# Double arrow for inline diagram

I want to make a diagram like A--->B, but there are two arrows, one written f_1 and another with f_2.

I tried \stackrel, but this gives arrows with different sizes.

If using \mathop{}_{under}^{over}, then the vertical separation is too large.

I also tried tikz, but the height position does not match the inline text.

Edit:

My tikz example code

\textbf{cokernel} of
\begin{tikzpicture}
\node (a) at (0,0){$A$};
\node (b) at (1.5,0){$X$};
\path[->]
([yshift=2pt]a.east)edge node[above]{$f_1$}([yshift=2pt]b.west)
([yshift=-2pt]a.east)edge node[below]{$f_2$}([yshift=-2pt]b.west);
\end{tikzpicture}


Effect:

And no matter how I adjust the y-position of node (a),(b), it just does not move to the right place.

-
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem or what you tried so far. It would also be helpful to see a picture of what you try to accomplish. I can't imagine that much from you description, but it should be possible with TikZ. –  Ronny Dec 13 '13 at 9:14
I just edit the question. Take a look. –  Y.H. Dec 13 '13 at 9:49
Thanks, but i think the result is quite nice, that you have with TikZ, so what do you mena by “move to the right place”? In line with the text before? –  Ronny Dec 13 '13 at 9:55
Are you looking for tex.stackexchange.com/q/65932/15925 ? –  Andrew Swann Dec 13 '13 at 9:59
...which would in your case be baseline=(a.base) –  Ronny Dec 13 '13 at 10:04

Here is a solution using xy. If you don't need tikz...

\documentclass{report}
\usepackage[all]{xy}

\begin{document}
\textbf{cokernel} of $\xymatrix{A\ar@<3pt>[r]^{f_1} \ar@<-3pt>[r]_{f_2} & X}$
\end{document}


If you don't like that arrow tips you can change it using \xyoption{tips} on preamble (or \usepackage[all,cmtips]{xy} as suggested by @egreg) and then change the arrow tip with

\SelectTips{cm}{10}$\xymatrix{A\ar@<3pt>[r]^{f_1} \ar@<-3pt>[r]_{f_2} & X}$


where cm means Computer Modern. You also can use lu or eu. See the results

-
Isn't \usepackage[all,cmtips]{xy} better for selecting CM tips? –  egreg Dec 16 '13 at 0:01
@egreg, it could be. I'll edit and insert your suggestion. –  Sigur Dec 16 '13 at 12:01

If you use tikz-cd, the baseline works well automatically:

\documentclass[margin=10pt]{standalone}
\usepackage{tikz-cd}
\begin{document}
\textbf{cokernel} of
\begin{tikzcd}
A \ar[yshift=2pt]{r}{f_1} \ar[yshift=-2pt]{r}[swap]{f_2} & X
\end{tikzcd}
\end{document}


yields

Personally, I prefer tikz-cd to xy because to my eyes, the arrow tips in xy are not correctly aligned with the shafts.

-