Skip to content

Instantly share code, notes, and snippets.

@ndgnuh
Created February 12, 2022 17:06
Show Gist options
  • Save ndgnuh/f1517639c36ab5c0384a7e66132d7638 to your computer and use it in GitHub Desktop.
Save ndgnuh/f1517639c36ab5c0384a7e66132d7638 to your computer and use it in GitHub Desktop.
Beamer \Image (auto width height)
\newcommand{\Image}[1]{%
\sbox0{\includegraphics[height=0.65\paperheight]{#1}}%
\ifdim\wd0 < \textwidth
\includegraphics[height=0.65\paperheight]{#1}%
\else
\includegraphics[width=\textwidth]{#1}%
\fi%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment