[tex4ht] \usepackage{niceverb} conflicts with tex4ht

Nasser M. Abbasi nma at 12000.org
Mon Jan 15 19:48:54 CET 2018

I found another strange problem that only shows in

I was trying the solution posted to my question here


I found that the solution does not work in tex4ht when
I used my .cfg file.

After lots of trial and error I found the problem and made
a very small MWE to show it.

Here it is. It comes down to only just including
\usepackage{niceverb} and nothing else, would generate
an error if there exist any comment inside my .cfg
which uses ' inside the comment, or if there is
an blank line after \begin{document} in my .cfg file !!


When compiling the above using
     make4ht foo.tex  ==> OK
But using
     make4ht  -c ./nma.cfg foo.tex  ==> error

! Argument of \do_rq_sansserif has an extra }.
<inserted text>
l.7 }}

It turned out this is due to using a ' inside \Css line
as a comment, inside the .cfg. Here is the nma.cfg

------ not OK ----------

\Css{ol  {
   margin: 0px 2px 0 0; /* that's */

Removing the ' in the comment remove the error, Like this


\Css{ol  {
   margin: 0px 2px 0 0; /* thats */

Not only that, to remove the error another way, is
to remove the _blank_ line after the
\begin{document} in the .cfg file, like this

\Css{ol  {
   margin: 0px 2px 0 0; /* that's */

These errors only show up when using niceverb package.

So I am now cleaning my .cfg file and removing
all the ' from _comments_ inside it to make tex4ht happy.

Any idea why this happens?

texlive 2017 on linux.


More information about the tex4ht mailing list