Closed The-Compiler closed 2 years ago
It can be both. the package could have an option to convert it to strings or you change your input to a backslash with catcode 12. I tagged it as enhancement because it's a feature to add this option.
Maybe I was not clear enough, this exects a bit background knowledge of LaTeX.
To workaround this you can generate a char using the charcode of the backslash and category code „other“.
\documentclass{standalone}
\usepackage[ngerman]{babel}
\usepackage{qrbill}
\ExplSyntaxOn
\newcommand*{\tokenBS}{\char_generate:nn {92} {12}}
\ExplSyntaxOff
\begin{document}
\QRbill[
creditor*={foo\tokenBS bar LLC\\
Postfach \\
404\\
2342\\
Zurich\\
CH},
Account=CH1280808005649899718,
]
\end{document}
Note: On recent TeX installations ngerman is no longer required - though you might prefer swissgerman to avoit “ß” anyway. The default for german
now is the same as former ngerman
To workaround this you can generate a char using the charcode of the backslash and category code „other“.
Ah, perfect, thanks! That does indeed work fine. Don't mind a workaround since I generate the .tex from Python anyways.
I was playing around with \catcode
to redefine \
, but couldn't get it to work.
Note: On recent TeX installations ngerman is no longer required - though you might prefer swissgerman to avoit “ß” anyway. The default for
german
now is the same as formerngerman
That was copied from the doc example. I opened #14 to update it.
I added an option which will use all input data to be parsed as string. This resolves this issue as well.
In case you want to mix up special characters and real LaTeX code you have to escape it manually of course.
One of my customers has a backslash in their company name (yes, they're IT related; yes, they did it for fun; no, I don't find it very funny either).
Unfortunately, something like:
leads to:
Is there a way I can escape it to make this work? If not, is this something that can be fixed, or an issue with the qrcode package?