# Formula sheet with columns and equation breaking

I'd like to make a compact formula sheet with 3 page columns in landscape orientation. I prefer the equations to break at boundaries (semi-)automatically. Currently most of my equations are formatted as equation. I've read on equation splitting, but I still don't know how to combine it with page columns.

Here's something I glued together:

\documentclass{article}
\usepackage{breqn}
\begin{document}
\begin{minipage}{0.45\textwidth}
\begin{dmath}
Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t             \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left(    \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t -   \hat{\mu}_m^{(s)}\right) \right)
\end{dmath}
\end{minipage}%
\hfill
\begin{minipage}{0.25\textwidth}
\begin{tabular}{|p{\textwidth}}
This is second part \\
$f(x) = 2x + 3y$ This line may go all along the end and wrap afterwards to the next as seen here\\
This is a forced next line by ending the previous line
\end{tabular}
\end{minipage}%
\hfill
\begin{minipage}{0.25\textwidth}
\begin{tabular}{|p{\textwidth}}
This is the third column.
\end{tabular}
\end{minipage}%
\end{document}


There are a couple problems:

• I'm getting underfull/overfull warnings.
• The equations are not broken up as nice as I'd like to in the first column.
• The second and third columns overlap.
• I'd like the separator lines go across the whole page.
• It's in portrait mode.
• Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Adam Liter Jan 28 '14 at 2:40
• – cmhughes Jan 28 '14 at 4:41

I am not very clear what exactly you are trying to do. Although you mention columns, you do not seem to be using any columns in your document. The multicol package allows the use of 3 columns. They do need to be of equal width as far as I can tell. vwcol allows variable widths but can only cope with text so wouldn't be an option here.

To get landscape, you can pass the class the relevant option and load geometry. That's the best way of adjusting page layout of that kind with the standard LaTeX classes, as far as I know.

So you might try something like this:

\documentclass[a4paper,landscape]{article}% geometry defaults to letterpaper, even if your installation defaults to a4 so specify this explicitly unless you want letter
\usepackage{geometry}
\usepackage{multicol}
\setlength{\columnseprule}{.4pt}% adjust if you'd like thicker or thinner vertical rules
\usepackage{breqn}

\begin{document}
\begin{multicols}{3}
\begin{dmath}
Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t             \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left(    \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t -   \hat{\mu}_m^{(s)}\right) \right)
\end{dmath}\columnbreak% multicol is designed to balance columns automatically but you can force column breaks like this if necessary

This is second part\\
$f(x) = 2x + 3y$ This line may go all along the end and wrap afterwards to the next as seen here\\
This is a forced next line by ending the previous line\columnbreak

This is the third column.
\end{multicols}
\end{document}


The output:

• If I divide the page into equal parts, that's not considered columns? Thanks for your code, it seems to pretty much how I want to. Now I have another problem of disabling enumeration: tex.stackexchange.com/questions/156433/… – m33lky Jan 29 '14 at 2:23
• @m33lky TeX sees, e.g., each minipage basically as a single character when it arranges them on the page. Or course, when it makes up each one, it typesets the stuff within the minipages. But once that's done, it treats the minipages as single boxes, which is the way it treats everything, really. So it will make a difference to how the page layout turns out in some cases. This code lets TeX handle more automatically and TeX usually likes that better (i.e. gives better results). The \columnbreaks are not ideal. If you can manage letting TeX automatically break columns, that would be better. – cfr Jan 29 '14 at 3:01