0

I use tikz and tcolorbox for theorems. Also I want footnotes outside of the boxes, at the bottom of the page and with the same numbering like the others. I want something like this, but with the numbering style to be the same with the outside footnotes.

Is there any solution?

This is my code

\documentclass{article}

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

\usepackage[most]{tcolorbox}

\usepackage{environ}

\renewcommand{\thefootnote}{[\Roman{footnote}]}% Footnote style!!!

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

\NewEnviron{Tbox}{
    \begin{tcolorbox}[enhanced,
        breakable]
        \BODY
    \end{tcolorbox}
}


\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 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 and with number [IV].}
\end{Tbox}

\end{document}

and this is how it looks like:

enter image description here

Thanks in advance!!!

1

I'm not sure about what outside the box means. If you want the footnote just below the box, you could try to use a bicolor box where the footnote is the lower part. What follows is not a perfect solution but a starting point.

\documentclass{article}

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

\usepackage[most]{tcolorbox}

\usepackage{environ}

\renewcommand{\thefootnote}{[\Roman{footnote}]}% Footnote style!!!

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

\NewEnviron{Tbox}{
    \begin{tcolorbox}[enhanced,
        breakable,
        bicolor,
        colback=white,
        colbacklower=white,
        fontlower=\footnotesize,
        bottom=1mm,
        middle=1mm,
        frame hidden,
        overlay={\draw[rounded corners] (frame.north west) rectangle (segmentation.south east);},
        ]
        \BODY
    \end{tcolorbox}
}

\newcommand{\myfootnote}[1]{\tcblower \footnotemark #1}



\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 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\myfootnote{I want this footnote outside of the box and with number [IV].}
\end{Tbox}

\end{document}

enter image description here

If you want the footnotes just like regular footnotes, follow ferahfeza's suggestion.

  • I mean that I want them to be at the bottom of the page, like the others footnotes. – Kώστας Κούδας Mar 25 at 12:06

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.