# change footnotes to endnotes, but allow some old footnotes

I have a book project that uses `\footnote{}` for all notes, but it is proposed to change all such notes that are just references or scholarly notes to endnotes, while also leaving notes that amplify the discussion as footnotes. I estimate that ~ 90% of notes will become endnotes.

• change in the text those that should remain footnotes to use a new command `\FN{}`

• redefine `\footnote{}` to `\pagenote{}` using the `pagenote` package (this seems more capable than `endnotes`).

But I'm not sure how to accomplish this. What I'm thinking is to use the following:

``````\usepackage{pagenote}
\makepagenote
\renewcommand*{\notedivision}{\chapter*{\notesname}}
\let\oldfootnote\footnote
\let\footnote\pagenote
\newcommand{\FN}[1]{\oldfootnote{#1}}
``````

Will this work? That is,

• can one actually have footnotes and endnotes in the same document?

• will my method of defining `\FN{}` in terms of a saved `\oldfootnote` work?

Edit: What I proposed above does work, at least partially. That is, notes coded as `\FN{}` do appear as footnotes in the text, while all others, coded as `\footnote{}` are translated to endnotes, and appear in a final Notes `\chapter*{Notes}`. However, they are all shown in the text with sequential superscript numbers.

If I am to make this work, I need to distinguish the footnotes from the endnotes in the text, say, by using superscript letters for the footnote symbols. I tried reordering the commands and re-defining the footnote symbol as follows, but this doesn't make the `\FN{}`s appear as superscript letters.

``````\usepackage{pagenote}
\let\oldfootnote\footnote
\newcommand{\FN}[1]{\oldfootnote{#1}}
\makeatletter
\let\@fnsymbol\@alph
\makeatother

\makepagenote
\let\footnote\pagenote
\renewcommand*{\notedivision}{\chapter*{\notesname}}
``````
• I'd find/replace the existing footnote commands (easy in any respectable editor) rather than unnecessarily redefining the command – Chris H Nov 3 '17 at 19:19
• i've seen `enotez` used in a book that had both (a lot of) endnotes and (just a few) footnotes. (unfortunately, i haven't got time right now to dig up the archive.) – barbara beeton Nov 3 '17 at 19:20
• @ChrisH There would be far too many footnotes to change to endnotes. My idea, if it can be made to work, requires changing only a small number to `\FN{}` – user101089 Nov 3 '17 at 19:23
• If you've ever used a decent editor with a replace all (across multiple files if necessary) you could do it in less time than it took to type the question. – Chris H Nov 3 '17 at 20:06
• References should normally use a citation format rather than endnotes (I often use a numeric superscript style, with alphabetic superscript footnotes -- you need some way to distinguish between the two, after all). That just leaves your "scholarly notes". If they always relate to a cited work, here's one way to do it, by adding text to the bibliography but I think I've seen a more generic way that I can't currently find. – Chris H Nov 7 '17 at 9:38

For the context explained above, the following solution works, and more importantly, can be easily reverted to the standard behavior of `\footnote`, while maintaining the distinction visually in the text.

That is, all `\footnote{}`s in the text are changed to numbered endnotes that appear in a final `\chapter*{Notes}` and have numeric superscripts. All `\FN{}`s appear as footnotes in the text and have alphabetic superscripts. Assume that the following commands are contained in a file `inputs/endnotes.tex` and included in the main file via `\input{inputs/endnotes}`.

``````\usepackage{pagenote}
\let\oldfootnote\footnote
\newcommand{\FN}[1]{\oldfootnote{#1}}
\renewcommand{\thefootnote}{\alph{footnote}}

\makepagenote
\let\footnote\pagenote
\renewcommand*{\notedivision}{\chapter*{\notesname}}
``````

For this to work, the original `\footnote` definition has to be captured first and assigned to `\FN`, and the footnote symbol changed, before changing to `\pagenote`.

This, of course, requires that the Notes be printed. Here, it is printed just after the Bibliography, using

``````\bibliography{timeref,graphics}

% Endnotes
\chapter*{Notes}
\printnotes
...
``````

To revert to the usual, inline printing of footnotes, but still distinguish those from endnotes, use the following, which prints the true footnotes in blue, and just comments out the inclusion of the file that changes the definition of `\footnote` to `\endnote`.

``````\newcommand{\FN}[1]{{\footnote{\color{blue}#1}}}
%\input{inputs/endnotes}
``````

and also comment out the lines to print the endnotes

``````% Endnotes
%\chapter*{Notes}
%\printnotes
``````