[Tex/LaTex] How to change author alignment in Beamer

beamerhorizontal alignmenttitles

It appears that different classes set up author layouts using tables.
I would like to render one of these outputs:

Equivalent to \begin{tabular}{rl}:

  Joe Schmoe My Boss
    Jane Doe His Boss

or, equivalent to \raggedleft:

  Joe Schmoe My Boss
   Jane Doe His Boss

from something resembling this M(N)WE:

\documentclass{beamer}

\author{%
Joe Schmoe, My Boss%
\and
Jane Doe, His Boss%
}

\begin{document}
\maketitle
\end{document}

I don't mind using \institute or something equivalent for job title, and I can even drop the job title to see a simple solution.

In some other document classes there is a nice solution involving \preauthor,
which I could modify in my style file.
Unfortunately, I get an unknown command error in Beamer 3 on \preauthor with that code.
Are there equivalent constructs in Beamer?

There is also another approach that uses a tabular environment
but that also fails in Beamer.

Ideally, I would like to change \defbeamertemplate*{title page}{default theme}{... in my beamer style file,
so that I could still use \author{} with all its trimmings in the main file,
but since I do not use authors anywhere else on the slide,
a solution using some kind of box in the main source would work as well.

Best Answer

One option redefining the internal \beamer@author defined in beamerbasetitle.sty (in this way, the definition will be theme-independent) to use a tabular with the desired alignment; you need to use the optional argument to provide a proper information for the author bookmark:

\documentclass{beamer}
\usetheme{Madrid}

\makeatletter
\long\def\beamer@author[#1]#2{%
  \def\insertauthor{\def\inst{\beamer@insttitle}\def\and{\beamer@andtitle}%
  \begin{tabular}{rl}#2\end{tabular}}%
  \def\beamer@shortauthor{#1}%
  \ifbeamer@autopdfinfo%
    \def\beamer@andstripped{}%
    \beamer@stripands#1 \and\relax
    {\let\inst=\@gobble\let\thanks=\@gobble\def\and{, }\hypersetup{pdfauthor={\beamer@andstripped}}}
  \fi%
}
\makeatother

\title{The title}
\author[Joe and Jane]{%
Joe Schmoe, & My Boss \\
Jane Doe, & His Boss
}

\begin{document}
\begin{frame}
\maketitle
\end{frame}
\end{document}

enter image description here

Change \begin{tabular}{rl} to \begin{tabular}{r} above for the other alignment required.

In a comment it has been requested to redefine \and so that it acts as \tabularnewline to separate author rows in the mandatory argument of \author; here's the required modification:

\documentclass{beamer}
\usetheme{Madrid}

\makeatletter
\long\def\beamer@author[#1]#2{%
  \def\and{\tabularnewline}
  \def\insertauthor{\def\inst{\beamer@insttitle}\def\and{\tabularnewline}%
  \begin{tabular}{rl}#2\end{tabular}}%
  \def\beamer@shortauthor{#1}%
  \ifbeamer@autopdfinfo%
    \def\beamer@andstripped{}%
    \beamer@stripands#1 \and\relax
    {\let\inst=\@gobble\let\thanks=\@gobble\def\and{, }\hypersetup{pdfauthor={\beamer@andstripped}}}
  \fi%
}
\makeatother

\title{The title}
\author[Joe \and Jane]{%
Joe Schmoe, & My Boss \and
Jane Doe, & His Boss
}

\begin{document}
\begin{frame}
\maketitle
\end{frame}
\end{document}

enter image description here