tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

Support for "automatic" page footnotes

Open mateusfccp opened this issue 3 years ago • 6 comments

This issue depends on #179.

Currently, if we try to use \footnote inside a tblr environment, the footnotes goes mental.

Sample code:

\documentclass{article}
\usepackage{tabularray}
\usepackage[language=english]{lipsum}

\title{Footnote Example}
\author{Mateus Felipe}
\date{December 2022}

\begin{document}

\maketitle

\section{Introduction}

\lipsum[1]\footnote{\lipsum[2]}

\begin{tblr}{c|c}
     Lorem\footnote{\lipsum[3]} & Ipsum  \\
     Dolor & Sit\footnote{\lipsum[4]}
\end{tblr}

\lipsum[5]\footnote{\lipsum[6]}

\end{document}

Result: image

This is actually a common problem with tabular environments in LaTeX. To solve this, I usually use tabularx, which simply works with footnotes. However, I prefer tabularray API way more. The only thing making me still use tabularx sometimes is this limitation.

mateusfccp avatar Dec 13 '22 23:12 mateusfccp

Support for table footnotes (footnotes typeset right after table, not in normal page footnote area) is introduced in tabularray 2021L (see changelog), and used in several examples in package manual, but not documented yet.

Just search for footnote in the package manual and you'll see option note and command \TblrNote in examples.

muzimuzhi avatar Dec 14 '22 00:12 muzimuzhi

Support for table footnotes (footnotes typeset right after table, not in normal page footnote area) is introduced in tabularray 2021L (see changelog), and used in several examples in package manual, but not documented yet.

Just search for footnote in the package manual and you'll see option note and command \TblrNote in examples.

I may be wrong, but isn't \TblrNote for table footnotes? Instead of regular footnotes? The issue proposes support for regular \footnote supporte.

Note that in the provided sample, the footnotes counter jumps from 1 to 9, then 12 and then 14, and only the ones that were in the text (1 and 14) are printed in the bottom of the page. The expected behavior is that all of them are printed in the bottom, and the numeration is sequential (1, 2, 3, 4).

mateusfccp avatar Dec 14 '22 09:12 mateusfccp

Ah you want page footnotes. Then you may have to use \footnotemark and \footnotetext, and manage footnote counter manually.

\documentclass{article}
\usepackage{tabularray}

\textheight=5cm % for screenshot

\begin{document}
Text\footnote{before tblr}

\begin{tblr}{colspec=lll, hlines, vlines}
  a\footnotemark[\numexpr\value{footnote}+1] & b \\
  c\footnotemark[\numexpr\value{footnote}+2] & d \\
\end{tblr}
\footnotetext[\numexpr\value{footnote}+1]{tabularray footnote}
\footnotetext[\numexpr\value{footnote}+2]{another tabularray footnote}
\addtocounter{footnote}{2}

Text\footnote{after tblr}
\end{document}

image

Automatic avoidance of counter jumping depends on the implementation of

  • #179.

muzimuzhi avatar Dec 14 '22 18:12 muzimuzhi

Ah you want page footnotes. Then you may have to use \footnotemark and \footnotetext, and manage footnote counter manually.

Yeah, I am aware of this way of making footnotes. The issue is precisely a request to be able to simply use the regular \footnote command inside it, like we can in tabularx. I am going to try to make the issue clearer about what it is about.

Automatic avoidance of counter jumping depends on the implementation of

Thanks for the info, I am going to keep this one open as its related to it but not exactly the same thing.

mateusfccp avatar Dec 15 '22 16:12 mateusfccp

@mateusfccp You may have a look at the following answer of mine:

https://tex.stackexchange.com/questions/645421/tabularray-with-footnotes/645453#645453

lvjr avatar Dec 31 '22 14:12 lvjr

Most annoying thing with the package. Please implement support for standard page footnote.

MrJake222 avatar Mar 30 '25 15:03 MrJake222