[tex4ht] [bug #617] The fancyvrb LaTeX package produces blank lines with the `\VerbatimInput` command
VítStarýNovotný
puszcza-hackers at gnu.org.ua
Mon Dec 11 17:36:17 CET 2023
URL:
<http://puszcza.gnu.org.ua/bugs/?617>
Summary: The fancyvrb LaTeX package produces blank lines with
the `\VerbatimInput` command
Project: tex4ht
Submitted by: witiko
Submitted on: Mon Dec 11 16:36:17 2023
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
I am having an issue with undesirable double-spacing with the `fancyvrb` LaTeX
package and the TeX4ht typesetting system. Below, I outline the steps to
reproduce the problem and show the expected and actual outcome.
### Steps to reproduce
I create the following LaTeX document in a file named `example-01.tex`:
```
\documentclass{article}
\usepackage{fancyvrb}
\usepackage{hyperref}
\begin{document}
\begin{Verbatim}
foo
bar
baz
\end{Verbatim}
\end{document}
```
I also create the following LaTeX document in a file named `example-02.tex`:
```
\documentclass{article}
\begin{filecontents}[overwrite, nosearch, noheader]{example.foo}
foo
bar
baz
\end{filecontents}
\usepackage{fancyvrb}
\usepackage{hyperref}
\begin{document}
\VerbatimInput{example.foo}
\end{document}
```
Then, I typeset both documents in TeX4ht using the `make4ht example-01.tex`
and `make4ht example-02.tex` commands.
### Expected outcome
Identical HTML documents in files `example-01.html` and `example-02.html` are
produced and contain a code block with three lines of code.
### Actual outcome
Whereas the HTML document `example-01.html` contains a code block with three
lines of code, the code block in the HTML document `example-02.html` contains
an extra blank line after every line of code from the original LaTeX document
and totals six lines of code.
To show the difference between the two documents, here is the output of the
unix command `diff example-01.html example-02.html`:
```
7,8c7,8
< <link href='example-01.css' rel='stylesheet' type='text/css' />
< <meta content='example-01.tex' name='src' />
---
> <link href='example-02.css' rel='stylesheet' type='text/css' />
> <meta content='example-02.tex' name='src' />
10,12c10,16
< <pre class='fancyvrb' id='fancyvrb1'><a id='x1-3r1'></a><span
class='cmtt-10'>foo</span>
< <a id='x1-5r2'></a><span class='cmtt-10'>bar</span>
< <a id='x1-7r3'></a><span class='cmtt-10'>baz</span></pre>
---
> <pre class='fancyvrb' id='fancyvrb1'>
> <a id='x1-3r1'></a><span class='cmtt-10'>foo</span>
>
> <a id='x1-5r2'></a><span class='cmtt-10'>bar</span>
>
> <a id='x1-7r3'></a><span class='cmtt-10'>baz</span>
> </pre>
```
### Discussion
It seems that the issue stems from the lack of support for the
`\VerbatimInput` command in TeX4ht. However, the `\VerbatimCommand` is used to
input verbatim text in the LaTeX definitions of the Markdown package for TeX
and cannot be easily substituted with the `Verbatim` environment. A fix or a
workaround would be appreciated.
_______________________________________________________
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.