# Control the size of an equation (in display mode)

There are several ways to show an equation. I'm trying to put a big equation in display mode (i.e.: ${\equation}$) and to keep it's dimensions within the size that is reasonable, using adjustbox.

This is the minimal (non) working example:

\documentclass[a4paper,twoside,twocolumn,final]{article}
\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:
$\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}


I have tried a number of other combinations, like minipage, gather and some other. Either it doesn't work or there are some margins that prevent the equation from expanding to the specified width (in this case \columnwidth).

• The example is too unrealistic; could you change it into a more meaningful one? – egreg Jan 16 '15 at 18:44
• It's ok if the equation is very small and unreadable, it's just an example. In fact, that's what I hope. The only important point is that the equation is not in inline mode, as that makes it more compact and looks different to all the other equations. Anyway, I modified the example. – Trylks Jan 16 '15 at 18:57

Just resize the equation:

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


I'd give the \splitfrac macro, which is provided by the mathtools package, a try. It can be used in both the numerator and the denominator of a fraction expressions. As the following example shows, \splitfrac macros can be nested.

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