TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can't understand how to draw it. enter image description here

share|improve this question
    
Welcome to TeX.SX! – egreg Mar 5 at 13:54

I'll toss my hat into the ring as well - even though both @egreg and @HenriMenke have great answers, I think plain old TikZ is a good alternative, because the code is a bit easier to parse. We declare each node, give it a name (in the parenethesis (), the label is in curly braces {}), and then draw arrows between the nodes. Here's the code:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}

\begin{tikzpicture}
\node (a) at (0,0) {$A$};
\node (b) at (1.5,0) {$B$};
\draw[->] (a) to [bend left] node[scale=.7] (f) [above] {$f$} (b);
\draw[->] (a) to [bend right] node[scale=.7] (g) [below] {$g$} (b);
\draw[-{Implies},double distance=1.5pt,shorten >=2pt,shorten <=2pt] (f) to node[scale=.7] [right] {$\alpha$} (g);
\end{tikzpicture}

\end{document}

An obvious downside is trying to replicate \Rightarrow with double, but I think it's not too big a deal, and the code is fairly easy to adjust. We also have to shorten then ends of the middle arrow so it doesn't overlap with the other arrows (done with shorten > for one and shorten < for the other end). Here's the result:

enter image description here

share|improve this answer

This is almost in the manual.

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

\begin{document}
\begin{tikzcd}
  A \arrow[r, bend left, "f", ""{name=U,inner sep=1pt,below}]
  \arrow[r, bend right, "g"{below}, ""{name=D,inner sep=1pt}]
  & B
  \arrow[Rightarrow, from=U, to=D, "\alpha"]
\end{tikzcd}
\end{document}

enter image description here

share|improve this answer

Section 25 of the reference manual. You can use

\documentclass{article}

\usepackage[all,2cell,cmtip]{xy}
\UseTwocells

\begin{document}

\[
\xymatrix{
  A \rtwocell^f_g{\alpha} & B
}
\]

\end{document}

However, going tikz-cd is something I'd recommend.

enter image description here

share|improve this answer

Another possibility is pst-node, and its psmatrix environment. It can be compiled with pdflatex if you load auto-pst-pdf and compile with the --enable-write18 switch (MiKTeX), or -shell-escape (TeX Live, MacTeX):

\documentclass[border=3pt]{standalone}
\usepackage{pst-node,amsmath, latexsym}
\usepackage{auto-pst-pdf}

\begin{document}

 $ \begin{psmatrix}[colsep = 1.5em,nodesepA=2pt, nodesepB=1pt, shortput=nab, labelsep=2pt, arrowinset=0.2]
 [name=A] A & \Downarrow & [name=B] B
 \ncarc[arcangle=35]{->}{A}{B}^{f}
 \ncarc[arcangle=-35]{->}{A}{B}_{g}
\end{psmatrix} $

\end{document} 

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.