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...

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

5
  • Hello @tomacs, if possible I'd like to write the equation over = with smaller dimension. – Gennaro Arguzzi Dec 4 '17 at 17:48
  • @Gennaro Arguzzi - More exactly? – user91669 Dec 4 '17 at 18:07
  • I changed the figure. Sorry for my mistake....I edited your figure accidentally. – Gennaro Arguzzi Dec 4 '17 at 18:20
  • I edited my solution! – user91669 Dec 4 '17 at 20:12
  • Beautiful solution @tomacs. Thank you very much! – Gennaro Arguzzi Dec 5 '17 at 7:48
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

1
  • also your solution is very useful for me. – Gennaro Arguzzi Dec 5 '17 at 7:49
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

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

2
  • 1
    Hello @Sebastiano thank you very much for your solution – Gennaro Arguzzi May 15 at 8:34
  • @GennaroArguzzi Hi Gennaro my best regards from Sicily :-) – Sebastiano May 21 at 11:19

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.