# Multicol doesn't break formulas

When trying to create a 3-column document (with tight-spaced page paddings), the text is in place, however, the formulas are not adapted to the column width:

\documentclass[12pt,a4paper,landscape]{article}
\usepackage[utf8]{inputenc}

\usepackage{amsmath,bm}
\usepackage{amsfonts}
\usepackage{multicol}
\usepackage{blindtext}

\usepackage[left=0.5cm,right=0.5cm,top=0.5cm,bottom=0.5cm]{geometry}

\begin{document}
\begin{multicols}{3}
\blindtext
$$The following equation shows ... \mathcal{L}(q)=E_{q(\tau)}[\log p(\tau)]+E_{q(\theta)}[\log p(\theta)]+E_{q(\mathbf{z}) q(\tau)}[\log p(\mathbf{z} | \tau)]$$

\begin{align}$$The following equation shows ... \mathcal{L}(q)=E_{q(\tau)}[\log p(\tau)]+E_{q(\theta)}[\log p(\theta)]+E_{q(\mathbf{z}) q(\tau)}[\log p(\mathbf{z} | \tau)]$$\end{align}

\blindtext
\end{multicols}
\end{document}


How can equations also adapted to the columns?

• unrelated to multicolumn, there is no automatic line breaking in align the point of the environment is that you need to add \\  to break the equation as needed. Jun 1, 2019 at 14:44
• it is hard to suggest anything without a real example, presumably your real document does not have The following equation shows ... inside the math Jun 1, 2019 at 14:45
• Is this also the case when using $...$? Jun 1, 2019 at 14:45
• no inline math will break in some places, but that looks more suitable to display math. Jun 1, 2019 at 14:46

## 1 Answer

Something like

\documentclass[12pt,a4paper,landscape]{article}
\usepackage[utf8]{inputenc}

\usepackage{amsmath,bm}
\usepackage{amsfonts}
\usepackage{multicol}
\usepackage{blindtext}

\usepackage[left=0.5cm,right=0.5cm,top=0.5cm,bottom=0.5cm]{geometry}

\begin{document}
\begin{multicols}{3}
\blindtext

The following equation shows \ldots
\begin{multline}
\mathcal{L}(q)=E_{q(\tau)}[\log p(\tau)]+\\
E_{q(\theta)}[\log p(\theta)]+\\
E_{q(\mathbf{z}) q(\tau)}[\log p(\mathbf{z} | \tau)]
\end{multline}

\blindtext
\end{multicols}
\end{document}