[tex4ht] split environment and exerquiz package

Tomas Davidek Tomas.Davidek at cern.ch
Thu Jan 7 22:34:16 CET 2021


Hello,

    I made several tests with tex4ht. The tool nicely converts most of 
the objects/environments, but I noticed two problems:

1. split environment

I use that for typesetting long formulas, for instance

This is my very long formula

\begin{displaymath}
    \begin{split}
       \tau(\eta^0) & = \frac{\hbar}{\Gamma(\eta^0)} =
       \frac{\hbar c}{c \Gamma(\eta^0)} =
       \frac{0{,}197~\gev\cdot\mathrm{fm}}{3\cdot
         10^{8}~\mathrm{m}\cdot\mathrm{s}^{-1}\times 1{,}30~\mathrm{keV}}
         = \\
       & = \frac{0{,}197\cdot 10^{-15}~\gev\cdot\mathrm{m}}{3\cdot
         10^{8}~\mathrm{m}\cdot\mathrm{s}^{-1}\times 1{,}30\cdot
         10^{-6}~\mathrm{GeV} = % \nonumber\\
       0{,}0505\cdot 10^{-17}~\mathrm{s} = 5{,}05\cdot
       10^{-19}~\mathrm{s} % \nonumber
     \end{split}
\end{displaymath}

This works perfectly in pdflatex, but when running htlatex, I get the 
following error message:

=======

! Package amsmath Error: \begin{split} won't work here.

See the amsmath package documentation for explanation.
Type  H <return>  for immediate help.
  ...

l.79       \end{split}

?
! Emergency stop.
  ...

l.79       \end{split}

============

Can someone please help me in figuring out what's wrong and how to avoid 
that?

2. I am using exerquiz package of AcroTeX education bundle 
(https://ctan.org/pkg/acrotex) which easily allows to typeset individual 
exercises and display/hide solutions. Unfortunately, it does not seem to 
work with tex4ht, when running htlatex, there is a conflict with one of 
the include file (epdfmark.def, part of this CTAN package)

====================

) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/htex4ht.def) 
(./insdljs.sty
) (./eforms.sty (./epdfmark.def))

exerquiz: * Using dvipsone/dvips option *


! LaTeX Error: Command \theHquizno undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
  ...

l.297 \renewcommand\theHquizno
{\curr at quiz.\theeqquestionnoi.\alph{quizno}}
?
! Emergency stop.
  ...

l.297 \renewcommand\theHquizno
{\curr at quiz.\theeqquestionnoi.\alph{quizno}}
==========


I understand that processing some environments that are not part of 
standard TeXLive distribution might be problematic. Nevertheless, is 
there a way to tell htlatex to e.g. to deal with them as images? Or any 
other way?


Thanks a lot for any hint

best regards,

Tomas



More information about the tex4ht mailing list.