Hello,
I have noticed that when I replace equation* with align* an empty line appears between the last text row and the actual equation. With equation*-environment, the equation is displayed right after the text. Is there a way to suppress the empty line with align*?
Thank you,
Alexander
P.S. I could provide an example as well, but if you know a general rule, I don't want to waste your time with the a long mathematical equation.
General ⇒ Empty line with align*
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
Re: Empty line with align*
Hi Alexander,
probably that's caused by a paragraph break before the math environment. Don't leave an empty line before or after displayed math environments, that would result in bad spacing. With align* it's good to see, but also with equation* you could notice a different spacing before/after if you set empty lines before/after the environment or not.
Stefan
probably that's caused by a paragraph break before the math environment. Don't leave an empty line before or after displayed math environments, that would result in bad spacing. With align* it's good to see, but also with equation* you could notice a different spacing before/after if you set empty lines before/after the environment or not.
Stefan
LaTeX.org admin
Re: Empty line with align*
Hello Stefan,
Thank you for the advice. I would like to reformulate my question now - How can I omit an empty line before and after an align* environment or say the center environment. I very often don't need this extra line before and after it.
Thank you for the advice. I would like to reformulate my question now - How can I omit an empty line before and after an align* environment or say the center environment. I very often don't need this extra line before and after it.
- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Empty line with align*
Hi Alexander,
what I meant was suppressing the additional empty "line" before align* that's caused by an empty source code line before \begin{align*}. Some spacing is common, also before and after equation*. You can remove this space by setting lengths like \abovedisplayskip etc. to 0pt. Have a look at this example:
The center environment is a different issue. It creates a list internally. You can avoid the additional space by using \centering like
Stefan
what I meant was suppressing the additional empty "line" before align* that's caused by an empty source code line before \begin{align*}. Some spacing is common, also before and after equation*. You can remove this space by setting lengths like \abovedisplayskip etc. to 0pt. Have a look at this example:
Code: Select all
\documentclass[a4paper,10pt]{article}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\usepackage{amsmath}
\begin{document}
\setlength{\abovedisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\blindtext
\begin{equation*}
x + y = z
\end{equation*}
\blindtext
\begin{align*}
x + x = z
\end{align*}
\blindtext
\end{document}
Code: Select all
{\centering text\par}
LaTeX.org admin