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
\documentclass[a4paper]{article}
\usepackage[german, ngerman]{babel}
\usepackage{ngerman} % I am the bad line\usepackage{pythontex}
\begin{document}
\begin{pycode}
print("y")
\end{pycode}
\end{document}
Running
xelatex mwe.tex
yields
! Argument of " has an extra }.
<inserted text>
\par
l.284 \StrSubstitute{\pytx@jobname}{"}{}
[\pytx@jobname]
removing the ngerman line makes it run again.
The text was updated successfully, but these errors were encountered:
I'd suggest trying to load pythontex before babel. I expect that ngerman is globally redefining " immediately (making it active, perhaps for umlaut), and this is interfering with pythontex using the " character in the preamble.
Should this not at least be mentioned in the documentation at some point where users can see it? Or maybe when loading pythontex the package could check for " being redefined and display a more helpful error message?
I can look into adding a note to the documentation, and at some point, I may be able to add a check for redefinitions of ASCII punctuation characters. The order of loading packages should really be discussed in language packages like ngerman, though, because any time a package globally redefines character or common macro meanings within the preamble, there is significant potential for issues, and such packages should always be loaded as late as possible.
Minimal working example
Running
yields
removing the
ngerman
line makes it run again.The text was updated successfully, but these errors were encountered: