2010-09-18 104 views
1

我試圖用\ newenvironment製作自己的環境。乳膠:在使用 newenvironment時訪問環境的內容

是否有可能訪問環境的「主體」?

例如,如果用戶使用

\begin{myenv} 
    i'm the content 
\end{myenv} 

我要分析的「我的內容」,在環境的定義。

由於提前,

揚奧利弗Oelerich

+0

你打算如何「分析」它? – banx 2010-09-18 09:49:24

+0

想要輸入&,以自動創建一個\ begin {表格} {cccc ... c},並輸入正確數量的c。 – janoliver 2010-09-18 09:56:21

回答

2

使用包 'ENVIRON'。

\NewEnviron{myenv}{\colorbox[gray]{0.7}{\BODY}} 

其中\BODY是你的 「身體」。