bdtc / lwarp

The LaTeX lwarp package — Convert LaTeX to HTML.
https://ctan.org/pkg/lwarp
29 stars 0 forks source link

Escaped space at end of line produces literal CR in HTML output #20

Closed alexrwatson closed 4 months ago

alexrwatson commented 5 months ago

Consider the following test case:

\documentclass{article}

\usepackage{lwarp}

\begin{document}

$a \ 
b$

\end{document}

(Note that after the "$a" there is a "\".)

When compiled with lualatex, this correctly produces a document with a single line containing the math expression "a b", with space between them.

When compiled with lwarpmk, this produces the following error:

Missing character: There is no ^M (U+000D) in font [lmmono8-regular]:!

(Incidentally, the ^M is a literal CR and mangles the console output.) An HTML file is output which contains \^M (again literal CR) in a math expression.

Under normal circumstances the document continues to compile and HTML output is produced, so this is easily spotted, but in a beamer slide it breaks the document entirely.

bdtc commented 5 months ago

Fixed in the upcoming release.

(Insterestingly, XeLaTeX and pdfLaTeX both print ^M in the error message, instead of mangling the output with the literal carriage return.)

bdtc commented 4 months ago

Fixed in v0.916.