Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The authblk package, in footnoted mode, puts footnote marks inside commas ("Alice1,") which is bad typography. Is there any way to persuade it to put the footnote marks outside the commas ("Alice,1"), or even better, on top of them?

Example:

\documentclass{article}
\usepackage{authblk}
\begin{document}
\title{A Demonstration of Bad Punctuation Placement}
\author[1]{Alice}
\author[2]{Bob}
\author[3]{Peggy}
\author[4]{Trent}
\affil[1]{}\affil[2]{}\affil[3]{}\affil[4]{}
\date{}
\maketitle

Better: $\mbox{Alice,}^1$ $\mbox{Bob,}^2$ $\mbox{Peggy,}^3$
and $\mbox{Trent}^4$

Even better: $\mbox{Alice\rlap{,}}^1$ $\mbox{Bob\rlap{,}}^2$
$\mbox{Peggy\rlap{,}}^3$ and $\mbox{Trent}^4$

\end{document}

(Ignore everything but the "Alice, Bob, Peggy, Trent" lines.)

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

It is actually easier to obtain the "even better" output, if you're willing to accept some spacing adjustments:

enter image description here

\documentclass{article}
\usepackage{authblk}% http://ctan.org/pkg/authblk
\makeatletter
\renewcommand\AB@authnote[1]{\rlap{\textsuperscript{\normalfont#1}}}
\renewcommand\Authsep{,~\,}
\renewcommand\Authands{,~\,and }
\makeatother
\begin{document}
\title{A Demonstration of Bad Punctuation Placement}
\author[1]{Alice}
\author[2]{Bob}
\author[3]{Peggy}
\author[4]{Trent}
\affil[1]{}\affil[2]{}\affil[3]{}\affil[4]{}
\date{}
\maketitle

Better: $\mbox{Alice,}^1$ $\mbox{Bob,}^2$ $\mbox{Peggy,}^3$
and $\mbox{Trent}^4$

Even better: $\mbox{Alice\rlap{,}}^1$ $\mbox{Bob\rlap{,}}^2$
$\mbox{Peggy\rlap{,}}^3$ and $\mbox{Trent}^4$

\end{document}

The \AB@authnote is first set, followed by \Authsep or \Authands, depending on whether you're the last author or not. The renewal of \AB@authnote to now have a right overlap (\rlap) causes the authors to be a little too condensed, which is corrected using a ,~\, and/or ,~\,and spacing.

share|improve this answer
1  
This didn't quite work, because the author list in my actual document is very long, so I need TeX to be able to break the line after one of the commas. Changing ,~\, to ,\hskip 5.5pt\relax in both places did the trick (monkeyed with the width until it looked good). I also added a tiny kern inside the \AB@authnote because the superscripts were colliding with the letters. Anyway, thanks for putting me on the right track! –  Zack Apr 19 '12 at 1:39
    
@Zack: True, ~ is not breakable. You could also use ,\,\ (ending with a control space). Also, the solution is not 100% perfect, since the font kerning in "even better" differs ever so slightly from the output provided by my solution, but it is negligible. –  Werner Apr 19 '12 at 1:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.