Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Remove vertical space around align

I would like to center two text lines with equations. Normally, one can do that with the align* environment. But I do not want the extra vertical space at the top and the bottom of the formulas (see example below).

An alternative could be to simply center the formulas with \centerline. But then, the two equation symbols will not be placed one below the other.

Here is an example:

\documentclass[a4paper]{article} 
\usepackage{amsmath}

\begin{document} 
text before % Extra space after this line
\begin{align*}
  1 &= 1 \\
  x &= \text{here is a long formula}
\end{align*}
text after % Extra space before this line

text before \\
\centerline{$1 = 1$} \\ % equation symbols not below each other
\centerline{$x = \text{here is a long formula}$} \\
text after
\end{document}

Is it possible to use align* without the extra vertical space ?

If not, what could be another solution ?

share|improve this question

marked as duplicate by Gonzalo Medina, Kurt, Harish Kumar, Qrrbrbirlbel, Heiko Oberdiek Oct 22 '12 at 3:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Have you considered editing the \abovedisplayskip? –  azetina Oct 22 '12 at 0:34
3  
add comment

1 Answer

Add the following lines of code:

{\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\begin{align*}
  1 &= 1 \\
  x &= \text{here is a long formula}
\end{align*}}

Enclosing the above in {} ensures that the display break adjustments are made local and not global.

share|improve this answer
add comment

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