How to style specific chapter in table of content












0















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 enter image description here



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 )
enter image description here
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
enter image description here



How do I reduce the space in the red line?










share|improve this question

























  • 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













  • 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've updated my question

    – aaaaaa
    Jan 31 at 12:12
















0















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 enter image description here



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 )
enter image description here
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
enter image description here



How do I reduce the space in the red line?










share|improve this question

























  • 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













  • 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've updated my question

    – aaaaaa
    Jan 31 at 12:12














0












0








0








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 enter image description here



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 )
enter image description here
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
enter image description here



How do I reduce the space in the red line?










share|improve this question
















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 enter image description here



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 )
enter image description here
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
enter image description here



How do I reduce the space in the red line?







table-of-contents formatting tocloft






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 12:11







aaaaaa

















asked Jan 30 at 16:55









aaaaaaaaaaaa

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











  • @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











  • @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











  • @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











  • @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










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
});


}
});














draft saved

draft discarded


















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
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?