1

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
\begin{equation}
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{equation}

\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}

enter image description here

How can equations also adapted to the columns?

4
  • 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 $ ...$?
    – black
    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 1

3

Something like

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.