9

My question is similar to the one here as well as here, but for some reason the proposed solution i.e. use resizebox, doesn't work for me.

I know that the 'obvious' answer is to add more line breaks, but this doesn't really make sense for what I'm trying to do which is to print my thesis using as few pages as possible (for proof reading purposes).

Here is my MWE:

\documentclass[10pt, oneside, twocolumn, notitlepage]{book}
\usepackage{amsthm,latexsym,amssymb,amsmath, amsfonts}
\usepackage{graphicx}
\usepackage{lipsum}

\newtheorem{thm}{Theorem}[section]


\newtheorem{rem}[thm]{Remark}

\begin{document}
\lipsum[1]
%\resizebox{.9\linewidth}{!}{
\begin{align*}
\mathrm{Term_{2a}} &=\iint  \left[\nabla \phi_t(x) \cdot \nabla \phi(y) + \nabla \phi(x) \cdot \nabla \phi_t(y) \right]\  e^{-\frac{\|x-y\|^2}{d^2}} W_{l}(\phi(x))W_{l}(\phi(y)) \mathrm{\ dx \ dy} \\
&=\iint  \nabla \phi_t(x) \cdot \nabla \phi(y)  e^{-\frac{\|x-y\|^2}{d^2}} W_{l}(\phi(x))W_{l}(\phi(y)) \mathrm{\ dx \ dy} \\
\end{align*}%}
\lipsum
\end{document}

This is what it looks like: enter image description here

Adding the resizebox{.9\linewidth}{!}{...} command produces the following errors (apologies it's rather small):

enter image description here

Community
  • 1
  • 1
Neil
  • 287
  • 1
  • 3
  • 12

2 Answers2

18

It seems that scalebox doesn't work well with math mode. A possible solution is to put your align inside a minipage:

\documentclass[10pt, oneside, twocolumn, notitlepage]{book}
\usepackage{amsthm,latexsym,amssymb,amsmath, amsfonts}
\usepackage{graphicx}
\usepackage{lipsum}

\newtheorem{thm}{Theorem}[section]


\newtheorem{rem}[thm]{Remark}

\begin{document}
\lipsum[1]

\resizebox{.9\linewidth}{!}{
  \begin{minipage}{\linewidth}
  \begin{align*}
\mathrm{Term_{2a}} &=\iint  \left[\nabla \phi_t(x) \cdot \nabla \phi(y) + \nabla \phi(x) \cdot \nabla \phi_t(y) \right]\  e^{-\frac{\|x-y\|^2}{d^2}} W_{l}(\phi(x))W_{l}(\phi(y)) \mathrm{\ dx \ dy} \\
&=\iint  \nabla \phi_t(x) \cdot \nabla \phi(y)  e^{-\frac{\|x-y\|^2}{d^2}} W_{l}(\phi(x))W_{l}(\phi(y)) \mathrm{\ dx \ dy} \\
\end{align*}
  \end{minipage}
}

\lipsum
\end{document}
Daniel
  • 196
  • 2
  • 5
  • 2
    With align this also scales the equation numbers. Any option for a self-defined environment which applies a minipage but leaves the equation number unscaled? – Elarion Jun 06 '20 at 20:48
  • I'm very curious that why the factor `.9`in the parameter of resizebox is necessary? I removed this factor, i.e. use `\resizebox{\linewidth}{!}{...`. The result is that, no visible overfull is found, but it still gives the overfull hbox warning. It's quite strange. – Yijun Yuan May 10 '21 at 10:12
  • Finally! Thanks. I was trying `resizebox`, `scalebox` and `minipage` separately, but it is your combination `resizebox+minipage` that worked. – Weather Report Apr 18 '23 at 14:03
0

Write the equation in between \beginmath{}-\end{math} and it will work.

\documentclass[10pt, oneside, twocolumn, notitlepage]{book}
\usepackage{amsthm,latexsym,amssymb,amsmath, amsfonts}
\usepackage{graphicx}
\usepackage{lipsum}

\newtheorem{thm}{Theorem}[section]


\newtheorem{rem}[thm]{Remark}

\begin{document}
\lipsum[1]
  \resizebox{0.92\hsize}{!}{%
        \begin{math}
        \begin{aligned}
        \mathrm{Term_{2a}} &=\iint  \left[\nabla \phi_t(x) \cdot \nabla \phi(y) + \nabla \phi(x) \cdot \nabla \phi_t(y) \right]\  e^{-\frac{\|x-y\|^2}{d^2}} W_{l}(\phi(x))W_{l}(\phi(y)) \mathrm{\ dx \ dy} \\
        &=\iint  \nabla \phi_t(x) \cdot \nabla \phi(y)  e^{-\frac{\|x-y\|^2}{d^2}} W_{l}(\phi(x))W_{l}(\phi(y)) \mathrm{\ dx \ dy} \\
        \end{aligned}
        \end{math}%      
    }
\lipsum
\end{document}
esra
  • 201
  • 2
  • 8