Removing Part Page & including bibliography leads to wrong arrangement in TOC
up vote
0
down vote
favorite
I have encountered a weird problem (in my eyes) to do with bibliographys in included chapters and the structure of a document and I just cannot find out whats the cause...
In the final document, I want to include a table of contents structured as follows:
I would like NOT to have the page for stating "PART 1 - Introduction", which I want to exclude using this command:
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}}
However, if I include this into my document, I end up with the following TOC:
--> The "Introduction" part moves to the bottom of the TOC
I have already figured out using a MWE, that it has something to do with including the bibliography inside a chapter that I am including, as a MWE with the bibliography in the main file was fine as well as including a chapter without a bibliography was fine - but the combination of those somehow triggers this?
This works:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
%include{MWE_Chapter}
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
end{document}
This doesn't:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
include{MWE_Chapter}
end{document}
with MWE_Chapter being:
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
I would really like to know what causes this behavior and if someone can reproduce it? Or if there is another possibility to remove the pages created by the part syntax without changing the TOC! Thanks!
The same by the way happens if I use
addcontentsline{toc}{part}{<Header of the part>}
instead of the renewcommand to remove the part page
table-of-contents bibliographies parts
|
show 2 more comments
up vote
0
down vote
favorite
I have encountered a weird problem (in my eyes) to do with bibliographys in included chapters and the structure of a document and I just cannot find out whats the cause...
In the final document, I want to include a table of contents structured as follows:
I would like NOT to have the page for stating "PART 1 - Introduction", which I want to exclude using this command:
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}}
However, if I include this into my document, I end up with the following TOC:
--> The "Introduction" part moves to the bottom of the TOC
I have already figured out using a MWE, that it has something to do with including the bibliography inside a chapter that I am including, as a MWE with the bibliography in the main file was fine as well as including a chapter without a bibliography was fine - but the combination of those somehow triggers this?
This works:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
%include{MWE_Chapter}
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
end{document}
This doesn't:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
include{MWE_Chapter}
end{document}
with MWE_Chapter being:
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
I would really like to know what causes this behavior and if someone can reproduce it? Or if there is another possibility to remove the pages created by the part syntax without changing the TOC! Thanks!
The same by the way happens if I use
addcontentsline{toc}{part}{<Header of the part>}
instead of the renewcommand to remove the part page
table-of-contents bibliographies parts
By your definition ofpart
you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies
– Christian Hupfer
Jan 25 at 20:16
Besides all, the document isn't compilable at all
– Christian Hupfer
Jan 25 at 20:21
1
I don't recommend it really, but tryrenewcommand{part}[1]{addcontentsline{toc}{part}{#1}null}
, because you're getting into troubles withinclude
here. Thenon
-include
version works as expected, butinclude
has some issues withaddcontentsline
– Christian Hupfer
Jan 25 at 20:25
I really do not understand what you want to achieve, but I'd not renew thepart
comment. If you just want an entry in the toc, addaddcontentsline{toc}{part}{Introduction}
, and if you want to increase the part number, putstepcounter{part}
.
– marmot
Jan 25 at 20:28
@marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result.
– Julia
Jan 25 at 23:08
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have encountered a weird problem (in my eyes) to do with bibliographys in included chapters and the structure of a document and I just cannot find out whats the cause...
In the final document, I want to include a table of contents structured as follows:
I would like NOT to have the page for stating "PART 1 - Introduction", which I want to exclude using this command:
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}}
However, if I include this into my document, I end up with the following TOC:
--> The "Introduction" part moves to the bottom of the TOC
I have already figured out using a MWE, that it has something to do with including the bibliography inside a chapter that I am including, as a MWE with the bibliography in the main file was fine as well as including a chapter without a bibliography was fine - but the combination of those somehow triggers this?
This works:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
%include{MWE_Chapter}
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
end{document}
This doesn't:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
include{MWE_Chapter}
end{document}
with MWE_Chapter being:
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
I would really like to know what causes this behavior and if someone can reproduce it? Or if there is another possibility to remove the pages created by the part syntax without changing the TOC! Thanks!
The same by the way happens if I use
addcontentsline{toc}{part}{<Header of the part>}
instead of the renewcommand to remove the part page
table-of-contents bibliographies parts
I have encountered a weird problem (in my eyes) to do with bibliographys in included chapters and the structure of a document and I just cannot find out whats the cause...
In the final document, I want to include a table of contents structured as follows:
I would like NOT to have the page for stating "PART 1 - Introduction", which I want to exclude using this command:
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}}
However, if I include this into my document, I end up with the following TOC:
--> The "Introduction" part moves to the bottom of the TOC
I have already figured out using a MWE, that it has something to do with including the bibliography inside a chapter that I am including, as a MWE with the bibliography in the main file was fine as well as including a chapter without a bibliography was fine - but the combination of those somehow triggers this?
This works:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
%include{MWE_Chapter}
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
end{document}
This doesn't:
documentclass{book}
usepackage{lipsum}
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}} %removes pages with part headers
begin{document}
tableofcontents
cleardoublepage
part{Introduction}
include{MWE_Chapter}
end{document}
with MWE_Chapter being:
chapter{Wabbadabbadupdup} % (fold)
This is just a test and a citation citep{Carmichael2008} -
section{Hey ho Lets go}
lipsum
bibliographystyle{jneurosci} %apalike, abbrv
bibliography{library}
I would really like to know what causes this behavior and if someone can reproduce it? Or if there is another possibility to remove the pages created by the part syntax without changing the TOC! Thanks!
The same by the way happens if I use
addcontentsline{toc}{part}{<Header of the part>}
instead of the renewcommand to remove the part page
table-of-contents bibliographies parts
table-of-contents bibliographies parts
asked Jan 25 at 20:13
Julia
1
1
By your definition ofpart
you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies
– Christian Hupfer
Jan 25 at 20:16
Besides all, the document isn't compilable at all
– Christian Hupfer
Jan 25 at 20:21
1
I don't recommend it really, but tryrenewcommand{part}[1]{addcontentsline{toc}{part}{#1}null}
, because you're getting into troubles withinclude
here. Thenon
-include
version works as expected, butinclude
has some issues withaddcontentsline
– Christian Hupfer
Jan 25 at 20:25
I really do not understand what you want to achieve, but I'd not renew thepart
comment. If you just want an entry in the toc, addaddcontentsline{toc}{part}{Introduction}
, and if you want to increase the part number, putstepcounter{part}
.
– marmot
Jan 25 at 20:28
@marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result.
– Julia
Jan 25 at 23:08
|
show 2 more comments
By your definition ofpart
you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies
– Christian Hupfer
Jan 25 at 20:16
Besides all, the document isn't compilable at all
– Christian Hupfer
Jan 25 at 20:21
1
I don't recommend it really, but tryrenewcommand{part}[1]{addcontentsline{toc}{part}{#1}null}
, because you're getting into troubles withinclude
here. Thenon
-include
version works as expected, butinclude
has some issues withaddcontentsline
– Christian Hupfer
Jan 25 at 20:25
I really do not understand what you want to achieve, but I'd not renew thepart
comment. If you just want an entry in the toc, addaddcontentsline{toc}{part}{Introduction}
, and if you want to increase the part number, putstepcounter{part}
.
– marmot
Jan 25 at 20:28
@marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result.
– Julia
Jan 25 at 23:08
By your definition of
part
you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies– Christian Hupfer
Jan 25 at 20:16
By your definition of
part
you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies– Christian Hupfer
Jan 25 at 20:16
Besides all, the document isn't compilable at all
– Christian Hupfer
Jan 25 at 20:21
Besides all, the document isn't compilable at all
– Christian Hupfer
Jan 25 at 20:21
1
1
I don't recommend it really, but try
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}null}
, because you're getting into troubles with include
here. The non
- include
version works as expected, but include
has some issues with addcontentsline
– Christian Hupfer
Jan 25 at 20:25
I don't recommend it really, but try
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}null}
, because you're getting into troubles with include
here. The non
- include
version works as expected, but include
has some issues with addcontentsline
– Christian Hupfer
Jan 25 at 20:25
I really do not understand what you want to achieve, but I'd not renew the
part
comment. If you just want an entry in the toc, add addcontentsline{toc}{part}{Introduction}
, and if you want to increase the part number, put stepcounter{part}
.– marmot
Jan 25 at 20:28
I really do not understand what you want to achieve, but I'd not renew the
part
comment. If you just want an entry in the toc, add addcontentsline{toc}{part}{Introduction}
, and if you want to increase the part number, put stepcounter{part}
.– marmot
Jan 25 at 20:28
@marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result.
– Julia
Jan 25 at 23:08
@marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result.
– Julia
Jan 25 at 23:08
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
So this problem I have seems to be linked to apparently one of the oldest bugs of Latex and I found an answer here (immediatewrite worked for me):
ToC numbering problem
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea withinclude
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.
– barbara beeton
Oct 23 at 23:28
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
So this problem I have seems to be linked to apparently one of the oldest bugs of Latex and I found an answer here (immediatewrite worked for me):
ToC numbering problem
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea withinclude
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.
– barbara beeton
Oct 23 at 23:28
add a comment |
up vote
0
down vote
So this problem I have seems to be linked to apparently one of the oldest bugs of Latex and I found an answer here (immediatewrite worked for me):
ToC numbering problem
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea withinclude
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.
– barbara beeton
Oct 23 at 23:28
add a comment |
up vote
0
down vote
up vote
0
down vote
So this problem I have seems to be linked to apparently one of the oldest bugs of Latex and I found an answer here (immediatewrite worked for me):
ToC numbering problem
So this problem I have seems to be linked to apparently one of the oldest bugs of Latex and I found an answer here (immediatewrite worked for me):
ToC numbering problem
answered Jan 26 at 14:52
Julia
1
1
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea withinclude
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.
– barbara beeton
Oct 23 at 23:28
add a comment |
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea withinclude
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.
– barbara beeton
Oct 23 at 23:28
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea with
include
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.– barbara beeton
Oct 23 at 23:28
while this does explain the problem, i would tend to call it a misfeature rather than a bug. the designer of latex had a good idea with
include
, but clearly didn't think out the implications too well. would you consider closing this as a duplicate? it will still remain available for other users to find, who have a similar problem.– barbara beeton
Oct 23 at 23:28
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f412148%2fremoving-part-page-including-bibliography-leads-to-wrong-arrangement-in-toc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
By your definition of
part
you will not have any part page again. If you want to remove it from the ToC, you must use more sophisticated strategies– Christian Hupfer
Jan 25 at 20:16
Besides all, the document isn't compilable at all
– Christian Hupfer
Jan 25 at 20:21
1
I don't recommend it really, but try
renewcommand{part}[1]{addcontentsline{toc}{part}{#1}null}
, because you're getting into troubles withinclude
here. Thenon
-include
version works as expected, butinclude
has some issues withaddcontentsline
– Christian Hupfer
Jan 25 at 20:25
I really do not understand what you want to achieve, but I'd not renew the
part
comment. If you just want an entry in the toc, addaddcontentsline{toc}{part}{Introduction}
, and if you want to increase the part number, putstepcounter{part}
.– marmot
Jan 25 at 20:28
@marmot What I want to achieve in the end is a common structure of the document including the part sections in the TOC, but not having a seperate page for each part, and then additionally have chapters with a bibliography each (natbib+chapterbib) - which is why I would like to include the chapters instead of having 1 big file. I already tried your suggested solution (and have included this in the question, see above) but get the same result.
– Julia
Jan 25 at 23:08