Why does the includeonly command not stepcounter the chaptercounter for omitted chapters?Correct way to use...
Unable to login to ec2 instance after running “sudo chmod 2770 /”
Who, if anyone, was the first astronaut to return to earth in a different vessel?
Run a command that requires sudo after a time has passed
Why do most space probes survive for far longer than they were designed for?
Some of the people in my town pay no taxes, what can I do about it?
Is this an email from Apple or fraud?
What's the relationship between the chords Cmaj Dmaj Emaj?
Why are recumbent bicycles and velomobiles illegal in UCI bicycle racing?
Why does the includeonly command not stepcounter the chaptercounter for omitted chapters?
How to run a binary file from crontab?
Is there a technology capable of disabling the whole of Earth's satellitle network?
Why do we charge our flashes?
Are all aperiodic systems chaotic?
How quickly could a motion be passed to alter minimum age for POTUS?
Unions, aliasing and type-punning in practice: what works and what does not?
Re-oder List of continous entries, possible?
Is candidate anonymity at all practical?
Bacterial growth inhibitors used in Deodorants
Found a major flaw in paper from home university – to which I would like to return
Why, in A Midsummer Night's Dream, does "square" mean "quarrel"?
A doctor saves lives, but he is a murderer in normal life. Is he good or bad? Or Both?
What happens when the last remaining players refuse to kill each other?
What prevents people from lying about where they live in order to reduce state income taxes?
Can a rabbi marry a couple inbetween the conception and birth of their child together, presuming they are fit for marriage?
Why does the includeonly command not stepcounter the chaptercounter for omitted chapters?
Correct way to use include and includeonly when writing a large document like a thesis“Reference does not exist” warning with includeonlyincludeonly command does not modify TOCnewclude does not include file contentincludeonly not including parts correctly because of _ in the file name and breqnRefsection and includeonly warningMake arara ignore includeonly commandNo pdf output for some of the included chapters in final compilation file (No error message)Repeating labels of custom environmentIs it possible to use includeonly, but display the full document?Same absolute path works for input but does not work for include, why?
I'm a big fan of the includeonly command, to keep pagecounts intact while only printing specific chapters. But I'm wondering why chaptercounters are not stepped in a scenario such as this one:
documentclass{report}
usepackage{filecontents}
begin{filecontents}{chapterone.tex}
chapter{First Title}
Text
end{filecontents}
begin{filecontents}{chaptertwo.tex}
chapter{Second Title}
Text
end{filecontents}
begin{filecontents}{chapterthree.tex}
chapter{Third Title}
Text
end{filecontents}
includeonly{chapterone,chapterthree}
begin{document}
include{chapterone}
include{chaptertwo}
%stepcounter{chapter} % I have to manually step it here to get the right chapter number for three
include{chapterthree}
end{document}
If LaTeX goes through the content of chaptertwo to determine how many pages it is skipping over in order to start at the correct number for subsequent chapters, is there a reason why it does not check/step chaptercounters?
Or am I using it incorrectly or did not understand something?
counters include
add a comment |
I'm a big fan of the includeonly command, to keep pagecounts intact while only printing specific chapters. But I'm wondering why chaptercounters are not stepped in a scenario such as this one:
documentclass{report}
usepackage{filecontents}
begin{filecontents}{chapterone.tex}
chapter{First Title}
Text
end{filecontents}
begin{filecontents}{chaptertwo.tex}
chapter{Second Title}
Text
end{filecontents}
begin{filecontents}{chapterthree.tex}
chapter{Third Title}
Text
end{filecontents}
includeonly{chapterone,chapterthree}
begin{document}
include{chapterone}
include{chaptertwo}
%stepcounter{chapter} % I have to manually step it here to get the right chapter number for three
include{chapterthree}
end{document}
If LaTeX goes through the content of chaptertwo to determine how many pages it is skipping over in order to start at the correct number for subsequent chapters, is there a reason why it does not check/step chaptercounters?
Or am I using it incorrectly or did not understand something?
counters include
2
I'm getting the expected chapter numbers if I run the example first withincludeonlycommented out and only then add theincludeonly. The same holds for page numbers and everything else. LaTeX needs the data from the.auxfiles, soincludeonlywill only give the 'correct' numbers (w.r.t. to the entire document) if at some point the entire document has been compiled and all chapters could write their.auxfiles. See for example the third paragraph in Davids answer to tex.stackexchange.com/q/87010/35864.
– moewe
6 hours ago
add a comment |
I'm a big fan of the includeonly command, to keep pagecounts intact while only printing specific chapters. But I'm wondering why chaptercounters are not stepped in a scenario such as this one:
documentclass{report}
usepackage{filecontents}
begin{filecontents}{chapterone.tex}
chapter{First Title}
Text
end{filecontents}
begin{filecontents}{chaptertwo.tex}
chapter{Second Title}
Text
end{filecontents}
begin{filecontents}{chapterthree.tex}
chapter{Third Title}
Text
end{filecontents}
includeonly{chapterone,chapterthree}
begin{document}
include{chapterone}
include{chaptertwo}
%stepcounter{chapter} % I have to manually step it here to get the right chapter number for three
include{chapterthree}
end{document}
If LaTeX goes through the content of chaptertwo to determine how many pages it is skipping over in order to start at the correct number for subsequent chapters, is there a reason why it does not check/step chaptercounters?
Or am I using it incorrectly or did not understand something?
counters include
I'm a big fan of the includeonly command, to keep pagecounts intact while only printing specific chapters. But I'm wondering why chaptercounters are not stepped in a scenario such as this one:
documentclass{report}
usepackage{filecontents}
begin{filecontents}{chapterone.tex}
chapter{First Title}
Text
end{filecontents}
begin{filecontents}{chaptertwo.tex}
chapter{Second Title}
Text
end{filecontents}
begin{filecontents}{chapterthree.tex}
chapter{Third Title}
Text
end{filecontents}
includeonly{chapterone,chapterthree}
begin{document}
include{chapterone}
include{chaptertwo}
%stepcounter{chapter} % I have to manually step it here to get the right chapter number for three
include{chapterthree}
end{document}
If LaTeX goes through the content of chaptertwo to determine how many pages it is skipping over in order to start at the correct number for subsequent chapters, is there a reason why it does not check/step chaptercounters?
Or am I using it incorrectly or did not understand something?
counters include
counters include
asked 6 hours ago
janjan
9311418
9311418
2
I'm getting the expected chapter numbers if I run the example first withincludeonlycommented out and only then add theincludeonly. The same holds for page numbers and everything else. LaTeX needs the data from the.auxfiles, soincludeonlywill only give the 'correct' numbers (w.r.t. to the entire document) if at some point the entire document has been compiled and all chapters could write their.auxfiles. See for example the third paragraph in Davids answer to tex.stackexchange.com/q/87010/35864.
– moewe
6 hours ago
add a comment |
2
I'm getting the expected chapter numbers if I run the example first withincludeonlycommented out and only then add theincludeonly. The same holds for page numbers and everything else. LaTeX needs the data from the.auxfiles, soincludeonlywill only give the 'correct' numbers (w.r.t. to the entire document) if at some point the entire document has been compiled and all chapters could write their.auxfiles. See for example the third paragraph in Davids answer to tex.stackexchange.com/q/87010/35864.
– moewe
6 hours ago
2
2
I'm getting the expected chapter numbers if I run the example first with
includeonly commented out and only then add the includeonly. The same holds for page numbers and everything else. LaTeX needs the data from the .aux files, so includeonly will only give the 'correct' numbers (w.r.t. to the entire document) if at some point the entire document has been compiled and all chapters could write their .aux files. See for example the third paragraph in Davids answer to tex.stackexchange.com/q/87010/35864.– moewe
6 hours ago
I'm getting the expected chapter numbers if I run the example first with
includeonly commented out and only then add the includeonly. The same holds for page numbers and everything else. LaTeX needs the data from the .aux files, so includeonly will only give the 'correct' numbers (w.r.t. to the entire document) if at some point the entire document has been compiled and all chapters could write their .aux files. See for example the third paragraph in Davids answer to tex.stackexchange.com/q/87010/35864.– moewe
6 hours ago
add a comment |
1 Answer
1
active
oldest
votes
LaTeX does not open the non-included files at all it just opens their .aux file. the values of all latex counters are saved in the aux file of each included file.
So if you do includeonly{chaptertwo} then include{chapterone} sets every declared latex counter to the values they had at the end of processing chapterone.tex last time that was included.
So periodically you should process the whole document without includeonly so that the saved vales at each include point are closer to the correct values.
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Technically you can also process the chapters in order so thatchapterone.auxis fresh when processingchaptertwo.texand so on.
– Stig Hemmer
2 hours ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
add a comment |
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
});
}
});
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%2f475609%2fwhy-does-the-includeonly-command-not-stepcounter-the-chaptercounter-for-omitte%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
LaTeX does not open the non-included files at all it just opens their .aux file. the values of all latex counters are saved in the aux file of each included file.
So if you do includeonly{chaptertwo} then include{chapterone} sets every declared latex counter to the values they had at the end of processing chapterone.tex last time that was included.
So periodically you should process the whole document without includeonly so that the saved vales at each include point are closer to the correct values.
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Technically you can also process the chapters in order so thatchapterone.auxis fresh when processingchaptertwo.texand so on.
– Stig Hemmer
2 hours ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
add a comment |
LaTeX does not open the non-included files at all it just opens their .aux file. the values of all latex counters are saved in the aux file of each included file.
So if you do includeonly{chaptertwo} then include{chapterone} sets every declared latex counter to the values they had at the end of processing chapterone.tex last time that was included.
So periodically you should process the whole document without includeonly so that the saved vales at each include point are closer to the correct values.
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Technically you can also process the chapters in order so thatchapterone.auxis fresh when processingchaptertwo.texand so on.
– Stig Hemmer
2 hours ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
add a comment |
LaTeX does not open the non-included files at all it just opens their .aux file. the values of all latex counters are saved in the aux file of each included file.
So if you do includeonly{chaptertwo} then include{chapterone} sets every declared latex counter to the values they had at the end of processing chapterone.tex last time that was included.
So periodically you should process the whole document without includeonly so that the saved vales at each include point are closer to the correct values.
LaTeX does not open the non-included files at all it just opens their .aux file. the values of all latex counters are saved in the aux file of each included file.
So if you do includeonly{chaptertwo} then include{chapterone} sets every declared latex counter to the values they had at the end of processing chapterone.tex last time that was included.
So periodically you should process the whole document without includeonly so that the saved vales at each include point are closer to the correct values.
answered 6 hours ago
David CarlisleDavid Carlisle
491k4111341883
491k4111341883
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Technically you can also process the chapters in order so thatchapterone.auxis fresh when processingchaptertwo.texand so on.
– Stig Hemmer
2 hours ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
add a comment |
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Technically you can also process the chapters in order so thatchapterone.auxis fresh when processingchaptertwo.texand so on.
– Stig Hemmer
2 hours ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Oh, I see. Yes, that makes sense.
– jan
6 hours ago
Technically you can also process the chapters in order so that
chapterone.aux is fresh when processing chaptertwo.tex and so on.– Stig Hemmer
2 hours ago
Technically you can also process the chapters in order so that
chapterone.aux is fresh when processing chaptertwo.tex and so on.– Stig Hemmer
2 hours ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
@StigHemmer you can for some documents, not all, for example if your front matter uses the same page numbering as the main document then adding figures or tables or additional chanters can make the table of contents of list of figures take an additional page so the page numbers will be wrong in earlier chapters until you run a document that processes all the chapters and gets the frontmatter lists closer to final form.
– David Carlisle
1 hour ago
add a comment |
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.
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%2f475609%2fwhy-does-the-includeonly-command-not-stepcounter-the-chaptercounter-for-omitte%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
2
I'm getting the expected chapter numbers if I run the example first with
includeonlycommented out and only then add theincludeonly. The same holds for page numbers and everything else. LaTeX needs the data from the.auxfiles, soincludeonlywill only give the 'correct' numbers (w.r.t. to the entire document) if at some point the entire document has been compiled and all chapters could write their.auxfiles. See for example the third paragraph in Davids answer to tex.stackexchange.com/q/87010/35864.– moewe
6 hours ago