%%
%% The LaTeX Companion, 3ed
%%
%% Example 11-3-15 on page II-163 in "tikz-cd --- Commutative diagrams based on tikz".
%%
%% Copyright (C) 2022 Frank Mittelbach
%%
%% It may be distributed and/or modified under the conditions
%% of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%%
%% See https://www.latex-project.org/lppl.txt for details.
%%

\documentclass{tlc3examargin}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{87.0pt}

%StartShownPreambleCommands
\usepackage{tikz-cd}
%StopShownPreambleCommands

\begin{document}
\[ \begin{tikzcd}
 A \arrow[dr, hook', controls={+(1.5,0.5) and +(-1,0.8)}]
   \arrow[dr, dashed, to path=|- (\tikztotarget)]
   \arrow[loop above, Rightarrow] & \mbox{}               \\
 \arrow[ur, dash, dotted]         & B \arrow[loop right, two heads]
\end{tikzcd} \]
\end{document}