# How to properly typeset footnotes/superscripts after punctuation marks?

I find the spacing of footnote marks after punctuation marks quite unsatisfactory, especially with sans serif fonts and compared to the spacing after letters. Example follows:

I came up with a little macro myself that tries to amend this manually.

\documentclass{article}
% URW Classico is a font that makes the issue apparent
\renewcommand{\sfdefault}{uop}
\renewcommand{\familydefault}{\sfdefault}
% define punctuation-aware footnote macro
\newlength{\punctuationfootlength}
\newcommand{\punctuationfootnote}[2]{#2\settowidth{\punctuationfootlength}%
{#2}\hspace{-\punctuationfootlength}\footnote{#1}}
% define a very small type area and don't care about margins
\setlength{\textwidth}{150pt}
\setlength{\textheight}{5\baselineskip}
\begin{document}
\noindent The three little pigs built their houses
out of straw\punctuationfootnote{not to be confused with hay},
sticks\footnote{or lumber according to some sources} and
bricks\punctuationfootnote{probably fired clay bricks}.
\end{document}


This will look like this:

I have to say, I didn't like this either. So I fiddled around a bit and set back the footnote marks by a half

and a third of the width of the punctuation mark.

Personally, I like the look of the last (-.3\punctuationfootlength) the best. But I'm a bit concerned that nobody ever seemed to have shared my opinion on this and if anything put a hair space between a letter and a footnote mark but never decreased the kerning. So if any typography guru here could put me straight on this matter that would be great. I'm also happy about anyone's second or third opinion on this.

Edit: Originally I also asked for a better way to TeX this here. As this is a separate question however, I moved it here.

Edit 2: Jon's comment caused me to succumb to the temptation I had all along of trying an additional intermediate between solutions 2 and 3. It seems like a ridiculously small change but here is -.4\punctuationfootlength:

Can't decide though. After a bit of pondering, I think I like the 3 a bit closer than the 1 which doesn't make things easier I guess.

-
You seem to define \punctuationfootnote to have two arguments, but then the macro is called with only one argument, viz., the content of the footnote. Am I missing something? Or is the second argument the punctuation mark? If so, it might be cleaner if you surrounded the punctuation mark with curly braces to make this setup explicit. By the way, the font "URW Classico" would appear to be a clone of Hermann Zapf's famous "Optima" font. –  Mico May 16 '12 at 13:26
Yes, the punctuation mark is the second argument and in this case I find the sentence more readable when keeping the punctuation marks visually outside the footnote macro. URW Classico is indeed an Optima clone but one that is free-as-in-beer for LaTeX. I can hardly expect people here to own or buy Optima just to reproduce my example. –  Christian May 16 '12 at 13:38
Not sure about this arrangement. Beyond Mico's point, which I agree with, this does not make for maintainable code: everytime you edit your text you run the risk of having to change \footnote to \punctuationfootnote and vice-versa. It gets even worse if you end up publishing in a European journal, where the expectation is that the footnotemark goes inside the punctuation mark! Also, while the first option looks ridiculous, I'm not convinced that the third is an (amazing) improvement over the default setup: are the complications worth the changes in appearance? –  jon May 16 '12 at 16:24
@jon I agree that an automatic adjustment would be much better but since I don't know how to do this, \punctuationfootnote it is. Do I take it that you prefer the second option? Actually, collecting different aesthetic opinions on this was meant to be part of the question. Lastly, I don't understand what you mean by "footnotemark goes inside the punctuation mark". Is it "texttext\footnote{foo}."? This would further argue for omitting the {} of the second argument I guess but that's just a matter of taste anyway. –  Christian May 16 '12 at 16:47
Oh, sorry. I guess the third option is best for me, but it doesn't look so much better (if at all) that it is worth the extra effort. As for some journals, the expectation is that the footnotemark would go: text text text¹. Sometimes, you'll even see it surrounded by parentheses (and maybe not superscript --- which looks really weird). My point is that you should think about where the writing will end up and work within the conventions/expectations of that forum. As for an 'automatic' solution, you should look at biblatex's punctuation tracker: perhaps it can be turned to your needs. –  jon May 16 '12 at 17:02

(Obligatory Bringhurst reference warning)

Bringhurst has a few challenging comments about footnotes, including a mild "don't do that", but the relevant one for this question is (The Elements of Typographic Style, v3.2, pp68-69):

4.3.2 Check the weight and spacing of superscripts. ... "Superscripts frequently come at the ends of phrases or sentences. If they are high above the line, they can be kerned over a comma or [full stop], but this may endanger readability, especially if the text is set in a modest size."

-
I was just trying to remember what it was Bringhurst did say about this and then I found your answer... :) –  jonalv May 16 '12 at 14:25
Thanks, I didn't think of searching for superscripts in general. I also changed the title of the question accordingly. Do I get it right that Bringhurst's "don't do that" refers to footnotes in general? –  Christian May 16 '12 at 14:48
Yes, he thinks sidenotes are better. "... But the academic habit of relegating notes to the foot of the page or the end of the book is a mirror of Victorian social and domestic practice ...[4.3.1]" Actually, the whole piece is full of LOLs. –  Brent.Longborough May 16 '12 at 15:45
Depends on the length of the notes, surely..? If the footnote needs to contain the original text (in the original language, say), then it is impossible to put it in the margins! (Endnotes are no less frustrating for that.) –  jon May 16 '12 at 16:26
@jon: That's true, but if there's a lot of them you might need something like ledmac –  Brent.Longborough May 16 '12 at 16:29

I guess I'll use a .06em hair space before all regular footnotes as suggested by http://www.read.seas.harvard.edu/~kohler/latex.html (referring to Jan Tschichold) and a negative hair space for punctuation footnotes (actually the link suggests a .08em hair space and .3\punctuationfootlength miraculously turned out to be .0828em but still …). This comes close to the manual kerning I felt best about

The three little pigs built their houses out of
straw,\hspace{-.06em}\footnote{not to be confused with hay}
sticks\hspace{.07em}\footnote{or lumber according to some sources} and
bricks.\hspace{-.08em}\footnote{probably fired clay bricks}


Talk about putting paper between cast metal sorts …

All together this yields

\documentclass{article}
% URW Classico is a font that makes the issue apparent
\renewcommand{\sfdefault}{uop}
\renewcommand{\familydefault}{\sfdefault}
% define punctuation-aware footnote macro
\let\origfootnote\footnote
\renewcommand{\footnote}[1]{\kern.06em\origfootnote{#1}}
\newcommand{\punctfootnote}[1]{\kern-.06em\origfootnote{#1}}
% define a very small
\setlength{\textwidth}{150pt}
\setlength{\textheight}{5\baselineskip}
\begin{document}
\noindent The three little pigs built their houses out of
straw,\punctfootnote{not to be confused with hay}
sticks\footnote{or lumber according to some sources} and
bricks.\punctfootnote{probably fired clay bricks}
\end{document}


which looks like this:

This should also resolve the debate about the order and number of arguments since \punctfootnote became a drop-in replacement for \footnote.

Thanks a lot for your input! Of course further comments are still very welcome.

-