[tex4ht] tex4ht options, figure placement and exerquiz

Michal Hoftich michal.h21 at gmail.com
Sun Jan 10 23:18:30 CET 2021


Hi Tomáš,

>1. I wanted to experiment with various tex4ht options. I only found 
>those listed in http://cvr.cc/?p=504. This list seems pretty old, can 
>you point me to more up-to-date list of options, ideally more 
>descriptive? For instance, I am looking for an option splitting the 
>document into individual pages according to sections, so I tried e.g.  
>make4ht -c split.cfg -u filename.tex "1", but no change wrt the default 
>behaviour.

The updated version is here: 
https://www.kodymirus.cz/tex4ht-doc/texfourhtOptions.html

It contains some new options, but I think the descriptions for the old 
ones are mostly the same. 

Regarding spliting into indivitual pages, you should try "2" or "3" 
options instead. Option 1 splits pages only on \part commands, "2" on 
\chapter, "3" on \section etc.


>
>2. a detail regarding the figure placement. The LaTeX code
>
>\begin{figure}
>  \centering
>\includegraphics[width=0.49\linewidth]{figures/kinematika/k0long_lips.eps}
>\includegraphics[width=0.49\linewidth]{figures/kinematika/dplus_lips.eps}
>  \caption{The figure caption....}
>  \label{fig:invariant_mass_distrib_example}
>\end{figure}
>
>normally results in two plots side-by-side, but in HTML the pictures 
>are organized one on top of the other. Is there a way to restore the 
>original behaviour?
>

You can try this configuration file:

\Preamble{xhtml}
\Css{figure.figure img { display: inline; }}
\begin{document}
\EndPreamble

The important is the \Css command. 

>3. The environment exerquiz is correctly translated into HTML, with 
>only one problem. The environment features an optional parameter [h] 
>or [H], which controls whether the solution is printed or not. There 
>are two issues -
>
>a) the optional argument is not taken into account
>
>b) the argument is printed in the HTML page
>
>At this stage, I don't worry too much about a), but worry a bit about 
>b). Well, of course I can strip this argument from the original LaTeX 
>file by a parser, I am just wondering whether this can be easily 
>achieved at the level of exerquiz.4ht ?

I can see that there is support TeX4ht file for exerquiz package, but it 
is pretty old and contains some obsolete HTML elements and JS. So it 
will definitelly need an update. I must figure how to install exerquiz, 
because it isn't included in TeX Live.

Can you please send a full TeX file that use exerquiz that I can use for 
testing?

Best regards,
Michal


More information about the tex4ht mailing list.