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.

I am using the following tex-file:

\documentclass{book}

\begin{document}
foo\footnote{test.}\footnote{test2}
\end{document}

And the result is two adjacent superscript numbers: enter image description here

I want to add a comma between the two numbers. Something in the line of

if (supercript number as the last char) print ,

Is there a general way to achieve that, not limited to the footnote example?

share|improve this question
    
I am looking for the way to do it, not necessarily footnotes. I will have a look into footmisc to find the code. –  Andy Oct 18 '11 at 11:28

1 Answer 1

up vote 8 down vote accepted

There is no control possible on what has already been set; however this can be done by redefining suitably \footnote:

\makeatletter
\let\kernel@footnote\footnote
\renewcommand\footnote[1]{\kernel@footnote{#1}%
  \@ifnextchar\footnote{\textsuperscript{\,}}{}}

However this would break declaring an optional argument to \footnote and some more work is needed for this (and would also eat spaces after footnotes).

Happily, Robin Fairbairns has already thought to the problem in his package footmisc:

\usepackage[multiple]{footmisc}

The consecutive footnote marks will be separated by a comma; if you want a thin space, declare

\renewcommand{\multfootsep}{\,}
share|improve this answer

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.