0

I want to include clickable links in my document that take you from a footnote or endnote in the body text to some material in the appendix. This problem is similar to the one posed in Making endnotes clickable links with hyperref, so I tried to use the hyperendnotes.sty code in Ryan Reich's answer to do so.

\documentclass[12pt,a4paper]{report}
\usepackage{amsmath,amsfonts,amssymb}

\usepackage{parskip}
\usepackage[toc,page]{appendix}

\usepackage{endnotes} 
\let\footnote\endnote
\renewcommand\enoteheading{\chapter{Notes}}
\renewcommand\enoteformat{\leftskip=0pt \parindent=0em
  \leavevmode\makeenmark\raggedright}

\usepackage[hyperfootnotes=true]{hyperref}
\usepackage{hyperendnotes}

\begin{document}

\tableofcontents

\chapter{chapter}

\section{section}
first\footnote{hello}, 

second\endnote{this is my equation
\begin{equation}
z=x+y
\end{equation}
}

third\endnote{another equation $a+b+c$}

\appendix
\addcontentsline{toc}{chapter}{Notes}

\theendnotes

\end{document}

The result looks OK: enter image description here

but I get errors like Undefined control sequence. first\footnote{hello} and when I click on the links I am taken back to the first page. How do I fix this?

  • There's a comment below Ryan Reich's answer that suggests you should copy all that code into a file (say, hyperendnotes.sty) and \input or \usepackage it. So no extra code goes into the actual document. – Medulla Oblongata Jan 06 '17 at 13:19
  • And an other comment of Ryan: Load it with the endnotes package (after hyperref) and enjoy. – Marco Daniel Jan 06 '17 at 13:21
  • So the order should be hyperref, endnotes, hyperendnotes? In that case I'm still getting the same error message – Medulla Oblongata Jan 06 '17 at 13:23
  • 4
    Please see: http://tex.stackexchange.com/questions/228289/problem-with-converting-footnotes-into-endnotes – Marco Daniel Jan 06 '17 at 13:34

0 Answers0