我正在使用 ntheorem,其证明环境大致如下
\newenvironment{proof}{\par\textbf{Proof} }{}
我的证明只是 的块align
,所以我想去掉“证明”和等式第一行之间的长空格。这可以像
\begin{flalign}
&\text{\textbf{Proof} to show: }& x &= y &\\
&& more & math
\end{flalign}
但是“证明”文本来自环境,我无法将其移动到 flalign 中。因此,我尝试将第一个数学基线设置为最后一个文本基线,这样就可以写入:
\documentclass{minimal}
\usepackage{amsmath}
\setlength{\textwidth}{7cm}
\begin{document}
\newlength{\antiskip}
\setlength{\antiskip}{\abovedisplayskip}
\addtolength{\antiskip}{\baselineskip}
% Ok
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
\begin{align}\noalign{\vskip-\antiskip}
\qquad\text{baseline } x^2
\end{align}
% Breaks
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
\begin{align}\noalign{\vskip-\antiskip}
\qquad\text{baseline } \sum_{i=0}^n
\end{align}
% Desired outcome (yes, really)
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
\begin{align}\noalign{\vskip-\antiskip\vskip-1.5ex}
\qquad\text{baseline } \sum_{i=0}^n
\end{align}
\end{document}
TL;DR:我希望它看起来像(3)
答案1
您在寻找类似的东西吗?
代码
\documentclass{article}
\usepackage{amsmath}
\usepackage[standard]{ntheorem}
\theoremstyle{nonumberplain}
\theorembodyfont{\upshape}
\renewtheorem{proof}{Proof}
\begin{document}
\setlength{\abovedisplayskip}{0pt}
\begin{proof}%
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac.
With \texttt{flalign}
\begin{flalign}
a_{11}& =b_{11}&
a_{12}& =b_{12}\\
a_{21}& =b_{21}&
a_{22}& =b_{22}+c_{22}
\end{flalign}
With \texttt{equation}
\begin{equation}%\noalign{\vskip-\antiskip}
%\qquad\text{baseline }
\sum_{i=1}^n (x+y)^n = x^n+\binom{n}{1}x^{n-1}y+\binom{n}{2}x^{n-2}y^2+\cdots+\binom{n}{n-1}xy^{n-1}+y^n
\end{equation}
With \texttt{align}
\begin{align}
f(c_1)\cdot\Delta x&=c_1\cdot\Delta x=0\cdot\frac{8}{n}\\
f(c_2)\cdot\Delta x&=c_2\cdot\Delta x=\frac{8}{n}\cdot\frac{8}{n}\\
f(c_3)\cdot\Delta x&=c_3\cdot\Delta x=2\cdot\frac{8}{n}\cdot\frac{8}{n}\\
f(c_4)\cdot\Delta x&=c_4\cdot\Delta x=3\cdot\frac{8}{n}\cdot\frac{8}{n}\\
\vdots\\
f(c_k)\cdot\Delta x&=c_k\cdot\Delta x=(k-1)\cdot\frac{8}{n}\cdot\frac{8}{n}=(k-1)\cdot\frac{64}{n^2}\\
\vdots\\
f(c_n)\cdot\Delta x&=c_n\cdot\Delta x=(n-1)\cdot\frac{8}{n}\cdot\frac{8}{n}=(n-1)\cdot\frac{64}{n^2}
\end{align}
\end{proof}
\end{document}