4

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

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).

2
  • The example is too unrealistic; could you change it into a more meaningful one?
    – egreg
    Jan 16, 2015 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, 2015 at 18:57

2 Answers 2

2

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}

enter image description here

1

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.

enter image description here

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .