Page LayoutAligned Author Affiliation

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Aligned Author Affiliation

Post by NELLLY »

Hi,

I used the following code to generate the affiliations of the authors.

Code: Select all

\documentclass[12pt]{article}
\usepackage{authblk}

\date{}
\title{PAPER TITLE}
\author[1]{FIRST AUTHOR}
\author[2]{SECOND AUTHOR}
\affil[1]{address university laboratory address xxxxxxxxxxxxxxxxxxxx.}
\affil[2]{YYYYYYYYYYYY}
\renewcommand\Authands{ and }

\begin{document}
  \maketitle

  abstract
\end{document}
I need the affiliation of the first author doesn't exceed one line and the two affiliations aligned i.e. in this way.
¹ Address of the first author
² Address of the second author.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Aligned Author Affiliation

Post by ghuczek »

You can reduce the font size to 10 or 11 points if the affiliation is long. If it is still too long, it will have to wrap to the next line.

The second alignment issue is due to centering. The affiliations will not left align because they are different lengths and centred. It looks better centred on the title page. Do you have a specific reason not to leave it centred?

If you must left align the affiliations, it's possible to pad the shorter line by adding tildes. Perhaos thee is a more elegant solution, but this will work. I couldn't find anything else it the package documentation that will allow left aligning instead of centring.

Code: Select all

\documentclass[11pt]{article}
\usepackage{authblk}

%\date{}
\title{PAPER TITLE}
\author[1]{FIRST AUTHOR}
\author[2]{SECOND AUTHOR}
\affil[1]{address university laboratory address xxxxxxxxxxxxxxxxxxxx.}
\affil[2]{second shorter address~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
%\renewcommand\Authands{ and }

\begin{document}
\maketitle

abstract
\end{document}
benkay86
Posts: 1
Joined: Wed Jan 10, 2024 10:46 pm

Aligned Author Affiliation

Post by benkay86 »

Sorry to revive an old question, but here's another option if anyone else is looking for this:

Code: Select all

\documentclass{article}
\usepackage{authblk}
\title{This is some thing}
\author[1]{John Smith}
\affil[1]{Department at a nice university}
\affil[2]{And another department}

% Here is the hack to get left-aligned affiliations only
\usepackage{setspace}
\makeatletter
\let\oldaffillist\AB@affillist
\renewcommand{\AB@affillist}{\begin{flushleft}\begin{spacing}{1.5}\oldaffillist\end{spacing}\end{flushleft}}
\makeatother

\begin{document}
\maketitle
\end{document}
Post Reply