lwarp
lwarp copied to clipboard
Line indentation is inconsistent within the verse environment when \flagverse is used with text formatting
One common use case of the \flagverse
command of the verse
package is to print verse numbers. With LuaLaTeX, the following output is achieved in PDF (with \vleftskip
set to 0.5em, and the \flagverse
formatted with \textsuperscript
):
However, when compiled with lwarp
, the following appears (with \HTMLvleftskip
also set to 0.5em):
This should not happen. The "body text" of the verse lines should all align on the left on the same vertical line. I think this might be because lwarp translates the verse environment into a <pre>
environment in HTML, which preserves whitespace, and the HTML it generates looks like this:
As you can see, the <sup>
(and indeed things like italics and bold as well) gets ignored in the white-space counting, resulting in the inconsistent spacing. Is there a way for the HTML generated to not have this "hanging indentation"? I've included below a minimal working example.
=============================
\documentclass{book}
\usepackage{lwarp}
\usepackage{verse}
\setlength{\vleftskip}{0.5em}
\setlength{\HTMLvleftskip}{0.5em}
\begin{document}
\begin{verse}
A reading from the book of the prophet Isaiah.
\flagverse{\textit{1}} The word that Isaiah son of Amoz saw concerning\\
Judah and Jerusalem.
\flagverse{\textsuperscript{2}} In days to come\\
the mountain of the LORD's house\\
shall be established as the highest of the mountains,\\
and shall be raised above the hills;\\
all the nations shall stream to it.
\end{verse}
\end{document}