Sorry for the bad English. I'm trying to use the tikz-cd package to make commutative diagrams. My code
\documentclass{article}
\usepackage[brazil]{babel}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \ar[r, "x"] & B
\end{tikzcd}
\end{document}
The problem occurs when putting a name under the arrow, the syntax "x" is incompatible with the brazil option of the babel package. When exchanging brazil for english it works normally. I already tried using
\usepackage[main=brazil, english]{babel}, \usepackage[brazil, english]{babel} e \usepackage[brazil, main=english]{babel}
But it did not work. I also tried to use
\usepackage[english, brazil]{babel}
\usepackage{polyglossia}
\setmainlanguage{brazil}
\setotherlanguages{english}
And finally
\selectlanguage{english}
However, it only works if I remove the option brazil


Argument of \language@active@arg" has an extra }. [\end{tikzcd}] /main.tex :7 Paragraph ended before \language@active@arg" was complete. [\end{tikzcd}] /main.tex :7 Paragraph ended before \pgfkeys@addpath was complete. [\end{tikzcd}] /main.tex :7 Missing \endcsname inserted. [\end{tikzcd}] /main.tex :7 Paragraph ended before \pgfkeys@splitter was complete. [\end{tikzcd}] /main.tex :6 Package pgfkeys Error: I do not know the key '"x\par ' and I am going to ignore it. Perhaps you misspelled it. [I think the culprit is a tikzcd arrow in cell 1-1.]– Sebastiano Mar 16 '17 at 19:49\usetikzlibrary{babel}-- this should remove the error and compile – Mar 16 '17 at 20:18"shorthand frombrazillanguage, while the linked question asks for enabling it inenglish. – siracusa Dec 07 '18 at 05:23