2

I borrowed this code from Clean Thesis template with a small modification in color selection.

\documentclass[b5paper,11pt]{scrbook}
\usepackage{lipsum}
\usepackage{mathpazo}
\usepackage{xcolor}

\renewcommand*\chapterheadstartvskip{\vspace*{-8.75em}}
\renewcommand*\chapterheadendvskip{\vspace*{2.5\baselineskip}}
\renewcommand*{\chapterformat}{%
    \ctchapternumber{\thechapter}%
}
\renewcommand{\chapterlinesformat}[3]{%
    \ctchaptertitle{#3}%
    #2%
}

\newcommand{\ctchapternumber}[1]{%
    \usekomafont{chapter}%
    \begin{minipage}[t]{0.3\textwidth}%
        \raggedleft{%
            {\color{red!50!black}\rule[-5pt]{2pt}{5cm}}%
            \quad%
            {\color{red!50!black}\fontsize{60}{60}\selectfont#1}%
        }%
    \end{minipage}%
}
\newcommand{\ctchaptertitle}[1]{%
    \usekomafont{chapter}%
    \begin{minipage}[t]{0.7\textwidth}%
        \vspace*{5.85em}%
        \raggedright%
        #1%
    \end{minipage}%
}

\begin{document}
    \chapter{Introduction}
    \lipsum[1]
\end{document}

This is the result I get.

enter image description here

As you can see, I already used font size 60 for chapter number but It doesn't get any bigger. It seems \fontsize{60}{60} has no effect on the chapter number font size. How do fix this?

1
  • There is a fontfeature called scale ... you can \addfontfeatures for some fonts.... Not sure if this is what you are looking for. Check the fontspec package for the syntax you need. – elika kohen Oct 27 '19 at 4:50
1

Your code produces the warning:

LaTeX Font Warning: Font shape `OT1/cmss/bx/n' in size <60> not available
(Font)              size <24.88> substituted on input line 36.

So you have to use a scalable font like lmodern.

Additional remark: Do not redefine \chapterstartvskip and \chapterendvskip, use \RedeclareSectionCommand with option afterindent=false instead.

Example:

\documentclass[b5paper,11pt]{scrbook}
\usepackage{lipsum}
\usepackage{mathpazo}
\usepackage{xcolor}
\usepackage{lmodern}% added

\RedeclareSectionCommand[
  afterindent=false,
  beforeskip=-8.75em,
  afterskip=2.5\baselineskip
]{chapter}

\renewcommand*{\chapterformat}{%
    \ctchapternumber{\thechapter}%
}
\renewcommand{\chapterlinesformat}[3]{%
    \ctchaptertitle{#3}%
    #2%
}

\newcommand{\ctchapternumber}[1]{%
    \usekomafont{chapter}%
    \begin{minipage}[t]{0.3\textwidth}%
        \raggedleft{%
            {\color{red!50!black}\rule[-5pt]{2pt}{5cm}}%
            \quad%
            {\color{red!50!black}\fontsize{60}{60}\selectfont#1}%
        }%
    \end{minipage}%
}
\newcommand{\ctchaptertitle}[1]{%
    \usekomafont{chapter}%
    \begin{minipage}[t]{0.7\textwidth}%
        \vspace*{5.85em}%
        \raggedright%
        #1%
    \end{minipage}%
}

\begin{document}
    \chapter{Introduction}
    \lipsum[1]
\end{document}



\documentclass{scrbook}
\usepackage{blindtext}
\usepackage{scrlayer-scrpage}
\ifoot{Test}
\setkomafont{pagenumber}{}
\addtokomafont{pagehead}{\Huge}
\begin{document}
\Blinddocument
\end{document}

\documentclass{scrartcl}
%\usepackage{datatool}
\usepackage[%
    main=ngerman,
    %english,
    british,
    american,
    french,
]{babel}
\begin{document}
test
\end{document}

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.