TransWikia.com

IEEEtran document class — how to align five authors properly

TeX - LaTeX Asked on August 1, 2021

How do I align author names such that the first three authors appear in 3 column format and the last two in two column?

author{IEEEauthorblockN{1textsuperscript{st} Given Name Surname}
IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
textit{name of organization (of Aff.)}
City, Country 
email address}
and
IEEEauthorblockN{2textsuperscript{nd} Given Name Surname}
IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
textit{name of organization (of Aff.)}
City, Country 
email address}
and
IEEEauthorblockN{3textsuperscript{rd} Given Name Surname}
IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
textit{name of organization (of Aff.)}
City, Country 
email address}
and
IEEEauthorblockN{4textsuperscript{th} Given Name Surname}
IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
textit{name of organization (of Aff.)}
City, Country 
email address}
and
IEEEauthorblockN{5textsuperscript{th} Given Name Surname}
IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
textit{name of organization (of Aff.)}
City, Country 
email address}
}

enter image description here

One Answer

The construction of the author block is contained within an @IEEEauthorhalign environment that has hfills on either end. This allows the author block to be centred in general. For multiple authors, each and (in conference mode) closes the @IEEEauthorhalign environment, issues an hfill and then opens @IEEEauthorhalign again.

In order to introduce a line break and have the author content still be aligned properly, I've defined a new command called linebreakand. It does what every and does, excepts introduces a par and a new hfill for the new line start.

enter image description here

documentclass[conference]{IEEEtran}

title{A title}

makeatletter
newcommand{linebreakand}{%
  end{@IEEEauthorhalign}
  hfillmbox{}par
  mbox{}hfillbegin{@IEEEauthorhalign}
}
makeatother

author{
  IEEEauthorblockN{1textsuperscript{st} Given Name Surname}
  IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
    textit{name of organization (of Aff.)}
    City, Country 
    email address}
  and
  IEEEauthorblockN{2textsuperscript{nd} Given Name Surname}
  IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
    textit{name of organization (of Aff.)}
    City, Country 
    email address}
  and
  IEEEauthorblockN{3textsuperscript{rd} Given Name Surname}
  IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
    textit{name of organization (of Aff.)}
    City, Country 
    email address}
  linebreakand % <------------- and with a line-break
  IEEEauthorblockN{4textsuperscript{th} Given Name Surname}
  IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
    textit{name of organization (of Aff.)}
    City, Country 
    email address}
  and
  IEEEauthorblockN{5textsuperscript{th} Given Name Surname}
  IEEEauthorblockA{textit{dept. name of organization (of Aff.)} 
    textit{name of organization (of Aff.)}
    City, Country 
    email address}
}

begin{document}

maketitle

end{document}

Correct answer by Werner on August 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP