7

I have customized the default chapter style like below. The chapter number font is Garamond number font, whereas the main text is Times font.

enter image description here

The codes:

\documentclass[a4paper, 12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{newtxtext, newtxmath}
\usepackage{color}
\definecolor{RoyalRed}{RGB}{157,16, 45}
\renewcommand{\sfdefault}{mdugm} %Garamond
\usepackage[ ]{titlesec}  %
\titleformat{\chapter}[display]
  { \normalsize \huge  \color{black}}
  {\flushright \normalsize \color{RoyalRed} \MakeUppercase { \chaptertitlename } \hspace{1 ex} { \fontsize{60}{60}\selectfont \color{RoyalRed} \sffamily  \thechapter }} {10 pt}{\huge}  
  \begin{document}

\chapter{Introduction}
...
bla bla
...
\chapter{State of the art}
...
bla bla
...
\end{document}

So how to set the chapter title state of art as bold font?

KOF
  • 5,019
  • 1
    There is no "Garamond sans" font. Redefining \sfdefault to mdugm has very little sense. And it has little sense having Times as main font and Garamond for the chapter numbers as well. – egreg Jan 21 '13 at 16:21
  • Well, I prefer Garamond number fonts to The Times' :) – KOF Jan 21 '13 at 16:29

1 Answers1

13

Use {\bfseries\huge} at the end:

\titleformat{\chapter}[display]
  { \normalsize \huge  \color{black}}
  {\flushright \normalsize \color{RoyalRed} \MakeUppercase { \chaptertitlename \hspace{1 ex} }  { \fontsize{60}{60}\selectfont \color{RoyalRed} \sffamily  \thechapter }} {10 pt}{\bfseries\huge} 

Code:

\documentclass[a4paper, 12pt]{book}
\usepackage[T1]{fontenc}
\usepackage{newtxtext, newtxmath}
\usepackage{color}
\definecolor{RoyalRed}{RGB}{157,16, 45}
\usepackage{titlesec}
\titleformat{\chapter}[display]
  {\normalsize \huge  \color{black}}%
  {\flushright\normalsize \color{RoyalRed}%
   \MakeUppercase{\chaptertitlename}\hspace{1ex}%
   {\fontfamily{mdugm}\fontsize{60}{60}\selectfont\thechapter}}%
  {10 pt}%
  {\bfseries\huge}%

\begin{document}

\chapter{Introduction}
...
bla bla
...
\chapter{State of the art}
...
bla bla
...
\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks. so the last option defines the chapter title font and size. – KOF Jan 21 '13 at 15:49
  • There are many spurious spaces in your code; also, why \hspace{1ex} in the argument of \MakeUppercase? I don't see why redefining \sfdefault; it suffices to say \fontfamily{mdugm} before \fontsize{60}{60}. Redefining \sfdefault to point to a serif font is quite strange, isn't it? – egreg Jan 21 '13 at 15:57
  • @egreg Yes, I was too focused to the problem and forgot to see those. Thank you. Hope now there aren't any more spurious spaces. –  Jan 21 '13 at 16:15
  • @egreg the reason why I set \hspace{1ex} is that CHAPTER looks too small when it's close to the Large Number. – KOF Jan 21 '13 at 16:44
  • @KOF There's nothing bad in using \hspace for separating the two parts. Just try various values until you're satisfied; for example \hspace{2em} (not ex, which makes little sense for horizontal lengths). Just don't put it in the argument to \MakeUppercase. Its place is outside it. – egreg Jan 21 '13 at 16:46