Skip to content

Instantly share code, notes, and snippets.

@rwst
Created November 21, 2011 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rwst/1382799 to your computer and use it in GitHub Desktop.
Save rwst/1382799 to your computer and use it in GitHub Desktop.
proposed patch to pandoc-templates preparing image width implementation in pandoc
diff --git a/default.latex b/default.latex
index e565833..e1d5a7e 100644
--- a/default.latex
+++ b/default.latex
@@ -47,15 +47,6 @@ $if(url)$
$endif$
$if(graphics)$
\usepackage{graphicx}
-% We will generate all images so they have a width \maxwidth. This means
-% that they will 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}
-\makeatother
-\let\Oldincludegraphics\includegraphics
-\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment