[Tex/LaTex] Footnotes layout in multicols environment

footnotesformattingmulticol

I am using the package multicol to typeset a one-column (spanning the entire text width) heading and a two-column main text block. In order to do so, I begin the multicols environment along with the start of the text block. The one-column heading spans a small fraction of the text height in the front page and I need to set a footnote there, before starting the two-column environment. I'd like to have that footnote typeset under the first column in the two-column running text. How could I possibly do this?

Moreover, I'd like to have the footnotes typeset in a single column under one of the text columns — I don't even mind having them as two-column footnotes, but what I do not want is a footnotes layout spanning the entire text width. I have tried with the command \twocolumnfootnotes from the class memoir, with the packages ledmac, dblfnote, and even with ftnright (the latter complains about its being used in a single-column document, due to that one-column heading). None has proved useful in this setting. As a less than MWE, just to convey a more concrete depiction of my scenario, let us consider:

\documentclass{memoir}

\usepackage{multicol}

\begin{document}

A single-column heading\footnote{Here I have my footnote.}

\begin{multicols}{2}
Here I am in the two-column environment, and I want my footnotes being set in accordance with the document's ``columnwidth''.\footnote{A footnote in the two-column environment.}
\end{multicols} 

\end{document}   

Best Answer

There are a number of good reasons why it is impossible to provide the layout you are looking for with multicols. Two important ones are:

  • As the name implies the code is supposed to support different column numbers on the same page. Now how wide should a footnote be? Full text width is ugly, but so is any other width, if it doesn't fit with the rest of column setup. Even if the spec would be reduced be just "one and two columns with balancing" it would still be ugly if you have, say, a single footnote (in twocolumn width) but the bottom of your page ends up being one-column.

  • Technically, multicols works by collecting a page worth of material and then splitting off the columns (and in case of balancing at the end potentially retrying many (hundred) scenarios to find the best balancing solution). Now this works by using \vsplit and \vsplit is keeping footnote material inside the boxes. So by using this approach you can't use the footnote material as poart of the column itself (or taking part of the balancing). Now it is possible, of course, to use a different approach involving a collection of output routines that do all this kind of work on the main vertical list rather than safely with already gathered material in boxes. However, it would be a good factor more complicated and as a result really complex output routines typically limit themselves to solving restricted problems.

Now TeX is Turing complete as you mentioned in a comment, but this isn't going to help you much initially. It doesn't mean that it is feasible to program each and everything in TeX and even if it is possible you might end up dropping all or most of the functionality that TeX offers in one area and reprogram it in a fairly inefficient way yourself just to get over built-in limitations. Until quite recently the biggest hurdle was that doing that would also mean the processing would end up being incredibly slow or hit memory limits.

That situation has improved a lot in the last years and this is one of the reasons why it is now possible to come up with a programming framework (like expl3) that provides that basis for expanding TeX's abilities within TeX. When multicols was originally written it would have been impossible to envision that one implements a full blown regular expression parser in TeX (not technically but realistically) now we have one in expl3.

Bottom line, the design of TeX was made for single column documents, and anything that goes a lot beyond that was pretty much either impossible or only possible in restricted scenarios.

Nowadays, one could do better and we do have a different page design concept in the drawer that does offer what you are looking for. The catch is, it is not ready. Its proto-type is already from 2000, but back then it was still utopia, because of the speed restrictions it imposed.

That has changed, so now something like expl3 is a platform that can be (and is) used for real, and we are currently in the process of revising the code and ideas from the end of the last century. Now this sound awfully old, doesn't it? But fact is, for current LaTeX multicol is still around as "the" solution so ... there is some reason for that.

Related Question