# Changing arrows style in tikz-cd

I am working with a lot of diagrams, and I like the font mathabx, at least for the arrows. I managed to have \rightarrow in mathabx style, so when I am using that command (and related, like hook, left and so on) it is fine. However, my diagrams are drawn with tikz-cd, and the style of the arrows does not correspond. I know I can change the style of the arrow with stealth, but can I also change it so it will be like mathabx style?

As example, here the arrow I like:

Here a little diagram, just to test. In general, I am putting many decorations on my arrows, like "thick", "two heads", "dotted" and so on.

\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}

%change style of arrows
\tikzcdset{arrow style=tikz, diagrams={>=stealth}}

\begin{document}
\begin{tikzcd}
A \ar[r]\ar[d] & B\ar[dl] \\
C &
\end{tikzcd}
\end{document}


Use the style named math font.

\documentclass{article}
\usepackage{mathabx}
\usepackage{tikz-cd}

%\usetikzlibrary{arrows}
%\usetikzlibrary{arrows.meta}

%change style of arrows
\tikzcdset{arrow style=math font}

\begin{document}
$A\rightarrow B$

\begin{tikzcd}
A \ar[r]\ar[d] & B\ar[dl] \\
C &
\end{tikzcd}
\end{document}


It doesn't work for every font, because TikZ tries to guess the placement of the stem and it may not adjust well with every math font. However, mathabx aims to be compatible with standard Computer Modern fonts, so the heuristics work well in this case.

There's no need to load the arrows and arrows.meta libraries, because tikz-cd does it for you.

• Thank you very much! However, it is a little blurry, at least in my output. As I was saying, I have quite some decoration for my arrows, in particular, I need some of them to be bold and it does not work properly. But I can see that it is a little too much too have all, and your solution is working otherwise! – Barbara Giunti Jul 25 at 15:51
• @BarbaraGiunti Blurry? Are you on MiKTeX? – egreg Jul 25 at 15:56
• Sorry, more shaky than blurry. Like the tail and the head are forced over a line which does not fit. And the bold arrow became just arrows with a thicker line in body. – Barbara Giunti Jul 25 at 16:01

What about tweaking the tikz stealth arrow a little bit? Maybe you can play around with the correct values but after a quick try I came up with the following parameters. There is definitely still a difference but it is somehow similar to the mathabx arrow.

\documentclass{article}
\usepackage{mathabx}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\tikzcdset{arrow style=tikz, diagrams={>={Stealth[round,length=4pt,width=4.95pt,inset=2.75pt]}}}

\begin{document}
$A\rightarrow B$

\begin{tikzcd}
A \ar[r]\ar[d] & B\ar[dl] \\
C &
\end{tikzcd}
\end{document}