In the beginning I used parnotes and endnotes to distinguish between the 2 seperated kinds of end-footnotes:


\usepackage{changepage} % \begin{adjustwidth}{...cm}{...cm}

\usepackage[colorlinks=true,linkcolor=red]{hyperref} % colors endnotes red --- for hyperlinks --- hyperref permits use of color{blue}{...}
\usepackage{endnotes} % \endnote{...}
\input{hyperendnotes.sty} % LOADS (needs \usepackage{hyperref}) hyperendnotes.sty; which can be downloaded at
% https://github.com/bibliogum/latexamu/blob/master/hyperendnotes.sty

\def\enoteheading{} % endnotes without standard heading

\usepackage[breakwithin, roman]{parnotes} % parnotes

\makeatletter % needed for \renewcommand{...} and \patchcmd{...}
\renewcommand{\parnotemarkfmt}[1]{{{\color{blue}\PN@mark@set{#1}\hspace{0.5mm}}}} % color parnotes blue --- tweaks spacing --- adjusts size of parnotes to look like hyperendnotes (part 1)
\usepackage{etoolbox} % \patchcmd{...}
  {}{} % <<< adjusts size of parnotes to look like hyperendnotes (part 2) --- thanks a lot for this part @egreg; at
% https://tex.stackexchange.com/questions/219000/a-question-about-using-a-renewcommand-to-adapt-a-package/219007#219007
\makeatother % needed for \renewcommand{...} and \patchcmd{...}


\noindent Some text \parnote{A parnote} \parnote{Another parnote} \endnote{An endnote} \parnote{Another parnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \parnote{Another parnote} \parnote{Another parnote} \parnote{Another parnote} \parnote{Another parnote} \endnote{Another endnote} \parnote{Another parnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \endnote{Another endnote} \parnote{Another parnote} \endnote{Another endnote} \parnote{Another parnote} \parnote{Another parnote} \par
\noindent \textbf{Parnotes}
\textbf{Endnotes} \par


So they were seperated and "labeled" just fine (even when the 2 "kinds" of endnotes are interwoven).

But that didn't get cross-referencing (clickable links) on the parnotes ...

Loading hyperendnotes.sty only puts clickable cross-referenced "links" on the \endnote{...}'s, but not on the \parnote{...}'s.

So user @cfr hinted at the enotez-package. I've found \usepackage{enotez} at least easier, since it doesn't require to load the extra hyperendnotes.sty any more.

In this second trial I only used endnotes (I dropped parnotes, since I wasn't able to get clickable hyperlinks on them.

In this second trial I only used endnotes (I dropped parnotes, since I wasn't able to get clickable hyperlinks on them.

  • Attention: This second "grey box" of trial code requires to compile two times. (due to the enotez-package).


\setenotez{backref=true, list-style=section, reset, split-title=\noindent}




Som text here \endnote{Endnote}. \par
Some more text \endnote{Endnote} before the first call of \colorbox{gray!20}{\textbackslash printendnotes}. 

\vspace{1em} \textbf{A first person's endnotes} \printendnotes \vspace{1em}

\setenotez{counter-format={roman}} \hypersetup{linkcolor=blue}

See? I can get clickable endnotes in two different colours, which is what I wanted. \endnote{Endnote}. \par {\large{But the problem is that ALL of the endnotes (of a certain colour) have to be grouped together and originate before the first \colorbox{gray!20}{\textbackslash printendnotes} and before ALL of the other endnotes (of another colour): there is no freedom to use the endnotes "interwoven", unfortunately.}} \endnote{Endnote}.

\vspace{1em} \textbf{A second person's endnotes} \printendnotes \vspace{2em}

\setenotez{counter-format={arabic}} \hypersetup{linkcolor=red}

You can get both footnote sections to truly follow each-other at the end of the document \endnote{Endnote} (which is what i wanted), by using a lot of \colorbox{gray!20}{\textbackslash vspace}'s (see the .tex-code below this line). But having to constantly adjust the \colorbox{gray!20}{\textbackslash vspace}'s doesn't seem very elegant at all. \endnote{Endnote}

\vspace{8.2em}% extra \vspace{...} to group the endnote sections together at the end of the .pdf

\vspace{1em} \textbf{A first person's endnotes} \printendnotes \vspace{1em}

\setenotez{counter-format={roman}} \hypersetup{linkcolor=blue}

\vspace{-15em}% extra \vspace{...} to group the endnote sections together at the end of the .pdf

See?\endnote{Endnote} Now the the sections are really together \endnote{Endnote} at the very end of the document. \par However: the {\large{origins of the two different types of endnotes still have to be grouped together, and cannot get interwoven, unfortunately.}}

\vspace{8em}% extra \vspace{...} to group the endnote sections together at the end of the .pdf

\vspace{1em} \textbf{A second person's endnotes} \printendnotes \vspace{1em}


Now there is cross-referencing (clickable links) on all of the endnotes!

But the different kinds of endnotes can no longer be interwoven.

There is no way to correctly code-label the different "types" of endnotes this way (without the parnotes). If "interwoven" the two "types" wouldn't be numbered and placed seperately at the bottom of the document.

So, in brief. Either one of the following could solve my problem.


  • getting cross-references on parnotes.

Or (when working with cross-referencable endnotes):

  • label the "type(-of-endnote)" (to have seperate numbering, colour and perhaps numerals) and have them printed seperately.

I started wondering whether or not a solution could be offered not using standard parnotes, endnotes or footnotes at all? But just have other code-labels to distinguish between two types of "notes", add some superscript, numbering, colouring (to "fake" endnotes). And then have them printed seperately? Perhaps (as a last resort) with biblatex?

I guess this "faking" or "defining footnotes autonomously" was done at the german Q-A-site texwelt: here or here. I'll post an english (slightly adapted) version below:



\expandafter\newwrite\csname the#1notes\endcsname
the#1notes\endcsname=\jobname.#1\relax %
\expandafter\newcommand\csname  #1note\endcsname[1]{%
\expandafter\immediate\expandafter\write\csname the#1notes\endcsname%
{\csname the#1note\endcsname\ \unexpanded{##1 \par}}%

\expandafter\newcommand\csname display#1notes\endcsname[1]{%
\csname the#1notes\endcsname%





This is the test-text \firstnote{Endnote} \secondnote{Endnote} , some more \firstnote{Endnote} test-text, some more  \secondnote{Endnote} test-text \secondnote{Endnote}. 


\displayfirstnotes{A first person's endnotes}
\displaysecondnotes{A second person's endnotes}


Now the different kinds of endnotes can be labeled easily and interwoven again.

But again there is no more cross-referencing (clickable links) on any of the endnotes.

The simple \usepackage{hyperref} isn't working anymore, since the footnotes aren't actual "footnotes": they are "faked" to look like them.

So does anyone know of an elegant solution to get cross-referencing (clickable links) on these "objects"?

Some other question:

  • This last (third) trial also colours the endnotes-headers, but not the endnote-numbers (at least not where the endnotes are printed). If anyone could get colour on the endnote-numbering there as well, that would be welcome.
  • Also: this way, there no longer seems to be an easy way to switch from arabic numberals to roman (in general, and in particular for one "type" of endnote)?

Many thanks.

  • 1
    Have you considered using endnotez which supports hyperref out-of-the-box? Also, have you read this? I don't know if that's the code you are using or not.
    – cfr
    Dec 22, 2014 at 2:14
  • I meant enotez. By the way, \bf was deprecated 20+ years ago. It is not a LaTeX-2e command. Use \bfseries or \textbf{} instead.
    – cfr
    Dec 22, 2014 at 2:20
  • @cfr; You referred to the post about hyperendnotes.sty. This is indeed the input I used in the first trial ("grey box" of code). However, I haven't in the second trial: there I fiddled around with the enotez-package because of your hint). Thanks for the notice about bold typesetting as well.
    – O0123
    Dec 22, 2014 at 23:43
  • One other thought: have you looked at eledmac? It is a package for typesetting critical editions. It can handle multiple series of endnotes or footnotes, and does hyperlinks. Note that I've never used it so I don't know whether all of this works well together in the way you desire, but I looked through the manual and I think it would be worth considering given that nobody has so far suggested an answer here.
    – cfr
    Dec 23, 2014 at 2:38
  • Or edmargin might be simpler.
    – cfr
    Dec 23, 2014 at 3:04


You must log in to answer this question.

Browse other questions tagged .