0

I want to have a footnote (numbered) in the footnote section but don't want the footnote mark to appear in the written text. How can I achieve this behaviour? If I use \footnotetext the numbering doesn't stay consistent (once used and not referenced, i.e. no matching \footnotemark, the number stays the same).

3

2 Answers 2

2

If you don't use \footnotemark, but want the footnote number continued, you have to use \stepcounter{footnote} to increase the footnote counter yourself:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mwe}
\begin{document}
\lipsum[1]\footnote{This was the first lipsum paragraph}

\lipsum[2]\stepcounter{footnote}\footnotetext{\label{ftn}We also have had assecond one.}

\lipsum[3]\footnote{And a third one.}

The invisible footnote was number \ref{ftn}.
\end{document}

Usually you don't need \refstepcounter, even if you set a label inside \footnotetext. I've shown this also in the example.

result

Note: Inside a minipage environment, you have to increase mpfootnote instead of footnote:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{mwe}
\begin{document}
\begin{figure}
  \begin{minipage}{\textwidth}
    \lipsum[1]\footnote{This was the first lipsum paragraph}
    
    \lipsum[2]\stepcounter{mpfootnote}\footnotetext{\label{ftn}We also have had assecond one.}
    
    \lipsum[3]\footnote{And a third one.}
    
    The invisible footnote was number \ref{ftn}.
  \end{minipage}
  \caption{Testfigure}
\end{figure}
\end{document}

inside minipage inside figure


Edit (because of comment): If you really need to use \footnotetext without \footnotemark but with \footref or \ref to a label set inside \footnotetext (something I would not recommend, because it is inconsistent and strange), you could locally redefine \thefootnote:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[colorlinks]{hyperref}
\usepackage{mwe}
\newcommand*{\footnotenomark}[1]{%
  {\renewcommand*{\thefootnote}{}\footnotemark}%
  \footnotetext{#1}%
}
\begin{document}
\lipsum[1]\footnote{This was the first lipsum paragraph}
\lipsum[4-7]

\lipsum[2]\footnotenomark{\label{ftn}We also have
  a second one.}
\lipsum[4-6]

\lipsum[3]\footnote{And a third one.}

\lipsum[4-5]
The invisible footnote was number \ref{ftn}.
\end{document}

But note, if you do not use option colorlinks but link frames or underlining links, there would be strange empty frames or underscores.

4
  • Unfortunately your solution doesn't seem to work in conjunction with the hyperref package (i.e. clickable hyperlinks). Do you happen to know which further variables I have to tweak (right now it jumps to the last footnote created without the modified method)?
    – Richard
    Jan 9 at 16:30
  • @Richard There indeed is a problem jumping to the footnote which has no number in the text. But all other links are correct in my tests. So I do not really see a problem, because if you want to reference a footnote the most simple thing is to use either \footnote, or \footnotemark and \footnotetext. And in both cases the link would be correct. So either I've missed something or you've withheld crucial information in your question. Maybe this is even a xy-question. Please show a minimal working example.
    – cabohah
    Jan 9 at 18:44
  • Maybe you misunderstood me, but if I do \footnotetext{sth. \label{sth}} and then do \ref{sth} the reference will point to the last footnote that was set by the \footnote command (or that has a matching \footnotemark), neither of which I want.
    – Richard
    Jan 9 at 18:49
  • @Richard It is absolutely unclear, why you are not using \footnotemark and \footnotetext. However, I've a suggestion even for such strange code.
    – cabohah
    Jan 9 at 18:52
3

Here, I defined a new command that uses footnotetext and simply adds one to the counter that keeps track of footnote numbering.

\documentclass[10pt,a4paper]{article}

\newcommand{\invisiblefootnote}[1]{%
\addtocounter{footnote}{1}%
\footnotetext{#1}%
}

\begin{document}
  \footnote{Text 1}
  \footnote{Text 2}
  \invisiblefootnote{can't see this one}
  \footnote{another one}
\end{document}

enter image description here

2
  • 3
    There are not wanted suspicious spaces in your definition. You need to comment both end of lines inside the definition of \invisiblefootnote. → tex.stackexchange.com/questions/7453
    – cabohah
    Jan 9 at 16:08
  • 1
    well spotted. I edited it
    – anis
    Jan 9 at 16:11

You must log in to answer this question.

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