# Trouble with multicol

I'm trying to use multicol to create a formula sheet with two columns. I have specified the use of such columns, and their position, but when I compile they come out one after the other rather than split vertically on each side of the page. It would be ideal to have two separate columns very close together to maximize space as this will be used during an examination. I have things like

\pagestyle{empty}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}


in my preamble to use as much of the page as possible, but every compilation yields the same output. I looked at a few posts with the lipsum environment but I'm not sure how that works with multicol. I realize this is a simple problem, and definitely has a simple answer, but I cannot achieve the desired output. It would also be excellent to have a framebox around each column, separated by \hspace or something of that nature.

Thanks in advance

EDIT:

\begin{multicols}{3}
2.1 a)
\begin{align*}
\ddot{x} &= \frac{1}{m}\left(F_0+ct\right)\\
\dot{x} &= \int_{0}^{t}\frac{1}{m}\left(F_0+ct\right)\,dt = \dfrac{F_0}{m}t+\dfrac{c}{2m}t^2\\
x &= \int_{0}^{t}\left(\dfrac{F_0}{m}t+\dfrac{c}{2m}t^2\right)\\
\end{align*}
\end{multicols}


Here is a sample, it's simply a strategy/reference to an assignment problem. I can post others as well as this is just a snippet, let me know.

EDIT 2

\begin{multicols}{3}
{\bf Bullet shot up with quadratic drag}
\begin{align*}
F &=-c_2v^2-mg\\
mv\dfrac{dv}{dx} &= -c_2v^2-mg\\
\int\dfrac{mv}{c_2v^2+mg}\,dv &=\int -1\,dx\\
\dfrac{m}{2c_2}\int \ln(c_2v^2+mg) &= -x+\beta\\
\beta &= \dfrac{m}{c_2}\ln(c_2v_0^2+mg)\\
v(x) &= \left((v_0^2+\frac{mg}{c_2})\exp{\dfrac{-2c_2x}{m}}-\dfrac{mg}{c_2}\right)^{1/2}\\
\end{align*}

{\bf Useful Proof}
\begin{align*}
\dfrac{d}{dt}\left[\vec{r}\cdot(\vec{v}\times\vec{a})\right] &= \vec{r}\cdot(\vec{v}\times\vec{a})\\
&= \dot{\vec{r}}\cdot(\vec{v}\times\vec{a}) + \vec{r}\cdot\dfrac{d}{dt}(\vec{v}\times\vec{a})\\
&= \vec{v}\cdot(\vec{v}\times\vec{a})+\vec{r}\cdot\left[\dot{\vec{v}}\times\vec{a}+\vec{v}\times\dot{\vec{a}}\right]\\
&= \vec{r}\cdot(\vec{v}\times\dot{\vec{a}})\\
\end{align*}

{\bf Find $V(x)$ where $F(x)=-kx+\frac{kx^3}{A^2}$,$v(t=0) = A\sqrt{\frac{k}{2m}}$ and $x(t=0) = 0$ }
\begin{align*}
F&=-\dfrac{dV}{dx}\\
k\int x-\dfrac{x^3}{A^2}\,dx &= \int dV\\
\dfrac{kx^2}{2}-\dfrac{kx^4}{4A^2} &= V(x) + C\\
V(x) &= \dfrac{kx^2}{2} -\dfrac{kx^4}{4A^2}\\
\end{align*}
{\bf Proof of successive maxima}
\begin{align*}
x(t) &= \exp{-\gamma t}(A\cos(\omega_dt+\theta_0))\\
x'(t) &= -\gamma\exp{-\gamma t}(A\cos(\omega_dt+\theta_0))+\exp{-\gamma t}(-A\omega_d\sin(\omega_dt+\theta_0))\\
0 &=A(-\gamma\cos(\omega_dt+\theta_0)-\omega_d\sin(\omega_dt+\theta_0))\\
1&=\dfrac{-\omega_d}{\gamma}\tan(\omega_dt+\theta_0)\\
\dfrac{-\gamma}{\omega_d}&=\tan(\omega_dt+\theta_0)\\
(\omega_dt_{i+1}+\theta_0) - (\omega_dt_i+\theta_0) &= 2\pi\\
\omega_d(t_{i+1}-t_i) &= 2\pi\\
t_{i+1}-t_i &= \dfrac{2\pi}{\omega_d}\\
t_{i+1}-t_i &= \dfrac{2\pi}{(\omega_0^2-\gamma^2)^{1/2}}
\end{align*}

