2

I want something like \xleftarrow{\text{x}}, but with \gets. The problem is that \xleftarrowextends to the length of the text. But i want arrows with the same length. Is there a possibility?

8
  • Can you please elaborate a bit more, I don't understand what you want to do.
    – Huang_d
    Jun 25, 2017 at 10:11
  • The problem is that \xleftarrowextend to the length of the text. But i want arrows with the same length.
    – ikreb
    Jun 25, 2017 at 10:15
  • Where is the macro \gets from?
    – user31729
    Jun 25, 2017 at 10:17
  • Is \overset{\text{x}}{\gets} what you are out after?
    – sodd
    Jun 25, 2017 at 10:18
  • @ChristianHupfer You can use \gets also at listings.
    – ikreb
    Jun 25, 2017 at 10:29

3 Answers 3

5

You could use either \stackrel or \overset (provided by the amsmath package) to achieve your typesetting needs.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for "\overset" macro
\begin{document}
$a\overset{\mathrm{x}}{\gets}b$, 
$a\stackrel{\mathrm{x}}{\gets}b$
\end{document}
5

You can use

\overset{\text{x}}{\gets}
3

You can use

 $a \buildrel \rm x\over\leftarrow b$

You must log in to answer this question.

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