13

How can one ensure that footnotes page-wrap only from verso (back, even-numbered) to recto (front, odd-numbered) pages?

With the following code, the line to which the second footnote is attached should be moved to page 4 so that the second footnote wraps from page 4 to page 5 (instead of from page 3 to page 5). The first footnote is okay (it spans from page 2 to page 3).

\documentclass{memoir}
\usepackage{lipsum}


\begin{document}

\lipsum Very long footnote.\footnote{\lipsum[1-5]}

\newpage
\lipsum[1-4] Very long footnote.\footnote{\lipsum[1-8]}

\end{document}

Some special considerations: (While extreme cases are unlikely to represent good style, (1) an implementer needs to be aware of them, and (2) some genres might give different priorities and not care about the oddity of such extreme examples. I have seen texts in the genre of legal commentary with many pages where footnotes fill most of the page.)

  • An unresolvable case is when a footnote spans more than two pages. In that case it doesn't matter where it starts, though ensuring that it starts on a verso (even-numbered) page is a sensible choice too.
  • If one has very long footnotes anchored to successive lines, one can simply fill the double page with the footnote and move each line containing such an anchor to the beginning of a new double page to fulfill the requirements.
  • If one has very long footnotes anchored to words on the same line, there won't be much one can do about keeping the anchors on the same page as the very long footnote. In such a case, the line with footnotes 6, 7, and 8 will simply have do be on (say) page 2, with these footnotes starting on (say) pages 2, 6, and 8.
  • An alternative and sensible way of ensuring the requirement is to move the footnote to the next verso (even-numbered page) while keeping the anchor on a recto page (this might make sense when there is a very long footnote on page 1 of a document).

These considerations will help with design decisions; there is more than one way to do it. Extreme cases won't occur much, but unless one works them out, it won't be clear how to implement an algorithm.

  • This seems like it would lead in certain cases to extremely short pages in some cases, which is likely to give large gaps between paragraphs, lists, displayed math, etc., and the reader might be left wondering what is going on. Is this a preferable solution to a manual intervention in the final stages of preparing the manuscript? (I always think if the reader notices the typography [for normal documents], it's a sign that the document design was unsuccessful.) (Which, by the way, is different from this being an interesting 'academic' question about implementation.) – jon Jun 16 '13 at 15:24
  • @jon I agree with your content, except it may not be that straightforward to ensure that footnotes don't cross over from recto to verso using manual intervention. There are some algorithmic aspects to work out, and it will be interesting to see how well an algorithm can actually do with this constraint. – Lover of Structure Jun 17 '13 at 12:28
4

An experiment

I can summarize my findings on this question.

  • Try to avoid using footnotes. Sometimes it doesn't look right even if you put a lot of efforts to properly typeset them and still the paper is difficult for people to read. There is a fine method, just convert your footnotes to sectionnotes or endnotes. There is even a package for it named endnotes, see http://ftp.cvut.cz/tex-archive/macros/latex/contrib/endnotes/endnotes.pdf. It uses simple I/O operations. The advantage of this method is that you could cross-reference from text to notes and back from notes to the citation in text, if needed. It is not easy, but it is not that difficult to program. Well, the two-way citations can be done with regular footnotes easily too with the help of the hyperref and footnotebackref packages, see http://ftp.cvut.cz/tex-archive/macros/latex/contrib/footnotebackref/footnotebackref.pdf.
  • If you must use footnotes, try to limit their overall splitting by \interfootnotelinepenalty=10000, meaning that penalty is set to its maximum.
  • It brings me to my experiment. I was thinking if it is possible to change this penalty to initial value (100) and to the highest value (10000) on-the-fly and our demands. If a footnote is to be typeset on an odd page, let the program sets it to 10000 before typesetting, if not, then let the penalty is set back to 100. I tried that. It looks it is working, but I was losing \footnoterule, so I drew my own.

I enclose the code, the first column of figures demonstrates the initial setting by TeX (line 12 set to 100 or \myinter), the second column of figures is typeset by this experiment (line 12 set to 10000). The examples look ugly, but the algorithm probably works as expected!

\documentclass[a4paper]{article}
\usepackage{kantlipsum}
\usepackage{xcolor}

\begin{document}
\newcount\myinter
\myinter=\interfootnotelinepenalty % Save the predefined value.
%\the\interfootnotelinepenalty % Show me the actual value.

\def\mykant#1{%
\ifodd\thepage
  \interfootnotelinepenalty=10000% 10000, \myinter
  \def\footnoterule{}%
\else
  \interfootnotelinepenalty=\myinter% 100, \myinter
\fi
\footnote{\kant*[#1]}%
% Definition of the command is rewritten...
\def\footnoterule{\noindent
\raisebox{0.7ex}[0ex][0ex]{% Just for fun...
  \makebox[3cm][l]{\color{red}\hrulefill}%
  \makebox[3cm][l]{\color{green}\hrulefill}%
  \makebox[3cm][l]{\color{blue}\hrulefill}%
  }}%
}% End of \mykant...

\kant[1-3]
My sentence.\mykant{5}
\kant[6-11]%
My next sentence.\mykant{6-7} 
\kant[9-10] Two words.\mykant{8} \kant[11] A word.\mykant{7} \kant[30] The last experiment.\mykant{9} The end of story!
\end{document}

pages 1 pages 2 pages 3 pages 4 pages 5

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.