-
I'm loving all these math exam-related questions on the TeX SE lately. Nice to know others are suffering as I am... –  Matthew Leingang Dec 13 '10 at 19:59
Can you provide an sample of your code with the multicol part included? –  Matthew Leingang Dec 13 '10 at 20:01
Could you post a working example that can be compiled and is a short example of would you would like to be able to do but are unable? The snippet you wrote doesn't actually use 3 columns...the align precludes that....please include your attempts at getting more space from the margins –  Yossi Farjoun Dec 14 '10 at 15:16
@Yossi Farjoun: I have edited the above post further and included a larger amount of the source file. Using align* fowls everything up as a few of you have pointed out. I think I may just compile the document within regular math mode. Thank you for the insight. –  Jasper D'Agostino Dec 15 '10 at 14:27
@Matthew Leingang: Stressful time of the year for everyone in school, and profs who have exams/final projects to mark..at least we are all suffering together! –  Jasper D'Agostino Dec 15 '10 at 15:05

## 2 Answers

The problem is the array, eqnarray or align environments cannot be broken up across columns. If you added enough equations to the align environment in your example, the equations would overflow the margin (you would get an overfull \vbox error message). In general, LaTeX does not break formula environments, either across columns or pages. I must add, though, that including \allowdisplaybreaks in your preamble will permit LaTeX to break up the formula environments. So, I have two rough solutions here:

First suggestion: include \allowdisplaybreaks in your preamble with your existing code. The equations should distribute fairly nicely across your three columns.

Another suggestion would be to use the array environment to create three columns, for instance:

$\begin{array}{l l l} ... \end{array}$


Within the array columns, you can also create an align environment for each equation you want write.

Here's a rough and ready example of a possible solution using array (Note: you have to load the array package):

$\begin{array}{ l >{\quad}l >{\quad}l >{\quad}l } 2.1 a) & \ddot{x} = \frac{1}{m}\left(F_0+ct\right) & \dot{x} = \int_{0}^{t}\frac{1}{m}\left(F_0+ct\right)\,dt = \dfrac{F_0}{m}t+\dfrac{c}{2m}t^2 & x = \int_{0}^{t}\left(\dfrac{F_0}{m}t+\dfrac{c}{2m}t^2\right)\\[6mm] 2.1 a) & \ddot{x} = \frac{1}{m}\left(F_0+ct\right) & \dot{x} = \int_{0}^{t}\frac{1}{m}\left(F_0+ct\right)\,dt = \dfrac{F_0}{m}t+\dfrac{c}{2m}t^2 & x = \int_{0}^{t}\left(\dfrac{F_0}{m}t+\dfrac{c}{2m}t^2\right)\\ \end{array}$


This is elegant, simple and not too time-consuming.

-
Thank you! I ended up using the array environment and the document compiled quite nicely. I also appreciate the comment about \allowdisplaybreaks as I was messing around with that as well, and find it quite useful. –  Jasper D'Agostino Dec 15 '10 at 14:32
@Jasper: glad this worked for you! –  Jimi Oke Dec 16 '10 at 5:13

The following code gives me 3 columns...but I have a feeling this isn't what you want....could it be the use of \align that was tripping you up?

\documentclass[10pt,letterpaper]{article}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage[latin1]{inputenc}
\setlength{\oddsidemargin}{0pt}
\setlength{\evensidemargin}{0pt}
\addtolength{\textwidth}{5cm}

\begin{document}
\begin{multicols}{3}
2.1 a)
\begin{equation*}\ddot{x} = \frac{1}{m}\left(F_0+ct\right)\end{equation*}
\begin{equation*}\dot{x} = \int_{0}^{t}\frac{1}{m}\left(F_0+ct\right)\,dt = \dfrac{F_0}{m}t+\dfrac{c}{2m}t^2\end{equation*}
\begin{equation*}x = \int_{0}^{t}\left(\dfrac{F_0}{m}t+\dfrac{c}{2m}t^2\right)\end{equation*}
\end{multicols}
\end{document}

-