How to style specific chapter in table of content
I have the following code :
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
begin{document}
tableofcontents
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
chapter{A}
chapter{B}
chapter{C}
end{document
which gives 
Notice that Costum1, Costum2 and Costum3 follows the style of A, B, C. What I want is Costum1, Costum2, and Costum3 to have no style at all, just plain 12 pt times new roman, no bold, no italic, with one spacing.
Below is what roughly I want ( I make this using word )

Also, I dont need the dot. It's there because it's default on Word.
Edit : I do need the dot, but only for custom1, custom2 and custom3.
hline
After trying the solution in Remove bold style for chapter names in table of contents
I was able to unbold custom1, custom2 and custom3 in TOC. Here's the full code.
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
usepackage{hyperref}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
newcommand*{enableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectbfseriesprotectcftdotfill{protectcftsecdotsep}}}% dot leaders in bold
}
newcommand*{disableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectnormalfontprotectcftdotfill{protectcftsecdotsep}}}%
}
begin{document}
tableofcontents
disableboldchapterintoc
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
enableboldchapterintoc
chapter{A}
chapter{B}
chapter{C}
end{document}
which gives

How do I reduce the space in the red line?
table-of-contents formatting tocloft
add a comment |
I have the following code :
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
begin{document}
tableofcontents
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
chapter{A}
chapter{B}
chapter{C}
end{document
which gives 
Notice that Costum1, Costum2 and Costum3 follows the style of A, B, C. What I want is Costum1, Costum2, and Costum3 to have no style at all, just plain 12 pt times new roman, no bold, no italic, with one spacing.
Below is what roughly I want ( I make this using word )

Also, I dont need the dot. It's there because it's default on Word.
Edit : I do need the dot, but only for custom1, custom2 and custom3.
hline
After trying the solution in Remove bold style for chapter names in table of contents
I was able to unbold custom1, custom2 and custom3 in TOC. Here's the full code.
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
usepackage{hyperref}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
newcommand*{enableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectbfseriesprotectcftdotfill{protectcftsecdotsep}}}% dot leaders in bold
}
newcommand*{disableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectnormalfontprotectcftdotfill{protectcftsecdotsep}}}%
}
begin{document}
tableofcontents
disableboldchapterintoc
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
enableboldchapterintoc
chapter{A}
chapter{B}
chapter{C}
end{document}
which gives

How do I reduce the space in the red line?
table-of-contents formatting tocloft
What is the purpose ofaddChapter? It is not working sincehyperrefis not loaded (sophantomsectionfails) and theaddChaptercalls are at the wrong place...chapteradds the correct ToC line already
– Christian Hupfer
Jan 30 at 17:23
@ChristianHupfer Yeah, I forgot to add hyperref, but somehow it works. What I want is to have costum style chapter title in the TOC. So, costum1, costum2 and costum3 will have its own style and will not follow the usual chapter style like A,B,and C. If I use the usual chapter chapter command on costum1 , costum2 and costum3. The toc of costum1, costum2, and costum3 will be numbered, I want to make them unnumbered and have simple style (12 pt times new roman). Do you have any other idea how I could solve this problem?
– aaaaaa
Jan 30 at 17:41
You meancustom, notcostum, by the way ;-)
– Christian Hupfer
Jan 30 at 17:44
@ChristianHupfer I was coming across one question that you answered tex.stackexchange.com/questions/419555/… I was able to unbold custom1, custom2, and custom3 chapter. The only problem left is the spacing between custom1 and costum2 is too big, also applies to custom 3. I was wondering if you know how to make it smaller, basically singlespacing for all these custom-styled chapter? Thanks in advance
– aaaaaa
Jan 30 at 19:21
@ChristianHupfer I've updated my question
– aaaaaa
Jan 31 at 12:12
add a comment |
I have the following code :
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
begin{document}
tableofcontents
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
chapter{A}
chapter{B}
chapter{C}
end{document
which gives 
Notice that Costum1, Costum2 and Costum3 follows the style of A, B, C. What I want is Costum1, Costum2, and Costum3 to have no style at all, just plain 12 pt times new roman, no bold, no italic, with one spacing.
Below is what roughly I want ( I make this using word )

Also, I dont need the dot. It's there because it's default on Word.
Edit : I do need the dot, but only for custom1, custom2 and custom3.
hline
After trying the solution in Remove bold style for chapter names in table of contents
I was able to unbold custom1, custom2 and custom3 in TOC. Here's the full code.
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
usepackage{hyperref}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
newcommand*{enableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectbfseriesprotectcftdotfill{protectcftsecdotsep}}}% dot leaders in bold
}
newcommand*{disableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectnormalfontprotectcftdotfill{protectcftsecdotsep}}}%
}
begin{document}
tableofcontents
disableboldchapterintoc
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
enableboldchapterintoc
chapter{A}
chapter{B}
chapter{C}
end{document}
which gives

