Theses, Books, Title pagesChapter Headings

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Chapter Headings

Post by templateuser »

Hello,

First I'd like to say this template looks really cool and I'm excited to be using it for a big project I'm going to be working on!

I have a question about the chapter headings. There is a part where there is a grayed out box that lists the chapter sections.

Is there a way to:
a) have the chapter sections numbered
b) have the gray box fit exactly the space that the text in the box takes up
c) a & b
d) have the box not appear there at all.

I apologize for making this question look like it's multiple choice! Thanks for any help!

Andrew

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Chapter Headings

Post by Vel »

Hey Andrew,

Awesome, this is a really cool template so I'm glad you're going to get some good use out of it!

Regarding your questions,

a) For numbering the sections go to structure.tex and find the "MINI TABLE OF CONTENTS IN CHAPTER HEADS" section on line 52. Edit it to the following:

Code: Select all

Code, edit and compile here:
% Section text styling
\titlecontents{lsection}[1em] % Indendating
{\footnotesize\sffamily} % Font settings
{\contentslabel[\thecontentslabel]{2em}}
{}
{}
% Subsection text styling
\titlecontents{lsubsection}[1.5em] % Indentation
{\normalfont\footnotesize\sffamily} % Font settings
{}
{}
{}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
You might want to play around with the spacing to suit your needs but I think that looks quite good.

b, c and d) The code that controls the box can be found under the "CHAPTER HEADINGS" of structure.tex on line 267. You can remove it entirely by commenting out the 3 lines under "%Commenting the 3 lines below removes the small contents box in the chapter heading". As for width, you can also change it using those three lines but I'll leave it to you to figure out how.

Good luck!

Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: Chapter Headings

Post by templateuser »

Thanks for your help, it's really appreciated!

Andrew
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: Chapter Headings

Post by templateuser »

Hello,

I was trying to remove the subsections that appear in the table of contents in the chapters heads. Is it possible?

I have a lot of subsections and it is broking the layout.

Thanks!

Cassiano
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Chapter Headings

Post by Vel »

Hi,

Find this line in structure.tex:

Code: Select all

\node[anchor=north west] at (1cm,.25cm) {\parbox[t][8cm][t]{6.5cm}{\huge\bfseries\flushleft \printcontents{l}{1}{\setcounter{tocdepth}{2}}}};
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Change the \setcounter{tocdepth}{2} in that line to \setcounter{tocdepth}{1}.

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: Chapter Headings

Post by templateuser »

It works perfectly!

Thanks!

Cassiano
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Chapter Headings

Post by templateuser »

Is it possible to set tocdepth on 1 for some chapters and on 2 for others?

DRe
User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

Re: Chapter Headings

Post by Vel »

Hi,

I think the best way to do this would be to introduce a binary flag (true/false) at the start of structure.tex and then do an if check for the line I commented on above so if the flag is, say, true, then it will print the version with tocdepth at 2 and if it's false it will print the version with depth at 1. You can then change the value of the flag before each chapter starts.

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

Re: Chapter Headings

Post by templateuser »

Works perfectly. Thanks!

DRe
Post Reply