summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-06-14 14:40:36 +0800
committerIru Cai <mytbk920423@gmail.com>2018-06-14 17:04:40 +0800
commit2934d169fed9b78a72c04ee66e91e39a78cf922a (patch)
treea9ab4c791ed7423205cf1757bbb55ad62644f459 /pdf
parentff12985075656da1ac7b9034b2033c08b57d43d6 (diff)
downloadfsfs-zh-2934d169fed9b78a72c04ee66e91e39a78cf922a.tar.xz
Update pandoc to 2.2.1
- "--latex-engine" renamed to "--pdf-engine" - copy the keepaspectratio graphicx setting from the latest pandoc LaTeX template - remove -S option when generating epub
Diffstat (limited to 'pdf')
-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}