我想复制 GK Batchelor 的流体动力学书籍的紧凑外观。当段落结束时,数学表达式可以折叠到段落的垂直空间中,表达式会向上移动。如果不明白,请在 Google Books 上查看。
环境可以align
自动执行此操作吗?还是我需要使用其他环境?我不知道有什么方法可以自动执行此操作。
答案1
这里有一个 LaTeX 方法,用于复制链接中的排版,以及使用@morbusg 的\abovedisplayshortskip
(-.5\baselineskip
加上一些胶水):
\documentclass{article}
\usepackage[margin=2.05in]{geometry}% http://ctan.org/pkg/geometry
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\newcommand{\pfrac}[2]{\frac{\partial #1}{\partial #2}}% Partial derivative
\begin{document}
\setlength{\abovedisplayshortskip}{-.5\baselineskip plus 3pt}% Original value: 0pt plus 3pt
\noindent \textit{Local variation of the velocity magnitude}
Some simple but useful results follow immediately from the expression
for local vorticity in terms of rectuangular co-ordinates with axes parallel
to the location directions of~$\mathbf{u}$, of the principal normal to the streamline
(directed towards the centre of curvature), and of the binomial to the
streamline. If $(s,n,b)$ represent co-ordinates in these three dimensions
respectively, and $(u,v,w)$ are the corresponding velocity components, we
have
\[
v=w=0, \quad
u=q, \quad
\pfrac{v}{s}=\frac{q}{R}, \quad
\pfrac{w}{s}=0
\]
locally, where~$R$ is the local radius of curvature of the streamline. The
components of the vorticity locally are then
\[
\omega_s=\pfrac{w}{n}-\pfrac{v}{b}, \quad
\omega_n=\pfrac{u}{b}, \quad
\omega_b=\frac{u}{R}-\pfrac{u}{n}.
\]
\leavevmode\rlap{Moreover,}%\hfill
\centerline{$\displaystyle
\left(\pfrac{}{s},\pfrac{}{n},\pfrac{}{b}\right)u=
\left(\pfrac{}{s},\pfrac{}{n},\pfrac{}{b}\right)q$}
%\hfill\null\\
locally. Hence, in irrotational flow we have
\begin{align}
\pfrac{q}{n}=\frac{q}{R}, \quad \pfrac{q}{b}=0. \tag{6.2.13}\label{irrotational_flow}
\end{align}
The first of the relations~\eqref{irrotational_flow} shows that, when the streamlines \ldots
\end{document}
geometry
用于减少边距并模仿链接输出。
输出中唯一的不同是排版了相对于文本块居中对齐的行,同时仍使文本左对齐(在本例中为“Moreover”)。\rlap
使用了一些“技巧”(通过 )来实现这一点,但这也可能是作者在标记中所做的。正如@egreg 在评论中提到的,如果段落前面有一个空行,则必须使用\leavevmode
。因此,为了完整起见(因为它在这里没有坏处...),我添加了\leavevmode
。
从教学角度来看, 的使用\abovedisplayshortskip
取自上一段中(单个)最后一行的宽度。因此,\abovedisplayshortskip
对于一般用例,当前一段由一行组成时,仅修改以适应链接中显示的显示内容是不够的,除非您愿意通过手动干预自行进行一些压缩(如我在示例中所做的那样)。
答案2
以下是链接文档的摘录,其中 Werner 建议\abovedisplayshortskip
将其设置为负半部分\baselineskip
(以纯文本形式):
\abovedisplayshortskip=-.5\baselineskip
\def\p#1#2{{\partial#1\over\partial#2}}
\noindent\dots represent co-ordinates in these three directions
respectively, and $(u, v, w)$ are the corresponding velocity components,
we have
$$ v=w=0,\quad u=q,\quad\p vs={q\over R},\quad\p ws=0 $$
locally, where $R$ is the local radius of curvature of the streamline.
The components of the vorticity locally are then
$$ \omega_s=\p wn-\p vb,\quad\omega_n=\p ub,\quad\omega_b={u\over R}-\p un. $$
Moreover,
$$ \left(\p{}s,\p{}n,\p{}b\right)u=\left(\p{}s,\p{}n,\p{}b\right)q $$
locally. Hence, in irrotational flow we have
$$ \p qn={q\over R},\quad\p qb=0. \eqno(\oldstyle 6.2.13) $$
The first of the relations \dots
\bye
看起来像:
请注意,我没有触碰abovedisplayskip
,只触碰了short
变体。