[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
tex4ht.

I was trying the solution posted to my question here

https://tex.stackexchange.com/questions/410434/is-there-upquote-like-package-for-main-text-and-not-just-verbatim-text

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 !!

---------------------
\documentclass{article}
\usepackage{niceverb}
\begin{document}
test
\end{document}
--------------------

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

(/usr/local/texlive/2017/texmf-dist/tex/generic/tex4ht/html4.4ht)
(/usr/local/texlive/2017/texmf-dist/tex/generic/tex4ht/html4-math.4ht))
(./foo.aux)
! Argument of \do_rq_sansserif has an extra }.
<inserted text>
                 \par
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 ----------
\Preamble{xhtml}
\begin{document}

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

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

---------OK------------
\Preamble{xhtml}
\begin{document}

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

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

---------OK-------------
\Preamble{xhtml}
\begin{document}
\Css{ol  {
   margin: 0px 2px 0 0; /* that's */
}}
\EndPreamble
------------------

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.

Thanks
--Nasser











More information about the tex4ht mailing list