1

I want to know if there is a tool to automatically resize the equations if they are longer than \pagewidth.

The whole story is that I am compiling my thesis in b5paper, but I want to also produce a pdf that is more ebook-size-friendly. Therefore, I am compiling the source documents again with a smaller paper size. Long equations that are correctly displayed in b5paper go over the margin in the new smaller paper. I tried to use the breqn package, but as soon as I load it, the compiler never ends compiling.

Any other idea?

Thanks in advance

1

Scaling elements which contain text is usually a bad idea, see Why not scale elements that contain text

I suggest to use a smaller font size or split the equations over multiple lines instead.

\begingroup
    \scriptsize%
    \begin{equation}
     x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
    \end{equation}
\endgroup

If you must scale them, you could try \resizebox:

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{equation}
\resizebox{.9\textwidth}{!}{
     x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
}
\end{equation}


\end{document}

Or if you also want to apply it to short equations which don't need to be scaled:

\documentclass{article}

\usepackage{adjustbox}

\begin{document}

\begin{equation}
\adjustbox{max width=.9\textwidth}{
     x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
}
\end{equation}


\begin{equation}
\adjustbox{max width=.9\textwidth}{
     x x x x x x x x x x x x x x x x x x x x 
}
\end{equation}

\end{document}
  • I wanted to have something that does not force me to change each one of the formulas in the whole book. I guess there is no better solution that the ones you proposed. Thanks anyway. – Robinson Medina Sep 4 '18 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.