Two images to fill one beamer frame: most appropriate method?

Suppose I have two images: one a solid blue square and another a yellow. What is the most appropriate way to divide and fill an entire beamer frame with these images? Horizontally (i.e., left half blue right half yellow)? Vertically? (i.e., top half blue bottom half yellow)

This post provides a method, but it involves low-level operations. Another post (can't find the link now) suggests using TikZ.

Is there a third that doesn't involve low-level operations or complicated external packages? I'm confused. I'd think this task wouldn't be all that difficult.

Replay

You can use the standard \includegraphics command setting the proper values for the width and height in terms of \paperwidth and \paperheight; a box (in this case \makebox) will prevent an overfull box; using plain for the frames will remove the headline, footline:

\documentclass{beamer}
\usepackage{graphicx}

\begin{document}

\begin{frame}[plain]
\makebox[\linewidth]{%
  \includegraphics[width=0.5\paperwidth,height=\paperheight]{cat1}%
  \includegraphics[width=0.5\paperwidth,height=\paperheight]{cat2}}
\end{frame}

\begin{frame}[plain]
\makebox[\linewidth]{%
  \includegraphics[width=\paperwidth,height=0.5\paperheight]{cat1}}\\\nointerlineskip
\makebox[\linewidth]{%
  \includegraphics[width=\paperwidth,height=0.5\paperheight]{cat2}
}
\end{frame}

\end{document}

Here is a very simple solution via columns.

Two images to fill one beamer frame: most appropriate method?
Two images to fill one beamer frame: most appropriate method?

\documentclass{beamer}
\usepackage{lmodern}
\begin{document}
\begin{frame}[plain]
  \begin{columns}
    \column{.5\paperwidth}
    \textcolor{blue}{\rule{.5\paperwidth}{\paperheight}}
    \column{.5\paperwidth}
    \textcolor{yellow}{\rule{.5\paperwidth}{\paperheight}}
  \end{columns}
\end{frame}
\begin{frame}[plain]
  \begin{columns}
    \column{\paperwidth}
    \textcolor{blue}{\rule{\paperwidth}{.5\paperheight}}\\\nointerlineskip
    \textcolor{yellow}{\rule{\paperwidth}{.5\paperheight}}
  \end{columns}
\end{frame}
\end{document}

Category: beamer Time: 2011-11-07 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.230 (s). 12 q(s)