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

Using within align environment #51

Closed
AviSteiner opened this issue Nov 27, 2020 · 2 comments
Closed

Using within align environment #51

AviSteiner opened this issue Nov 27, 2020 · 2 comments

Comments

@AviSteiner
Copy link

The code

\documentclass{article}
\usepackage{amsmath}
\usepackage{quiver}

\begin{document}

% https://q.uiver.app/?q=WzAsMixbMCwwLCJQIl0sWzEsMCwiUSJdLFswLDEsIlxcdmFycGhpIiwwLHsib2Zmc2V0IjotMX1dLFswLDEsIjAiLDIseyJvZmZzZXQiOjF9XV0=
\begin{align}
    \begin{tikzcd}
    	{P} & {Q}
    	\arrow["{\varphi}", from=1-1, to=1-2, shift left=1]
    	\arrow["{0}"', from=1-1, to=1-2, shift right=1]
    \end{tikzcd}
\end{align}

\end{document}

produces the error
image

When align is replaced by equation, this doesn't happen. Is this a problem with tikzcd or with quiver?

@varkor
Copy link
Owner

varkor commented Nov 27, 2020

& has a different meaning inside align, which is conflicting with the meaning inside tikzcd. You can use the ampersand replacement option to overwrite the tikz-cd symbol:

\begin{align}
    \begin{tikzcd}[ampersand replacement=\&]
    	{P} \& {Q}
    	\arrow["{\varphi}", from=1-1, to=1-2, shift left=1]
    	\arrow["{0}"', from=1-1, to=1-2, shift right=1]
    \end{tikzcd}
\end{align}

I'm not sure whether this is something I want to handle inside quiver directly, because I think this is a fairly uncommon use-case (as opposed to using equation, for instance), and when it is needed, one can perform the ampersand replacement manually.

If you disagree, let me know, and we can discuss a possible solution.

@varkor
Copy link
Owner

varkor commented Apr 13, 2021

I've opened an issue for ampersand replacement here: #51, because I think it would be a useful option.

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

2 participants