I would like to put my \footnotes{} on a separate line in code, to make code easier to maintain and read. But I don't want any whitespace in between the foot note, and the preceeding word in the output. Is this possible?
Asked
Active
Viewed 2,906 times
9
naught101
- 8,224
2 Answers
15
Make it this way:
word%
\footnote{footnote text}
more text
In other words set a percent sign directly after the word, where the footnote belongs to. See also What is the use of percent signs (%) at the end of lines?.
0
I have the same problem I just solve that by:
\renewcommand\footnote{\nolinebreak \kern-1mm \LTRfootnote}
here:
\nolinebreakallows me to prevent footnote break at the end of lines\kern-1mmremoves the white space which is produced by the new-line.
here I just used \LTRfootnote for my own purpose. you can use your own command
Prof. Hell
- 121
-
1Welcome to tex.sx.
-1mmisn't necessarily the width of the space that is to be ignored. That could be more or less, depending on the actual text content of the line. In most cases, it probably won't make much difference, but if the spaces in the line are particularly shrunk, the footnote number could conceivably overprint the previous character. Using\unskipand omitting the\nolinebreakshould work more dependably. – barbara beeton Nov 16 '19 at 02:36
} %. This way I can use wrap the lines in emacs (e.g.,M-q) and it won't put the 'more text' on the same line as the end of the footnote. – jon Apr 26 '12 at 16:17