Hello everyone. I am using a ready master thesis template that I think looks nice in general, however I have a one problem that drives me crazy. Every time when I start a new section, it never begins with a capital letter. Something like this:
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
% ********************************************************************
% layout of the chapter-, section-, subsection-, subsubsection-,
% paragraph and description-headings
% ********************************************************************
\RequirePackage{titlesec}
% parts
\ifthenelse{\boolean{@parts}}%
{%
% \newcommand{\ctparttext}{\relax}
\newcommand{\ct@parttext}{\relax} % Thanks to Ivo
\newcommand{\ctparttext}[1]{\renewcommand{\ct@parttext}{#1 \relax}}
\titleformat{\part}[display]
{\normalfont\centering\large}%
{\thispagestyle{empty}\partname~\MakeTextUppercase{\thepart}}{1em}%
{\color{Maroon}\spacedallcaps}[\bigskip\normalfont\normalsize\color{Black}\begin{quote}\ct@parttext\end{quote}]
}{\relax}
% chapters
\ifthenelse{\boolean{@linedheaders}}%
{% lines above and below, number right
\titleformat{\chapter}[display]%
{\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}%
{\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}{% something like Bringhurst
\titleformat{\chapter}[display]%
{\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}{0pt}%
{\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%
}
% sections \FloatBarrier
\titleformat{\section}
{\relax}{\textsc{\MakeTextLowercase{\thesection}}}{1em}{\spacedlowsmallcaps}
% subsections
\titleformat{\subsection}
{\relax}{\textsc{\MakeTextLowercase{\thesubsection}}}{1em}{\normalsize\itshape}
% subsubsections
\titleformat{\subsubsection}
{\relax}{\textsc{\MakeTextLowercase{\thesubsubsection}}}{1em}{\normalsize\itshape}
% paragraphs
\titleformat{\paragraph}[runin]
{\normalfont\normalsize}{\theparagraph}{0pt}{\spacedlowsmallcaps}
% descriptionlabels
\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\spacedlowsmallcaps{#1}} % spacedlowsmallcaps textit textsc
% spacing
\ifthenelse{\boolean{@nochapters}}%
{\relax}%
{\titlespacing*{\chapter}{0pt}{1\baselineskip}{1.2\baselineskip}}
\titlespacing*{\section}{0pt}{1.25\baselineskip}{1\baselineskip}
\titlespacing*{\subsection}{0pt}{1.25\baselineskip}{1\baselineskip}
\titlespacing*{\paragraph}{0pt}{1\baselineskip}{1\baselineskip}
Redefine as you like, such as removing \spacedlowsmallcaps and \textsc, where you don't desire it. Use \bfseries there instead, so you don't need \textbf in the text later.
Thank you Stefan, it helped. I just have 2 more issues. I would really appreciate if you could give me some hints on that.
1) In contents, sections begin with capital letter but chapters don't. I tried to fix it the same way as you did but it did not seem to work anymore and chapter appear bold which I don't want in the contents table. It looks like that:
2) I have noticed that some headers appear bold as well and never start with capital letters, others don't appear bold, don't begin with a capital letter
Is there any way to fix it?
Many thanks
Namnloest.jpg (5.36 KiB) Viewed 10458 times
header.jpg (4.41 KiB) Viewed 10525 times
content.jpg (21.41 KiB) Viewed 10458 times
Last edited by cgnieder on Fri Mar 14, 2014 10:39 am, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p