5

With this code:

\documentclass[11pt]{book}
\begin{document}
\chapter{I}
Suonava la messa dell’alba\footnotemark[1] a San
Giovanni; ma il paesetto dormiva ancora della grossa, perché era
piovuto da tre giorni, e nei seminati ci si affondava fino a mezza
gamba. Tutt’a un tratto, nel silenzio, s’udì un rovinìo, la campanella
squillante di Sant’Agata\footnotemark[2] che chiamava aiuto, usci e
finestre che sbattevano, la gente che scappava fuori in camicia,
gridando:\par
% other many paragraphs here
%at the end of the chapter the footnotes
\footnotetext[1]{  Suonava la campana che annunciava la messa
dell’alba.\par }
\footnotetext[2]{  Della chiesa di Sant’Agata.\par }
%etc.
\end{document}

I want the footnotes to appear at the bottom of every page and not at the end of the chapter.

I've tried to add \usepackage[bottom]{footmisc} in the preamble but it didn't work. I'm using Overleaf, with default settings

first page

second-last page

last page

7
  • 5
    Is there a reason why you don't just use \footnote{...text...}?
    – JamesT
    Apr 9, 2023 at 11:28
  • Yes, I generate the tex file with php from an epub where the notes are at the end of every chapter. Apr 9, 2023 at 11:31
  • 3
    Can you show a screenshot of your result? If I run your code and add a few more paragraphs to get a second page, the footnotes are still at the bottom of the first page. Apr 9, 2023 at 11:32
  • Fair enough, it may be an issue with how you are compiling it then, could you link to a website or describe how you are compiling it with an edit to your question please so others can reproduce?
    – JamesT
    Apr 9, 2023 at 11:36
  • 1
    I can reproduce your problem (unlike @samcarter_is_at_topanswers.xyz). If I run your code with a few more paragraphs inserted before the group of \footnotetexts, the footnotes are typeset on the last page, just as in your example.
    – marquinho
    Apr 9, 2023 at 12:00

1 Answer 1

5

(edited to provide a bit more information about how the TeX/LaTeX page builder algorithm works and how this matters for the OP's issue)

I want the footnotes to appear at the bottom of every page and not at the end of the chapter.

The TeX/LaTeX page builder algorithm is "greedy", in the sense that it finishes a page and ships it out (generally, but not necessarily, to a pdf file) as soon as it can do so. This implies that if the \footnotetext directives are delayed until the end of a chapter, LaTeX has absolutely no way of going back a few pages and "doing over" the pages that happen to contain the \footnotemark directives that correspond to the delayed \footnotetext directives.

Rather than place the \footnotetext directives at the very end of a chapter, I suggest you insert them immediately after the corresponding \footnotemark instructions.

I've highlighted the footnote markers in the following screenshot.

enter image description here

\documentclass[11pt]{book}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage{lipsum}

\begin{document}

\chapter{I}

Suonava la messa dell'alba%
\footnotemark[1]%
\footnotetext[1]{Suonava la campana che annunciava la messa dell'alba.}
a San Giovanni; ma il paesetto dormiva ancora della grossa, perché era piovuto da tre giorni, e nei seminati ci si affondava fino a mezza gamba. Tutt'a un tratto, nel silenzio, s'udì un rovinìo, la campanella squillante di Sant'Agata%
\footnotemark[2]%
\footnotetext[2]{Della chiesa di Sant'Agata.}
che chiamava aiuto, usci e finestre che sbattevano, la gente che scappava fuori in camicia, gridando:

\lipsum[1-4] % about a page worth of filler text

\end{document}
7
  • 1
    Yes, but the tex file is generated with php from an epub where the notes are at the end of every chapter, so I prefer to find another solution. Anyway, this will be my last attempt, thanks. Apr 9, 2023 at 12:32
  • 4
    @AlbertoArdito - The LaTeX page builder algorithm is "greedy", in the sense that it finishes a page and ships it out (generally to a pdf file) as soon as it can do so. If the \footnotetext directives are delayed until the end of a chapter, LaTeX has absolutely no way of going back however many pages may be needed and "doing over" the pages that happen to contain the \footnotemark directives that correspond to the delayed \footnotetext directives.
    – Mico
    Apr 9, 2023 at 12:36
  • 3
    @Mico: Sorry for being unclear :) What I meant by "expected behavior" is "what should I normally expect when I use \footnotetext in LaTeX?" You answered this in your latest comment: LaTeX can't go back and rebuild an earlier page to insert the footnotes. I believe OP was "expecting" the opposite when they placed \footnotetext at the end but hoped for the text to print at the start. Therefore, your comment would be a good addition to the answer: "That cannot be done, because of LaTeX' algorithm".
    – marquinho
    Apr 9, 2023 at 12:43
  • 2
    @marquinho - Good suggestion! I'll go ahead ahead and provide the missing explanation in the body of the answer.
    – Mico
    Apr 9, 2023 at 12:44
  • 3
    Ok, I'm going to write a php script to replace every mark with a \footnote with the relative note. Thanks for the explanation Apr 9, 2023 at 12:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .