[tex4ht] [bug #617] The fancyvrb LaTeX package produces blank lines with the `\VerbatimInput` command

Michal Hoftich puszcza-hackers at gnu.org.ua
Mon Dec 11 22:48:03 CET 2023


Follow-up Comment #1, bug #617 (project tex4ht):

Hi Vítek, 

thanks for the report. I am pretty sure that \VerbatimInput worked in the
past, as I used it occasionally. I cannot find the place where spurious
newlines come from, so we need to use a work around - insert special TeX4ht
instructions to ignore characters and space. You can try this configuration
file:

\Preamble{xhtml}
\catcode`\:=11
\Configure{fancyvrb}
   {\IgnorePar \EndP \gHAdvance\fancyvrbNo by 1
    \gHAssign\fancyvrb:cnt0
    \HCode{<pre class="fancyvrb"
id="fancyvrb\fancyvrbNo">}\ht:special{t4ht@[}}
   {x\EndP\ht:special{t4ht@]}\HCode{</pre>}}
   {\ht:special{t4ht@]}\gHAdvance\fancyvrb:cnt by 1
    \ifnum \fancyvrb:cnt>1
    \HCode{\Hnewline}\fi} {}
   {}{\ht:special{t4ht@[}}
\catcode`\:=12
\begin{document}
\EndPreamble


It seems to work for both Verbatim environment and \VerbatimInput. If it works
for you too, I will update TeX4ht sources.

    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?617>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



More information about the tex4ht mailing list.