2

Good day people,

Today, I was wondering how to correlate the bookmark numbering with the table of contents. As the attached picture shows, the Titulo and Declaracion share the same number page at the bookmark part. In the documento, Declaracion correspond to i (Roman number for one). I have try several combinations of commands and I'm still getting the same result.

The header of main tex file is:

\documentclass[
        twoside,
%            openright,
        titlepage, numbers=noenddot, headinclude,
        footinclude=true,
        abstractoff,
    dottedtoc,
        cleardoublepage=empty,
        BCOR=5mm, paper=a4, fontsize=12pt,
        listof=totoc,
        ]{scrreprt}
\PassOptionsToPackage{
            eulerchapternumbers,
            listings,
            pdfspacing,
            subfig,
            beramono,
            parts}{classicthesis}
\usepackage{scrpage2}
\deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}
\pagestyle{pgnumbottomcenter}
\renewcommand{\chapterpagestyle}{pgnumbottomcenter}
\usepackage[spanish,german,english]{babel}
\addto{\captionsenglish}{\renewcommand*{\appendixname}{Ap\'endice}}
%\usepackage[spanish]{babel}
%\documentclass[a4paper,twoside,12pt]{book}
\setlength{\textwidth}{176mm}
\setlength{\textheight}{250mm}
\setlength{\oddsidemargin}{5mm}
\setlength{\evensidemargin}{5mm}
\setlength{\hoffset}{4.6mm}
\setlength{\voffset}{4.6mm}
\setlength{\columnsep}{5mm}
\setlength{\marginparsep}{0mm}
\setlength{\marginparwidth}{0mm}
%\setlength{\topmargin}{-5mm}
%********************************************************************
% Note: Make all your adjustments in here
%*******************************************************
\input{classicthesis-config}
%\usepackage[a4paper]{geometry}
%\usepackage{fancyhdr} 
\usepackage{multicol}
\usepackage{setspace}
\usepackage{wallpaper}
\usepackage{chngcntr}
%\usepackage[sectionbib]{chapterbib}
%\usepackage[left=1in,right=1in,top=0.5in,bottom=0.5in]{geometry}
% \usepackage{multibib}
\usepackage[T1]{fontenc}
\usepackage{wrapfig}
%\usepackage[hypertexnames=false]{hyperref}
\usepackage{pdfpages}
\usepackage{epigraph}
%\usepackage[utf8]{inputenc}
\usepackage[title, titletoc,toc,page]{appendix}
\renewcommand{\appendixname}{Ap\'endices}
\renewcommand{\appendixtocname}{Ap\'endices}
\renewcommand{\appendixpagename}{Ap\'endices}
% workaround
%\makeatletter
%\appto{\appendices}{\def\Hy@chapapp{Appendix}}
%\makeatother
%\usepackage[compact]{titlesec}
\titlespacing{\section}{0pt}{1ex}{1ex}
\titlespacing{\subsection}{0pt}{1ex}{1ex}
\titlespacing{\subsubsection}{0pt}{1ex}{1ex}
\titlespacing{\paragraph}{0pt}{1ex}{1ex}
\titlespacing{\subparagraph}{0pt}{1ex}{1ex}
%\usepackage{scrpage2}
%\deftripstyle{pgnumbottomcenter}{}{}{}{}{\pagemark{}}{}
%\pagestyle{pgnumbottomcenter}
%\renewcommand{\chapterpagestyle}{pgnumbottomcenter}
\begin{document}
\frenchspacing
\raggedbottom
\include{FrontBackmatter/Titlepage}
\include{FrontBackmatter/Titleback}
\cleardoublepage
\clearpage
\pagenumbering{roman}
%\pagestyle{plain}
\cleardoublepage\include{FrontBackmatter/Declaration}
\end{document}

The header of Declaration.tex file is:

%*******************************************************
% Declaration
%*******************************************************
%\refstepcounter{dummy}
%\clearpage
%\cleardoublepage
\phantomsection
\pdfbookmark[1]{Declaraci\'on}{declaraci\'on}
\chapter*{Declaraci\'on}
\thispagestyle{empty}

Thank so much in advance for any clue and have a good day

enter image description here

Another.Chemist
  • 884
  • 2
  • 7
  • 15

1 Answers1

4

Since the code in the question is contradictory, I can only give a partial answer. The image contains chapters, which are not part of the code. The table of contents does have page numbers usually, but the bookmarks do not have page numbers. If a bookmark is inner document link, then it could point to a wrong page, but this is not stated in the question. And there could be wrong PDF page labels.

The file Declaration.tex contains:

%\clearpage
%\cleardoublepage
\phantomsection
\pdfbookmark[1]{Declaraci\'on}{declaraci\'on}
\chapter*{Declaraci\'on}

\chapter usually starts a new page (\cleardoublepage). The anchor setting (\phantomsection) and bookmark (\pdfbookmark) are used before. Thus it can happen that they go to a previous page. This is solved by removing the comment character in front of \cleardoublepage:

\cleardoublepage
\pdfbookmark[1]{Declaraci\'on}{declaracion}% no need for funny anchor names
\chapter*{Declaraci\'on}

\phantomsection is not needed, because \pdfbookmark already creates an anchor.

Heiko Oberdiek
  • 271,626