Inclusion arrow in TikZ
You can use the right hook-latex
, or right hook->
arrow (depending on the arrow type you want on the other side) from the arrows
library:
Code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\draw [ultra thick, right hook-latex, red] (0, 0) -- (3, 0);
\draw [ultra thick, right hook->, blue] (0,-1) -- (3,-1);
\end{tikzpicture}
\end{document}
For commutative diagrams I suggest using the tikz-cd
package; it uses TikZ
to facilitate the drawing of commutative diagrams (it has its own arrows library designed for diagrams and the arrow you are looking for is already buil-in); a little example with the requested inclusion (and some others just for illustration):
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
0 \arrow[hookrightarrow]{r}
& A\arrow[hookrightarrow]{r}{\varphi}\arrow[hookrightarrow]{d}{\eta_1}
& B\arrow{r}{\psi}\arrow{d}{\eta_2}
& C\arrow{r}\arrow{d}{\eta_3}
& 0 \\
0 \arrow[hookrightarrow]{r}
& A'\arrow[hookrightarrow]{r}[swap]{\varphi'}
& B'\arrow{r}[swap]{\psi'}
& C'\arrow{r}
& 0
\end{tikzcd}
\end{document}
You can use the arrows
library from TikZ
, so for example, to use the -latex
style from TikZ
, you can say
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}
\tikzset{
commutative diagrams/.cd,
arrow style=tikz,
diagrams={>=latex}}
\begin{document}
\begin{tikzcd}
0 \arrow[hookrightarrow]{r}
& A\arrow[hookrightarrow]{r}{\varphi}\arrow[hookrightarrow]{d}{\eta_1}
& B\arrow{r}{\psi}\arrow{d}{\eta_2}
& C\arrow{r}\arrow{d}{\eta_3}
& 0 \\
0 \arrow[hookrightarrow]{r}
& A'\arrow[hookrightarrow]{r}[swap]{\varphi'}
& B'\arrow{r}[swap]{\psi'}
& C'\arrow{r}
& 0
\end{tikzcd}
\end{document}
The above code changes the tip arrow style for all the diagrams, but you can select the -latex arrow tip just for some arrows (perhaps not really desirable to have two different arrow tips on the same diagram):
\arrow[hookrightarrow,-latex]{d}{\eta_1}