# Changing footnotes/endnotes into hidden comments or annotations

So I have a rather large dissertation that currently contains footnotes and endnotes (using \makepagenote). The final document can only contain footnotes. Some of the \pagenote{ ... } material will become \footnote, but there are others that I don't want to appear in the final PDF but retain in the .tex file for future reference. I tried search and replace \pagenote{ to %, but the end of the comment is hard to determine.

I'm using scrivener to generate the .tex document, so I could change the closing bracket } for endnotes to be whatever I want to make search/replace easier, except "enter". Since I use TexShop to generate my PDF's, it relies on OgreKit which can use regular expression search/replace, but I have no idea how that works. The other thing I've found is using a comments/annotations package, but there seems to be quite a few and my first attempt was unsuccessful with XeLaTeX.

• Does \renewcommand{\pagenote}[1]{} in the preamble, right before \begin{document} work? – jarauh Nov 23 '15 at 16:36
• or \renewcommand{\pagenote}[1]{\pdfcomment[icon=Comment]{#1}} with \usepackage{pdfcomment} in the preamble – Josef Nov 23 '15 at 19:39