3

I would like to get HTML + MathML with LaTeX equation in the alt attribute.

htlatex filename.tex "xhtml,mathml,charset=utf-8" ' -cunihtf'

My LaTeX MWE is:

\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}

Converted HTML file:

<?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 Answer 1

0

Using LaTeXML we can get LaTeX Equations and MathML Equations.

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .