brucemiller / LaTeXML

LaTeXML: a TeX and LaTeX to XML/HTML/ePub/MathML translator.
http://dlmf.nist.gov/LaTeXML/
Other
915 stars 96 forks source link

html.sty.ltxml needs to redefine \begin #163

Closed dginev closed 14 years ago

dginev commented 14 years ago

[Originally Ticket 1487]

Your reimplementation of html.sty lacks the redefinition of \begin, which caused a really awkward Fatal error on our PlanetMath conversion. It was an interesting experience tracing it back to the style.

In html.sty we have:


%  This redefines  \begin  to allow for an optional argument
%  which is used by LaTeX2HTML to specify `style-sheet' information

\let\realLaTeX@begin=\begin
\renewcommand{\begin}[1][]{\realLaTeX@begin}

This horrendous treatment (LaTeX2HTML keeps its binding in the styles themselves, eh?) allows authors to do really weird things such as:

\begin[roman]{enumerate}
\item $\mu_c$ is ...
\end{enumerate}

On the LaTeXML side, we probably want to simply ignore this optional argument, at least for the moment. However, we really need the redefinition, otherwise we get tons of Fatals for no good reason. It should be a 10 second fix.

Thanks!

brucemiller commented 14 years ago

Although the fix is probably easy, it's always easier when there's a handy test case. I assume you're not seeing this in arXiv; Is the planet math stuff accessible somehow?

dginev commented 14 years ago

The PlanetMath corpus is also hosted on our SVN and I am currently trying to improve our coverage there.

The PlanetMath svn is here

Three examples that have this Fatal:

I will keep updating you with other interesting deficiencies that come to light from that corpus. I have asked Michael to make the SVN world-readable, so try reading it again tomorrow, in case you don't have permissions right now. I am attaching one of the sources, so that you don't feel idle :>

dginev commented 14 years ago

As a side note, with the few tickets you fixed in the last days, we improved from the original 75% coverage to 94% error-free conversion and 97% successful to XHTML. So PlanetMath is turning out quite nice.

The two tough nuts remaining are xypic (3% of the errors) and pstricks (another 3%). Their total number of sources is about 8400.

brucemiller commented 14 years ago

Good news on planet math, then! Cool!

No, I can't get access to those links. I put in the name/pw pair that I thought was right, but now I got forbidden; don't know if my pw is wrong, or if I just don't have access to that repo.

dginev commented 14 years ago

@Bruce: You should have access to the SVN now.

brucemiller commented 14 years ago

Blech! what a thing to do... Anyway, should be fixed now. Thanks for the report.