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}{<->ssubcmr/bx/sc}{} \DeclareFontShape{T1}{lmr}{bx}{sc}{<->ssubcmr/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!

Kolmin
  • 559

1 Answers1

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}{<->ssubcmr/bx/sc}{} \DeclareFontShape{T1}{lmr}{bx}{sc}{<->ssubcmr/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

cabohah
  • 11,455
  • Thanks a lot: great! – Kolmin Nov 29 '23 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 Nov 29 '23 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 Nov 30 '23 at 07:26