I want to drawing two arrows which different directions from 1 edge to 2 edge.

I want to print a and b on the arrows respectively.

enter image description here



  • Anyone know how to get this in markdown-embedded equations ?
    – Antonello
    Oct 11 '21 at 6:32
  • 1
    In Rmarkdowm, provide the above packages in the YALM header or in a template and just type the formula in LaTeX.
    – Fran
    Oct 11 '21 at 20:05
  • Thanks. I am using markdown to write documents in VSCode, I found this to work: $X \underset{txdown}{\stackrel{txup}{\rightleftharpoons}} Y$
    – Antonello
    Oct 12 '21 at 8:18

An answer with tikz overlays (1 and 2 are not in the tikz picture but could be)


\newcommand{\tikzmark}[1]{\begin{tikzpicture}[overlay,remember picture]\coordinate(#1);\end{tikzpicture}}

{\Huge 1\tikzmark{A}\hspace{50pt}\tikzmark{B}2}
\begin{tikzpicture}[overlay,remember picture]
\draw[thick,->] ([shift={(0,0.4)}]A)--([shift={(0,0.4)}]B) node[midway, above]{{\large a}};
\draw[thick,<-] ([shift={(0,0.1)}]A)--([shift={(0,.1)}]B) node[midway, below]{{\large b}};

enter image description here


it is not clear, if you like to have as math expression (as provide Fran in his nice answer), or you like to have picture with such content. for the latter is handy package tikz-cd (intended for the commutative diagrams):



1 \arrow[r,shift left,"a"]
2 \arrow[l,shift left,"b"]


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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