带有列和方程式划分的公式表

带有列和方程式划分的公式表

我想制作一个横向的紧凑公式表,其中有 3 页列。我希望方程式在边界处(半)自动断开。目前,我的大部分方程式都格式化为equation。我读过方程分裂,但是我还不知道如何将它和页面列结合起来。

这是我粘在一起的东西:

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

有几个问题:

  • 我收到了欠满/过满警告。
  • 在第一列中,方程式并没有像我希望的那样很好地分解。
  • 第二列和第三列重叠。
  • 我希望分隔线跨越整个页面。
  • 它处于纵向模式。

答案1

我不太清楚你到底想做什么。虽然你提到了列,但你似乎没有在文档中使用任何列。该multicol软件包允许使用 3 列。据我所知,它们确实需要等宽。vwcol允许可变宽度,但只能处理文本,因此这里不是一个选项。

要获得横向布局,您可以将相关选项传递给类并加载geometry。据我所知,这是使用标准 LaTeX 类调整此类页面布局的最佳方法。

因此你可以尝试这样的方法:

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

输出:

横向模式中 3 列,带数学运算

相关内容