I am using the description style arrow label in Tikz-cd so that the label appears on top of the arrow with some white space around the label. The issue is, with small arrows and large labels, the white space eats up the entire arrow.
Thus I would like to shrink the white space around the label. In the Tikz-cd documentation it says this can be accomplished with "inner sep," though I am not sure exactly how this is done.
Here is a minimal working example where I try to (unsuccessfully) modify the white space around the arrow label using inner sep.
\documentclass{article}
\usepackage{amsmath,amssymb,tikz-cd}
\begin{document}
$$
\begin{tikzcd}
A \ar[r, "f" description] & B
\end{tikzcd}
$$
$$
\begin{tikzcd}
A \ar[r, "f" description, inner sep = -2em] & B
\end{tikzcd}
$$
\end{document}
Best Answer
Put
inner sep
in the optionlabels
of TikZ-CD.You can also set it locally, for one or some labels only, with:
See the example:
Off-topic: don't use
$$...$$
in LaTeX, use\[...\]
, see here: Why is \[ ... \] preferable to $$ ... $$?