5

I have a code block looking like this

\begin{align*}
    ||Ty - Tz||_w &\stackrel{\text{Satz 4.3}}{=} \sup_{t \in I}e^{-2L(t-t_0)}||(Ty)(t) - (Tz)(t)||_\infty \\
    &\stackrel{\phantom{Satz 4.3}}{\leq} \frac{1}{2}||y - z||_w
\end{align*}

The first = and \leq align nicely even though I used \stackrel with the first equality, because I added the necessary space using \phantom in the line with \leq. Now I want to add text above \leq as well (the text will (4.5) so it's shorter than Satz 4.3. I want to signs still to be aligned and the text centered above it. I tried something like \widthof{Satz 4.3}][c]{(4.5)} but this uses the normal text size of "Satz 4.3` which is too wide.

How can I approach this?

4
  • It is actually far more common (less intricate, and also very clear) to add an explanation after the equations, like this (code).
    – Werner
    Nov 22, 2019 at 16:42
  • @Werner What you are depicting are tags, which are typically used to label equations. The OP wants to indicate where the (in)equalities come from. At least on blackboards it is a very common practice to do what the OP does.
    – user194703
    Nov 22, 2019 at 17:19
  • @Schrödinger'scat: No, these are descriptions. Tags are flush with the margin.
    – Werner
    Nov 22, 2019 at 17:31
  • @Werner They look like tags and thus are a bit confusing IMHO.
    – user194703
    Nov 22, 2019 at 17:45

2 Answers 2

5

I'd create a bit of vertical distance between "Satz 4.3" and the "=" symbol, by inserting an arrow symbol, and I'd then "squash" the width of the text/arrow combination to zero via a \mathclap directive.

enter image description here

Observe that the code uses \tiny for the text material, which corresponds to \scriptscriptstyle for the math material. If you believe that the result isn't sufficiently prominent, I'd use color to make it more prominent, rather than increase the size.

\documentclass{article}
\usepackage{mathtools} % for 'align*' env.
\DeclarePairedDelimiter\norm\lVert\rVert

\begin{document}
\begin{align*}
\norm{ Ty - Tz}_w 
&\stackrel{\mathclap{\substack{\text{\tiny Satz 4.3}\\ 
                               \scriptscriptstyle\downarrow}}}{=} 
 \sup_{t\in I}e^{-2L(t-t_0)}\norm{(Ty)(t)-(Tz)(t)}_\infty \\
&\stackrel{\mathclap{\text{\tiny (4.5)}}}{\leq}
 \tfrac{1}{2}\norm{y - z} _w
\end{align*}
\end{document}
5

Welcome! You could use eqparbox for that.

\documentclass{article}
\usepackage{amsmath}
\usepackage{eqparbox}
\begin{document}
\begin{align*}
    ||Ty - Tz||_w &\stackrel{\text{\eqmakebox[a][c]{Satz 4.3}}}{=} \sup_{t \in I}e^{-2L(t-t_0)}||(Ty)(t) - (Tz)(t)||_\infty \\
    &\stackrel{\text{\eqmakebox[a][c]{4.5}}}{\leq} \frac{1}{2}||y - z||_w
\end{align*}

\begin{align*}
    ||Ty - Tz||_w &\overset{\text{\eqmakebox[a][c]{Satz 4.3}}}{=} \sup_{t \in I}e^{-2L(t-t_0)}||(Ty)(t) - (Tz)(t)||_\infty \\
    &\overset{\text{\eqmakebox[a][c]{4.5}}}{\leq} \frac{1}{2}||y - z||_w
\end{align*}

\end{document}

enter image description here

Some background: in \eqmakebox[a][c]{Satz 4.3}, a is a label. All \eqmakeboxes with this label will have the same width. If you have another set of synchronized boxes somewhere else, you can give them another label such as b. c is just the alignment, you could left- or right align the texts (l or r) but here we want to center it with c. Please note also that it will be possible to create unique labels automatically in case you do that very often and do not want to keep track of whether or not you have already used a in that document. Please let me know if you want this spelled out.

2
  • Thank you, what do the arguments a and c do? Nov 22, 2019 at 16:34
  • 1
    @user7802048 a is a label. If you want to use the trick in another equation where the boxes have different widths, you can do so by using another label such as b. That is, all boxes made with \eqmakebox[a][...]{....} will have the same width, all boxes made with ``\eqmakebox[b][...]{....}` will have coinciding widths, but the width does not necessarily coincide with the ones labeled a and so on. c is just the alignment, you could left- or right align the text but here we need to center it with c.
    – user194703
    Nov 22, 2019 at 16:37

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.