1

I use tikz-boxes and tcolorbox and I want to have the footnotes outside of the boxes at the bottom of the page with the same numbering with the others. To sum up, I want the tikz or tcolorbox footnotes not to be different with the others (see here).

So I tried Martin Scharrer's solution to this question, that uses savenotes environment. I wrap savenotes environment around tikzpicture and tcolorbox. The code is below:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{shapes,snakes}

\usepackage[most]{tcolorbox}

\usepackage{environ}

\renewcommand{\thefootnote}{[\Roman{footnote}]}

\tikzstyle{mybox} = [draw=black, fill=white, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\NewEnviron{tikzbox}{
    \begin{savenotes} % I add this!!!
            \begin{tikzpicture}
\node [mybox] (box){
    \begin{minipage}{0.50\textwidth}
            \BODY
    \end{minipage}
};
\end{tikzpicture}
\end{savenotes}% I add this!!!

}

\NewEnviron{Tbox}{
        \begin{savenotes}% I add this!!!
    \begin{tcolorbox}[enhanced,
        breakable]
        \BODY
    \end{tcolorbox}
\end{savenotes}% I add this!!!

}


\begin{document}

Some main text Some main text Some main text Some main text Some main text Some main text\footnote{The first footnote.}

Other main text Other main text Other main text Other main text\footnote{The second footnote.}

\begin{tikzbox}
Some tikzboxed text Some tikzboxed text Some tikzboxed text\footnote{I want this footnote outside of the box, at the bottom of the page and with number [III].}
\end{tikzbox}

\begin{Tbox}
Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text\footnote{I want this footnote outside of the box, at the bottom of the page and with number [IV].}
\end{Tbox}

\end{document}

The problem is that I get an error message and not the result that I expected. The strange is that Martin Scharrer's code (copy-paste) works fine. Here is the log-file.

Thank's in advanced!!!

0 Answers0