# Adding the author photo along with the name in the title page

Friends, I'm trying to add a photo along with each author name in a beamer title page. Please consider the following code:

\documentclass[10pt]{beamer}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\usepackage{graphicx}

\newcommand{\theauthor}[1]{%
\includegraphics[scale=.3]{#1}
}%

\title{A dinner with us}
\author[Alice and Bob]{\theauthor{alice} and \theauthor{bob}}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\end{document}


which gives me the following output:

I tried to add the name below the photo, but I had no luck. At first, I thought about using a tabular environment, but I could not make it work.

I'll probably get rid of the "and" word and put both author blocks aligned, let's say:

Any suggestion on how could I achieve this? I know this might be a very easy question, but it puzzles me. :-)

-

\newcommand{\theauthor}[3][3cm]{%
\vbox{\hbox{\includegraphics[width=#1]{#2}}\hbox to #1{\hss#3\hss}}}

\title{A dinner with us}


Using tabular conflicts with the massaging done by beamer, whereas a more primitive approach is successful, in the sense of using primitive commands such as \vbox, \hbox or \halign that won't be untimely expanded during the processing by beamer. The optional argument to \theauthor can be used to set the width of the image (default 3cm).

Alternative definition:

\newcommand{\theauthor}[2]{\vbox{\halign{\hfil##\hfil\cr
\includegraphics[scale=.3]{#1}\cr#2\cr}}}

-
It works like a charm, thanks egreg. :-) –  Paulo Cereda Oct 3 '11 at 17:49

Assuming you're okay with essentially creating a custom title page, you can use the \columns environment to create blocks for your authors. Modifying the \theauthor command to include an extra #1 as shown will place the author name under each picture. Alternatively you can add an extra argument to the command for more flexibility.

## What it looks like

The depicted people are Emmy Noether and George Stokes. I just wanted a pair of public domain photos that no one would care about me using.

## The Code

\documentclass[10pt]{beamer}

\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\usepackage{graphicx}

\newcommand{\theauthor}[1]{%
\includegraphics[width=0.6\textwidth]{#1}\\#1
}%

\title{A dinner with us}
\author{Emmy and George}
\begin{document}

\begin{frame}

\centering
\begin{huge}An evening with us
\end{huge}

\vspace{1cm}

\begin{columns}[c]
\column{.5\textwidth}
\centering
\theauthor{Emmy}
\column{.5\textwidth}
\centering
\theauthor{George}
\end{columns}

\vspace{1cm}
\today

\end{frame}

\end{document}


It's not elegant by any stretch of the imagination, but it seems to work pretty well.

References:

I used HappyMutant's page on beamer as a reference for setting up columns.

-
Thanks Richard, it's a nice answer. :-) –  Paulo Cereda Oct 3 '11 at 17:49