2

I would like to know how to put footnotes outside of a tcolorbox. An 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
2

enter image description here

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

\usepackage{tcolorbox}
\usepackage{footnote}
\usepackage{etoolbox}
\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 at 2:47
  • would you like to accept the answer if it is suitable to you r requirement – js bibra Feb 28 at 3:20
  • Sure, it should be good now – simonm12 Feb 28 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.