Fix includegraphics using default keys #30

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

jtanguy commented Jun 4, 2013

Instead of redefining \includegraphics in LateX and beamer templates, the
preambles now use the graphicx \setkey system.

I believe it solves the graphicx problems for PR #26 and #28

@jtanguy jtanguy Use graphicx defaults
Instead of redefining \includegraphics in LateX and beamer templates, the
preambles now use the graphicx \setkey system.
6bc432f

jgm closed this in a3cce8d May 1, 2014

@jrbing jrbing added a commit to jrbing/pandoc-templates that referenced this pull request Aug 23, 2014

@yihui @jrbing yihui + jrbing Use \setkeys{Gin}{} to set appropriate defaults for \includegraphics,…
… instead of entirely redefining this command.

Note we also consider the height of images; if an image is too high, 0.8\textheight will be used for beamer slides, and \textheight is used for articles (see http://tex.stackexchange.com/q/11954/9128).

If the user has explicitly provided the width/height options in \includegraphics[], our defaults will be overwritten, and this approach is better than the check `\@ifnextchar[` after \includegraphics because the latter approach simply gives up everything once it sees [, whereas \setkeys{Gin} can keep the good defaults unless they are explicitly overwritten in [].

closes #30, closes #28, and closes #26
05ce16e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment