6

Note: DG's answer is the practical solution for the problem, but I recommend you to also see David Carlisle's answer since it talks about the problem.


I searched about this for a while, but I couldn't find an answer.

Sometimes we have a footnote within a paragraph and I personally think that using \footnote in the middle of it makes the code very confusing. So I came up with the idea of using the pair \footnotemark and \footnotetext to organize everything, but I know that this pair is usually used when you cannot use \footnote.

Hence, my question is: Am I committing a crime if I use \footnotemark and \footnotetext instead of \footnote in "normal situations"?

The point of this question is to know whether I will cause problems in large and complex Latex documents or whether doing that is considered bad practice like using eqnarray in place of align.

In summary

I want change from this:

Some text\footnote{1st footnote} and more text

to this:

Some text\footnotemark~and more text
\footnotetext{1st footnote}

Note

I am aware of this specific danger of \footnotemark, so I can guarantee that this issue is not a problem in my case:

\documentclass{article}
\usepackage[paperheight=3cm]{geometry} % (not needed) just for the example

\begin{document}
Some text\footnotemark~and more text\footnotemark
\footnotetext{1st footnote}
\footnotetext{2nd footnote}
\end{document}

known issue

1
5

Use https://www.ctan.org/pkg/sepfootnotes to manage the footnote content (you can even use another file to store your notes):

\documentclass{article}
\usepackage[paperheight=3cm]{geometry} % (not needed) just for the example

\usepackage{sepfootnotes}
\sepfootnotecontent{1st}{1st footnote}
\sepfootnotecontent{2nd}{2nd footnote}

\begin{document}
Some text\sepfootnote{1st} and more text\sepfootnote{2nd}
\end{document}

enter image description here

5
  • I didn't know this package. In addition to everything you said, the fact that it allows you to place \sepfootnotecontent after begin{document} makes it very powerful for my case, I really liked it! Thanks!
    – Leone
    Feb 24 at 15:04
  • 3
    @Leone you know you could accept this if this is what you use, I have enough points that I can still sleep at night if I lose 15 every now and then:-) Feb 24 at 15:56
  • @DavidCarlisle, thanks for giving me that freedom. This is one of those cases where I would like to accept two responses at the same time, but I chose yours because of the discussion about good and bad practices. I mentioned DG' in my question to help give visibility to his suggestion as well. Sorry DG' :(
    – Leone
    Feb 24 at 16:35
  • 1
    @Leone - no worries, I will find my sleep at night as well ;)
    – DG'
    Feb 24 at 17:25
  • After using the sepfootnotes package for a while, I must admit that this answer really solved my problem. So, here I am, changing the accepted answer as David Carlisle suggested at first. Sorry the delay and thank you guys for being (La)Tex gods :)
    – Leone
    Aug 19 at 14:32
7

I would say it is bad practice to use it as you show in a paragraph, certainly with white space before it.

As shown the footnote mark will appear where the mark is placed but the footnote text will be placed at the bottom of the page that ends the paragraph which may well be the next, or even later, page.

In cases where you have to split them this way it is usually because the text is in a box, so you can use \footnotetext immediately after the box and then it will again appear on the same page as the boxed text and so the same page as the mark.

1
  • You pointed out a problem that I missed. The fact that the paragraph may move down (if I add some text before it) can cause big problems for me, as the footnote text can jump to another page.
    – Leone
    Feb 24 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.