mathml 与 htlatex 中的实际 latex 编码

mathml 与 htlatex 中的实际 latex 编码

我想获得HTML + MathMLLaTeX equation属性alt

htlatex 文件名.tex "xhtml,mathml,charset=utf-8" ' -cunihtf'

我的 LaTeX MWE 是:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
The general form of the truth-function is: $[\overline{p}, \overline{\xi}, N (\overline{\xi})]$.

\begin{equation*}
\mathcal{L} = p_{0}, p_{1}, p_{2}, \ldots 
\end{equation*}
\end{document}

转换后的 HTML 文件:

<?xml version="1.0" encoding="utf-8" ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" 
"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" > 
<html xmlns="http://www.w3.org/1999/xhtml"  
> 
<head><title></title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> 
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)" /> 
<!-- xhtml,mathml,charset=utf-8,html --> 
<meta name="src" content="stack.tex" /> 
<meta name="date" content="2015-11-17 15:12:00" /> 
<link rel="stylesheet" type="text/css" href="stack.css" /> 
</head><body 
>
<!--l. 4--><p class="noindent" >The general form of the truth-function is:
<!--l. 4--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="inline" ><mrow ><mo 
class="MathClass-open">[</mo><mrow><mover accent="false" 
class="mml-overline"><mrow><mi 
>p</mi></mrow><mo 
accent="true">ϼ/mo></mover><mo 
class="MathClass-punc">,</mo><mover accent="false" 
class="mml-overline"><mrow><mi 
>&#x03BE;</mi></mrow><mo 
accent="true">ϼ/mo></mover><mo 
class="MathClass-punc">,</mo><mi 
>N</mi><mrow ><mo 
class="MathClass-open">(</mo><mrow><mover accent="false" 
class="mml-overline"><mrow><mi 
>&#x03BE;</mi></mrow><mo 
accent="true">ϼ/mo></mover></mrow><mo 
class="MathClass-close">)</mo></mrow></mrow><mo 
class="MathClass-close">]</mo></mrow></math>.
</p>
   <table class="equation-star"><tr><td>
<!--l. 6--><math 
 xmlns="http://www.w3.org/1998/Math/MathML"  
display="block" class="equation">
                          <mi 
mathvariant="bold-script"><img 
src="cmsy10-4c.png" alt="L" class="10x-x-4c" /></mi> <mo 
class="MathClass-rel">=</mo> <msub><mrow 
><mi 
>p</mi></mrow><mrow 
><mn>0</mn></mrow></msub 
><mo 
class="MathClass-punc">,</mo><msub><mrow 
><mi 
>p</mi></mrow><mrow 
><mn>1</mn></mrow></msub 
><mo 
class="MathClass-punc">,</mo><msub><mrow 
><mi 
>p</mi></mrow><mrow 
><mn>2</mn></mrow></msub 
><mo 
class="MathClass-punc">,</mo><mo 
class="MathClass-op">&#x2026;</mo>
</math></td></tr></table>

</body></html> 

答案1

利用LaTeXML我们可以得到LaTeX EquationsMathML方程。

1)latexml --inputencoding=utf-8 --destination=outputfilename.xml inputfilename.tex

2)latexmlpost --format=xhtml --destination=outputfilename.xhtml inputfilename.xml

相关内容