How do I reduce the space in the red line?
table-of-contents formatting tocloft
I have the following code :
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
begin{document}
tableofcontents
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
chapter{A}
chapter{B}
chapter{C}
end{document
which gives 
Notice that Costum1, Costum2 and Costum3 follows the style of A, B, C. What I want is Costum1, Costum2, and Costum3 to have no style at all, just plain 12 pt times new roman, no bold, no italic, with one spacing.
Below is what roughly I want ( I make this using word )

Also, I dont need the dot. It's there because it's default on Word.
Edit : I do need the dot, but only for custom1, custom2 and custom3.
hline
After trying the solution in Remove bold style for chapter names in table of contents
I was able to unbold custom1, custom2 and custom3 in TOC. Here's the full code.
documentclass[12pt, times new roman, a4paper, onecolumn, oneside, final]{report}
usepackage{tocbibind}
usepackage{tocloft}
usepackage{hyperref}
newcommand{addChapter}[1]{phantomsection addcontentsline{toc}{chapter}{#1}}
newcommand*{enableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfontprotectbfseries}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectbfseriesprotectcftdotfill{protectcftsecdotsep}}}% dot leaders in bold
}
newcommand*{disableboldchapterintoc}{%
addtocontents{toc}{stringrenewcommand{protectcftchappagefont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapfont}{protectnormalfont}}
addtocontents{toc}{stringrenewcommand{protectcftchapleader}{protectnormalfontprotectcftdotfill{protectcftsecdotsep}}}%
}
begin{document}
tableofcontents
disableboldchapterintoc
addChapter{Costum1}
addChapter{Costum2}
addChapter{Costum3}
enableboldchapterintoc
chapter{A}
chapter{B}
chapter{C}
end{document}
which gives

