# Adding a footnote to the end of chapters

I need to add a single (possibly more) footnote to the end of the chapter (bottom of last page of chapter).

I do not want a whole complex thing to do this simple task. I simply want to put some text like

* This is the last page of the last chapter

at the bottom of the last page of the last chapter without having to manually keep track of that page.

-
The package endnote can do it; there are instructions in the documentation. – egreg Aug 29 '12 at 15:47
@egreg from what I read I have to create a separate text file just to put a simple little comment... seems overkill. – AbstractDissonance Aug 29 '12 at 15:51
No need for a separate file; see my answer for a simple example. – Gonzalo Medina Aug 29 '12 at 16:48

Here is a version that adds a footnote at the end of every chapter after issuing \chapendfootnote (of course, you could also just make this the default and not have to issue \chapendfootnote at all). The test to insert the end-of-chapter footnote is based on whether you're in a chapter with number >= 1. This would typically exclude \frontmatter chapters or \chapter*s, since they don't increment the chapter counter:

\documentclass[twoside]{report}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\makeatletter
\let\@chapterfootnote\@empty%
\newcommand{\chapterfootnote}[1]{\gdef\@chapterfootnote{#1}}%
\newcommand{\thechapendfootnote}{{%
\renewcommand{\thefootnote}{\fnsymbol{footnote}}%
\ifx\@empty\@chapterfootnote\else
\footnotetext[1]{\@chapterfootnote}%
\fi}%
\let\@chapterfootnote\@empty}%
\newcommand{\chapendfootnote}{%
\let\oldchapter\chapter%
\renewcommand{\chapter}{%
\ifnum\value{chapter}<1\else\thechapendfootnote\fi%
\oldchapter%
}%
}
\makeatother
\AtEndDocument{\thechapendfootnote}%
\begin{document}
\chapendfootnote
\tableofcontents
\chapter{A chapter}
\chapterfootnote{Hello this chapterfootnote for Chapter~1.}
\lipsum[1-20]
\chapter{Another chapter}
\chapterfootnote{This is a completely different chapter foot note for Chapter~2.}
\lipsum[1-15]
\chapter{Final chapter}
\chapterfootnote{And this is another one.}
\lipsum[1-40]
\end{document}​


Individualized end-of-chapter footnotes are specified using \chapterfootnote{<footnote>}.

-
 Cool, but I'd like to add different footnotes to different chapters ;) e.g., \chapter{chapter 2} .... \chapterfootnote{This is a footnote for chapter 2 at the end of the chapter} I think you code might be easy to convert by just creating a macro like \chapterfootnote and getting the current chapter number that it is called in. One just needs to keep some time of history with the footnote and it's chapter. – AbstractDissonance Aug 29 '12 at 19:18 @AbstractDissonance: I've added this "different" footnote to the example I gave. Not sure whether that addresses your concern. – Werner Aug 29 '12 at 19:34 No, I mean I need completely different footnotes per chapter. A normal footnote is per page. I want a footnote per chapter(but still be able to do per page footnotes). For example, \chapter{1} ... \chapterfootnote{Hello this chapterfootnote for chapter 1} ... \chapter{2} ... \chapterfootnote{This is a completely different chapter foot note for chapter 2} ... \chapterfootnote{And this is another one} ... – AbstractDissonance Aug 29 '12 at 19:50 Your code is very close but I think you just need to store each footnote and the chapter it is applied to in the \thechapendfootnote macro then put them all at the end of the chapters they belong to(instead of hard coding only one global chapterfootnote. – AbstractDissonance Aug 29 '12 at 19:52 @AbstractDissonance: Try the updated answer. – Werner Aug 29 '12 at 19:58
show 4 more comments

As egreg mention in a comment, the endnotes package does what you need: a little example using standard \footnotes and \endnotes:

\documentclass{book}
\usepackage{endnotes}
\usepackage{lipsum}

\begin{document}

\chapter{Test Chapter One}
\lipsum*[2]\footnote{A regular footnote}
\lipsum*[4]\endnote{An endnote}
\lipsum*[2]\footnote{Another regular footnote}
\lipsum*[4]\endnote{Another endnote}
\lipsum*[1-4]
\theendnotes
\chapter{Test Chapter Two}

\end{document}

-
 One thing I'm trying to avoid is having to specify the location of the notes(else I can just do it myself easily). i.e, having to specify \theendnotes. Also, I want more of a footnote like note rather than some fancy list of notes. I only have one note(or two) and I don't want it to stand out. The endnote package doesn't really accomplish this as it does too much. – AbstractDissonance Aug 29 '12 at 17:28