# authblk messes up \AA command in \author and \affil with pdflatex

The following example compiled with pdflatex (MikTeX on Windows 10)

\documentclass{article}
\usepackage{authblk}
\title{{\AA}lesund is a nice city}
\author[1]{{\AA}ge}
\affil[1]{NTNU, {\AA}lesund}
\begin{document}
\maketitle
The name should be {\AA}ge', the affiliation {\AA}lesund'.
\end{document}


produces this:

i.e., the accent on Å's in \author and \affil fields is on a wrong place.

Using \r{A} does not help. Adding \usepackage[latin1]{inputenc} and replacing \AA with Å does not work either, neither does [utf8] encoding. On the other hand, xelatex produces the correct output both with \AA and with Å.

Is this a known issue/bug, or should I report it somewhere?

• Add \usepackage[T1]{fontenc}, that tells LaTeX \AA is a real letter from the font, not an A that LaTeX should add a ring to. – daleif Feb 1 '18 at 13:40

\usepackage[T1]{fontenc}


This tells (pdf)LaTeX that it can find many (designed) letters directly in the font, without (and not using xelatex or lualatex), LaTeX will try to add a ring to an A.

BTW: always a good idea to have both fontenc and inputenc when using (pdf)LaTeX.

• It worked, thanks. Any idea why I need fontenc only inside \author and \affil, while other places it works without? – Michal Kaut Feb 1 '18 at 13:51
• It is not just under \author and \affil. My guess is that this is due to the processing authblk performs, it saves stuff in a form of list and something goes nuts somewhere – daleif Feb 1 '18 at 14:55

the package locally redefines \rlap to affect the position of footnote marks, but that affects the positioning of the accent \r A in OT1. You can define the accent not to use \rlap but use lower level commands directly

\documentclass{article}

\makeatletter
\DeclareTextCompositeCommand{\r}{OT1}{A}
%\rlap
\hb@xt@\z@
{\raise.67\dimen@\hbox{\char23}%
\hss
}A}
\makeatother
\usepackage{authblk}
\title{{\AA}lesund is a nice city}
\author[1]{{\AA}ge}
\affil[1]{NTNU, {\AA}lesund}
\begin{document}
\maketitle
The name should be {\AA}ge', the affiliation {\AA}lesund'.
\end{document}

• I have accepted daleif's answer because it provides an easier solution, but this is an interesting explanation of what actually happens. – Michal Kaut Feb 2 '18 at 7:28