Multicol 不会破坏公式

Multicol 不会破坏公式

当尝试创建一个 3 列文档(具有紧密间距的页面填充)时,文本已到位,但公式并未适应列宽:

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

在此处输入图片描述

方程式又怎样能适应列呢?

答案1

就像是

在此处输入图片描述

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

相关内容