2

I would find it convenient to be able to write my source with footnotes on their own lines, like this:

Part of the main paragraph

\footnote{Footnote text}

More of the main paragraph

It seems to me it would be much easier to read through my source that way. But it puts an ugly space just before the superscript designating the footnote. Does anyone know a way around it?

cfr
  • 198,882
  • 2
    Just write an % into the first column of the blank line. That comments this blank line (it is not seen as blank line aka break for LaTeX) – Mensch Oct 13 '15 at 00:14

3 Answers3

5

There really isn't any way to avoid this, if you insist on having completely blank lines. TeX automatically converts a blank line to a \par, and that's built pretty deeply into the system.

You can, as others have noted, put % (the comment character) on the blank lines:

Part of the main paragraph%
%
\footnote{Footnote text}
%
More of the main paragraph

This works because TeX no longer sees a blank line. % is the comment character; it, and everything on the line after it, are ignored by TeX. Since your "blank" lines start with %, the entire lines are ignored by TeX; that means that there are no blank lines, which means that there are no \pars (at least as far as TeX is concerned), so you don't get the spacing that's bothering you.

dgoodmaniii
  • 4,270
  • 1
  • 19
  • 36
2

Use % to avoid ending spaces

Part of the main paragraph%
%
\footnote{Footnote text}
%
More of the main paragraph
Fran
  • 80,769
2

Well, I use another way to write my footnotes. Please see this code:

art of the main paragraphart of the main paragraph art of
art of the main paragraph\footnote{%  <==================
  Footnote text Footnote text Footnote text Footnote text 
  Footnote text Footnote text Footnote text Footnote text 
  Footnote text Footnote text Footnote text 
}%  <====================================================
More of the main paragraph

So I can pretty clear see where the footnote starts and ends. The % are used to avoid unwanted spaces in the printed document (I used <====== here only to mark the comments for you. In my code I do not use it ...).

That is one of my methods to have a readable TeX code.

If you want to omit the first % you can write the first word of the footnote and break then manualy the line:

art of the main paragraphart of the main paragraph art of
art of the main paragraph\footnote{Footnote 
  text Footnote text Footnote text Footnote text Footnote 
  text Footnote text Footnote text Footnote text Footnote
  text Footnote text Footnote text 
}%  <====================================================
More of the main paragraph

and if the footnote has to be at the end of a line (I manually break the line after column 72) you can write:

art of the main paragraphart of the main paragraph art of
art of the main paragraph art of the main 
paragraph\footnote{Footnote
  text Footnote text Footnote text Footnote text Footnote 
  text Footnote text Footnote text Footnote text Footnote 
  text Footnote text Footnote text 
}%  <====================================================
More of the main paragraph
Mensch
  • 65,388
  • 1
    I spotted it two minutes after posting, thought you would see it in time and nobody would have noticed it. The five minutes grace period in which edits aren't recorded. :-) – Johannes_B Oct 16 '15 at 17:49