6

I would like my footnotes to be separate in the .tex file, but rendered without a space in the resulting file. Can this be done?

Example: This is some text\footnote{with a footnote} renders as

This is some text1

whereas

This is some text
\footnote{with a footnote}

renders as

This is some text 1

I would like to avoid that extra space, but write my footnote on a different line.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
keflavich
  • 4,613

1 Answers1

8

Insert a % at the end of the line above the \footnote

This is some text% <--- Important
\footnote{with a footnote}

As reference, see What is the use of percent signs (%) at the end of lines? Alternatively, redefine \footnote to perform an \unskip before continuing on with the regular placement of the \footnote:

\let\oldfootnote\footnote
\renewcommand{\footnote}{\unskip\oldfootnote}% Remove any skips inserted before \footnote

%...

This is some text
\footnote{with a footnote}
Werner
  • 603,163