0

How to create a double arrow line with a variable on its top. Something like this.enter image description here

Mohaqiq
  • 151

2 Answers2

2

Try package mathtools

\documentclass{article}
\usepackage{mathtools}
\begin{document}

$\xleftrightarrow[\text{world}]{\text{hello}}$

\end{document}
BambOo
  • 8,801
  • 2
  • 20
  • 47
  • instead \xleftrightarrow... according to op question should be \xLeftrightarrow ... – Zarko Sep 06 '18 at 14:15
  • @Zarko Really? Doesn't double just mean (here) that there should be arrow heads on both sides? –  Sep 06 '18 at 14:16
  • @marmot, hm, you are probably right ... question is not very clear to me :-( – Zarko Sep 06 '18 at 14:18
  • @Zarko, I agree the question is maybe unclear but I tried the closest match to the picture :) – BambOo Sep 06 '18 at 14:32
1

With \overset:

\documentclass[border=2mm]{standalone}

\usepackage[]{amsmath}

\begin{document}
$
  \overset{n_S^i}{\leftrightarrow}
$
\end{document}

enter image description here

Skillmon
  • 60,462