Q:

End note reference not in superscript

For an article I write, I am using the endnotes package – I am a newbie and I cannot achieve the following:

how to have reference in text like mytext [1] instead of mytext1

Here is my code:
\documentclass[]{jacow}
\begin{document}
\section{Rationale}\label{rationale}

    Over the last 26 years, \emph{mytext}\endnote{\url{http://dummylink.com}} has been the main system we used.

\end

I have no idea what to change.
Looking on the web I successfully changed the reference in the final notes
section to have the square brackets:
\patchcmd{\theendnotes}
  {\makeatletter}
  {\makeatletter\renewcommand\makeenmark{[\theenmark] }}
  {}{}

I would like to do the same for the reference in text itself.

A:

If you only put \renewcommand\makeenmark{[\theenmark] } in your preamble (without the \patchcmd business) then every mark will be changed:
\documentclass{article}
\usepackage{endnotes,etoolbox}

% the mark everywhere:
\renewcommand\makeenmark{[\theenmark]}

% the mark in the list of endnotes -- we need an extra space:
\patchcmd{\theendnotes}
  {\makeatletter}
  {\makeatletter\renewcommand\makeenmark{[\theenmark] }}% notice the space!
  {}{}
\begin{document}

Text\endnote{bla} text

\theendnotes

\end{document}

