[tex4ht] Bizarre bug - \def\sp{...}

Hans Georg Schaathun georg+tex at schaathun.net
Tue Nov 1 14:10:01 CET 2016

I tried to define an \sp macro in LaTeX, to do something like this:
   \[ \sp\{x\} \]
   \[ x^2 \]
There is no problem with pdflatex, but evidently tex4ht uses \sp for
something special.  The first formula gives a parser error in firefox,
and the second is not the simple power that it should be.

Compilation command:
  htlatex test.tex "xhtml,mathml,charset=utf-8" " -cmozhtf -utf8" \
	  "-cvalidate" -shell-escape

It is not a big deal, since I am used to sometimes hitting macro names
which are used internally.  It just breaks the ambition that every
latex doc compiles with tex4ht and is perceived as the same content by
a human reader.

:-- Hans Georg

More information about the tex4ht mailing list