2

I would like to know how to put footnotes outside of a tcolorbox. A simple example of what I get with the usual footnote command :

enter image description here:

\documentclass[10pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tcolorbox}

\begin{document}
\begin{tcolorbox}
this is text\footnote{and a footnote inside the box} but I would like to have this footnote at the end of the page
\end{tcolorbox}
\end{document}
2

1 Answer 1

7

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}

\usepackage{tcolorbox}
\usepackage{footnote}
\BeforeBeginEnvironment{tcolorbox}{\savenotes}
\AfterEndEnvironment{tcolorbox}{\spewnotes}
\begin{document}
    \begin{tcolorbox}
        this is text\footnote{and a footnote inside the box} but I would like to have this footnote at the end of the page
    \end{tcolorbox}
\end{document}
3
  • This works perfectly, thanks a lot !
    – simonm12
    Feb 28, 2021 at 2:47
  • would you like to accept the answer if it is suitable to you r requirement
    – js bibra
    Feb 28, 2021 at 3:20
  • Sure, it should be good now
    – simonm12
    Feb 28, 2021 at 8:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .