Skip to content

Commit 8c73ad7

Browse files
fix(manuscript): update header to include keepaspectratio in includegraphics
```latex \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} ``` was changed to ```latex \newsavebox\pandoc@box \newcommand*\pandocbounded[1]{% scales image to fit in text height/width \sbox\pandoc@box{#1}% \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}% \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}% \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}% \else\usebox{\pandoc@box}% \fi% } ``` which is probably related to using a pandoc version that is incompatible with the given quarto version e.g. 1.6.42 with pandoc 3.1.1 Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
1 parent 8e40111 commit 8c73ad7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

reproducibility/manuscript/header.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
% \usepackage{showframe}
77
% \usepackage{layout}
88
\allowdisplaybreaks
9+
10+
\let\oldincludegraphics\includegraphics
11+
\renewcommand{\includegraphics}[2][]{\oldincludegraphics[#1,keepaspectratio]{#2}}

0 commit comments

Comments
 (0)