I can't find how to draw a surjective arrow between two nodes in TikZ. I'd like it to look somewhat like this.
Asked
Active
Viewed 7,315 times
5
-
1Welcome to TeX.SX! See: How to create up arrow with two heads? – Bobyandbob Dec 07 '17 at 14:22
3 Answers
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}
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}
Sina Ahmadi
- 829
2
My further proposal would be to use, as an alternative, the xy package. You get the same results as in the previous answers.
\documentclass[a4paper,12pt]{article}
\usepackage[cmtip,all]{xy}
\begin{document}
\xymatrix@C=1.5pc{A\ar@{->>}[r]& B
}
\end{document}
Sebastiano
- 54,118


