LaTeXML
LaTeXML copied to clipboard
[feature request] package environ
https://ctan.org/pkg/environ
MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{environ}
\NewEnviron{as}{\begin{align}\begin{split}\BODY\end{split}\end{align}}
\begin{document}
\begin{as}
a & = 1\\
b & = 2
\end{as}
\end{document}
LaTeX output:
LaTeXML output:
<document xmlns="http://dlmf.nist.gov/LaTeXML">
<resource src="LaTeXML.css" type="text/css"/>
<resource src="ltx-article.css" type="text/css"/>
<para xml:id="p1">
<ERROR class="undefined">\NewEnviron</ERROR>
<p>as</p>
<equationgroup class="ltx_eqn_align" xml:id="S0.EGx1">
<equation xml:id="S0.E1">
<tags>
<tag>(1)</tag>
<tag role="refnum">1</tag>
</tags>
<MathFork>
<Math tex="\displaystyle\begin{split}\BODY\end{split}" text="[\BODY]" xml:id="S0.E1.m2">
<XMath>
<XMDual>
<XMRef idref="S0.E1.m1.1.mf"/>
<XMArray colsep="0pt" name="aligned">
<XMRow>
<XMCell align="right">
<ERROR class="undefined" xml:id="S0.E1.m1.1.mf">\BODY</ERROR>
</XMCell>
</XMRow>
</XMArray>
</XMDual>
</XMath>
</Math>
<MathBranch>
<td align="center" colspan="2"><Math mode="inline" tex="\displaystyle\begin{split}\BODY\end{split}" text="[\BODY]" xml:id="S0.E1.m1">
<XMath>
<XMDual>
<XMRef idref="S0.E1.m1.1"/>
<XMArray colsep="0pt" name="aligned">
<XMRow>
<XMCell align="right">
<ERROR class="undefined" xml:id="S0.E1.m1.1">\BODY</ERROR>
</XMCell>
</XMRow>
</XMArray>
</XMDual>
</XMath>
</Math></td>
</MathBranch>
</MathFork>
</equation>
</equationgroup>
<ERROR class="undefined">\NewEnviron</ERROR>
<p>as*</p>
<equationgroup class="ltx_eqn_align" xml:id="S0.EGx2">
<equation xml:id="S0.Ex1">
<MathFork>
<Math tex="\displaystyle\begin{split}\BODY\end{split}" text="[\BODY]" xml:id="S0.Ex1.m2">
<XMath>
<XMDual>
<XMRef idref="S0.Ex1.m1.1.mf"/>
<XMArray colsep="0pt" name="aligned">
<XMRow>
<XMCell align="right">
<ERROR class="undefined" xml:id="S0.Ex1.m1.1.mf">\BODY</ERROR>
</XMCell>
</XMRow>
</XMArray>
</XMDual>
</XMath>
</Math>
<MathBranch>
<td align="center" colspan="2"><Math mode="inline" tex="\displaystyle\begin{split}\BODY\end{split}" text="[\BODY]" xml:id="S0.Ex1.m1">
<XMath>
<XMDual>
<XMRef idref="S0.Ex1.m1.1"/>
<XMArray colsep="0pt" name="aligned">
<XMRow>
<XMCell align="right">
<ERROR class="undefined" xml:id="S0.Ex1.m1.1">\BODY</ERROR>
</XMCell>
</XMRow>
</XMArray>
</XMDual>
</XMath>
</Math></td>
</MathBranch>
</MathFork>
</equation>
</equationgroup>
<ERROR class="undefined">{as}</ERROR>
<p>a & = 1<break/>b = 2</p>
</para>
</document>