Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using ntheorem, with a proof environment that roughly works like

\newenvironment{proof}{\par\textbf{Proof} }{}

My proofs are just blocks of align, so I want to get rid of the long space between “Proof” and the first line of the equation. This could be done like

\begin{flalign}
&\text{\textbf{Proof} to show: }&  x &= y &\\
&& more & math
\end{flalign}

But the “Proof” text comes from the environment, I can't move it into the flalign. So I tried to just set the first math baseline to the last text baseline which would allow writing:

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

Output

TL;DR: I want it to look like (3)

share|improve this question
    
With standard option loaded in ntheorem package, there is a predefined proof theorem environment. –  hpesoj626 Feb 2 '13 at 6:53
    
That's what I'm using. It has the same problem though, the "Proof" text is defined in the environment. If it wasn't the easy solution would be using the second block of code. –  pascal Feb 2 '13 at 6:56
add comment

1 Answer

Are you after something like this?

Code

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

Output

enter image description here

share|improve this answer
    
I have to go now. Please leave your comment if this does not solve your problem. –  hpesoj626 Feb 2 '13 at 8:12
    
\setlength{\abovedisplayskip}{0pt} and my previous solution \setlength{\abovedisplayskip}{-\baselineskip} have the same problem with higher-than-normal math lines as the \vskip one in my question, additionally they break \intertext{} because that uses \abovedisplayskip too. –  pascal Feb 2 '13 at 20:17
    
@pascal I am sorry but I don't understand what you really want to do. Do you want to make your inline math behave like display math without messing up with the other lines? Inline math are displayed the way they are precisely because you don't want the problem you are encountering to happen. I don't know if I could be of much help here now. :) –  hpesoj626 Feb 3 '13 at 5:14
    
no I want exactly what I produced as (3) in my question, mad as it sounds. (In my actual use case there's no text clashing into the formula, it's just there to show the line heights) –  pascal Feb 3 '13 at 9:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.