Multilined and Misformatted Table of Contents in Master/Subfiles Document
I'm trying to figure out what I did that screwed up the formatting of this course notes template. I apologize for not having a better MWE, but it seems to all have parts together to it.
MWE (edited):
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
Security is Mathematics.tex (as an MWE)
classheader{Security is Mathematics}
section{Security is Mathematics}label{security-is-mathematics}
Insert Text Here
These two documents, compiled while in the same directory, provide the following first page as output. Not exactly what I'm looking for. Any thoughts on how to fix this and make it cleaner? Thanks all!
table-of-contents formatting subfiles
add a comment |
I'm trying to figure out what I did that screwed up the formatting of this course notes template. I apologize for not having a better MWE, but it seems to all have parts together to it.
MWE (edited):
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
Security is Mathematics.tex (as an MWE)
classheader{Security is Mathematics}
section{Security is Mathematics}label{security-is-mathematics}
Insert Text Here
These two documents, compiled while in the same directory, provide the following first page as output. Not exactly what I'm looking for. Any thoughts on how to fix this and make it cleaner? Thanks all!
table-of-contents formatting subfiles
add a comment |
I'm trying to figure out what I did that screwed up the formatting of this course notes template. I apologize for not having a better MWE, but it seems to all have parts together to it.
MWE (edited):
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
Security is Mathematics.tex (as an MWE)
classheader{Security is Mathematics}
section{Security is Mathematics}label{security-is-mathematics}
Insert Text Here
These two documents, compiled while in the same directory, provide the following first page as output. Not exactly what I'm looking for. Any thoughts on how to fix this and make it cleaner? Thanks all!
table-of-contents formatting subfiles
I'm trying to figure out what I did that screwed up the formatting of this course notes template. I apologize for not having a better MWE, but it seems to all have parts together to it.
MWE (edited):
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
Security is Mathematics.tex (as an MWE)
classheader{Security is Mathematics}
section{Security is Mathematics}label{security-is-mathematics}
Insert Text Here
These two documents, compiled while in the same directory, provide the following first page as output. Not exactly what I'm looking for. Any thoughts on how to fix this and make it cleaner? Thanks all!
table-of-contents formatting subfiles
table-of-contents formatting subfiles
edited Dec 8 at 13:50
asked Dec 8 at 7:09
Michael Link
159110
159110
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can drastically reduce your ca 500 line long master document to the following MWE that still reproduces your problem with the table of contents:
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
If you now comment out line 4 (phantomsection
...), you achieve the following output:
Applied to your original example, you get:
Apart from that, you might be interested in using a different documentclass like report
or even book
that are better suited for longer documents. They also provide the chapter
command that automatically starts on a new page.
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%2f463774%2fmultilined-and-misformatted-table-of-contents-in-master-subfiles-document%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
You can drastically reduce your ca 500 line long master document to the following MWE that still reproduces your problem with the table of contents:
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
If you now comment out line 4 (phantomsection
...), you achieve the following output:
Applied to your original example, you get:
Apart from that, you might be interested in using a different documentclass like report
or even book
that are better suited for longer documents. They also provide the chapter
command that automatically starts on a new page.
add a comment |
You can drastically reduce your ca 500 line long master document to the following MWE that still reproduces your problem with the table of contents:
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
If you now comment out line 4 (phantomsection
...), you achieve the following output:
Applied to your original example, you get:
Apart from that, you might be interested in using a different documentclass like report
or even book
that are better suited for longer documents. They also provide the chapter
command that automatically starts on a new page.
add a comment |
You can drastically reduce your ca 500 line long master document to the following MWE that still reproduces your problem with the table of contents:
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
If you now comment out line 4 (phantomsection
...), you achieve the following output:
Applied to your original example, you get:
Apart from that, you might be interested in using a different documentclass like report
or even book
that are better suited for longer documents. They also provide the chapter
command that automatically starts on a new page.
You can drastically reduce your ca 500 line long master document to the following MWE that still reproduces your problem with the table of contents:
documentclass[11pt]{article}
newcommand{classheader}[1]{newpagesection*{#1}
phantomsection addcontentsline{toc}{section}{(#1)}
}
usepackage{fancyhdr}
pagestyle{fancy}
rfoot{parbox[t]{0.9in}{centering Page thepage\ classheader}}
usepackage{hyperref}
begin{document}
thispagestyle{empty}
tableofcontents
newpage
thispagestyle{empty}
section*{Introduction}
include{SecurityisMathematics}
end{document}
If you now comment out line 4 (phantomsection
...), you achieve the following output:
Applied to your original example, you get:
Apart from that, you might be interested in using a different documentclass like report
or even book
that are better suited for longer documents. They also provide the chapter
command that automatically starts on a new page.
answered Dec 8 at 11:03
leandriis
8,1071528
8,1071528
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f463774%2fmultilined-and-misformatted-table-of-contents-in-master-subfiles-document%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