x-posting this back to debian-handbook-translators Am Samstag, dem 04.09.2021 um 13:37 +0900 schrieb Norbert Preining: > Well, dblatex produces incorrect LaTeX code, so nothing we can do about > this: The generated code is > \begin{lstcode}[escapeinside={<:}{:>}][scale=false,firstnumber=1,esca > peinside={<t>}{</t>},moredelim={**[is][\bfseries]{<b>}{</b>}},moredelim={**[i > s][\itshape]{<i>}{</i>}},] > > which is of the form > > \begin{lstcode}[opts][opts] > > which should be > > \begin{lstcode}[opts,opts] > > Manually changing this makes the file compile. Thanks for the explanation. dblatex produces the same for lstlisting, but that doesn't fail. It just generates a warning. So this is a genuine bug. After digging into the issue further, the problem is that /usr/lib/python3/dist-packages/dbtexmf/dblatex/rawverb.py adds the [escapeinside={<:}{:>}] sequence instead of adding it inside the existing options added by /usr/share/xml/docbook/stylesheet/dblatex/xsl/verbatim.xsl already. I think we need to fix the issue here by checking for existing options and adding the escapeinside option to them instead of adding another pair of brackets. Maybe we just need to fix the search pattern? Anybody with enough Python knowledge to write a patch? I'll have a look at it myself, but I'd prefer to keep updating the handbook if possible. Regards, Daniel -- Regards, Daniel Leidert <dleidert@debian.org> | https://www.wgdd.de/ GPG-Key RSA4096 / BEED4DED5544A4C03E283DC74BCD0567C296D05D GPG-Key ED25519 / BD3C132D8B3805D1808123AB7ACE00941E338C78 https://www.fiverr.com/dleidert https://www.patreon.com/join/dleidert
Attachment:
signature.asc
Description: This is a digitally signed message part