How do I reduce the space in the red line?
table-of-contents formatting tocloft
table-of-contents formatting tocloft
edited Jan 31 at 12:11
aaaaaa
asked Jan 30 at 16:55
aaaaaaaaaaaa
12
12
What is the purpose ofaddChapter? It is not working sincehyperrefis not loaded (sophantomsectionfails) and theaddChaptercalls are at the wrong place...chapteradds the correct ToC line already
– Christian Hupfer
Jan 30 at 17:23
@ChristianHupfer Yeah, I forgot to add hyperref, but somehow it works. What I want is to have costum style chapter title in the TOC. So, costum1, costum2 and costum3 will have its own style and will not follow the usual chapter style like A,B,and C. If I use the usual chapter chapter command on costum1 , costum2 and costum3. The toc of costum1, costum2, and costum3 will be numbered, I want to make them unnumbered and have simple style (12 pt times new roman). Do you have any other idea how I could solve this problem?
– aaaaaa
Jan 30 at 17:41
You meancustom, notcostum, by the way ;-)
– Christian Hupfer
Jan 30 at 17:44
@ChristianHupfer I was coming across one question that you answered tex.stackexchange.com/questions/419555/… I was able to unbold custom1, custom2, and custom3 chapter. The only problem left is the spacing between custom1 and costum2 is too big, also applies to custom 3. I was wondering if you know how to make it smaller, basically singlespacing for all these custom-styled chapter? Thanks in advance
– aaaaaa
Jan 30 at 19:21
@ChristianHupfer I've updated my question
– aaaaaa
Jan 31 at 12:12
add a comment |
What is the purpose ofaddChapter? It is not working sincehyperrefis not loaded (sophantomsectionfails) and theaddChaptercalls are at the wrong place...chapteradds the correct ToC line already
– Christian Hupfer
Jan 30 at 17:23
@ChristianHupfer Yeah, I forgot to add hyperref, but somehow it works. What I want is to have costum style chapter title in the TOC. So, costum1, costum2 and costum3 will have its own style and will not follow the usual chapter style like A,B,and C. If I use the usual chapter chapter command on costum1 , costum2 and costum3. The toc of costum1, costum2, and costum3 will be numbered, I want to make them unnumbered and have simple style (12 pt times new roman). Do you have any other idea how I could solve this problem?
– aaaaaa
Jan 30 at 17:41
You meancustom, notcostum, by the way ;-)
– Christian Hupfer
Jan 30 at 17:44
@ChristianHupfer I was coming across one question that you answered tex.stackexchange.com/questions/419555/… I was able to unbold custom1, custom2, and custom3 chapter. The only problem left is the spacing between custom1 and costum2 is too big, also applies to custom 3. I was wondering if you know how to make it smaller, basically singlespacing for all these custom-styled chapter? Thanks in advance
– aaaaaa
Jan 30 at 19:21
@ChristianHupfer I've updated my question
– aaaaaa
Jan 31 at 12:12
What is the purpose of
addChapter? It is not working since hyperref is not loaded (so phantomsection fails) and the addChapter calls are at the wrong place... chapter adds the correct ToC line already– Christian Hupfer
Jan 30 at 17:23
What is the purpose of
addChapter? It is not working since hyperref is not loaded (so phantomsection fails) and the addChapter calls are at the wrong place... chapter adds the correct ToC line already– Christian Hupfer
Jan 30 at 17:23
@ChristianHupfer Yeah, I forgot to add hyperref, but somehow it works. What I want is to have costum style chapter title in the TOC. So, costum1, costum2 and costum3 will have its own style and will not follow the usual chapter style like A,B,and C. If I use the usual chapter chapter command on costum1 , costum2 and costum3. The toc of costum1, costum2, and costum3 will be numbered, I want to make them unnumbered and have simple style (12 pt times new roman). Do you have any other idea how I could solve this problem?
– aaaaaa
Jan 30 at 17:41
@ChristianHupfer Yeah, I forgot to add hyperref, but somehow it works. What I want is to have costum style chapter title in the TOC. So, costum1, costum2 and costum3 will have its own style and will not follow the usual chapter style like A,B,and C. If I use the usual chapter chapter command on costum1 , costum2 and costum3. The toc of costum1, costum2, and costum3 will be numbered, I want to make them unnumbered and have simple style (12 pt times new roman). Do you have any other idea how I could solve this problem?
– aaaaaa
Jan 30 at 17:41
You mean
custom, not costum, by the way ;-)– Christian Hupfer
Jan 30 at 17:44
You mean
custom, not costum, by the way ;-)– Christian Hupfer
Jan 30 at 17:44
@ChristianHupfer I was coming across one question that you answered tex.stackexchange.com/questions/419555/… I was able to unbold custom1, custom2, and custom3 chapter. The only problem left is the spacing between custom1 and costum2 is too big, also applies to custom 3. I was wondering if you know how to make it smaller, basically singlespacing for all these custom-styled chapter? Thanks in advance
– aaaaaa
Jan 30 at 19:21
@ChristianHupfer I was coming across one question that you answered tex.stackexchange.com/questions/419555/… I was able to unbold custom1, custom2, and custom3 chapter. The only problem left is the spacing between custom1 and costum2 is too big, also applies to custom 3. I was wondering if you know how to make it smaller, basically singlespacing for all these custom-styled chapter? Thanks in advance
– aaaaaa
Jan 30 at 19:21
@ChristianHupfer I've updated my question
– aaaaaa
Jan 31 at 12:12
@ChristianHupfer I've updated my question
– aaaaaa
Jan 31 at 12:12
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%2f472592%2fhow-to-style-specific-chapter-in-table-of-content%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%2f472592%2fhow-to-style-specific-chapter-in-table-of-content%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
What is the purpose of
addChapter? It is not working sincehyperrefis not loaded (sophantomsectionfails) and theaddChaptercalls are at the wrong place...chapteradds the correct ToC line already– Christian Hupfer
Jan 30 at 17:23
@ChristianHupfer Yeah, I forgot to add hyperref, but somehow it works. What I want is to have costum style chapter title in the TOC. So, costum1, costum2 and costum3 will have its own style and will not follow the usual chapter style like A,B,and C. If I use the usual chapter chapter command on costum1 , costum2 and costum3. The toc of costum1, costum2, and costum3 will be numbered, I want to make them unnumbered and have simple style (12 pt times new roman). Do you have any other idea how I could solve this problem?
– aaaaaa
Jan 30 at 17:41
You mean
custom, notcostum, by the way ;-)– Christian Hupfer
Jan 30 at 17:44
@ChristianHupfer I was coming across one question that you answered tex.stackexchange.com/questions/419555/… I was able to unbold custom1, custom2, and custom3 chapter. The only problem left is the spacing between custom1 and costum2 is too big, also applies to custom 3. I was wondering if you know how to make it smaller, basically singlespacing for all these custom-styled chapter? Thanks in advance
– aaaaaa
Jan 30 at 19:21
@ChristianHupfer I've updated my question
– aaaaaa
Jan 31 at 12:12