I'm using the following syntax a lot for defining variable substitutions in my calculations:
\left [ \begin{array}{rcl}
t &=& \sqrt{x+5}\\
x &=& t^2 - 5\\
dx &=& 2tdt\\
\end{array} \right ]
It looks (almost!) exactly the way I want, but it is a lot of garbage to write everytime I'm making a substitution. How can I create new Latex syntax so that instead of the above, I would instead write:
\begin{vars}
t &=& \sqrt{x+5}\\
x &=& t^2 - 5\\
dx &=& 2tdt
\end{vars}
And it would render to the same? Even better would be if I could write something like:
\defvars{t, {\sqrt{x+5}}{x, {t^2 - 5}}{dx, {2tdt}}
Best Answer
Here's an idea using
etoolbox
's\docsvlist
: