4
\overset{x = u^2}{=} 

produces an equal sign with x = u^2 above it in a slightly smaller font size.

If I want to add y = v^2 above x = u^2 but with exactly the same font size, how do I do that? \overset{\overset{y = v^2}{x = u^2}}{=} does not work since y = v^2 becomes even smaller.

In addition to that, if possible, I would like all the equal signs to be displayed above each other symmetrically and not a bit to the left or right of each other.

2 Answers 2

7

I think you may be looking for the \substack command to "stack" y=v^2 above x=u^2.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\overset{\substack{y=v^2\\x=u^2}}{=} \quad \overset{x=u^2}{=}
\]
\end{document}

Two Addenda: (i) To align the = symbols, use a few \phantoms. (ii) A slight [!] improvement is available by reducing the size of the overset material.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\newcommand\xxx{\phantom{{}^2}} % a phantom that's as wide as a superscript "2"
\begin{document}

\[
\overset{\substack{\xxx y=v^2\\ \xxx x=u^2}}{=} \quad 
\overset{ \xxx x=u^2}{=}
\]

\[
\overset{\substack{\scriptscriptstyle\xxx y=v^2\\[-1pt] \scriptscriptstyle\xxx x=u^2}}{=} 
\quad\overset{\scriptscriptstyle \xxx x=u^2}{=}
\]
\end{document}
6
  • 1
    You got first. I didn't want to show the picture, I felt it was terrible even without seeing it.
    – egreg
    Dec 29, 2016 at 17:00
  • 2
    This is a good answer. I dunno about you, but I feel like the offsetting of the equals sign, caused by the right hand side being wider than the left hand side, is a bit imperfect. Would it be possible to have all the = signs centred wrt each other?
    – Au101
    Dec 29, 2016 at 17:02
  • 2
    @Au101 - I just posted an addendum to show how one might align the = symbols. :-)
    – Mico
    Dec 29, 2016 at 17:07
  • Thank you very much Mico, I greatly appreciate your help.
    – David
    Dec 29, 2016 at 17:10
  • 1
    @Mico Thanks, I think that looks a little nicer :) And well done on all of that rep! :)
    – Au101
    Dec 29, 2016 at 17:34
4

Done here with stacks and TABstacks. Vertical gaps from primary eqn (set here as 6pt) and between secondary eqns (set as 1pt) can be customized.

\documentclass{article}
\usepackage{tabstackengine}
\stackMath
\TABstackMath
\TABstackMathstyle{\scriptstyle}
\begin{document}
\[
\renewcommand\useanchorwidth{T}
y \stackon[6pt]{{}={}}{\alignstackon[1pt]{\mkern8mu x =& u^2}{y =& v^2}} mx + b
\]
\end{document}

enter image description here

A similar rendition may be obtained with

\[
\renewcommand\useanchorwidth{T}
\setstackgap{S}{1pt}
y \stackon[6pt]{{}={}}{\mkern7mu\alignShortstack{y =& v^2\\ x =& u^2}} mx + b
\]

You must log in to answer this question.

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