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
Greetings! I'm trying to write a simple commutative diagram but I can't do it inside the exercise environment (the combination of the exercise environment with the babel package, tikz package and quotation marks doesn't work).
Despite having tried everythting, I could only narrow down the problem. Could you help me with the last step of the puzzle?
PS: I leave a minimal example below of what worked and didn't work. Thank you for your help!
\documentclass{article}
\usepackage{xsim}
\usepackage{tikz-cd}
\usepackage[portuguese]{babel}
\usetikzlibrary{babel}
\begin{document}
%Outside exercise environment, it works with quotation marks:
$\begin{tikzcd}
A \arrow[r, "f"] & B
\end{tikzcd}$
%Without quotation marks, it works inside exercise environment (with ampersand replacement):
\begin{exercise}
$\begin{tikzcd}[ampersand replacement=\&]
A \arrow[r] \& B
\end{tikzcd}$
\end{exercise}
%With quotation marks, it doesn't work inside exercise environment
\begin{exercise}
$\begin{tikzcd}[ampersand replacement=\&]
A \arrow[r, "f"] \& B
\end{tikzcd}$
\end{exercise}
\end{document}
The text was updated successfully, but these errors were encountered:
Greetings! I'm trying to write a simple commutative diagram but I can't do it inside the exercise environment (the combination of the exercise environment with the babel package, tikz package and quotation marks doesn't work).
Despite having tried everythting, I could only narrow down the problem. Could you help me with the last step of the puzzle?
PS: I leave a minimal example below of what worked and didn't work. Thank you for your help!
The text was updated successfully, but these errors were encountered: