Numbering is off in TOC by the amount of pages of the Content












1















I use the following code to generate the "Contents" section of my thesis:



include{ch_abstract}newpagecleardoublepage
clearpage
tableofcontents
markboth{}{}
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


The abstracts starts at iii and ends at vi.
Then 4 pages of content follow.
The List of Tables starts on page xi.
Unfortunately, in the table of content it is listed on page vii. That is right where the 4 pages of content starts, which are not included in the content overview.




Abstract ....................iii



List of Tables.............vii



List of Figures............x



List of Abbreviations..xii




Everything is shifted by the 4 pages of content that are not included. The numbering in the main part of the thesis is totally fine.
How can I make the List of Tables start at xi, List of Figures at xiii and List of Abbreviations at xxi (including the correct linking of all of them).



Based on the suggestions below ("cleardoublepage") I adjusted my code. I furthermore included two calls of "phantomsection" (trial and error) and now the numbering and the links to the "List of Figures" and "List of Abbreviations" are correct. The numbering of the "List of Tables" is correct as well. However, the link points to ix instead of xi. This is the last problem that needs to be solved.



  include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}









share|improve this question




















  • 1





    Welcome to TeX.SE! Real quick: Did you run LaTeX (at least) twice to fully update the contents of the Table of Contents (pun intended)?

    – Mico
    Feb 17 at 19:24











  • I run the following commands in this exact order: latex thesis.tex, bibtex thesis.aux, latex thesis.tex, dvips thesis.dvi, ps2pdf thesis.ps

    – green
    Feb 17 at 19:31











  • Running bibtex thesis.aux is an error. (Actually, it's mainly painfully pedantic.) Please switch to bibtex thesis -- no need for a filename extension. A separate question: Is there a reason for not running pdflatex?

    – Mico
    Feb 17 at 19:36













  • i changed the bibtex call. Regarding the "latex" vs "pdflatex" issue: I use "latex" as I include "eps" files and I thought this does not work with "pdflatex".

    – green
    Feb 17 at 19:40






  • 1





    The numbering shouldn't be off by the entire Contents page count... just one or two pages. You either didn't compile enough times, or you're not showing all the code. We can't replicate your issue with the current code.

    – Werner
    Feb 17 at 19:56
















1















I use the following code to generate the "Contents" section of my thesis:



include{ch_abstract}newpagecleardoublepage
clearpage
tableofcontents
markboth{}{}
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


The abstracts starts at iii and ends at vi.
Then 4 pages of content follow.
The List of Tables starts on page xi.
Unfortunately, in the table of content it is listed on page vii. That is right where the 4 pages of content starts, which are not included in the content overview.




Abstract ....................iii



List of Tables.............vii



List of Figures............x



List of Abbreviations..xii




Everything is shifted by the 4 pages of content that are not included. The numbering in the main part of the thesis is totally fine.
How can I make the List of Tables start at xi, List of Figures at xiii and List of Abbreviations at xxi (including the correct linking of all of them).



Based on the suggestions below ("cleardoublepage") I adjusted my code. I furthermore included two calls of "phantomsection" (trial and error) and now the numbering and the links to the "List of Figures" and "List of Abbreviations" are correct. The numbering of the "List of Tables" is correct as well. However, the link points to ix instead of xi. This is the last problem that needs to be solved.



  include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}









share|improve this question




















  • 1





    Welcome to TeX.SE! Real quick: Did you run LaTeX (at least) twice to fully update the contents of the Table of Contents (pun intended)?

    – Mico
    Feb 17 at 19:24











  • I run the following commands in this exact order: latex thesis.tex, bibtex thesis.aux, latex thesis.tex, dvips thesis.dvi, ps2pdf thesis.ps

    – green
    Feb 17 at 19:31











  • Running bibtex thesis.aux is an error. (Actually, it's mainly painfully pedantic.) Please switch to bibtex thesis -- no need for a filename extension. A separate question: Is there a reason for not running pdflatex?

    – Mico
    Feb 17 at 19:36













  • i changed the bibtex call. Regarding the "latex" vs "pdflatex" issue: I use "latex" as I include "eps" files and I thought this does not work with "pdflatex".

    – green
    Feb 17 at 19:40






  • 1





    The numbering shouldn't be off by the entire Contents page count... just one or two pages. You either didn't compile enough times, or you're not showing all the code. We can't replicate your issue with the current code.

    – Werner
    Feb 17 at 19:56














1












1








1








I use the following code to generate the "Contents" section of my thesis:



include{ch_abstract}newpagecleardoublepage
clearpage
tableofcontents
markboth{}{}
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


The abstracts starts at iii and ends at vi.
Then 4 pages of content follow.
The List of Tables starts on page xi.
Unfortunately, in the table of content it is listed on page vii. That is right where the 4 pages of content starts, which are not included in the content overview.




Abstract ....................iii



List of Tables.............vii



List of Figures............x



List of Abbreviations..xii




Everything is shifted by the 4 pages of content that are not included. The numbering in the main part of the thesis is totally fine.
How can I make the List of Tables start at xi, List of Figures at xiii and List of Abbreviations at xxi (including the correct linking of all of them).



Based on the suggestions below ("cleardoublepage") I adjusted my code. I furthermore included two calls of "phantomsection" (trial and error) and now the numbering and the links to the "List of Figures" and "List of Abbreviations" are correct. The numbering of the "List of Tables" is correct as well. However, the link points to ix instead of xi. This is the last problem that needs to be solved.



  include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}









