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.

How do I get rid of the extra spacing after multicols?

\documentclass{article}
\usepackage{amsmath}
\usepackage{anysize}
\usepackage{lipsum}
\usepackage{multicol}
\begin{document}
    \begin{multicols}{2}
        \noindent    \[ a = b \]
        \columnbreak \[ a = b \]
    \end{multicols}
    \noindent \lipsum
\end{document}

Result:

share|improve this question
    
If you want to group the equations by column without using multicols, you could use p{} columns within a tabular, as in this answer. But that still leaves a lot of vertical space. –  rdhs Dec 11 '11 at 2:17
add comment

1 Answer

up vote 5 down vote accepted

Well, for typesetting math expression multicols are not the best choice. Try this:

\documentclass{article}
\begin{document}
  \[ a = b \qquad a = b \]
  \noindent \lipsum
\end{document}

If you just have two single expression to go next to each other \qquad inserts just some whitespace to push them apart. If you have more places were you want to typeset math you might want to look at the align environment. Have a look at mathmode for more examples.

share|improve this answer
    
Whoa... what is this magic... +1 thanks a bunch. :) What's the difference between qquad and columnbreak though? –  Mehrdad Dec 11 '11 at 1:01
    
The trouble with align is that it doesn't do what I want -- I want to have three columns of equations, but the equations are grouped vertically, not horizontally. I don't necessarily even have the same number of rows in every column... how would I go about doing that? –  Mehrdad Dec 11 '11 at 1:13
    
@Mehrdad If you take a look at the mathmode pdf you will find plenty of examples with multiple columns. You just use && to separate the different columns and end the line with \\ to begin a new row. If you have equations you can write a&=b& to align the equations by the = sign. –  uli Dec 11 '11 at 1:16
    
Yes, but the problem is that doing so groups by row, not by column. So it's not flexible -- when I later decide to remove a cell, I will have to change the entire table just to shift up the elements under it. –  Mehrdad Dec 11 '11 at 1:18
    
@Mehrdad I am afraid I don't know what you mean by “group by row”. align environments allow math to be typeset in a grid like fashion. And yes if you remove one from the middle, it is troublesome to move the ones below up. But that is taken care of by a good editor with a column edit mode, as well as alinging the source so it can be cut and pasted easily. –  uli Dec 11 '11 at 1:25
show 1 more comment

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.