13

suppose I have several authors that I have declared via the \author command in latex-beamer, e.g.

\author{Einstein \and Podolsky \and Rosen}

I was wondering whether there is a way to access the individual names, i.e. something like

authors[0] == "Einstein"
authors[1] == "Podolsky"
authors[2] == "Rosen"

I would like to display all names with a corresponding QR-Code for contact information at the bottom of a conference poster. Sure, I could just retype the names again but I guess that is a rather inelegant way.

1
  • 1
    Have you tried something like using authblk? ctan.org/pkg/authblk (Just throwing out an idea, don't know if it would work or not.) Jun 11, 2012 at 15:07

1 Answer 1

12

The etoolbox lets you process lists separated by a catcode 3 |. If you convert \and into | then you can process the authors as a list. For classes that do not redefine \author the following should work.

\documentclass{article}
\usepackage{etoolbox}

\author{Einstein \and Podolsky \and Rosen}

\makeatletter
\begingroup
  \catcode`|=3\relax
  \def\and{|}
  \newcounter{@authorCount}
  \def\do#1{
    \stepcounter{@authorCount}
    \csgdef{author\Roman{@authorCount}}{#1}
  }
  \edef\eauthor{\@author}
  \dolistloop{\eauthor}%
\endgroup
\makeatother

\begin{document}
\authorI

\authorII

\authorIII
\end{document}

The beamer class redefines \author so you need to replace \edef\eauthor{\@author} with \edef\eauthor{\beamer@shortauthor}.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .