Text Formatting ⇒ One line too much
One line too much
I need to remove an empty line after an equation, as shown on the picture below. The vertical space is way too much in this case.
I can't give a minimal compilable code example here, since this is occuring in some rare instances only and is unpredictable.
What command should I use to tell LaTeX to remove that empty line ?
Is there an inverse of the \newline command ?
I can't give a minimal compilable code example here, since this is occuring in some rare instances only and is unpredictable.
What command should I use to tell LaTeX to remove that empty line ?
Is there an inverse of the \newline command ?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
One line too much
Something likeCham wrote:Is there an inverse of the \newline command ?
\vspace{-\baselineskip}
perhaps. But I would rather fix the actual problem. Do you have an empty line after the formula? Before and after displayed math environments, empty lines, which mean paragraph breaks, should not be used, because the displayed environment already adds its own space.Stefan
LaTeX.org admin
One line too much
I'm not sure to understand. The code is like this (this is a non-compilable example) :
EDIT : When a say "empty line", I mean a vertical space which is too large and which looks like an empty line. I just want to reduce it. The \vspace command doesn't remove it, its removing the space after the next line only 
Code: Select all
Bla bla bla bla bla bla bla :
\begin{align}
A &= B \nonumber \\ \nonumber \\
&= C \nonumber \\ \nonumber \\
&= D.
\end{align} % then follows an empty line after compilation
Bla bla bla bla bla bla
\begin{equation*}
A = B.
\end{equation*}
Bla bla bla bla bla bla

One line too much
Here's a compilable example. The spacing problem isn't obvious in this case, though :
Now, how can I reduce the vertical space immediately after equation (1), just before the following text line ?
Code: Select all
\documentclass[12pt,letterpaper]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
Bla bla bla bla bla bla bla bla bla :
\begin{align}
Axyztuv &= B + x + y \nonumber \\ \nonumber \\
&\equiv C - 2 + 12 \nonumber \\ \nonumber \\
&= Dx - y - z.
\end{align}
Bla bla bla bla
\begin{equation*}
Axyz + 3 - y = Buvw.
\end{equation*}
Bla bla bla bla bla
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
One line too much
You could modify
You could even set it to
Stefan
\belowdisplayskip
. To keep the change local, use a group or braces. For example:Code: Select all
\begingroup
\setlength{\belowdisplayskip}{\belowdisplayshortskip}
\begin{align}
...
\end{align}
\endgroup
0pt
or any other value.Stefan
LaTeX.org admin
Re: One line too much
It doesn't do anything ! Am I missing something ? What about the space parameter ?
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
One line too much
It works for me with your code:
Stefan
Code: Select all
\documentclass[12pt,letterpaper]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath}
\begin{document}
Bla bla bla bla bla bla bla bla bla :
\begingroup
\setlength{\belowdisplayskip}{0pt}
\begin{align}
Axyztuv &= B + x + y \nonumber \\ \nonumber \\
&\equiv C - 2 + 12 \nonumber \\ \nonumber \\
&= Dx - y - z.
\end{align}
\endgroup
Bla bla bla bla
\begin{equation*}
Axyz + 3 - y = Buvw.
\end{equation*}
Bla bla bla bla bla
\end{document}
LaTeX.org admin
Re: One line too much
Aah ! Now it's working. I missed the 0pt parameter...
Thanks Stefan.
Thanks Stefan.