2

I'm using classicthesis and I'd like to change the formatting of the chapter title a little bit (f.e. size and color). I think I've found the according part in the classicthesis-style

% ********************************************************************
% layout of the chapter-, section-, subsection-, subsubsection-,
% paragraph and description-headings
% ********************************************************************             
\RequirePackage{titlesec}
% chapters
\ifthenelse{\boolean{@linedheaders}}%
{% lines above and below, number right
\titleformat{\chapter}[display]%             
    {\relax}{\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }{0pt}% change color to red
    {\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]% change size to \huge
}{% something like Bringhurst  
\titleformat{\chapter}[display]%
    {\relax}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}{0pt}%
    {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]% 
}

but when I try to change color and size of the text, nothing happens.

 \documentclass[twoside,openright,titlepage,numbers=noenddot,headinclude, footinclude=true,cleardoublepage=empty,abstractoff, BCOR=5mm,paper=a4,fontsize=11pt,ngerman,american]{scrreprt} 

\input{classicthesis-config}
\usepackage{lipsum}

\begin{document}

\pagestyle{scrheadings}
\part{Introduction}
\chapter{First chapter}
\section{First section}
\lipsum[1-18]
\end{document}
4
  • KOMA classes such as scrreprt and titlesec do not cooperate very well. Try to comment out \pagestyle{scrheadings}
    – user31729
    Jul 3, 2014 at 10:56
  • This doesn't work and in addition I loose my headers.
    – djanna
    Jul 3, 2014 at 11:16
  • By title you mean the page containing Part I INTRODUCTION or the header of the pages with new chapters? What you have added in your question is about chapters while the text is about the title format.
    – Pouya
    Jul 3, 2014 at 14:32
  • I'm sorry for the misunderstanding. I'd like to change the format of the chapter title. So "First chapter" shall be written in a different color and size (f.e. green and huge). The style of the chapter number and the line and everything else shall remain unchanged. Maybe I chose a wrong part from the file... that would explain, why changes didn't led to the expected results.
    – djanna
    Jul 3, 2014 at 17:24

1 Answer 1

5

The following example code shows where to insert the modifications required (the relevant lines of code are marked with % change color and size here). I used a shade of green and \huge, but of course you can use the attributes that best suit your needs:

 \documentclass[
   twoside,
   openright,
   titlepage,
   numbers=noenddot,
   headinclude, 
   footinclude=true,
   cleardoublepage=empty,
   abstractoff, 
   BCOR=5mm,
   paper=a4,
   fontsize=11pt,
   ngerman,
   american
   ]{scrreprt} 
\input{classicthesis-config}
\usepackage{lipsum}

\makeatletter
\ifthenelse{\boolean{@linedheaders}}%
    {% lines above and below, number right
    \titleformat{\chapter}[display]%             
        {\relax}
        {\raggedleft{\color{halfgray}\chapterNumber\thechapter} \\ }
        {0pt}%
        {\color{green!70!black}\huge\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}% change color and size here 
        [\normalcolor\normalsize\vspace*{.8\baselineskip}\titlerule]%
    }
    {% something like Bringhurst  
    \titleformat{\chapter}[display]%
        {\relax}
        {\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{halfgray}\chapterNumber\thechapter}}
        {0pt}%
        {\color{green!70!black}\huge\raggedright\spacedallcaps}% change color and size here
        [\normalcolor\normalsize\vspace*{.8\baselineskip}\titlerule]% 
    }
\makeatother    
\begin{document}

\pagestyle{scrheadings}
\part{Introduction}
\chapter{First chapter}
\section{First section}
\lipsum[1-18]

\end{document}

The result:

enter image description here

Do not make the changes in the original .sty files (this is never recommended); do them in your .tex file surrounded with \makeatletter, \makeatother, as in my example code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .