Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

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).

share|improve this answer
    
This is it! Wonderful! –  ℝaphink Apr 14 '11 at 15:27
    
footnote should do this better \AtBeginDocument instead. –  Martin Scharrer Apr 14 '11 at 19:58
add comment

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.

share|improve this answer
    
the footnote doesn't appear in the \parbox if I don't use the footnote package, it just doesn't appear at all. –  ℝaphink Apr 14 '11 at 14:54
    
the \footnotemark+\footnotetext does the trick. However, I'd really like to understand why \footnote won't play nice with \xcolor... –  ℝaphink Apr 14 '11 at 14:57
add comment

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}
share|improve this answer
    
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. –  ℝaphink Apr 14 '11 at 15:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.