Estoy usando Quiver y tengo problemas para hacer diagramas con flechas curvas. Por ejemplo, me propone poner este es mi documento:
\begin{tikzcd}[ampersand replacement=\&,column sep=2.25em]
A \& B
\arrow[curve={height=-12pt}, from=1-1, to=1-2]
\end{tikzcd}
pero no se compila. TexMaker me dice: Error de paquete tikz: + o - esperado y el uso de \tikz@curveCdot no coincide con su definición.
Utilizo ambos tikz
y tikz-cd
en mi preámbulo.
MWE:
\documentclass{article}
\usepackage[french,english]{babel}
\usepackage{tikz-cd}
\usetikzlibrary{calc}
% A TikZ style for curved arrows of a fixed height, due to AndréC.
\tikzset{curve/.style={settings={#1},to path={(\tikztostart)
.. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
.. (\tikztotarget)\tikztonodes}},
settings/.code={\tikzset{quiver/.cd,#1}
\def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}},
quiver/.cd,pos/.initial=0.35,height/.initial=0}
\begin{document}
\begin{tikzcd}[ampersand replacement=\&]
A \& B
\arrow[curve={height=-12pt}, from=1-1, to=1-2]
\end{tikzcd}
\end{document}
Respuesta1
Te olvidas de cargar la babel
biblioteca.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french,english]{babel}
\usepackage{tikz-cd}
\usetikzlibrary{calc,babel} % <--- IMPORTANT!
% A TikZ style for curved arrows of a fixed height, due to AndréC.
\tikzset{
curve/.style={
settings={#1},
to path={
(\tikztostart)
.. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
.. (\tikztotarget)\tikztonodes
},
},
settings/.code={%
\tikzset{quiver/.cd,#1}%
\def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}%
},
quiver/.cd,
pos/.initial=0.35,
height/.initial=0,
}
\begin{document}
\begin{tikzcd}[ampersand replacement=\&]
A \& B
\arrow[curve={height=-12pt}, from=1-1, to=1-2]
\end{tikzcd}
\begin{tikzcd}
A & B
\arrow[curve={height=-12pt}, from=1-1, to=1-2]
\end{tikzcd}
\end{document}
No es necesario ampersand replacement
.