1

I am using three page numbering styles which are Alpha, Roman and Arabic. I want my pdf viewer to display them as well and to jump to the first arabic numbered page when I enter '1' and not to the first page of the document. I found this thread Different page labels/numbering in PDF viewer explaining very good how it's done for two styles (arabic and roman)

But how is it done for three?

A working example

\documentclass[
a4paper,        % A4 Papier ist Pflicht am Fachgebiet
twoside,        % Empfehlung des Fachgebietes
openright,  % Empfehlung des Fachgebietes
12pt,               % mindestens 9pt
BCOR=1cm,      % Bindungskorrektur -> sollte an die eigenen Ansprüche entsprechend angepasst werden
DIV=10         % Seitenaufteilung: 10 ist Standard für 11pt Schrift. Vor Änderung am besten passende Literatur zu scrreport lesen.
]{scrreprt}


\usepackage{amsmath}
\usepackage[english,ngerman]{babel} 
\usepackage[OT1]{fontenc}  
\usepackage[utf8]{inputenc} 

\begin{document}
% % % % % % % % % % % % % % % % % % % %
% Gleichungen in der Form Chapter.equation
\numberwithin{equation}{chapter}
\renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
% Die ersten Seiten bekommen keine Kopf- und Fußzeile.
\pagestyle{empty} 
%\pdfcatalog{%
%  /PageLabels<<%
%    /Nums[%
%      % Page numbers are zero based.
%      % Uppercase roman numbers starting with first page.
%      A<</S/R>>%
%      % Arabic numbers starting with current page.
%      \the\numexpr\value{page}-1\relax<</S/D>>%
%    ]%
%  >>%
%}
\pagenumbering{Alph}


%% Eidesstattliche Versicherung %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{formaler_Inhalt/selbststaendigkeitsErklaerung}
\cleardoublepage

%% Inhaltsverzeichnis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{Roman}
\tableofcontents %Table of contents
\cleardoublepage

%% Abbildungsverzeichnis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
\addcontentsline{toc}{chapter}{Abbildungsverzeichnis} % Abbildungsverzeichnis ins Inhaltsverzeichnis schreiben
\listoffigures


%% INHALT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
\pagestyle{headings}
\pdfcatalog{%
  /PageLabels<<%
    /Nums[%
      % Page numbers are zero based.
      % Uppercase roman numbers starting with first page.
      0<</S/R>>%
      % Arabic numbers starting with current page.
      \the\numexpr\value{page}-1\relax<</S/D>>%
    ]%
  >>%
}
\pagenumbering{arabic}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\chapter{Kant sagt}
Sapere aude 
\newpage
Sapere aude


%% LITERATURVERZEICHNIS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
\addcontentsline{toc}{chapter}{Literaturverzeichnis} % Literaturverzeichnis ins Inhaltsverzeichnis schreiben

\end{document}
  • try with \usepackage{hyperref} – touhami Jan 30 '16 at 15:25
1

It also works completely without hyperref. You first have to declare a \newcounter in the preamble. Then, instead of setting the PDF page labels at the first numbering change, you set the counter.

You then set the PDF page labels at the second numbering change, using the counter's value for the start of the second entry.

\documentclass{report}

\pagenumbering{Alph}
\newcounter{lastAlphpage}

\begin{document}

\chapter{chap1}

Bla bla bla

\clearpage
% Set your counter at the space between \clearpage and \pagenumbering
\setcounter{lastAlphpage}{\value{page}}
\pagenumbering{Roman}

\chapter{chap2}
bla bla bla    
\clearpage
% Using Heiko Oberdiek's solution from the other thread:
% Best place at the start of the Arabic numbered pages
% after \cleardoublepage and before the page number is
% reset in \pagenumbering{arabic}.
\pdfcatalog{%
    /PageLabels<<%
    /Nums[%
    % Page numbers are zero based.
    % Alphabetic numbers starting with first page.
    0<</S/A>>%
    % Roman numbers starting with the page saved in the counter.
    \the\numexpr\value{lastAlphpage}-1\relax<</S/R>>%
    % Arabic numbers starting with current page. 
    % Don't forget to add the counter. \value{page} contains the 
    % current "roman" page number. You have to subtract two because 
    % each of the values include one page "too much".
    \the\numexpr(\value{lastAlphpage}+\value{page})-2\relax<</S/D>>%
    ]%
    >>%
}
\pagenumbering{arabic}

\chapter{chap3}
bla bla bla

\end{document}

(This used this answer by Heiko Oberdiek)

0

You pointed me in the right direction I used hyperref in my document but put pdfpagelabels=false which should be true :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.