Upon reading What are the differences between $$, [, align, equation and displaymath?, I decided I really wanted to understand what was going on inside \[...\] and so I devised some tests. What I discovered confounds me.
Why does \[...\] do the wrong thing at the top of a page?
The definition of \[ goes out of its way to suppress additional vertical space by invoking \nointerlineskip, but then adds vertical space implicitly by making an empty box 60% the width of the line: \makebox[.6\linewidth]{}.
I can see how this might be desirable in some cases, but it's certifiably the wrong thing to do for a displayed formula at the top of a page, as it causes a whole extra line's worth of unwanted space at the top. This happens whether the result of a forced page break or the result of natural break after a paragraph.
Here is a minimal working example:
\documentclass{article}
\begin{document}
\newpage $$y=x^2$$
\newpage \[y=x^2\]
\end{document}
Notice how the second equation is much lower on the page than the first. Does anyone know why this is? Is it a flaw in \[...\]? Is it by design?
Note that it also does this inside of (at the top of) a \parbox.
amsmath, since it redefines\[and\]. – Werner Feb 08 '12 at 19:34$$...$$vs.\[...\]line up perfectly. Cool. – Todd Lehman Feb 08 '12 at 19:57