jgm/pandoc-templates — pull request #57 by gadenbuie (2014-04-10 04:16:22+00:00)
Title: Fixes #52: max width and height of images in default.beamer

Based on [this answer at tex.stackexchange](http://tex.stackexchange.com/a/67462), according to which

> The `beamer` class redefines `\includegraphics`, but "at begin document", so... `\LetLtxMacro` is needed.

Also, for overly tall images `\maxheight` is set to `0.8\textheight`. Beamer doesn't seem to store the height of the text area between header and footer, so `0.8` is a best guess.

Verified with Pandoc 1.12.3 using the [test case](https://www.dropbox.com/sh/72mw64o8iqlwn1b/-ETTcO13rU) provided by @yihui in [issue #49](https://github.com/jgm/pandoc-templates/pull/49).