3

This question already has an answer here:

I'd like to have a "=" symbol with some text over it, and an equation below it. I know that \stackrel{\frac{0}{0}}{=} can handle my demand on the equation part, however I don't know how to write something more below my "=" sign at the same time.

marked as duplicate by egreg, Heiko Oberdiek, Claudio Fiandrino, mafp, T. Verron Jul 9 '13 at 10:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I edited my solution to include \mathrel{} and to demonstrate the effect of the \usestackwidth parameter. – Steven B. Segletes Jul 9 '13 at 15:01
4

I realize what I wrote is math gibberish, but I wanted to show how I've set it up so that the arguments are (by default) in math mode, which you can escape by surrounding your argument with $ signs (as I've done with the top argument). Also, you can define the stacking separation distance, as I have done (4pt above, 2pt below), since the "=" glyph comes with asymmetric space above and below it. In fact, the \DeclareMathOperator solutions provided in other solutions also does not account for this asymmetry.

The stack can account for the width of the stacked material, if that's what you want. If you wanted the equals sign alone to define the width of the stack, that can be done, too, by setting \def\useanchorwidth{T} prior to invocation. I show both possibilities below, first with the "=" defining the stackwidth, then with the over/under labels contributing to the calculation of stackwidth. Also, I revised the solution to include \mathrel{}, which adds some extra l-r spacing.

\documentclass{article}
\usepackage{stackengine}
\parskip 1em
\newcommand\stackequal[2]{%
  \mathrel{\stackunder[2pt]{\stackon[4pt]{=}{$\scriptscriptstyle#1$}}{%
  $\scriptscriptstyle#2$}}}
\begin{document}
\def\useanchorwidth{T}
\( x \stackequal{$\tiny limit$}{z\rightarrow 0} 3 \)

\def\useanchorwidth{F}
\( x \stackequal{$\tiny limit$}{z\rightarrow 0} 3 \)
\end{document}

enter image description here

2

depending on how much text you would like to put there, it might look very odd, but with amslatex this is no problem by simply declaring the '=' as an operator. But this also just might be a qucik-and-dirty solution. Use the starred versions to declare the operator with \limits:

\documentclass[12pt,final]{article}

\usepackage[]{amsmath}

\DeclareMathOperator*{\equals}{=}

\begin{document}

\begin{align}
\frac{\pi}{e}  \equals^{\pi\approx3}_{e\approx3} 1
\end{align}


\end{document}

See http://www.ctan.org/pkg/amslatex Documentation chapter 5.1

Not the answer you're looking for? Browse other questions tagged or ask your own question.