[tex4ht] exerquiz problems

Tomas Davidek Tomas.Davidek at cern.ch
Mon Jan 18 16:00:07 CET 2021

Thanks a lot, Michal. I applied your correction to exerquiz.4ht in my 
system. It works well, but when adding more text to my document, I am 
getting the error messages like

[ipnp-n19] ~/tex/cestina.tex4ht > make4ht -c split.cfg -u exerquiz_exx.tex
[STATUS]  make4ht: Conversion started
[STATUS]  make4ht: Input file: exerquiz_exx.tex
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ./exerquiz_exx.tex   204      Extra \endcsname.
[ERROR]   htlatex: 
/usr/share/texlive/texmf-dist/tex/generic/tex4ht/tex4ht.sty ?        
Extra \endcsname.
[ERROR]   htlatex: ./exerquiz_exx.xref  204      Missing \endcsname 
[ERROR]   htlatex: ?    204      Missing \endcsname inserted.
[ERROR]   htlatex: ?    204      Missing \endcsname inserted.
[ERROR]   htlatex: ?    204      Extra \endcsname.
[ERROR]   htlatex: ?    204      Extra \endcsname.
[ERROR]   htlatex: ?    204      LaTeX Error: Missing \begin{document} 
in `split.cfg'.
[ERROR]   htlatex: ?    1182     Missing \endcsname inserted.
[ERROR]   htlatex: ?    1182     You can't use `\relax' after \the.
[ERROR]   htlatex: Compilation errors in the htlatex run

Well, the error message suggests there might be a problem in the 
configuration file (split.cfg), but - when getting rid of the exerquiz 
environment, the error message disappears. It's strange, maybe there is 
some interference between the align and example environments?? I don't know.

Attached is a tarball containing all files needed for running the 
example. The examples are two - one with the exercise environment 
heavily used (exerquiz_exx.tex) and another without using this 
environment (exerquiz_ex.tex, this one runs ok).

I should also note that - even when getting the error messages - the 
resulting HTML page looks reasonably, but when adding more chapters, the 
code crashes. So apparently one should avoid these error messages for 
large documents....

Maybe the problem can be fixed by an improvement in the configuration 
file split.cfg??

Thanks a lot,


On 1/13/21 10:02 PM, Michal Hoftich wrote:
> Dear Tomáš,
>> I suspected that the problem is  due to exerquiz package.  
>> Unfortunately yes, the problem can be removed by commenting out _all_ 
>> exerquiz stuff, then all error messages disappear.
>> I am afraid that exerquiz.4ht filter is old (as Michal already 
>> pointed out) and needs to be updated. I have no idea how difficult it 
>> is, please can someone have a look?
>> Attached is a tarball containing the LaTeX source file used for these 
>> tests, the configuration file and all files required by the exerquiz 
>> package.
> Thanks for the sample file. It seems that the TeX4ht support file for 
> exerquiz is really old (it says 1999 in the literate sources!) and it 
> patches commands that are no longer part of this package.
> I've found that it is better to remove all redefinitions from this 
> file. After that, there is only one problematic command. This command 
> outputs some postscript code at each chapter. It isn't really useful 
> with Tex4ht, so we can redefine it to do nothing. I can compile your 
> file without errors after this change.
> I am not sure if the output looks good, especially the stuff that uses 
> exerquiz macros. I will try to look into this in the future. I am busy 
> with some work stuff at the moment unfortunately :/
> Best regards,
> Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: two_ex.tgz
Type: application/x-gtar-compressed
Size: 128275 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex4ht/attachments/20210118/17726139/attachment-0001.bin>

More information about the tex4ht mailing list.