I am trying to squelch the page numbers using the code from here. This works fine, if one uses ordinary page numbers. If the page numbers are modified with the pagenumbering command, it doesn't work anymore.
Here is the MWE:
\documentclass{scrbook}
\usepackage{accsupp}
% Defining the squelch command
\DeclareRobustCommand\squelch[1]{%
\BeginAccSupp{method=plain,ActualText={}}#1\EndAccSupp{}}
% Trying to squelch the page numbers
\let\oldthepage\thepage
\def\thepage{\squelch{\oldthepage}}
\begin{document}
\pagenumbering{roman}
\chapter{First Chapter}
\newpage
\pagenumbering{arabic}
\chapter{Next Chapter}
\end{document}
\pagenumberingredefines\thepage. – egreg Mar 31 '12 at 17:58\pagenumbering. – Chel Mar 31 '12 at 18:04