diff --git a/default.latex b/default.latex index c91a03861..5ef9170a9 100644 --- a/default.latex +++ b/default.latex @@ -70,13 +70,18 @@ $if(graphics)$ % Images get their normal width if they fit onto the page, but % are scaled down if they would overflow the margins. \makeatletter -\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth -\else\Gin@nat@width\fi} +\def\ScaleIfNeeded{% + \ifdim\Gin@nat@width>\linewidth + \linewidth + \else + \Gin@nat@width + \fi +} \makeatother \let\Oldincludegraphics\includegraphics {% \catcode`\@=11\relax% - \gdef\includegraphics{\@ifnextchar[{\Oldincludegraphics}{\Oldincludegraphics[width=\maxwidth]}}% + \gdef\includegraphics{\@ifnextchar[{\Oldincludegraphics}{\Oldincludegraphics[width=\ScaleIfNeeded]}}% }% $endif$ \ifxetex