14

I was wandering if there's a way to make only one footnote appear with a symbol (*) instead of the number.

Thanks!!!

doncherry
  • 54,637
pierpaolo
  • 141

1 Answers1

17

If you're not using anything fancy in your document (like hyperref, say), you can redefine \@xfootnote:

enter image description here

\documentclass{article}
%\setlength{\textheight}{.3\textheight} Just for this example
\makeatletter
\def\@xfootnote[#1]{%
  \protected@xdef\@thefnmark{#1}%
  \@footnotemark\@footnotetext}
\makeatother
\begin{document}
This is a\footnote{Regular footnote} piece of text.
This is a\footnote[*]{Different footnote} piece of text.
This is a\footnote{Regular footnote} piece of text.
This is a\footnote{Regular footnote} piece of text.
This is a\footnote[$\dagger$]{Different footnote} piece of text.
This is a\footnote{Regular footnote} piece of text.
This is a\footnote[$\star$]{Different footnote} piece of text.
\end{document}
Werner
  • 603,163
  • Wouldn’t it be semantically nicer to use \textdagger and something like \textasteriskcentered or one of bbding’s or pifont’s stars instead of the math mode versions? – doncherry Feb 06 '14 at 19:00
  • @doncherry: I followed the basic definition of \@fnsymbol in latex.ltx. – Werner Feb 06 '14 at 19:02
  • @Werner It seems to be working fine with hyperref on my end (with hyperfootnotes=true). Is there a particular reason to expect clashes? – triple_sec Feb 12 '20 at 07:28
  • @triple_sec: I know that hyperref changes/taps into a large number of document elements, so was concerned that it would influence that if redefining \@xfootnote. If it works, then go ahead; I probably didn't test it extensively. – Werner Feb 12 '20 at 17:04
  • @Werner I see—I do know what you’re talking about, hyperref can easily wreak havoc. I thought you had identified a specific clash, though. I didn’t check thoroughly, either, but, for what it’s worth, I identified no error message in the console and the output looked very nice. The custom symbols even had clickable hyperlinks attached to them! This is an elegant solution, thank you very much! – triple_sec Feb 13 '20 at 01:22