2

I'm wondering if there is a simple way to adding avertical arrow and a math formula over equal sign. The arrow's height should be changed also in a confortable way.

On Tex Stack Exchange I found only how add text over equal sign.

enter image description here

Thank you so much for your willingness.

EDIT: the goal is to write equations over each equal signs which occur in a chain of relationships; a=b=c=d=e=f...

4 Answers4

3

Another simple solution:

\documentclass{article}
\usepackage{mathtools}
\usepackage{old-arrows}
\newcommand{\eqstackrel}[1]{\stackrel{\substack{\mathclap{#1}\\[0.5ex]\displaystyle\uparrow\\ ~}}{ = } }

\begin{document}

    \[ a\eqstackrel{b = a/c} b \]%

\end{document} 

enter image description here

Bernard
  • 271,350
2

For those who do not want to use mathtools (e.g. because underbrace looks strange then), you can exchange \mathclap by \ensuremath. I also changed uparrow to downarrow:

\documentclass{article}
\usepackage{amsmath}
\newcommand{\eqstackrel}[1]{\stackrel{\substack{\ensuremath{#1} \\ [0.5ex] \displaystyle \downarrow \\ ~}}{ = } }

\begin{document}

\[ a\eqstackrel{b = a/c} b \]%

\end{document}

(adapted from @Bernard's answer)

enter image description here

Sebastiano
  • 54,118
Isi
  • 197
2

Another solution could be using a commutative diagram like xy package:

\documentclass[a4paper,12pt]{article}
\usepackage[all,cmtip]{xy}
\begin{document}
\xymatrix@R=1.3pc{\scriptstyle{a=b/c}&\\
a=b \ar[u]&}
\end{document}

The vertical arrow can be increase or decrease from the parameter 1.3.

enter image description here

Sebastiano
  • 54,118
1

Maybe it is a solution:

\documentclass{article}
\usepackage{graphicx,mathtools}
\newcommand{\equparrow}[1][1]{\stackrel{\text{\scalebox{1}[#1]{$\uparrow$}}}{=}}
\newcommand{\equparrowx}[2][1]{\stackrel{\mathclap{#2}}{\equparrow[#1]}}
\begin{document}
\begin{align*}
b&=a/c\\[-.5\baselineskip]
a&\equparrow b\\[-.5\baselineskip]
a&\equparrow[2] \frac12
\end{align*}
\[a\equparrowx{a=b/c}b\]
\[a\equparrowx[1.5]{a=b/c}b\]
\end{document}

enter image description here