CTAN Comprehensive TeX Archive Network

Directory macros/latex/contrib/tcbpagefootnote

README.md

tcbpagefootnote Package

: Page footnotes from inside tcolorbox

tcolorbox typesets the content of a box like a minipage: a \footnote inside the box is numbered with the mpfootnote counter (a, b, ...) and its text is put at the bottom of the box.

The tcbpagefootnote package adds the tcolorbox key page footnote. With it, the footnotes in the title, the upper part and the lower part of the box

  1. are numbered with the footnote counter and \thefootnote, along with the footnotes of the body text, and
  2. are put at the bottom of the page where the box is: their texts are collected while the box is typeset and are put into the ordinary footnote insertion right after the box. If the box moves to the next page, its footnotes move with it.

\footnote[<number>], \footnotemark with \footnotetext, \tcbox, and boxes with page footnote inside each other work as usual. With hyperref, each footnote mark links to its own footnote text.

  • Supported formats/engines: pdf, , Lua (with or without Lua-ja), p, up (+ dvipdfmx)

Files

File Description
tcbpagefootnote.sty The package
tcbpagefootnote.tex / .pdf Documentation
test-*.tex Test suite (see below)

Requirements

  • tcolorbox (the hooks library is loaded by the package)
  • Tested with Live 2026 ( 2026-06-01, tcolorbox 6.10.0)

Installation

Copy tcbpagefootnote.sty to your local tree: $TEXMF/tex/latex/tcbpagefootnote/

Usage

\usepackage{tcbpagefootnote}

\begin{tcolorbox}[title=Note, page footnote]
  Text\footnote{A page footnote.}.
\end{tcolorbox}

\newtcolorbox{note}[1][]{colback=blue!5, page footnote, #1}
\tcbset{page footnote}  % for every box

Errors, warnings and limitations

  • page footnote cannot be used with float (error).
  • Keys that set the whole after code (after, after skip, nobeforeafter, ...) remove the code that puts the footnotes when they come after page footnote (error): give them before it, e.g. [after skip=1pt, page footnote].
  • A breakable box that is broken across pages puts the footnote texts of all its parts on the page where the box ends, and the package warns. The content of a breakable box is typeset as a whole before it is split, and footnote insertions do not travel with the split parts.
  • Vertical writing (tate) is out of the scope of this version. With (u)p and dvipdfmx, tcolorbox itself does not work in tate, since the dvipdfmx driver of TikZ/PGF does not support it; this is to be handled by a separate package.

Testing

make test compiles every test with pdf, , Lua, p and up (+ dvipdfmx), and checks the log:

  • TPF-RESULT OK: every footnote text is typeset exactly once, with its own mark, on the expected page, as a page footnote or as a footnote of the box (recorded at shipout to the .aux file and checked when it is read back at \end{document}; see test-common.tex).
  • test-hyperref: no warning on a duplicate or missing destination in the log or in the output of the engine and (x)dvipdfmx.
  • test-breakable: exactly one tcbpagefootnote warning; the other tests: none.
  • test-errors: the expected error message.
Test Engines What it covers
test-basic.tex pdflatex, xelatex, lualatex (article, ltjsarticle), platex, uplatex title/upper/lower, several footnotes, \footnote[9], \footnotemark/\footnotetext, nested boxes, an ordinary box, \tcbox, \newtcolorbox, \tcbset, a box moved to the next page
test-hyperref.tex pdflatex, xelatex, lualatex, platex, uplatex test-basic.tex with hyperref
test-breakable.tex pdflatex, xelatex, lualatex, platex, uplatex a broken box (footnotes on the last page, warning), an unbroken breakable box, an unbreakable box after a broken one
test-japanese.tex lualatex (ltjbook), platex (jbook), uplatex (ujbook) a Japanese document
test-errors.tex pdflatex the error messages (float, after, key already defined)

test-common.tex holds the helpers shared by the tests.

Repository

License

This package is licensed under the conditions of the Project Public License, either version 1.3c of this license or any later version.

Copyright (c) 2026 Munehiro Yamamoto

Download the contents of this package in one zip archive (189.3k).

Tcbpagefootnote – Page footnotes from inside tcolorbox

tcolorbox typesets the content of a box like a minipage: a \footnote inside the box is numbered with the mpfootnote counter and its text is put at the bottom of the box. This package adds the tcolorbox key page footnote, with which the footnotes in the title, upper and lower part of a box are numbered along with the footnotes of the body text and are put at the bottom of the page where the box is.

Nested boxes, \footnotemark/\footnotetext, \tcbox and hyperref (each footnote text keeps the anchor of its own mark) are supported. A breakable box broken across pages puts its footnote texts on the page where the box ends, with a warning.

Supported formats/engines: pdflatex, , Lua, p, up (with dvipdfmx).

PackageTcbpagefootnote
Repository
Version1.0 2026-10-25
LicensesThe Project Public License 1.3c
Copyright2026 Munehiro Yamamoto
MaintainerMunehiro Yamamoto
Contained inTeX Live as tcbpagefootnote
TopicsFootnote
Boxing
...
Guest Book Sitemap Contact Contact Author