显示方程式的方法有很多种。我尝试将一个大方程式置于显示模式(即:),\[ {\equation} \]
并使用 将其尺寸保持在合理的范围内adjustbox
。
这是最小(非)工作示例:
\documentclass[a4paper,twoside,twocolumn,final]{article}
\setlength\textwidth{42.5pc}
\setlength\columnsep{1.5pc}
\usepackage{adjustbox}
\begin{document}
\texttt{\\columnwidth is \the\columnwidth}. We are going to see a wonderful equation, it extends to the other column and knows no limits:
%\adjustbox{max size={\columnwidth}{\textheight},keepaspectratio,center}{
\[
\frac{k + l + m + n + p + q + r + t + u + v + w + x + y + z}{a + b + c + d + f + g + h + i + j + k + l + m + \frac{t + r + y + l + k + s}{\frac{small + characters }{are + fine}}}
\]
%}
\end{document}
我尝试了许多其他组合,例如minipage
,gather
以及其他一些组合。要么不起作用,要么存在一些边距,导致方程无法扩展到指定宽度(在本例中为\columnwidth
)。
答案1
只需调整方程的大小:
\documentclass[a4paper,twoside,twocolumn,final]{article}
\usepackage{graphicx}
\setlength\textwidth{42.5pc}
\setlength\columnsep{1.5pc}
\begin{document}
\texttt{\\columnwidth is \the\columnwidth}. We are going to see a wonderful equation, it extends to the other column and knows no limits:
\[
\resizebox{\columnwidth}{!}{$\displaystyle
\frac{k + l + m + n + p + q + r + t + u + v + w + x + y + z}{a + b + c + d + f + g + h + i + j + k + l + m + \frac{t + r + y + l + k + s}{\frac{small + characters }{are + fine}}}
$}
\]
\end{document}
答案2
我会尝试一下包\splitfrac
提供的宏mathtools
。它可以用于分数表达式的分子和分母。如以下示例所示,\splitfrac
宏可以嵌套。
\documentclass[a4paper,twoside,twocolumn,final]{article}
\setlength\textwidth{42.5pc}
\setlength\columnsep{1.5pc}
\usepackage{mathtools}
\begin{document}
\texttt{\textbackslash columnwidth is \the\columnwidth}.
We are going to see a wonderful equation, it extends to the other column and knows no limits:
\[
\frac{\splitfrac{k + l + m + n + p + q + r + t}{ + u + v + w + x + y + z}}{\splitfrac{a + b + c + d + f + g + h + i + j}{ \splitfrac{+ k + l + m + t + r + y + l + k + s }{+ small + characters + are + fine}}}
\]
\end{document}