下划线中的自动换行

下划线中的自动换行

我经常发现自己在(不)等号符号下直接写(不)等号链中段落的解释,方法是添加一个下划线,该下划线从符号开始向下(或向上)到解释处。到目前为止,我必须手动换行,这非常烦人。我想知道是否有任何方法可以让 TeX 自动换行。例如:

\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}

在此处输入图片描述

解释如下:

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:

有什么方法可以避免以这种方式中断线路?

PS 顺便说一句,当我插入示例时,我记得我通常会执行以下操作:

\let\oldlg\lg
\renewcommand{\lg}{\lambda}

或类似的东西。有什么理由不这样做吗?\lg例如,在某个地方使用 的宏?

编辑

抱歉。听了 Alenanno 的回答后,我意识到一个能更好地表达我意图的例子可能是这样的align*

在此处输入图片描述

其代码应该是这样的:

\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*}

或者也许是这个,我不会给出其代码,这是另一个align*

在此处输入图片描述

给出的例子全部来自我正在上的一门大学课程的笔记。我的意思是,这是我的那门课程的笔记。仅供记录 :)。

编辑2

为了记录,这里是最后一个示例中文本位的代码:

\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?}

答案1

您可以使用包adjustwidth提供的环境changepage,其工作方式如下:

\begin{adjustwidth}{<left margin>}{<right margin>}    
    <narrow text>
\end{adjustwidth}

至于\renewcommand,这取决于具体情况。除非您知道自己在做什么,否则我认为不建议更新命令,因为您可能会破坏整个文档中已经使用的某些命令。根据命令的不同,我建议创建一个新的命令。

在此处输入图片描述

\documentclass[a4paper]{report}
\usepackage{geometry}
\usepackage{changepage}
\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|}}}{\leq}\int\limits_0^R\left\|\frac{S(h)u-u}{h}-Au\right\|\mathrm{d}t.\]
\begin{adjustwidth}{5.5cm}{4.5cm}\scriptsize
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:
\end{adjustwidth}
\end{document}

答案2

另一个解决方案是使用\parbox,如建议的那样这里. 代码使用\parbox,按建议居中这里

\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| \\ \parbox{15.5em}{\centering Proprietà dell'integrale di Bochner, la norma dell'integrale è minore o uguale dell'integrale della norma, $e^{-\lambda t}$ è uno scalare, non solo ma è positivo e minore o uguale di 1, perché $\lambda>0,t>0$, la proprietà del semigruppo, sto supponendo che sia contrattivo, $\|S(t)\|\leq1$, quindi maggioro con:}}}}{\leq}\int\limits_0^R\left\|\frac{S(h)u-u}{h}-Au\right\|\mathrm{d}t.\]
\end{document}

输出:

在此处输入图片描述

注意字体的变化: 中的正常字体\underset很小,\parbox(像任何框一样)恢复到正常文本大小,为了获得正确的下标大小,您必须\scriptsize在里面使用\parbox

更新

要固定行距,请\linespread在 的开头放置\parbox,并记得紧跟\selectfont其后,否则\linespread将不起作用。

此方法的输出示例

在此处输入图片描述

相关内容