General ⇒ Empty line with align*
Empty line with align*
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.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Empty line with align*
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
Re: Empty line with align*
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: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Empty line with align*
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}