7

I have a commutative diagram with a vertical isomorphism, and am currently using a Tilde a one of its labels.

\ar[d, "\sim"', "\phi^1"]

The intent would be clearer if I rotated the Tilde 90 degrees. Is there an easy way to do that in tikz-cd without rotating the other label?

1
  • I got the correct output with the syntax \arrow[u, "\sim" {anchor=south, rotate=90}], but entering a comma after "\sim" yields an error.
    – equin
    May 11, 2021 at 9:47

1 Answer 1

10

You can apply styles to labels in tikz-cd. Usually they would be like "\sim" draw, while with multiple options, they would need to be enclosed by braces. However, I'm inexplicably getting an error in that case. So I worked around the problem using \tikzset styles.

Output

enter image description here

Code

\documentclass[margin=10pt]{standalone}
\usepackage{tikz-cd}

\tikzset{
    labl/.style={anchor=south, rotate=90, inner sep=.5mm}
}

\begin{document}
\begin{tikzcd}
a \ar[d, "\sim" labl, "\phi^1"] \\
b 
\end{tikzcd}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .