MathHubInfo / Legacy-planetary

Legacy: Planetary System is a math-enabled Web 3.0 information portal.
http://trac.mathweb.org/planetary/
79 stars 25 forks source link

math inside text mode inside math mode #440

Open rspuzio opened 10 years ago

rspuzio commented 10 years ago

If one types something like "[ a=b \text{ if $c=d$} ]" into LaTeX, one gets something like "a=b if c=d" as output. However, in Planetary/LaTeXML, one instead gets something like "a=b if". This is causing the entry

http://planetmath.org/mobiusfunction

to no longer render properly.

dginev commented 10 years ago

If you paste the source of that piecewise sum:

\[
\sum_{d | n} \mu(d) = 
\begin{cases}
1 & \text{if $n = 1$}\\
0 & \text{if $n > 1$}
\end{cases}
\]

into http://latexml.mathweb.org/editor, things look as they should. Next, I checked the actual MathML in the page you linked to and there are a few irregularities with it (there shouldn't be HTML entity encoding going inside the annotation elements. The way things are now, the TeX source looks garbled). My suspicion is that the error here is rooted in the way PlanetMath send data to LaTeXML OR has been fixed in one of the newer revisions of LaTeXML.