From 2934d169fed9b78a72c04ee66e91e39a78cf922a Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Thu, 14 Jun 2018 14:40:36 +0800 Subject: 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 --- pdf/template.tex | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pdf') 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} -- cgit v1.2.3