11

How can I get a footnotemark defined in an tcolorbox environment that appears in two or three pages, but the respective footnotetext printed out in the footer of the first page?

The image shows three pages and one big tcolorbox with a \footnotemark inside the environment, and the respective \footnotetext located at the footer. enter image description here [footnote within tccolorbox ]

6
  • 1
    Welcome to TeX.SX! Could you please make your question a bit clearer?
    – egreg
    Commented Aug 28, 2015 at 21:25
  • See the answer here too: tex.stackexchange.com/a/503492/120578 Footnote is redefined to be a global footnote even if it is inside the tcolorbox or outside of it.
    – koleygr
    Commented Aug 9, 2019 at 8:16
  • Hello @koleygr , I'm afraid that my cuestion was not perfectly done. If you repeat your first example in [link]tex.stackexchange.com/a/503492/120578[link] ` \begin{testexample}[Latin Text] \lipsum[1]\footnote{my first footnote} \\ \lipsum[1] \lipsum[1] \lipsum[1] \lipsum[1] \lipsum[2]\footnote{Another Footnote} \end{testexample}` you will see the first footnote text in page 2, while the footnote mark is in page 1. And I wanted the footnote text in the first page (in the page where the footnote mark lies). Thank you
    – JOM
    Commented Aug 14, 2019 at 15:12
  • @JOM ... I just print the footnote text there just after the environment and haven't take care about starting the environment in other page than finishing... I could do it some time.
    – koleygr
    Commented Aug 14, 2019 at 15:34
  • It's okay @koleygr , seems to be an issue to me. I just want that every footnotemark in an especific page to be paired with its respective footnotetext in the same page. thanks!
    – JOM
    Commented Aug 15, 2019 at 20:04

1 Answer 1

5

If I understand your question correctly, you want to refer to the same footnote from multiple colorboxes. The footnote should furthermore appear at the bottom of a page, not in a colorbox.

The code below provides the answer. Apparently, all you need is footnote labeling because footnotes in tcolorboxes make use of different counters and use letters, which turns out to be very convenient.

\documentclass{article}
\usepackage[paperheight=3in,paperwidth=5in]{geometry}
\usepackage{tcolorbox}

\begin{document}

% The footnote is placed on the page where you place this:
My global footnote is defined here\footnote{\label{name}This is my global footnote.}
% The label is required to refer to the footnote.


\begin{tcolorbox}
 % Refer to the same footnote as follows:
 Second reference to global footnote\footnotemark[\ref{name}]
  \begin{tcolorbox}
    % It's still possible to use local footnotes, which by default (and rather conveniently) uses letters in the tcolorbox environment and has its own counter:
  A local footnote\footnote{This is a local footnote}

  Third reference to global footnote\footnotemark[\ref{name}]

  % Another local footnote, not disturbed by the counter of the global footnote:
  A local footnote\footnote{This is my second local footnote}
 \end{tcolorbox}
\end{tcolorbox}

\end{document}

result

If you do not want the reference to the global footnote to appear where it's defined, then replace \footnote{\label{... for \addtocounter{footnote}{1}\footnotetext{\label{....

3
  • Forgive me for my english. It is only one (actual) \footmark in a tcolorbox environment that spreads on three pages. I want the \footmark printed inside de tcolorbox, and I wish to choose that the \footnotetext appears in the first footer
    – JOM
    Commented Aug 29, 2015 at 12:29
  • 1
    OK @JJMDriessen. I tried your code and it works (the global footnote has not to be the first one). Thanks The problem now is when I use my macros. LaTeX says ! Missing number, treated as zero. <to be read again> \protect l.20 ...e inside tcolorbox\footnotemark[\ref{name}]
    – JOM
    Commented Aug 29, 2015 at 13:17
  • Is there a way to force the footnotes in a box to appear at footer of the page? Commented Apr 19 at 11:08

You must log in to answer this question.

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