You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I eventually figured out that it's actually a bug in listings.sty.ltxml. The \\' on the previous line gets misinterpreted and doesn't close the quote. Because the next two lines supposedly begin inside a quotation, spaces are represented incorrectly. This can be seen in the following:
and an output of confused ’\\’␣␣quotes;’ both times. The latter two spaces become open boxes because latexml thinks we're still inside the quote, and then needs to add a third quote at the end of the line to make sure to close it.
It turns out that removing [language=Perl] from either command causes the spaces to render correctly. I think this is because without a language, there is nothing to say that strings should be formatted differently.
Unfortunately, digging into listings.sty.ltxml is beyond my current capabilities. If someone else is able to, great. If we can't track down where this is coming from, then would we want to at least paper over the bug showing up in the manual by switching the last two examples? That would put the misparsed quote at the end, so that no spaces come after.
The text was updated successfully, but these errors were encountered:
Thanks for the enthusiasm to contribute back to LaTeXML @teepeemm ! Sounds like this may be an issue with either the Perl language definition for listings, or LaTeXML's interpretation of it. Possibly something for Bruce to look into if no one beats him to it.
Awesome! I'd been bothered by that, but hadn't traced it back to the backslashes! Turns out I need to recognized backslashed backslashes so they don't quote the next thing in line! Thanks much for pointing to the fix (and yeah, the listings binding is pretty obscure)
I wanted to roll up my sleeves and attempt a contribution. I thought an easy first step would be the odd formatting in the trivial examples at http://dlmf.nist.gov/LaTeXML/manual/customization/customization.latexml.html#SS3. Surely it would just be a misplaced space.
I eventually figured out that it's actually a bug in listings.sty.ltxml. The
\\'
on the previous line gets misinterpreted and doesn't close the quote. Because the next two lines supposedly begin inside a quotation, spaces are represented incorrectly. This can be seen in the following:which results in an xml snippet of
and an output of
confused ’\\’␣␣quotes;’
both times. The latter two spaces become open boxes because latexml thinks we're still inside the quote, and then needs to add a third quote at the end of the line to make sure to close it.It turns out that removing
[language=Perl]
from either command causes the spaces to render correctly. I think this is because without a language, there is nothing to say that strings should be formatted differently.Unfortunately, digging into listings.sty.ltxml is beyond my current capabilities. If someone else is able to, great. If we can't track down where this is coming from, then would we want to at least paper over the bug showing up in the manual by switching the last two examples? That would put the misparsed quote at the end, so that no spaces come after.
The text was updated successfully, but these errors were encountered: