Closed tobiasBora closed 1 year ago
I haven't tried, but my bet is you get the same issue without beamer:
\documentclass{article}
\usepackage[french]{babel}
\usepackage{tikz}
\usetikzlibrary{babel}
\NewDocumentEnvironment{mytest}{+b}{#1}{}
\begin{document}
\begin{mytest}
\begin{tikzpicture}
\node[label={45:mylabel},fill=green]{AAA};
\end{tikzpicture}
\end{mytest}
\end{document}
It won't work because when mytest
grabs the contents of the environment, it will tokenize :
as the french-babel active colon, rather than a regular catcode-12 colon. It should work if you do (mytest
inside tikzpicture
):
\begin{tikzpicture}
\begin{mytest}
\node[label={45:mylabel},fill=green]{AAA};
\end{mytest}
\end{tikzpicture}
or if you use a different way to grab the environment (which will depend on what exactly you are trying to do).
In any case, this is expected behaviour.
Ok thanks. I asked for solutions here and they provided nice alternatives.
I can’t use the label syntax
label={45:my text}
to put a label at 45 degrees when beamer + babel french are enabled. I tried various stuff like[fragile]
,\usetikzlibrary{babel}
or\AtBeginEnvironment{tikzpicture}{\shorthandoff{;}\shorthandoff{:}}
, none of them work:I have
instead of ![enter image description here](https://i.stack.imgur.com/jVEEX.png)