views:

24

answers:

1

Hey guys,

I'm trying to make my own environment with \newenvironment.

Is it somehow possible to access the "body" of the environment?

For example if the user uses

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

i want to analyze the "i'm the content" in the definition of the environment.

Thanks in advance,

Jan Oliver Oelerich

+1  A: 

Use package 'environ'.

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

where \BODY is a your "body".

Alexey Malistov