I often find myself writing explanations to passages in (in)equality chains directly under the (in)equality signs, by putting an underset which puts a vertical line starting from the sign and going down (or up) to an explanation. As of now, I have to break the lines manually, which is very annoying. I was wondering if there is any way to have TeX break the lines by itself. For example:
\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb,amsfonts,mathtools,newtxtext,newtxmath}
\begin{document}
\[\left\|\int\limits_0^Re^{-\lambda t}S(t)\left(\frac{S(h)u-u}{h}-Au\right)\mathrm{d}t\right\|\underset{\mathclap{\substack{\Big| \\ \text{Proprietà dell'integrale di Bochner,} \\ \text{la norma dell'integrale} \\ \text{è minore o uguale} \\ \text{dell'integrale della norma,} \\ \text{$e^{-\lambda t}$ è uno scalare, non solo} \\ \text{ma è positivo e minore o uguale} \\ \text{di 1, perché $\lambda>0,t>0$, la proprietà} \\ \text{del semigruppo, sto supponendo} \\ \text{che sia contrattivo, $\|S(t)\|\leq1$, quindi} \\ \text{maggioro con:}}}}{\leq}\int\limits_0^R\left\|\frac{S(h)u-u}{h}-Au\right\|\mathrm{d}t.\]
\end{document}
The explanation goes:
Property of the Bochner integral,
the norm of the integral
is less than or equal to
the integral of the norm,
$e^{-\lambda t}$ is a scalar, not only
but it's positive and less than or equal
to 1, because $\lambda>0,t>0$, the property
of the semigroup, I am supposing
it is contractive, $\|S(t)\|\leq1$, so
I major with:
Any way to avoid having to break the lines that way?
PS As an aside, as I inserted the example I remembered that I do the following usually:
\let\oldlg\lg
\renewcommand{\lg}{\lambda}
or something of the likes. Is there any reason not to do this? A macro somewhere using \lg
, for example?
Edit
Sorry. After Alenanno's answer, I realized a better example of my intentions could be this align*
:
whose code should be like:
\begin{align*}
\|\rho_n\ast u-u\|_{L^p(\omega)}^p=\int\limits_\omega\left|\rho_n\ast u-u\right|^p\mathrm{d}x\underset{\mathclap{\substack{\Big| \\ \text{Esplicito la convoluzione, magheggio} \\ \text{per scrivere $u(x)$ come integrale}}}}{=}{}&\int\limits_\omega\left|\int\limits_B\rho_n(y)(u(x-y)-u(x))\mathrm{d}y\right|^p\mathrm{d}x\leq{} \\
{}\underset{\mathclap{\substack{\Big| \\ Jensen rispetto alla misura di $\rho_n$}}}}{\leq}{}&\int\limits_\omega\left(\int\limits_B\rho_n(y)\left|u(x-y)-u(x)\right|^p\mathrm{d}y\right)\mathrm{d}x={} \\
{}\underset{\mathclap{\substack{\Big| \\ \text{Fubini-Tonelli}}}}{=}{}&\int\limits_B\left(\int\limits_\omega\rho_n(y)\left|u(x-y)-u(x)\right|^p\mathrm{d}x\right)\mathrm{d}y={} \\
{}\underset{\mathclap{\substack{\Big| \\ \text{Estraggo $\rho_n$ e faccio l'integrale interno}}}}{=}{}&\int\limits_B\rho_n(y)\|\tau_yu-u\|_{L^p(\omega)}^p\mathrm{d}y\overset{\mathclap{\substack{\text{Estraggo il massimo di quelle norme} \\ \Big|}}}{=}\sup_{|y|<\frac1n}\|\tau_yu-u\|_{L^p(\omega)}^p\int\limits_B\rho_n(y)\mathrm{d}y,
\end{align*}
or maybe this, whose code I am not going to give, which is another align*
:
The given examples are all three from the notes of a Uni course I am attending. My notes of that course, I mean. Just for the record :).
Edit 2
For the record, here is the code for the text bits in the last example:
\text{Mm? Dunque, che cos'è?} \\ \text{Questa cosa qui è per definizione} \\ \text{l'integrale, non tanto per definizione} \\ \text{ma per quella proposizione che avevamo} \\ \text{visto, \sqb{parliamo del \kcref{thm:teor:ConvDeriv},}} \\ \text{è la convoluzione della derivata di $\rg_N$} \\ \text{che di fatto entra all'interno} \\ \text{dell'integrale, quindi questo qua} \\ \text{è che cosa?}
\text{'kèi? Fatemi usare questa notazione} \\ \text{un pochino, anche qui, molto} \\ \text{provvisoria, fatemi mettere} \\ \text{la variabile rispetto} \\ \text{a cui derivo qua. Questo è} \\ \text{calcolato in $x-y$, per $f(y)\diff y$,} \\ \text{'kèi? D'accordo. Adesso però} \\ \text{spostiamo questa derivata rispetto} \\ \text{alla variabile $x$ sulla derivata} \\ \text{rispetto alla variabile $y$,} \\ \text{e naturalmente c'è il rischio che,} \\ \text{siccome davanti ad $y$ c'è un segno,} \\ \text{a seconda della disparità,} \\ \text{di fatto, dell'ordine di derivazione, balli,} \\ \text{ci sia un segno che balla, no,} \\ \text{e questo effettivamente uno lo considera} \\ \text{con questo fattore correttivo che è} \\ \text{$-1$ elevato alla lunghezza del multi-indice,} \\ \text{cioè di fatto al numero complessivo di volte} \\ \text{che stiamo, uuuuh, derivando, dell'integrale} \\ \text{della derivata, stavolta nella variabile $y$.}
\text{D'accordo? OK? E questo è, attenzione,} \\ \text{questo è $(-1)^{|\ag|}$, 'kèi, questo pura} \\ \text{e semplice, uuuuh, ricopiatura, e adesso però} \\ \text{qui usiamo il fatto che $f$ possiede una $\pd^\ag$,} \\ \text{quindi questa qui cos'è, questa cosa qui} \\ \text{è, siccome, ovviamente, $\rg_N$ è,} \\ \text{in particolare, una funzione test, possiamo usare,} \\ \text{nella definizione di \dd, $\rg_N$} \\ \text{al posto di $u$, e quindi questo è un altro $(-1)^{|\ag|}$} \\ \text{per l'integrale su $\Wg$ di, $\rg_N$ questa volta} \\ \text{non è più derivato, e la derivata debole} \\ \text{si scarica su $y$, su $f$, scusate, non su $y$. Giusto?}
\parbox
orminipage
, breaking the lines explicitly, and ending that box with\par
or a blank line.\parbox
should solve everything since it regulates the width of the text. The strange shape is just to avoid superposition, the lines were broken manually, and the uneven line spacing is what TeX automatically puts there.\text{
,} \\ \text{
and}
with a mere\parbox{15.5em}
(or some other parameter) wrapping with\centering
in it, I will obtain a similar but much better result. I'm not doing it just 'cause I'm lazy :).\\
to break lines in a "centered"\parbox
does make sense, and doesn't really take more effort (in fact less) than many lines of\text
.