5

I can't find how to draw a surjective arrow between two nodes in TikZ. I'd like it to look somewhat like this.

enter image description here

clementine
  • 51
  • 1
  • 2

3 Answers3

9

A pure TikZ solution involves using ->> and that's about it:

\documentclass{article} 
\usepackage{tikz} 
\begin{document}
\begin{tikzpicture} 
\node at (0,0) (a) {A};
\node at (1,0) (b) {B};
\path [draw,->>] (a) -- (b);
\end{tikzpicture}
\end{document}

Quack

And we are done. :)

Paulo Cereda
  • 44,220
3

By importing tikz-cd package, you can use \arrow command with twoheadrightarrow option as follows:

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

\begin{document}

\begin{tikzcd} 
A \arrow[r, tail, twoheadrightarrow, dashed] & B
\end{tikzcd}

\end{document}
2

My further proposal would be to use, as an alternative, the xy package. You get the same results as in the previous answers.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[cmtip,all]{xy}
\begin{document}
\xymatrix@C=1.5pc{A\ar@{->>}[r]& B
}
\end{document}
Sebastiano
  • 54,118