Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xsim, babel and tikz; problem with quotation marks #107

Open
ghost opened this issue Sep 14, 2022 · 0 comments
Open

xsim, babel and tikz; problem with quotation marks #107

ghost opened this issue Sep 14, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 14, 2022

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants