Directory macros/latex/contrib/tcbpagefootnote
tcbpagefootnote Package
LaTeX: 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
- are numbered with the
footnotecounter and\thefootnote, along with the footnotes of the body text, and - 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: pdfLaTeX, XeLaTeX, LuaLaTeX (with or without LuaTeX-ja), pLaTeX, upLaTeX (+ dvipdfmx)
Files
| File | Description |
|---|---|
tcbpagefootnote.sty |
The package |
tcbpagefootnote.tex / .pdf |
Documentation |
test-*.tex |
Test suite (see below) |
Requirements
tcolorbox(thehookslibrary is loaded by the package)- Tested with TeX Live 2026 (LaTeX2ε 2026-06-01, tcolorbox 6.10.0)
Installation
Copy tcbpagefootnote.sty to your local TeX 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 footnotecannot be used withfloat(error).- Keys that set the whole
aftercode (after,after skip,nobeforeafter, ...) remove the code that puts the footnotes when they come afterpage footnote(error): give them before it, e.g.[after skip=1pt, page footnote]. - A
breakablebox 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)pLaTeX 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 pdfLaTeX, XeLaTeX, LuaLaTeX, pLaTeX and upLaTeX (+ 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.auxfile and checked when it is read back at\end{document}; seetest-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
- https://github.com/munepi/tcbpagefootnote
- Bug reports: https://github.com/munepi/tcbpagefootnote/issues
License
This package is licensed under the conditions of the LaTeX 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, XeLaTeX, LuaLaTeX, pLaTeX, upLaTeX (with dvipdfmx).
| Package | Tcbpagefootnote |
| Repository | |
| Version | 1.0 2026-10-25 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Munehiro Yamamoto |
| Maintainer | Munehiro Yamamoto |
| Contained in | TeX Live as tcbpagefootnote |
| Topics | Boxing Footnote |