share|improve this question
















I use the following code to generate the "Contents" section of my thesis:



include{ch_abstract}newpagecleardoublepage
clearpage
tableofcontents
markboth{}{}
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


The abstracts starts at iii and ends at vi.
Then 4 pages of content follow.
The List of Tables starts on page xi.
Unfortunately, in the table of content it is listed on page vii. That is right where the 4 pages of content starts, which are not included in the content overview.




Abstract ....................iii



List of Tables.............vii



List of Figures............x



List of Abbreviations..xii




Everything is shifted by the 4 pages of content that are not included. The numbering in the main part of the thesis is totally fine.
How can I make the List of Tables start at xi, List of Figures at xiii and List of Abbreviations at xxi (including the correct linking of all of them).



Based on the suggestions below ("cleardoublepage") I adjusted my code. I furthermore included two calls of "phantomsection" (trial and error) and now the numbering and the links to the "List of Figures" and "List of Abbreviations" are correct. The numbering of the "List of Tables" is correct as well. However, the link points to ix instead of xi. This is the last problem that needs to be solved.



  include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
phantomsection
cleardoublepage
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}






table-of-contents






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 17 at 20:27







green

















asked Feb 17 at 19:20









greengreen

62




62








  • 1





    Welcome to TeX.SE! Real quick: Did you run LaTeX (at least) twice to fully update the contents of the Table of Contents (pun intended)?

    – Mico
    Feb 17 at 19:24











  • I run the following commands in this exact order: latex thesis.tex, bibtex thesis.aux, latex thesis.tex, dvips thesis.dvi, ps2pdf thesis.ps

    – green
    Feb 17 at 19:31











  • Running bibtex thesis.aux is an error. (Actually, it's mainly painfully pedantic.) Please switch to bibtex thesis -- no need for a filename extension. A separate question: Is there a reason for not running pdflatex?

    – Mico
    Feb 17 at 19:36













  • i changed the bibtex call. Regarding the "latex" vs "pdflatex" issue: I use "latex" as I include "eps" files and I thought this does not work with "pdflatex".

    – green
    Feb 17 at 19:40






  • 1





    The numbering shouldn't be off by the entire Contents page count... just one or two pages. You either didn't compile enough times, or you're not showing all the code. We can't replicate your issue with the current code.

    – Werner
    Feb 17 at 19:56














  • 1





    Welcome to TeX.SE! Real quick: Did you run LaTeX (at least) twice to fully update the contents of the Table of Contents (pun intended)?

    – Mico
    Feb 17 at 19:24











  • I run the following commands in this exact order: latex thesis.tex, bibtex thesis.aux, latex thesis.tex, dvips thesis.dvi, ps2pdf thesis.ps

    – green
    Feb 17 at 19:31











  • Running bibtex thesis.aux is an error. (Actually, it's mainly painfully pedantic.) Please switch to bibtex thesis -- no need for a filename extension. A separate question: Is there a reason for not running pdflatex?

    – Mico
    Feb 17 at 19:36













  • i changed the bibtex call. Regarding the "latex" vs "pdflatex" issue: I use "latex" as I include "eps" files and I thought this does not work with "pdflatex".

    – green
    Feb 17 at 19:40






  • 1





    The numbering shouldn't be off by the entire Contents page count... just one or two pages. You either didn't compile enough times, or you're not showing all the code. We can't replicate your issue with the current code.

    – Werner
    Feb 17 at 19:56








1




1





Welcome to TeX.SE! Real quick: Did you run LaTeX (at least) twice to fully update the contents of the Table of Contents (pun intended)?

– Mico
Feb 17 at 19:24





Welcome to TeX.SE! Real quick: Did you run LaTeX (at least) twice to fully update the contents of the Table of Contents (pun intended)?

– Mico
Feb 17 at 19:24













I run the following commands in this exact order: latex thesis.tex, bibtex thesis.aux, latex thesis.tex, dvips thesis.dvi, ps2pdf thesis.ps

– green
Feb 17 at 19:31





I run the following commands in this exact order: latex thesis.tex, bibtex thesis.aux, latex thesis.tex, dvips thesis.dvi, ps2pdf thesis.ps

– green
Feb 17 at 19:31













Running bibtex thesis.aux is an error. (Actually, it's mainly painfully pedantic.) Please switch to bibtex thesis -- no need for a filename extension. A separate question: Is there a reason for not running pdflatex?

– Mico
Feb 17 at 19:36







Running bibtex thesis.aux is an error. (Actually, it's mainly painfully pedantic.) Please switch to bibtex thesis -- no need for a filename extension. A separate question: Is there a reason for not running pdflatex?

– Mico
Feb 17 at 19:36















i changed the bibtex call. Regarding the "latex" vs "pdflatex" issue: I use "latex" as I include "eps" files and I thought this does not work with "pdflatex".

– green
Feb 17 at 19:40





i changed the bibtex call. Regarding the "latex" vs "pdflatex" issue: I use "latex" as I include "eps" files and I thought this does not work with "pdflatex".

– green
Feb 17 at 19:40




1




1





The numbering shouldn't be off by the entire Contents page count... just one or two pages. You either didn't compile enough times, or you're not showing all the code. We can't replicate your issue with the current code.

– Werner
Feb 17 at 19:56





The numbering shouldn't be off by the entire Contents page count... just one or two pages. You either didn't compile enough times, or you're not showing all the code. We can't replicate your issue with the current code.

– Werner
Feb 17 at 19:56










1 Answer
1






active

oldest

votes


















0














To solve the problem I had to add a third call to latex (Mico), I had to add calls to cleardoublepage (touhami) and I had to add phantomsection calls after the cleardoublepage calls (Werner).



...
include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


Thank you very much for the combined support!






share|improve this answer
























  • you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

    – Johannes_B
    Feb 18 at 6:26











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475376%2fnumbering-is-off-in-toc-by-the-amount-of-pages-of-the-content%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














To solve the problem I had to add a third call to latex (Mico), I had to add calls to cleardoublepage (touhami) and I had to add phantomsection calls after the cleardoublepage calls (Werner).



...
include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


Thank you very much for the combined support!






share|improve this answer
























  • you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

    – Johannes_B
    Feb 18 at 6:26
















0














To solve the problem I had to add a third call to latex (Mico), I had to add calls to cleardoublepage (touhami) and I had to add phantomsection calls after the cleardoublepage calls (Werner).



...
include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


Thank you very much for the combined support!






share|improve this answer
























  • you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

    – Johannes_B
    Feb 18 at 6:26














0












0








0







To solve the problem I had to add a third call to latex (Mico), I had to add calls to cleardoublepage (touhami) and I had to add phantomsection calls after the cleardoublepage calls (Werner).



...
include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


Thank you very much for the combined support!






share|improve this answer













To solve the problem I had to add a third call to latex (Mico), I had to add calls to cleardoublepage (touhami) and I had to add phantomsection calls after the cleardoublepage calls (Werner).



...
include{ch_abstract}newpagecleardoublepage
phantomsection
tableofcontents
markboth{}{}
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Tables}listoftablesnewpage
cleardoublepage
phantomsection
addcontentsline{toc}{chapter}{List of Figures}listoffiguresnewpage
markboth{LIST OF ABBREVIATIONS}{LIST OF ABBREVIATIONS}
include{ch_abbreviations}newpage
thispagestyle{empty}
mainmatter
setcounter{page}{1}


Thank you very much for the combined support!







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 17 at 20:41









greengreen

62




62













  • you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

    – Johannes_B
    Feb 18 at 6:26



















  • you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

    – Johannes_B
    Feb 18 at 6:26

















you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

– Johannes_B
Feb 18 at 6:26





you considered reading an introduction to LaTeX? Right now, your code is quite strange. There are ways to add those lists automatically to the toc, without you having to do all of this stuff.

– Johannes_B
Feb 18 at 6:26


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475376%2fnumbering-is-off-in-toc-by-the-amount-of-pages-of-the-content%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?