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.

Consider the minimal code:

\documentclass{report}
\usepackage{mathtools}
\usepackage{lipsum}
\begin{document}
\lipsum*[2]%
\begin{align*}
m_{1}(x) &=x(x-1)=x^{2}-x, & m_{2}(x)&=x^{2}(x-1)=x^{3}-x^{2},
\end{align*}
\begin{align*}
m_{3}(x) &=x(x-1)^{2}=x^{3}-2x^{2}+x.
\end{align*}%
\lipsum*[3]
\end{document}

producing

enter image description here

What is the best way to have the same result but with a smaller vertical space between the two lines, but using only one environment?

Of course I can try to use \vspace{negative space} between those two align* but I'm afraid it could be dangerous.

share|improve this question
    
given that the alignment points are different I suspect a negative vspace between the two is the only way. Of course answers may vary in how far they go to hide the negative space or the two separate alignments from the document markup –  David Carlisle Apr 4 at 12:03
    
@DavidCarlisle, maybe some negative vertical space but with those options to expand or contract? I don't want to have a so hard vertical space. It could be small if necessary to better format my page. –  Sigur Apr 4 at 12:06
1  
I see what you're asking for - but why? Might your equations be easier to read if they were in three lines with the first equal signs aligned? Then the reader could easily compare the expressions for the functions m_1. –  Ethan Bolker Apr 4 at 12:36
    
@Sigur I'd use the same spaces ams uses (which is \abovedisplayskip and \belowdisplaysip I think, same as a primitive $$ display) –  David Carlisle Apr 4 at 12:49
    
@EthanBolker, I need to save space. When possible I insert everything in one line, but sometimes I need one line more. –  Sigur Apr 4 at 13:53

2 Answers 2

in your example, nothing is actually aligned, in spite of the use of &. alignment implies that more than one line is involved.

i suggest using gather* instead:

\begin{gather*}
m_{1}(x) =x(x-1)=x^{2}-x, \qquad m_{2}(x)=x^{2}(x-1)=x^{3}-x^{2},\\
m_{3}(x) =x(x-1)^{2}=x^{3}-2x^{2}+x.
\end{gather*}

output of example code

if you want to add a bit more space between the two lines, you can always put an optional dimension right after the double backslash (don't leave a typed space before the opening bracket!):

... \\[2pt]

suggestion: read the amsmath users guide (texdoc amsmath) to see what options exist for formatting multi-line displays. there are quite a few, with quite varied possibilities.

share|improve this answer
    
Awww, you beat me to this very answer by a few seconds! –  Mico Apr 4 at 12:42
1  
@Mico -- which answer -- the gather* or "read the documentation"? –  barbara beeton Apr 4 at 12:46
    
@barbarabeeton, thanks. I have some blocks with more than 3 expressions. But if they fit only in one line, I use one. If necessary, I split the line in two, like my example. I was supposing that the space between the items on the same line could be evenly spaced. This is not the case if I use \quad isn't? –  Sigur Apr 4 at 13:56
1  
@Sigur -- i think you're using the align approach to get the spacing between actual equations done automatically (i.e., that separation will be larger than the space around an =). i have an appointment now, but i'll try to come back to this later. –  barbara beeton Apr 4 at 14:45
    
@barbarabeeton - the gather* part... –  Mico Apr 4 at 14:52

Maybe I'm missing something, but I don't really see the align* environment as doing anything other than providing horizontal space between the top two expressions. If that is the case, then a simple stack can accomplish your goal or reducing the vertical gap. Note that the gap itself is specified as an optional stacking argument.

\documentclass{report}
\usepackage{mathtools}
\usepackage{lipsum}
\usepackage[usestackEOL]{stackengine}
\stackMath
\begin{document}
\lipsum*[2]%
\begin{equation*}
\stackunder[10pt]{m_{1}(x) =x(x-1)=x^{2}-x,\quad\qquad m_{2}(x)=x^{2}(x-1)=x^{3}-x^{2},}%
  {m_{3}(x) =x(x-1)^{2}=x^{3}-2x^{2}+x.}
\end{equation*}
\lipsum*[3]
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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