Cannot compile after putting table of contents The 2019 Stack Overflow Developer Survey...
What is the best strategy for white in this position?
What is the motivation for a law requiring 2 parties to consent for recording a conversation
Geography at the pixel level
Could a US political party gain complete control over the government by removing checks & balances?
Manuscript was "unsubmitted" because the manuscript was deposited in Arxiv Preprints
Limit to 0 ambiguity
How to answer pointed "are you quitting" questioning when I don't want them to suspect
Why is it "Tumoren" and not "Tumore"?
What can other administrators access on my machine?
Pristine Bit Checking
I looked up a future colleague on LinkedIn before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?
Does a dangling wire really electrocute me if I'm standing in water?
What is the steepest angle that a canal can be traversable without locks?
Lethal sonic weapons
Is there a name of the flying bionic bird?
Output the Arecibo Message
Landlord wants to switch my lease to a "Land contract" to "get back at the city"
Why isn't airport relocation done gradually?
Why do UK politicians seemingly ignore opinion polls on Brexit?
How to deal with fear of taking dependencies
Understanding the implication of what "well-defined" means for the operation in quotient group
Why can Shazam do this?
Inline version of a function returns different value than non-inline version
Inflated grade on resume at previous job, might former employer tell new employer?
Cannot compile after putting table of contents
The 2019 Stack Overflow Developer Survey Results Are InPutting table of contents in a page without other elementsResets page numbering after table of contentsPage number on the left with book classlist of figures and tables when there are no figures or tables?Cannot change fonts on Algorithms Table of Contents pageHow to show Mini table only sections in a chapter not other chapter?I cannot rename table of contentsTable of contents ignores chapters declared after a certain lineTable of contents after partsFncychap with Conny option cannot produce table of contents
This is my preamble:
documentclass[12pt]{report}
usepackage[left=1.5in, right=1in, top=1in,bottom=1.5in]{geometry}
usepackage{setspace}
usepackage{amsbsy}
usepackage{fancyhdr}
usepackage{lipsum}
usepackage{graphicx}
usepackage{enumitem}
usepackage{textcomp}
usepackage{lscape}
usepackage{amsmath}
usepackage{calc}
usepackage[rm,tiny]{titlesec} %added this to change the chapter title's font as default regular text font.
usepackage{titlesec}
usepackage{sectsty}
sectionfont{underlinenormalfontnormalsizecentering}
newlength{depthofsumsign}
setlength{depthofsumsign}{depthof{$sum$}}
newlength{totalheightofsumsign}
newlength{heightanddepthofargument}
usepackage{pdflscape,booktabs}
usepackage[flushleft]{threeparttable}
renewcommandTPTtagStyle{textit}
usepackage[font=it,skip=0.5baselineskip]{caption} % italic text for captions
usepackage{titletoc}
usepackage{hyperref}
titlecontents{chapter}
[3pt] % left margin
{}%
{contentsmargin{0pt} % numbered entry format
thecontentslabelenspace%
}
{contentsmargin{0pt}large} % unnumbered entry format
{titlerule*[.99pc]{.}contentspage} % filler-page format (e.g dots)
[] % below code (e.g vertical space)
%to put page numbers as the header
fancyhf{}
fancyhead[C]{thepage}
pagestyle{fancy}
titleformat{chapter}{normalfontcentering}{}{0pt}{}
titlelabel{}
titlespacing*{chapter}{0pt}{-25pt}{4pt}
titleformat{section}{normalfontcentering}{}{0pt}{}
%koleygr: Redefining chapter to include thispagestyle{fancy}
letoldchapterchapter
makeatletter
defchapter{%
@ifstar{@Starred}{@nonStarred}%
}
def@Starred{%
@ifnextchar[%
{GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}@StarredWith}%
{@StarredWithout}%
}
def@StarredWith[#1]#2{%
oldchapter*{#2}%
thispagestyle{fancy}
}
def@StarredWithout#1{
oldchapter*{#1}%
thispagestyle{fancy}
}
def@nonStarred{%
@ifnextchar[%
{@nonStarredWith}%
{@nonStarredWithout}%
}
def@nonStarredWith[#1]#2{%
oldchapter[#1]{#2}%
thispagestyle{fancy}
}
def@nonStarredWithout#1{%
oldchapter{#1}%
thispagestyle{fancy}
}
makeatother
interfootnotelinepenalty=10000
renewcommand{contentsname}{TABLE OF CONTENTS}
begin{document}
I was using this same set of codes earlier, and it was working fine. Then I wanted to change the format of the titles, 'List of figures,' and 'List of tables' into all caps, i.e. "LIST OF FIGURES," and "LIST OF TABLES."
I then first used this code:
documentclass{article}
usepackage{tocbibind}
letoldaddcontentslineaddcontentsline
newcommand{ADDCONTENTSLINE}[3]{%
oldaddcontentsline{#1}{#2}{MakeUppercase{#3}}%
}
newcommand{CAPinToC}{letaddcontentslineADDCONTENTSLINE}
newcommand{noCAPinToC}{letaddcontentslineoldaddcontentsline}
begin{document}
tableofcontents
CAPinToC% All entries in ToC will be CAPITALIZED from here on
listoftables
listoffigures
noCAPinToC% Rever to original addcontentsline formatting
section{A section}
begin{figure}caption{A figure}end{figure}
begin{table}caption{A table}end{table}
end{document}
It showed some errors, and I could not compile. Then, I deleted the code, and used this:
renewcommand*listfigurename{List of figures}
%after begin{document} and before the listoffigures command.
renewcommand*listtablename{List of tables}
%after begin{document} and before the listoftables command.
It still did not work.
But when I tried to delete it and compile, it would not compile at all.
I tried undoing everything I did in the last five minutes, and it would still not compile.
Finally, I got rid of tableofcontents
code, and it compiled. But, now I cannot add the table of contents at all.
Is there some defect in my codes, somewhere?
Thanks a lot!!
table-of-contents
add a comment |
This is my preamble:
documentclass[12pt]{report}
usepackage[left=1.5in, right=1in, top=1in,bottom=1.5in]{geometry}
usepackage{setspace}
usepackage{amsbsy}
usepackage{fancyhdr}
usepackage{lipsum}
usepackage{graphicx}
usepackage{enumitem}
usepackage{textcomp}
usepackage{lscape}
usepackage{amsmath}
usepackage{calc}
usepackage[rm,tiny]{titlesec} %added this to change the chapter title's font as default regular text font.
usepackage{titlesec}
usepackage{sectsty}
sectionfont{underlinenormalfontnormalsizecentering}
newlength{depthofsumsign}
setlength{depthofsumsign}{depthof{$sum$}}
newlength{totalheightofsumsign}
newlength{heightanddepthofargument}
usepackage{pdflscape,booktabs}
usepackage[flushleft]{threeparttable}
renewcommandTPTtagStyle{textit}
usepackage[font=it,skip=0.5baselineskip]{caption} % italic text for captions
usepackage{titletoc}
usepackage{hyperref}
titlecontents{chapter}
[3pt] % left margin
{}%
{contentsmargin{0pt} % numbered entry format
thecontentslabelenspace%
}
{contentsmargin{0pt}large} % unnumbered entry format
{titlerule*[.99pc]{.}contentspage} % filler-page format (e.g dots)
[] % below code (e.g vertical space)
%to put page numbers as the header
fancyhf{}
fancyhead[C]{thepage}
pagestyle{fancy}
titleformat{chapter}{normalfontcentering}{}{0pt}{}
titlelabel{}
titlespacing*{chapter}{0pt}{-25pt}{4pt}
titleformat{section}{normalfontcentering}{}{0pt}{}
%koleygr: Redefining chapter to include thispagestyle{fancy}
letoldchapterchapter
makeatletter
defchapter{%
@ifstar{@Starred}{@nonStarred}%
}
def@Starred{%
@ifnextchar[%
{GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}@StarredWith}%
{@StarredWithout}%
}
def@StarredWith[#1]#2{%
oldchapter*{#2}%
thispagestyle{fancy}
}
def@StarredWithout#1{
oldchapter*{#1}%
thispagestyle{fancy}
}
def@nonStarred{%
@ifnextchar[%
{@nonStarredWith}%
{@nonStarredWithout}%
}
def@nonStarredWith[#1]#2{%
oldchapter[#1]{#2}%
thispagestyle{fancy}
}
def@nonStarredWithout#1{%
oldchapter{#1}%
thispagestyle{fancy}
}
makeatother
interfootnotelinepenalty=10000
renewcommand{contentsname}{TABLE OF CONTENTS}
begin{document}
I was using this same set of codes earlier, and it was working fine. Then I wanted to change the format of the titles, 'List of figures,' and 'List of tables' into all caps, i.e. "LIST OF FIGURES," and "LIST OF TABLES."
I then first used this code:
documentclass{article}
usepackage{tocbibind}
letoldaddcontentslineaddcontentsline
newcommand{ADDCONTENTSLINE}[3]{%
oldaddcontentsline{#1}{#2}{MakeUppercase{#3}}%
}
newcommand{CAPinToC}{letaddcontentslineADDCONTENTSLINE}
newcommand{noCAPinToC}{letaddcontentslineoldaddcontentsline}
begin{document}
tableofcontents
CAPinToC% All entries in ToC will be CAPITALIZED from here on
listoftables
listoffigures
noCAPinToC% Rever to original addcontentsline formatting
section{A section}
begin{figure}caption{A figure}end{figure}
begin{table}caption{A table}end{table}
end{document}
It showed some errors, and I could not compile. Then, I deleted the code, and used this:
renewcommand*listfigurename{List of figures}
%after begin{document} and before the listoffigures command.
renewcommand*listtablename{List of tables}
%after begin{document} and before the listoftables command.
It still did not work.
But when I tried to delete it and compile, it would not compile at all.
I tried undoing everything I did in the last five minutes, and it would still not compile.
Finally, I got rid of tableofcontents
code, and it compiled. But, now I cannot add the table of contents at all.
Is there some defect in my codes, somewhere?
Thanks a lot!!
table-of-contents
1
Don't make people confused with so many codes. Please post a minimal but compilable code (not only the preamble) that reproduces your problem. Btw, please add the error message.
– JouleV
5 mins ago
add a comment |
This is my preamble:
documentclass[12pt]{report}
usepackage[left=1.5in, right=1in, top=1in,bottom=1.5in]{geometry}
usepackage{setspace}
usepackage{amsbsy}
usepackage{fancyhdr}
usepackage{lipsum}
usepackage{graphicx}
usepackage{enumitem}
usepackage{textcomp}
usepackage{lscape}
usepackage{amsmath}
usepackage{calc}
usepackage[rm,tiny]{titlesec} %added this to change the chapter title's font as default regular text font.
usepackage{titlesec}
usepackage{sectsty}
sectionfont{underlinenormalfontnormalsizecentering}
newlength{depthofsumsign}
setlength{depthofsumsign}{depthof{$sum$}}
newlength{totalheightofsumsign}
newlength{heightanddepthofargument}
usepackage{pdflscape,booktabs}
usepackage[flushleft]{threeparttable}
renewcommandTPTtagStyle{textit}
usepackage[font=it,skip=0.5baselineskip]{caption} % italic text for captions
usepackage{titletoc}
usepackage{hyperref}
titlecontents{chapter}
[3pt] % left margin
{}%
{contentsmargin{0pt} % numbered entry format
thecontentslabelenspace%
}
{contentsmargin{0pt}large} % unnumbered entry format
{titlerule*[.99pc]{.}contentspage} % filler-page format (e.g dots)
[] % below code (e.g vertical space)
%to put page numbers as the header
fancyhf{}
fancyhead[C]{thepage}
pagestyle{fancy}
titleformat{chapter}{normalfontcentering}{}{0pt}{}
titlelabel{}
titlespacing*{chapter}{0pt}{-25pt}{4pt}
titleformat{section}{normalfontcentering}{}{0pt}{}
%koleygr: Redefining chapter to include thispagestyle{fancy}
letoldchapterchapter
makeatletter
defchapter{%
@ifstar{@Starred}{@nonStarred}%
}
def@Starred{%
@ifnextchar[%
{GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}@StarredWith}%
{@StarredWithout}%
}
def@StarredWith[#1]#2{%
oldchapter*{#2}%
thispagestyle{fancy}
}
def@StarredWithout#1{
oldchapter*{#1}%
thispagestyle{fancy}
}
def@nonStarred{%
@ifnextchar[%
{@nonStarredWith}%
{@nonStarredWithout}%
}
def@nonStarredWith[#1]#2{%
oldchapter[#1]{#2}%
thispagestyle{fancy}
}
def@nonStarredWithout#1{%
oldchapter{#1}%
thispagestyle{fancy}
}
makeatother
interfootnotelinepenalty=10000
renewcommand{contentsname}{TABLE OF CONTENTS}
begin{document}
I was using this same set of codes earlier, and it was working fine. Then I wanted to change the format of the titles, 'List of figures,' and 'List of tables' into all caps, i.e. "LIST OF FIGURES," and "LIST OF TABLES."
I then first used this code:
documentclass{article}
usepackage{tocbibind}
letoldaddcontentslineaddcontentsline
newcommand{ADDCONTENTSLINE}[3]{%
oldaddcontentsline{#1}{#2}{MakeUppercase{#3}}%
}
newcommand{CAPinToC}{letaddcontentslineADDCONTENTSLINE}
newcommand{noCAPinToC}{letaddcontentslineoldaddcontentsline}
begin{document}
tableofcontents
CAPinToC% All entries in ToC will be CAPITALIZED from here on
listoftables
listoffigures
noCAPinToC% Rever to original addcontentsline formatting
section{A section}
begin{figure}caption{A figure}end{figure}
begin{table}caption{A table}end{table}
end{document}
It showed some errors, and I could not compile. Then, I deleted the code, and used this:
renewcommand*listfigurename{List of figures}
%after begin{document} and before the listoffigures command.
renewcommand*listtablename{List of tables}
%after begin{document} and before the listoftables command.
It still did not work.
But when I tried to delete it and compile, it would not compile at all.
I tried undoing everything I did in the last five minutes, and it would still not compile.
Finally, I got rid of tableofcontents
code, and it compiled. But, now I cannot add the table of contents at all.
Is there some defect in my codes, somewhere?
Thanks a lot!!
table-of-contents
This is my preamble:
documentclass[12pt]{report}
usepackage[left=1.5in, right=1in, top=1in,bottom=1.5in]{geometry}
usepackage{setspace}
usepackage{amsbsy}
usepackage{fancyhdr}
usepackage{lipsum}
usepackage{graphicx}
usepackage{enumitem}
usepackage{textcomp}
usepackage{lscape}
usepackage{amsmath}
usepackage{calc}
usepackage[rm,tiny]{titlesec} %added this to change the chapter title's font as default regular text font.
usepackage{titlesec}
usepackage{sectsty}
sectionfont{underlinenormalfontnormalsizecentering}
newlength{depthofsumsign}
setlength{depthofsumsign}{depthof{$sum$}}
newlength{totalheightofsumsign}
newlength{heightanddepthofargument}
usepackage{pdflscape,booktabs}
usepackage[flushleft]{threeparttable}
renewcommandTPTtagStyle{textit}
usepackage[font=it,skip=0.5baselineskip]{caption} % italic text for captions
usepackage{titletoc}
usepackage{hyperref}
titlecontents{chapter}
[3pt] % left margin
{}%
{contentsmargin{0pt} % numbered entry format
thecontentslabelenspace%
}
{contentsmargin{0pt}large} % unnumbered entry format
{titlerule*[.99pc]{.}contentspage} % filler-page format (e.g dots)
[] % below code (e.g vertical space)
%to put page numbers as the header
fancyhf{}
fancyhead[C]{thepage}
pagestyle{fancy}
titleformat{chapter}{normalfontcentering}{}{0pt}{}
titlelabel{}
titlespacing*{chapter}{0pt}{-25pt}{4pt}
titleformat{section}{normalfontcentering}{}{0pt}{}
%koleygr: Redefining chapter to include thispagestyle{fancy}
letoldchapterchapter
makeatletter
defchapter{%
@ifstar{@Starred}{@nonStarred}%
}
def@Starred{%
@ifnextchar[%
{GenericWarning{}{Warning: A starred section can not have parameters. I am going to ignore them!}@StarredWith}%
{@StarredWithout}%
}
def@StarredWith[#1]#2{%
oldchapter*{#2}%
thispagestyle{fancy}
}
def@StarredWithout#1{
oldchapter*{#1}%
thispagestyle{fancy}
}
def@nonStarred{%
@ifnextchar[%
{@nonStarredWith}%
{@nonStarredWithout}%
}
def@nonStarredWith[#1]#2{%
oldchapter[#1]{#2}%
thispagestyle{fancy}
}
def@nonStarredWithout#1{%
oldchapter{#1}%
thispagestyle{fancy}
}
makeatother
interfootnotelinepenalty=10000
renewcommand{contentsname}{TABLE OF CONTENTS}
begin{document}
I was using this same set of codes earlier, and it was working fine. Then I wanted to change the format of the titles, 'List of figures,' and 'List of tables' into all caps, i.e. "LIST OF FIGURES," and "LIST OF TABLES."
I then first used this code:
documentclass{article}
usepackage{tocbibind}
letoldaddcontentslineaddcontentsline
newcommand{ADDCONTENTSLINE}[3]{%
oldaddcontentsline{#1}{#2}{MakeUppercase{#3}}%
}
newcommand{CAPinToC}{letaddcontentslineADDCONTENTSLINE}
newcommand{noCAPinToC}{letaddcontentslineoldaddcontentsline}
begin{document}
tableofcontents
CAPinToC% All entries in ToC will be CAPITALIZED from here on
listoftables
listoffigures
noCAPinToC% Rever to original addcontentsline formatting
section{A section}
begin{figure}caption{A figure}end{figure}
begin{table}caption{A table}end{table}
end{document}
It showed some errors, and I could not compile. Then, I deleted the code, and used this:
renewcommand*listfigurename{List of figures}
%after begin{document} and before the listoffigures command.
renewcommand*listtablename{List of tables}
%after begin{document} and before the listoftables command.
It still did not work.
But when I tried to delete it and compile, it would not compile at all.
I tried undoing everything I did in the last five minutes, and it would still not compile.
Finally, I got rid of tableofcontents
code, and it compiled. But, now I cannot add the table of contents at all.
Is there some defect in my codes, somewhere?
Thanks a lot!!
table-of-contents
table-of-contents
asked 7 mins ago
Samyam ShresthaSamyam Shrestha
495
495
1
Don't make people confused with so many codes. Please post a minimal but compilable code (not only the preamble) that reproduces your problem. Btw, please add the error message.
– JouleV
5 mins ago
add a comment |
1
Don't make people confused with so many codes. Please post a minimal but compilable code (not only the preamble) that reproduces your problem. Btw, please add the error message.
– JouleV
5 mins ago
1
1
Don't make people confused with so many codes. Please post a minimal but compilable code (not only the preamble) that reproduces your problem. Btw, please add the error message.
– JouleV
5 mins ago
Don't make people confused with so many codes. Please post a minimal but compilable code (not only the preamble) that reproduces your problem. Btw, please add the error message.
– JouleV
5 mins ago
add a comment |
0
active
oldest
votes
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%2f484046%2fcannot-compile-after-putting-table-of-contents%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f484046%2fcannot-compile-after-putting-table-of-contents%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
1
Don't make people confused with so many codes. Please post a minimal but compilable code (not only the preamble) that reproduces your problem. Btw, please add the error message.
– JouleV
5 mins ago