I'm very new here even if I've used Stackexchange looking for answers a lot. For once I can't find the one I'm looking for so I have to ask it. I'm a bit afraid it is a very simple question but I've spent 2 days on it without finding the answer.
Let's say I've defined a new command \newcommand{\boldit}[1]{\textbf{#1}}
(I know this one is not really useful).
Now I'd like to build an environment out of it. But I have some problem with the braces:
\newenvironment{makeitbold}{%
\boldit{
}{%
}
}
I tried to replace some pair with either a pair of \bgroup \egroup
or \begingroup \endgroup
but it doesn't work.
I also tried to change the command using \long\def
instead of \newcommand
to be able to use some other delimiters (for instance I tried <>
as delimiters). It worked for the command itself but not for the environment.
To sum it up, I'd like to build an environment which passes its whole (or part of its) content to a command.
I hope I explained it well.