2

For my tikz-cd diagrams, I am trying to define an arrow with a cross at the tail. I feel like this should be easy, but have not found an easy way of doing this yet.

  • A cross like in + or x? – egreg Jun 12 '19 at 10:54
6

You can use Rays arrow tips from the arrows.meta TikZ library:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd, arrows.meta}

% '+' arrow tip
%
% You may declare the '+' arrow tip centrally here if you wish, or in a
% particular 'tikzpicture' environment as shown below.
% Thanks to Håkon Marthinsen for this arrow tip specifiation
% (<https://tex.stackexchange.com/a/340406/73317>).
%
%\tikzset{+ /.tip = {Bar[sep=1.5pt 2,width=3pt 4]_[sep=0]}}

\begin{document}
\begin{tikzcd}
 A \arrow[rd] \arrow[r, {Rays[]}->, "\phi"] & B \\
                                            & C
\end{tikzcd}

\begin{tikzcd}
 A \arrow[rd] \arrow[r, {Rays[n=8]}->, "\phi"] & B \\
                                               & C
\end{tikzcd}

% '+' arrow tip from <https://tex.stackexchange.com/a/340406/73317>
\begin{tikzcd}[+ /.tip = {Bar[sep=1.5pt 2,width=3pt 4]_[sep=0]}]
 A \arrow[rd] \arrow[r, +->, "\phi"] & B \\
                                     & C
\end{tikzcd}

\end{document}

Screenshot

  • 1
    What about an “upright cross”? – egreg Jun 12 '19 at 10:53
  • 2
    Dear @egreg, please consult the latest version of my answer. It features what I would call a '+' arrow tip—I don't mind if you want to call it an “upright cross”. :-) – frougon Jun 12 '19 at 11:50
  • Exactly what I meant, thanks! – egreg Jun 12 '19 at 12:21
  • 1
    @egreg I shall take a screenshot of your comment and keep it locked in a safe like a check from Don Knuth. ;-) – frougon Jun 12 '19 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.