2

Updated:

I want would like to add more than one author affiliation in latex article. To make this I have tried with the following latex code :

\documentclass{article}
\usepackage{authblk}
\author[1]{A. Author}
\author[2]{B. Author}
\author[3]{C.  Author}
%\author[2]{Corresponding Author\thanks{email@2nduniversity.com}}
\affil[1,2]{Institution of the Authors from  University}
\affil[3]{Institution of the Authors from  College}
\affil[1]{Email id: aa@gmail.com}
\affil[2]{Email id: ba@gmail.com}
\affil[1,3]{Email id: ca@gmail.com}
\title{Title of the Presentation}
\date{}
%
\begin{document}
\maketitle
Main Part of document here.
\end{document}. 

But it does not give my desired output. I want exactly like this :
enter image description here How can I do this?

  • 1
    You have some mistakes like : 1)not A in first authors name, 2) third author has number one instead of [3]... The only difference in the result after these changes is a blank line after author that can be solved with the "fix" \author[3]{C. Author\vspace*{-10pt}} and that the emails are in separate lines. Do you want the emails in the same line too? – koleygr Dec 16 '17 at 8:44
  • @koleygr thank you for point out my mistake. – MKS Dec 16 '17 at 10:20
3

Apart from correcting the typo in \author[1]{C. Author}, which should be \author[3]{C. Author} as pointed out in the comments, you can use the approach in this answer to make the emails appear on the same line. The following code block determines what appears between affiliations (in this case, a comma followed by a space):

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

To make this change local, you should enclose all the email code in curly braces {}. To include the Email ids: header, you can use an affiliation whose tag is a space (\affil[ ]{Email ids}) and : as separator:

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

    \affil[ ]{Email ids}

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

    \affil[1]{aa@gmail.com}
    \affil[2]{ba@gmail.com}
    \affil[1,3]{ca@gmail.com}
}

enter image description here

The full code is as follows:

\documentclass{article}
\usepackage{authblk}
\author[1]{A. Author}
\author[2]{B. Author}
\author[3]{C.  Author}
%\author[2]{Corresponding Author\thanks{email@2nduniversity.com}}
\affil[1,2]{Institution of the Authors from  University}
\affil[3]{Institution of the Authors from  College}
{
    \makeatletter
    \renewcommand\AB@affilsepx{: \protect\Affilfont}
    \makeatother

    \affil[ ]{Email ids}

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

    \affil[1]{aa@gmail.com}
    \affil[2]{ba@gmail.com}
    \affil[1,3]{ca@gmail.com}
}

\title{Title of the Presentation}
\date{}
%
\begin{document}
    \maketitle
    Main Part of document here.
\end{document}. 

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.