Page LayoutMulticolumn Misalignment Problem

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
celestialorb
Posts: 1
Joined: Sat May 07, 2011 5:15 am

Multicolumn Misalignment Problem

Post by celestialorb »

Hello all,

I'm having a problem with the multicol environment.

I currently have the following LaTeX code:

Code: Select all

\begin{multicols}{3}
	{
		\begin{equation}\sum F_x = 0\end{equation}
		\begin{equation}\frac{dP}{dx} - p = 0\end{equation}
	}
	{
		\begin{equation}\sum F_y = 0\end{equation}
		\begin{equation}\frac{dQ}{dx} + q = 0\end{equation}
	}
	{
		\begin{equation}\sum M = 0\end{equation}
		\begin{equation}\frac{dQ}{dx} + q = 0\end{equation}
	}
\end{multicols}
However, when I render the document I get the following layout of the various equations (click to go to imgur page for larger image):
Image

Does anyone know why the third column appears to be shifted up? If it matters I'm using the AIAA's official LaTeX styling.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
woj-k
Posts: 15
Joined: Wed Jul 28, 2010 7:25 pm

Multicolumn Misalignment Problem

Post by woj-k »

With multicol it's important to keep track of any superfluous whitespace that's introduced (a linebreak in the .tex file counts as a space, etc.) The easiest way to avoid suprises is to end every line with a comment sign. Here you also need a \noindent, for obvious reasons.

Code: Select all

    \begin{multicols}{3}%
       \noindent%
       {%
          \begin{equation}\sum F_x = 0\end{equation}%
          \begin{equation}\frac{dP}{dx} - p = 0\end{equation}%
       }%
       {%
          \begin{equation}\sum F_y = 0\end{equation}%
          \begin{equation}\frac{dQ}{dx} + q = 0\end{equation}%
       }%
       {%
          \begin{equation}\sum M = 0\end{equation}%
          \begin{equation}\frac{dQ}{dx} + q = 0\end{equation}%
       }%
    \end{multicols}
Kind regards,
woj-k
Post Reply