8

I am creating several commutative diagrams with diagonal arrows, and I'm so close to the look I want. My last step is to be able to create double head arrows and hook arrows of length x. I found an answer to the double head arrow problem here: Is it possible to have a two head arrow as a decorator?. The same solution doesn't work for the hook arrow, though, because it has 'decorations' on both ends.

It looks like lots of people have similar problems, but I haven't been able to find a solution other than creating the arrow in tikz, which doesn't seem terribly dynamic. Thanks for any help.

As per request, my MWE is

\documentclass{article}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{arrows}
\usepackage{rotating}
\def\Overrightarrow#1{\mathrlap{\overrightarrow{\phantom{#1\mkern11mu}}}%
  \overrightarrow{#1}}   

\begin{document}

$$\begin{array}{lllllll}
F_1 & \multicolumn{3}{c}{\xrightarrow{\mathmakebox[1cm]{\phi_1}}} & F_0 & \overset{\phi_0} \twoheadrightarrow & M \\
& \begin{turn}{-45}$\Overrightarrow{\mathmakebox[.7cm]{}}$\end{turn} & &  \begin{turn}{45}$\hookrightarrow$\end{turn} & & & \\
& & \ker(\phi_0) & & & & 
 \end{array}$$

\end{document}

Which gives me

enter image description here

As you can see, the double headed angled arrow looks adequate, save for the thickness that I think I can fix, but I want to make the hook arrow look similar.

2
  • 1
    have you seen the tikz-cd package- it has all kinds of useful examples
    – cmhughes
    Commented Jul 23, 2013 at 19:01
  • in the question you cite, the double-headed arrow acts as a math accent, but you say you are creating commutative diagrams. are you using a diagram package, and if so, which one? a minimal working example (MWE) would be very helpful. Commented Jul 23, 2013 at 21:18

2 Answers 2

9

The idea of using TikZ is good; but better yet is to use tikz-cd:

\documentclass[12pt]{article}
\usepackage{tikz-cd}

\begin{document}
\[
\begin{tikzcd}
 F_1 \arrow{rr}{\phi_1} \arrow[two heads]{dr} && F_0 \arrow[two heads]{r}{\phi_0} & M \\
     & \ker(\phi_0) \arrow[hookrightarrow]{ur}
\end{tikzcd}
\]
\end{document}

enter image description here

4
  • I am very willing to use that to get such amazing results! Thanks egreg, and also cmhughes for suggesting this package.
    – Trevor
    Commented Jul 25, 2013 at 12:58
  • hmmm. the arrowheads don't exactly match. (nitpicking again.) Commented Jul 25, 2013 at 14:28
  • 1
    @barbarabeeton Fixed. Reading the docs sometimes helps. ;-)
    – egreg
    Commented Jul 25, 2013 at 14:31
  • 1
    @egreg -- i guess you can argue with david carlisle about reading docs. he never listens to me ... Commented Jul 25, 2013 at 14:34
8

if you're willing to use xy-pic this might work for you.

\documentclass[12pt]{article}
\usepackage[cmtip,all]{xy}

\begin{document}
\[
\xymatrix{%
 F_1 \ar[rr]^{\phi_1} \ar@{->>}[dr] && F_0 \ar@{->>}[r]^{\phi_0} & M \\
     & \ker(\phi_0) \ar@{^{(}->}[ur]
}
\]
\end{document}

output of example code

1
  • As if it is not enough that David Carlisle steals our well-deserved TikZ points with picture mode .... :P
    – percusse
    Commented Jul 24, 2013 at 21:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .