summaryrefslogtreecommitdiff
path: root/pdf/template.tex
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/template.tex')
-rw-r--r--pdf/template.tex12
1 files changed, 11 insertions, 1 deletions
diff --git a/pdf/template.tex b/pdf/template.tex
index a5e1b2a..6950729 100644
--- a/pdf/template.tex
+++ b/pdf/template.tex
@@ -18,7 +18,17 @@
colorlinks = true,
citecolor = black,
linkcolor = black]{hyperref}
-\usepackage{graphicx}
+
+\usepackage{graphicx,grffile}
+\makeatletter
+\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
+\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
+\makeatother
+% Scale images if necessary, so that they will not overflow the page
+% margins by default, and it is still possible to overwrite the defaults
+% using explicit options in \includegraphics[width, height, ...]{}
+\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
+
\usepackage{xltxtra}
\usepackage{fancyhdr}
\usepackage{booktabs}