-
-
Save DenisKramer/e2653a94bc50b49db91f460d99f7343f to your computer and use it in GitHub Desktop.
LaTeX Beamer frame environment with image background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % This beamer environment provides a simple way to make slides with full-size images | |
| % | |
| % Usage: | |
| % \begin{imageframe}[keepaspectratio,width=\paperwidth]{bg_image.jpg} | |
| Here comes my slide content | |
| \end{imageframe} | |
| % | |
| % The environment scales the image to fit the slide by default in a way that ensures the | |
| % entire picture is visible. That is usually not what you want. Use the optional parameter | |
| % to scale it as needed. Some common options are: | |
| % | |
| % 1) Scale to width: keepaspectratio,width=\paperwidth | |
| % 2) Scale to height: keepaspectratio,height=\paperheight | |
| % 3) Squeeze to fit: width=\paperwidth,height=\paperheight | |
| % | |
| \newenvironment{imageframe}[2][keepaspectratio,width=\paperwidth,height=\paperheight] | |
| {% | |
| \begingroup% | |
| \setbeamertemplate{navigation symbols}{}% | |
| \usebackgroundtemplate{\includegraphics[#1]{#2}}% | |
| \begin{frame}[plain]% | |
| }{% | |
| \end{frame}% | |
| \endgroup% | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment