Problem with \newcommand{\es}{\end{split}}

45 views
Skip to first unread message

Dr. Salix

unread,
Mar 24, 2020, 12:11:59 PM3/24/20
to LaTeX Users Group
Hi. I have successfully defined the commands

\newcommand{\bes}{ \begin{equation} \begin{split} }
\newcommand{\bs}{ \begin{split} }

but when I try

\newcommand{ \ees }{ \end{split} \end{equation} }
\newcommand{ \es }{ \end{split} }

they do not work. Why is that? How can I fix it?
Thanks

Werner Grundlingh

unread,
Mar 24, 2020, 12:23:03 PM3/24/20
to LaTeX Users Group
You are facing the same issue as reported here:

The reason here is that the \end{split} construction needs to be explicitly visible for it to work. If you want it to work the way you expect with the shorthand notation, you'll need something like this:

\def\bes#1\ees{%
 
\begin{equation}
   
\begin{split}
     
#1
   
\end{split}
 
\end{equation}
}


and

\def\bs#1\es{%
 
\begin{split}
   
#1
 
\end{split}
}

Dr. Salix

unread,
Mar 24, 2020, 12:39:12 PM3/24/20
to LaTeX Users Group
Thanks, that works alright!
Reply all
Reply to author
Forward
0 new messages