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.
So I tried Martin Scharrer's solution to this question, that uses savenotes environment. I wrap savenotes environment around tikzpicture and tcolorbox. The tikz-box is OK, but not the tcolorbox. The footnote's text is at the bottom of the page (OK with this), but it has other numbering.
The code is below:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes}
\usepackage[most]{tcolorbox}
\usepackage{footnote}
\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}
\begin{tcolorbox}[enhanced,
breakable]
\BODY
\end{tcolorbox}
\end{savenotes}
}
\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{This is OK.}
\end{tikzbox}
\begin{Tbox}
Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text\footnote{This is not OK. I want this footnote outside of the box, at the bottom of the page and with number [IV].}
\end{Tbox}
\end{document}
and this is how it looks like:


