3

This is what I have done:

\documentclass{article}

\begin{document} Some text. Some text. Some text. Some text. Some text. Some text.\footnote{This is footnote 1}\textsuperscript{,}% \footnote{This is footnote 2}\textsuperscript{,}% \footnote{This is footnote 3}\textsuperscript{,}% \footnote{This is footnote 4}\textsuperscript{,}% \footnote{This is footnote 5} Some text. \end{document}

Which produces:

enter image description here enter image description here

Is there a better way to do this, without having to manually put in the \textsuperscript{,}? I'd like it to be automatic.

vy32
  • 4,780

2 Answers2

2

Use the footmisc package with the multiple option. See below for a revision of your MWE, for which thank you.

% footmarksprob.tex  SE 554074

\documentclass{article} \usepackage[multiple]{footmisc}

\begin{document} Some text. Some text. Some text. Some text. Some text. Some text.\footnote{This is footnote 1}%\textsuperscript{,}% \footnote{This is footnote 2}%\textsuperscript{,}% \footnote{This is footnote 3}%\textsuperscript{,}% \footnote{This is footnote 4}%\textsuperscript{,}% \footnote{This is footnote 5} Some text. \end{document}

Peter Wilson
  • 28,066
1

If your document doesn't load the hyperref package, then adopting the recommendation in @PeterWilson's answer -- to load the footmisc package with the option multiple -- is all you need to do.

If, however, your document does load the hyperref package, the aforementioned approach no longer works, i.e., the commas between adjacent footnotes disappear mysteriously. A different approach is required. Specifically, the footnote macro needs to be modified along the lines proposed in this answer to the posting Incompatibility between footmisc-option multiple and hyperref.

As an alternative to modifying the \footnote macro yourself (as is done in the code below), just run

\usepackage[dont-mess-around]{fnpct}

in the preamble.

enter image description here

\documentclass{article}
\setlength\textheight{3cm} % just for this example

\let\oldFootnote\footnote \newcommand\nextToken\relax \renewcommand\footnote[1]{% \oldFootnote{#1}\futurelet\nextToken\isFootnote} \newcommand\isFootnote{% \ifx\footnote\nextToken\textsuperscript{,}\fi} %\usepackage[multiple]{footmisc} % doesn't hurt, but doesn't work either \usepackage[colorlinks,allcolors=blue]{hyperref}

\begin{document} Some text.\footnote{First}\footnote{Second}\footnote{Third}\footnote{Fourth}\footnote{Fifth} Some more text. \end{document}

Mico
  • 506,678