0

I was searching for an option to list all footnotes at the end of my text as well as on the same page. I found this answer using the package enotez which showed that there is a way to collect all footnotes. But the solution redefined the footnote command as a whole to endnote (\let\footnote=\endnote)

So is there a way to define a new command that triggeres endnote and footnote at the same time?

[Oh, if you ask yourself why somebody wants that slightly weird solution - my sister has little Latex experience and is writing a report for maths and she started by using the footnote command and I'm here to fix it. But I guess that this is an interesting question beside that specifc problem :)]

Thanks for your time!

chris
  • 103
  • 1

2 Answers2

1

From your description I it sounds to me as if what you really want is not a command that calls \footnote and \endnote at the same time but rather to use these two interchangeably. However the solution for that you have included in your question (the \let\footnote=\endnote solution).

If you want one command that really calls both other commands, you'd probably have to do it something like this:

\newcommand{\doublenote}[1]{\footnote{#1}\endnote{#1}}

This is untested but in principle I think this should do what you want (provided you don't want to use option arguments).

egreg
  • 1,121,712
Raven
  • 3,023
0

You need to avoid printing a double footnote mark. However, I can't see how this can be useful for.

\documentclass{article}
\usepackage{enotez}

\newcommand{\doublenote}[1]{\endnote{#1}\stepcounter{footnote}\footnotetext{#1}}

\setlength{\textheight}{4cm}% just to get a smaller picture

\begin{document}

This text has a double note\doublenote{Footnote here}.

\printendnotes

\end{document}

Of course, in a real document, the endnotes would go to a new page.

enter image description here

egreg
  • 1,121,712
  • Hey! Yeah, as I said that function isn't that usefull for me. I would rather use ohter ways to give reference to my sources. It's a workaround about a problem that ouccred because I didn'Ät have the time to assist my sister as I should have done it. Now I'm cleaning up ;) And we all know that it's always better to do something automatically than manually, so I took this situation as a challenge to expand my own knowledge. Thank you for helping me with this! – chris Jun 03 '20 at 21:13