2

I have a very basic question that is basically a follow-up of this old one.

How can I have small caps that are boldface in the title of a chapter or a section?

Below a MWE.

\RequirePackage{fix-cm}
\documentclass[10pt]{book}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{lmodern} % To switch to Latin Modern
\rmfamily % To load Latin Modern Roman and enable the following NFSS declarations.
% Declare that Latin Modern Roman (lmr) should take
% its bold (b) and bold extended (bx) weight, and small capital (sc) shape, 
% from the corresponding Computer Modern Roman (cmr) font, for the T1 font encoding.
\DeclareFontShape{T1}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{}
\DeclareFontShape{T1}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{}


%
\usepackage{titlesec}


\makeatletter
\def\@makechapterhead#1{%
  \vspace*{-21\p@}%
  {\parindent \z@ \raggedright \normalfont
    \interlinepenalty\@M
    \huge\bfseries\sc  \thechapter.\quad #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother


\usepackage{tocloft}
\renewcommand{\cfttoctitlefont}{\huge\bfseries\sc}


\title{Title}
\author{Author}

\begin{document}
\maketitle

\tableofcontents

\chapter{Chapter}
\section{Section}

\end{document}

In particular, I am currently using the answer provided by user @Blaisorblade from the link above, along with titlesec, but nothing really happens: as it can be noted, the title of chapter is in small caps, but is not bold face and the same applies to the TOC entry.

Any feedback will be most welcome!

4
  • Please note that questions on tex.se should be self-sustained and not require readers to follow links, then search for the answer you might mean and construct a test document themselves. Commented Nov 29, 2023 at 11:29
  • 1
    If you want all titles to be in small caps, the easiest way is to do \usepackage{sectsty} and \allsectionsfont{\scshape}. This answer is given in this post. Commented Nov 29, 2023 at 11:40
  • @samcarter_is_at_topanswers.xyz thanks for the point: MWE provided.
    – Kolmin
    Commented Nov 29, 2023 at 11:45
  • @AntonVrdoljak thanks for the feedback. However, my problem is not with small caps, but with small caps along with bold face.
    – Kolmin
    Commented Nov 29, 2023 at 11:46

1 Answer 1

4

As already told in Will's answer to the question vou've linked, you should not use \sc, because this deprecated font command does also deactivate the previous \bfseries. Use \scshape instead:

\RequirePackage{fix-cm}
\documentclass[10pt]{book}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}% Note: Not needed since LaTeX 2018/04/01.
\usepackage[T1]{fontenc}

\usepackage{lmodern} % To switch to Latin Modern
\rmfamily % To load Latin Modern Roman and enable the following NFSS declarations.
% Declare that Latin Modern Roman (lmr) should take
% its bold (b) and bold extended (bx) weight, and small capital (sc) shape, 
% from the corresponding Computer Modern Roman (cmr) font, for the T1 font encoding.
\DeclareFontShape{T1}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{}
\DeclareFontShape{T1}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{}

%
\usepackage{titlesec}% Note: Loaded but currently not used.


\makeatletter
\def\@makechapterhead#1{% Note: Instead of redefining \@makechapterhead, you could use the already loaded titlesec.
  \vspace*{-21\p@}%
  {\parindent \z@ \raggedright \normalfont
    \interlinepenalty\@M
    \huge\bfseries\scshape  \thechapter.\quad #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother


\usepackage{tocloft}% Note: Instead of using tocloft, you could also redefine \@makeschapterhead similar to your redefinition of \@makechapterhead.
\renewcommand{\cfttoctitlefont}{\huge\bfseries\scshape}


\title{Title}
\author{Author}

\begin{document}
\maketitle

\tableofcontents

\chapter{Chapter}
\section{Section}

\end{document}

enter image description here

3
  • Thanks a lot: great!
    – Kolmin
    Commented Nov 29, 2023 at 13:11
  • btw, somewhat related: do you have any idea why I have no control at all over the title of the reference chapter? Neither I can move it, nor it shows like all the others.
    – Kolmin
    Commented Nov 29, 2023 at 18:17
  • 1
    @Kolmin Redefining \@makechapterhead changes only numbered chapters (\chapter{…}) but not the not numbered chapters (\chapter*). Because of this, you need tocloft in your example to also change the heading of \tableofcontents. See my comments about how to change this.
    – cabohah
    Commented Nov 30, 2023 at 7:26

You must log in to answer this question.

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