3

The following code fails to build:

\documentclass{book}

\usepackage{footnote}
\usepackage{xcolor}

\begin{document}

\chapter{My first chapter}

\parbox{110mm}{
Here is a footnote\footnote{The footnote is here}.
Where is my footnote?
}

\end{document}

The error produced is:

! Extra }, or forgotten \endgroup.
<argument> ...@finalstrut \strutbox }\fn@endnote }

l.13 }

If I remove the footnote package, the footnote is not exported outside of the parbox, and I need the xcolor package to produce gray lettrines somewhere else in the document.

Is that a know bug? How can I circumvent it?

3 Answers 3

8

Load footnote after xcolor. footnote contains a \let\fn@endnote\color@endgroup, this give the wrong result if xcolor hasn't been loaded yet (xcolorredefines \color@endgroup).

2
  • This is it! Wonderful!
    – raphink
    Apr 14, 2011 at 15:27
  • footnote should do this better \AtBeginDocument instead. Apr 14, 2011 at 19:58
1

use a minipage instead of the parbox:

\begin{minipage}{110mm}
Here is a footnote\footnote{The footnote is here}.
Where is my footnote?
\end{minipage}
1
  • That works, too. But the result is very different from what I expect. Using a minipage, the footnote text is put right at the end of the minipage (which makes sense), instead of being at the end of the page (where I would like it). @Martin's solution, on the other hand, allows to play the footnote text at the end of the page.
    – raphink
    Apr 14, 2011 at 15:12
1

You could try to combination of \footnotemark and \footnotetext to avoid having the footnote inside the \parbox. This works for you example, but is actually some technique the footnote package tries to avoid.

\documentclass{book}

\usepackage{footnote}
\usepackage{xcolor}

\begin{document}

\chapter{My first chapter}

\parbox{110mm}{
Here is a footnote\footnotemark.
Where is my footnote?
}
\footnotetext{The footnote is here}.

\end{document}

See also this TeX FAQ which is more about footnotes in tables, but partially also applies here.

2
  • the footnote doesn't appear in the \parbox if I don't use the footnote package, it just doesn't appear at all.
    – raphink
    Apr 14, 2011 at 14:54
  • the \footnotemark+\footnotetext does the trick. However, I'd really like to understand why \footnote won't play nice with \xcolor...
    – raphink
    Apr 14, 2011 at 14:57

You must log in to answer this question.

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