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

  • Do you have/want Declaracion in the ToC as well? If not, I would uncomment the \cleardoublepage, which may be the source of your problem. – Werner Jan 23 '15 at 1:06
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please post a minimal working example (MWE). – cfr Jan 23 '15 at 1:20
  • thank @Werner, I did it and I'm still getting the same output : ( – Another.Chemist Jan 23 '15 at 1:41
  • 2
    Special hint from my side, drop classicthesis. This won't be the last oddity you encounter. – Johannes_B Jan 23 '15 at 8:31
  • 1
    fancyhdr should not be used with a KOMAclass, as well as titlesec (tex.stackexchange.com/questions/224331/…). Du you want your declaration in the toc as well? If so, use \addchap. – Johannes_B Jan 23 '15 at 8:37
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.

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.