I'm trying to make an environment that does the follows:
\newcommand\foo[1]{does something with #1}
\newenvironment{bar}{\foo \someStartFunction}{\someEndFunction}
such that
\begin{bar}
some text
\end{bar}
expands to
\foo{some text}
My first instinct would be to place brackets { and } inside the newenvironment, but this will of course go wrong. Is there any easy way to do this; is there some kind of \someStartFunction ... \someEndFunction?
environpackage. – egreg May 26 '17 at 21:17