1

I am trying to make endnotes appear in the text as [1] , [2] .... with hyperlink to the text at the end of the document. When I try to do it with footnote by following code, the appearance is correct [1], but they appear as footnotes on the same page.


\usepackage[utf8]{inputenc}

\usepackage[authordate,backend=biber,autolang=other,bibencoding=inputenc,footmarkoff]{biblatex-chicago}
\makeatletter
\renewcommand{\@makefnmark}{\makebox{\normalfont[\@thefnmark]}}
\makeatother

\usepackage[bottom]{footmisc}

\begin{document}

Text\footnote{A footnote}

\end{document}

but when I convert it to the endnote using following code, the hyperlink and their defined formatting disappears.

\usepackage{enotez} 
\usepackage{hyperref}%
\let\footnote=\endnote

enter image description here

I want it to be like this

enter image description here

How to correct this problem?

1 Answer 1

1

The enotez package has a lot of options; I recommend reading its documentation.

In particular, it has a mark-cs= option you can use to provide a command to format the marks. The command should take one argument. Here I define a command \newcommand{\bracketme}[1]{\,[#1]} that puts its argument in brackets, preceded by a narrow space (\,) and set this to the value of mark-cs=.

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage[authordate,backend=biber,autolang=other,bibencoding=inputenc,footmarkoff]{biblatex-chicago}
\makeatletter
\renewcommand{\@makefnmark}{\makebox{\normalfont[\@thefnmark]}}
\makeatother

\usepackage[bottom]{footmisc}

\usepackage{enotez} 
\usepackage{hyperref}%
\let\footnote=\endnote
\newcommand{\bracketme}[1]{\,[#1]}
\setenotez{mark-cs={\bracketme}}

\begin{document}

Text\footnote{A footnote}

\printendnotes

\end{document}

enotez example

I think this is a long the lines of what you're looking for, but can be tweaked.

If you want links to be blue for example, you can use \usepackage[colorlinks,linkcolor=blue]{hyperref}, or to just make these blue, use \textcolor{blue}{[#1]} in the command (which requires the xcolor package or similar).

1
  • Thank you very much. I really appreciate your guidance @frabjous
    – Sunny
    Commented Sep 6, 2022 at 1:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .