wrap LaTeX command in environment

后端 未结 5 1987
谎友^
谎友^ 2021-02-05 06:22

How can I wrap a LaTeX command in an environment? In essence, how can I turn \\somecommand{contents} into \\begin{somecommand} contents \\end{somecommand}? I have tried the obvi

5条回答
  •  别那么骄傲
    2021-02-05 06:40

    A Simpler way could be:

    \newenvironment{somecommand}[0]{ \somecommand\bgroup } { \egroup }

    Explanation: \bgroup works like { and \egroup works like }.

提交回复
热议问题