@@ -14,6 +14,15 @@
1414\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
1515\usepackage{url}
1616\usepackage{graphicx}
17+% We will generate all images so they have a width \maxwidth. This means
18+% that they will get their normal width if they fit onto the page, but
19+% are scaled down if they would overflow the margins.
20+\makeatletter
21+\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
22+\else\Gin@nat@width\fi}
23+\makeatother
24+\let\Oldincludegraphics\includegraphics
25+\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
1726\usepackage[breaklinks=true,unicode=true]{hyperref}
1827\setlength{\parindent}{0pt}
1928\setlength{\parskip}{6pt plus 2pt minus 1pt}