2

I was following the solution provided in this post to put 3 affiliations on the same line using authblk but failed. The author/affiliation list is like:

\author[1]{author1}
\author[2]{author2}
\author[3]{author3}
\affil[1]{dept1}
\affil[2]{dept2}
\affil[3]{dept3}

Following the answer in this post, I add these commands:

\makeatletter
\renewcommand\AB@affilsepx{, \protect\Affilfont}
\makeatother

in order to typeset the affiliations to:

1 dept1, 2 dept2, 3 dept3

But the result showed still as:

1 dept1
2 dept2
3 dept3

I didn't set a local repository for authblk. I used the online repo hosted and provided by my university. Would this be the reason that the \renewcommand\AB@affilspex command not working? Anyone can provide another way to achieve "affiliations on the same line" problem?

6

May be this will help you,

\documentclass{article}

\usepackage{authblk}


\makeatletter
\renewcommand\AB@affilsepx{, \protect\Affilfont}
\makeatother

\title{Your Title}
\author[1]{author1}
\author[2]{author2}
\author[3]{author3}
\affil[1]{dept1}
\affil[2]{dept2}
\affil[3]{dept3}


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

Here is the output,

enter image description here

  • Thanks. I used: \makeatletter \renewcommand\AB@affilsepx{\hfill \protect\Affilfont} \makeatother to use space instead of commas between the affiliations. – haggai_e Mar 30 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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