Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
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.) –  Willie Wong Jun 11 '12 at 15:07

1 Answer 1

up vote 12 down vote accepted

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}.

share|improve this answer
    
Great, works perfectly! Thank you! –  Aton Jun 11 '12 at 18:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.