7

I want to show an arrow for an isomorphism in a commutative diagram. Currently I'm using

\ar[rr, dotted, "\textasciitilde", "\funcname{f}''"']

but there is two much vertical space between the Tilde and the arrow. What is the proper way to do this in tikz-cd?

0

3 Answers 3

5

I didn't quite understand at first what you wanted to achieve. So here's the final version (thanks to @egreg for the help).

Output

enter image description here

Code

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

\begin{document}

\begin{tikzcd}
A \ar[r, dotted, "\sim", "f''"'] & B
\end{tikzcd}

\end{document}
4

I think what you're looking for, is the property "inner sep". In the following picture, the first arrow is generated with \ar[r, "\sim"], while the second is generated with \ar[r, "\sim" inner sep=.3mm].

\sim label with and with out inner sep=.3mm

2
  • what about the vertical arrow? I mean if the arrow is vertically downward then how to do that?
    – RIPAN DAS
    Commented Jan 12 at 6:19
  • @RIPANDAS try something like \ar[d, "\sim" {rotate=90, anchor=north}]. Commented Jan 14 at 12:07
2

This was done without tikz-cd.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

$\xrightarrow{\sim}$

\end{document}

which gives

enter image description here

For a dashed arrow, like you wanted,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{MnSymbol}

\begin{document}

$\overset{\sim}{\dashrightarrow}$

\end{document}

which gives

enter image description here

I found another question that had other similar shapes, but I lost it, so I'm still looking for it again. Alenanno's answer has a great tikz-cd version. I simply thought it would be useful to point out what a non-tikz-cd solution would be. I'm working on making the dotted arrow a little longer, as it's kind of short.

Hope this helps.

1
  • /sim has the same spacing error; I was hoping to get the Tilde cloer to the line of the arrow.
    – shmuel
    Commented Aug 17, 2016 at 17:11

You must log in to answer this question.

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