10

Inspired by this question i used accsupp to protect the headers of my pdf from being copied which works nicely so far. I tried to do the same thing for the footnotemarks which hasn't worked so far. Screenshot:

enter image description here

I tried using:

\documentclass{article}
\usepackage{accsupp}
\renewcommand{\thefootnote}{%
  \BeginAccSupp{ActualText={}}\arabic{footnote}\EndAccSupp{}%
}
\begin{document}
This is a test\footnote{This is a footnote}
\end{document}

An ideas? The actual text of the footnote should stay selectable.

mischbek
  • 103

1 Answers1

9

The problem is fragility:

\documentclass{article}
\usepackage{accsupp}
\renewcommand{\thefootnote}{%
  \protect\BeginAccSupp{ActualText={}}\arabic{footnote}\protect\EndAccSupp{}%
}
\begin{document}
This is a test\footnote{This is a footnote}
\end{document}

enter image description here

egreg
  • 1,121,712