[Tex/LaTex] How to make a LaTeX poster with all affiliations on the same line, using Beamer

beamertitles

I'm using the beamer class and all the examples I can find have the author affiliations on different lines. My research project requires us to have them all on 1 line, with superscripts indicating the author's correct affiliation. Here is my current code.

\title{Title goes here} 
\author[shortname]{Author1 \inst{1} \and Author2 \inst{2}     \and Author3     \inst{3}}
\institute[shortinst]{\inst{1} Affil1 \and 
                  \inst{2} Afil2 \and \inst{3} Afil3 }

For the record, I tried reading authblk affiliations on same line but didn't understand it. Simple examples are needed with my knowledge level.

Best Answer

In beamer, the institute \and is defined as

\def\beamer@andinst{\\[1em]}

so that it inserts a line break and leaves a 1em vertical gap between entries. Mere redefine this as

\makeatletter
\def\beamer@andinst{\quad}
\makeatother

to insert a 1em horizontal gap between entries:

enter image description here

\documentclass{beamer}
\title{Title goes here}
\author[shortname]{Author1 \inst{1} \and Author2 \inst{2} \and Author3 \inst{3}}
\institute[shortinst]{\inst{1} Affil1 \and \inst{2} Affil2 \and \inst{3} Affil3}

\makeatletter
\def\beamer@andinst{\quad}
\makeatother
\begin{document}

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

\end{document}