1

I’m using ntheorem to set my proofs, using the nonumberbreak style:

\documentclass{article}
\usepackage{amsmath}
\usepackage[amsmath]{ntheorem}
\theoremstyle{nonumberbreak}
\newtheorem{proof}{Proof}

So if I write

\begin{proof}
One line
\begin{align*}
\text{One equation}
\end{align*}
\end{proof}

I get the desired output (left one in the picture below).

But in some cases, my proof starts with some math environment right away, e.g.

\begin{proof}
\begin{align*}
\text{One equation}
\end{align*}
\end{proof}

In this case, I get exactly the same spacing as before, as if I replaced “One line” by ~ or something like that.

I can reduce the vertical space by setting \abovedisplayskip to 0px (third picture below), but there is still precisely one line left.

The three variants

How can I get rid of this line?

4
  • \setlength{\abovedisplayskip}{-\baselineskip} yields the desired result, but is of course only a hack and will break horribly if there are multiple math environments in the proof. – Joachim Breitner Oct 26 '15 at 9:07
  • I'm afraid this is “by design”. The style obtains the break by typesetting “Proof” in a two line high box (with zero width). – egreg Oct 26 '15 at 10:29
  • Thanks, but I don’t follow. Why is “One line” then not also pushed down? – Joachim Breitner Oct 26 '15 at 12:29
  • The word "Proof” is typeset on top of a zero width box, two lines high. The first word in the proof is at the left margin, superimposed to the (empty) bottom line of that box. Anyway, starting a proof with a display is a “don't do it” for me. – egreg Oct 26 '15 at 13:08
3

You could do the following

\documentclass{article}
\usepackage{amsmath}
\usepackage[amsmath]{ntheorem}
\theoremstyle{nonumberbreak}
\newtheorem{proof}{Proof}

\begin{document}
So if I write

\begin{proof}
\mbox{aaa}\\*[-\dimexpr2\baselineskip+\abovedisplayskip\relax]\mbox{bbb}
\begin{align*}
\text{One equation}
\end{align*}
zzz
\begin{align*}
\text{One equation}
\end{align*}
zzz
\end{proof}

\end{document}

which only affects the space above one equation (you might want to omit the aaa and bbb and just use \mbox{} in a real document).

The fact that such contortions are needed might be taken as a hint that perhaps it's not the expected usage and that saying at least Consider the equation before the equation would make make egreg happier.

2
  • LaTeX often does a good job to produce nice output for sensible documents and styles, but to consider a document or style unsensible every time LaTeX does not do a good job can be a sign of self-righteousness. – Joachim Breitner Dec 4 '15 at 12:40
  • @JoachimBreitner yes I'd agree in general although here it's not not "doing a good job" but rather "not attempting to do anything at all, on the grounds it shouldn't happen" tex-the-program essentially doesn't support paragraphs starting with display math (it doesn't give an error but gives horrible spacing) starting from that base it is hard for macro packages such as amsthm to do anything sensible here. – David Carlisle Dec 4 '15 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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