# How to indicate authors' affiliation correctly in order?

If I have three authors listed according to their contributions and one author listed in the middle has different affiliation than others. Hence the title should look roughly like this:

How can I do this? I am using IEEEtran class.

Here is the code I tried:

\documentclass[conference,compsoc]{IEEEtran}
\begin{document}
\title{Title of Paper}

% author names and affiliations
% use a multiple column layout for up to three different
% affiliations
Dipto Das\IEEEauthorrefmark{2}, Anindya Iqbal\IEEEauthorrefmark{3}, Amiangshu Bosu\IEEEauthorrefmark{4}, Rifat Shahriyar\IEEEauthorrefmark{5}}
\IEEEauthorblockA{Department of Computer Science and Engineering\\
Bangladesh University of Engineering and Technology\\
\IEEEauthorrefmark{2}dipto.cse.buet@gmail.com,
\IEEEauthorrefmark{3}anindya@cse.buet.ac.bd,
\IEEEauthorrefmark{5}rifat@cse.buet.ac.bd},
}
\IEEEauthorblockA{Department of Computer Science\\
Southern Illinois University\\
Carbondale, IL, USA\\
Email:\IEEEauthorrefmark{4}abosu@cs.siu.edu,
}

\maketitle

\input all.tex
\end{document}


I ran into error saying misplaced crcr.

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user36296 Oct 5 '17 at 19:19
• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – CarLaTeX Oct 5 '17 at 19:19
• Hi @samcarter, I have added my code snippet to the question. – kello Oct 5 '17 at 20:12
• @CarLaTeX thank you. The guide was helpful. – kello Oct 5 '17 at 20:12
• You're welcome, thank you for having read it! – CarLaTeX Oct 5 '17 at 20:19

\documentclass[conference,compsoc]{IEEEtran}
\begin{document}
\title{Title of Paper}
\author{%
\IEEEauthorblockN{
\IEEEauthorrefmark{1},
Dipto Das%
\IEEEauthorrefmark{2},
Anindya Iqbal%
\IEEEauthorrefmark{3},
Amiangshu Bosu%
\IEEEauthorrefmark{4},
Rifat Shahriyar%
\IEEEauthorrefmark{5}
}
\IEEEauthorblockA{
\IEEEauthorrefmark{1}
\IEEEauthorrefmark{2}
\IEEEauthorrefmark{3}
\IEEEauthorrefmark{4}
Department of Computer Science and Engineering\\
Bangladesh University of Engineering and Technology\\
\\
Email:%
\IEEEauthorrefmark{2}dipto.cse.buet@gmail.com,
\IEEEauthorrefmark{3}anindya@cse.buet.ac.bd,
\IEEEauthorrefmark{4}rifat@cse.buet.ac.bd}

\IEEEauthorblockA{%
\IEEEauthorrefmark{4}
Department of Computer Science\\
Southern Illinois University\\
Carbondale, IL, USA\\
Email:%
\IEEEauthorrefmark{4}abosu@cs.siu.edu
}
}

\maketitle

All
%\input all.tex

\end{document}


By formatting your code, it becomes easier to see it.