# Labels and arrows problem in tikz-cd

i have a problem with tikz-cd package and a label over an arrow

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
%
\usepackage{tikz}
\usetikzlibrary{cd}
%
\begin{document}
\begin{tikzcd}[column sep=tiny]
&\mathbb{S}ig^I\arrow[dl,phantom , shift left]\arrow[dl, "\left(Mod^{I}\right)^{op}" above, shift right] \arrow[dr, "Sen^{I}"] &\\
\mathbb{C}at^{op}&\models &\mathbb{S}et
\end{tikzcd}
\end{document}


Here is the problem (in the left arrow is the problem) Thanks for the help.

• \arrow[dl, "(Mod^{I})^{op}", swap] – LaRiFaRi Dec 8 '14 at 15:31

This looks fine to me. Added above left and above right, and removed the unnecessary \left...\right construction

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
%
\usepackage{tikz}
\usetikzlibrary{cd}
%
\begin{document}
\begin{tikzcd}[column sep=tiny]
&\mathbb{S}ig^I
\arrow[dl,phantom , shift left]
\arrow[dl, "(Mod^{I})^{op}" above left]
\arrow[dr, "Sen^{I}",above right] &\\
\mathbb{C}at^{op}&\models &\mathbb{S}et
\end{tikzcd}
\end{document}


With some more tricks: using math italic that way leads to not so good output. I would never use blackboard bold for the first letter, but with a personal command it's easy to change the typesetting in the whole document by modifying just the definition.

The vertical alignment of the two labels is obtained by using \mathstrut in the one on the right, which adds a “phantom parenthesis”.

Similarly, the arrows have approximately the same angle by adding a phantom \op in the lower right entry.

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{tikz-cd}

\newcommand\cat[1]{\makecat#1\makecat}
\def\makecat#1#2\makecat{\mathbb{#1}\mathrm{#2}}
\newcommand{\fun}[1]{\mathrm{#1}}
\newcommand{\op}{^{\mathrm{op}}}

\begin{document}

\begin{tikzcd}[column sep=0em]
& \cat{Sig}^I
\arrow[dl, swap, "(\fun{Mod}^{I})\op"]
\arrow[dr, "\mathstrut\fun{Sen}^{I}"]
\\
\cat{Cat}\op & \models & \cat{Set}\hphantom{\op}
\end{tikzcd}

\end{document}


\cats have \fun. ;-)

I try with TikZ.

\documentclass[tikz,border=2mm]{standalone}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}
\def\a{2}
\path
(0,0)      node (Si) {$\mathbb{S}ig^I$}
+(-135:\a) node (Ca) {$\mathbb{C}at^{op}$}
+(-45:\a)  node (Se) {$\mathbb{S}et$}
(Si|-Ca)   node{$\models$};

\draw (Si)--(Ca) node[pos=.4,left]{$(Mod^{I})^{op}$};
\draw (Si)--(Se) node[pos=.4,right=1mm]{$Sen^{I}$};
\end{tikzpicture}
\end{document}