wrap LaTeX command in environment

后端 未结 5 2066
谎友^
谎友^ 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:45

    define command

    \newcommnad{eqn}{1}{\begin{equation}#1\end{equation}}
    

    will change

    \eqn{x^2=y}
    

    to

    \begin{equation}
      x^2=y
    \end{equation}
    

    I think

提交回复
热议问题