运行 Latex 使用 XSLTML 2.1.2 创建的 tex 文件时出错
Error while running latex with a tex file created using XSLTML 2.1.2
我正在用下面的方式创建一个带有公式的 PDF
Mathml.xml > XSLTML 2.1.2 > pdflatex
那是我有一个带有 mathml 方程式的 xml 文件,我正在使用 XSLTML 2.1.2(XSLT 文件)从中创建一个 tex 文件,它给出了一个 .tex 文件的输出, tex 文件将用于通过将其编译为 pdflatex *.tex
来创建 PDF
但是在这样做的时候,出现了一个错误
我的数学文件:
<math xmlns="http://www.w3.org/1998/Math/MathML" alttext="math equation" display="inline" altimg-width="389" altimg-height="57" altimg="../images/altmath_10486.png">
<mtable columnalign="left left">
<mtr>
<mtd>
<mo>⤹</mo>
<mo>+</mo>
<mo>Σ</mo>
<msub>
<mi>M</mi>
<mrow>
<mi>C</mi>
</mrow>
</msub>
<mo>=</mo>
<mn>0</mn>
<mo>;</mo>
</mtd>
<mtd>
<mo>−</mo>
<msub>
<mi>M</mi>
<mrow>
<mi>C</mi>
</mrow>
</msub>
<mo>−</mo>
<mn mathvariant="normal">540</mn>
<mspace width="0.33em"/>
<mi mathvariant="normal">N</mi>
<mo mathvariant="normal">(</mo>
<mn mathvariant="normal">2</mn>
<mspace width="0.33em"/>
<mi mathvariant="normal">m</mi>
<mo mathvariant="normal">)</mo>
<mo mathvariant="normal">=</mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd/>
<mtd>
<msub>
<mi>M</mi>
<mrow>
<mi>C</mi>
</mrow>
</msub>
<mo>=</mo>
<mo>−</mo>
<mn mathvariant="normal">1080</mn>
<mspace width="0.33em"/>
<mi mathvariant="normal">N</mi>
<mo mathvariant="normal">⋅</mo>
<mi mathvariant="normal">m</mi>
<mspace width="35pt"/>
<mi mathsize="normal" mathcolor="#ef3f3e" mathvariant="sans-serif-italic">Ans.</mi>
</mtd>
</mtr>
</mtable>
我的德克萨斯州:
\documentclass[preview]{standalone}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\begin{document}
\fontsize{12}{14}\selectfont
\begin{equation*}
\begin{array}{ll}⤹+\Sigma {M}_{C}=0;& -{M}_{C}-\mathrm{540}\phantom{\rule{0.33em}{0ex}}\mathrm{N}\mathrm{\left(}\mathrm{2}\phantom{\rule{0.33em}{0ex}}\mathrm{m}\mathrm{\right)}\mathrm{=}0\ & {M}_{C}=-\mathrm{1080}\phantom{\rule{0.33em}{0ex}}\mathrm{N}\mathrm{\cdot }\mathrm{m}\phantom{\rule{35pt}{0ex}}\textcolor[rgb]{0.9372549019607843,0.24705882352941178,0.24313725490196078}{\mathsf{Ans.}}\end{array}
\end{equation*}
\end{document}
我是 MathML 和 Tex 的新手,所以有人为此提出了解决方案
谢谢
Pandoc 也读取 MathML(你可以假装它是一个 HTML 文件):
pandoc -f html -t latex Mathml.xml
如果安装了 LaTeX,甚至可以直接获取 PDF:
pandoc -f html Mathml.xml -o output.pdf
我正在用下面的方式创建一个带有公式的 PDF
Mathml.xml > XSLTML 2.1.2 > pdflatex
那是我有一个带有 mathml 方程式的 xml 文件,我正在使用 XSLTML 2.1.2(XSLT 文件)从中创建一个 tex 文件,它给出了一个 .tex 文件的输出, tex 文件将用于通过将其编译为 pdflatex *.tex
来创建 PDF但是在这样做的时候,出现了一个错误
我的数学文件:
<math xmlns="http://www.w3.org/1998/Math/MathML" alttext="math equation" display="inline" altimg-width="389" altimg-height="57" altimg="../images/altmath_10486.png">
<mtable columnalign="left left">
<mtr>
<mtd>
<mo>⤹</mo>
<mo>+</mo>
<mo>Σ</mo>
<msub>
<mi>M</mi>
<mrow>
<mi>C</mi>
</mrow>
</msub>
<mo>=</mo>
<mn>0</mn>
<mo>;</mo>
</mtd>
<mtd>
<mo>−</mo>
<msub>
<mi>M</mi>
<mrow>
<mi>C</mi>
</mrow>
</msub>
<mo>−</mo>
<mn mathvariant="normal">540</mn>
<mspace width="0.33em"/>
<mi mathvariant="normal">N</mi>
<mo mathvariant="normal">(</mo>
<mn mathvariant="normal">2</mn>
<mspace width="0.33em"/>
<mi mathvariant="normal">m</mi>
<mo mathvariant="normal">)</mo>
<mo mathvariant="normal">=</mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd/>
<mtd>
<msub>
<mi>M</mi>
<mrow>
<mi>C</mi>
</mrow>
</msub>
<mo>=</mo>
<mo>−</mo>
<mn mathvariant="normal">1080</mn>
<mspace width="0.33em"/>
<mi mathvariant="normal">N</mi>
<mo mathvariant="normal">⋅</mo>
<mi mathvariant="normal">m</mi>
<mspace width="35pt"/>
<mi mathsize="normal" mathcolor="#ef3f3e" mathvariant="sans-serif-italic">Ans.</mi>
</mtd>
</mtr>
</mtable>
我的德克萨斯州:
\documentclass[preview]{standalone}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\begin{document}
\fontsize{12}{14}\selectfont
\begin{equation*}
\begin{array}{ll}⤹+\Sigma {M}_{C}=0;& -{M}_{C}-\mathrm{540}\phantom{\rule{0.33em}{0ex}}\mathrm{N}\mathrm{\left(}\mathrm{2}\phantom{\rule{0.33em}{0ex}}\mathrm{m}\mathrm{\right)}\mathrm{=}0\ & {M}_{C}=-\mathrm{1080}\phantom{\rule{0.33em}{0ex}}\mathrm{N}\mathrm{\cdot }\mathrm{m}\phantom{\rule{35pt}{0ex}}\textcolor[rgb]{0.9372549019607843,0.24705882352941178,0.24313725490196078}{\mathsf{Ans.}}\end{array}
\end{equation*}
\end{document}
我是 MathML 和 Tex 的新手,所以有人为此提出了解决方案
谢谢
Pandoc 也读取 MathML(你可以假装它是一个 HTML 文件):
pandoc -f html -t latex Mathml.xml
如果安装了 LaTeX,甚至可以直接获取 PDF:
pandoc -f html Mathml.xml -o output.pdf