# remove boldface from chapter titles, section and subsection names

How is it possible to remove the boldface from chapter titles, section and subsection names? I have found the following code for sections, but I can't find a way for chapters and subsections.

\makeatletter
\renewcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large}}
\makeatother


-
Welcome to TeX.sx! – Torbjørn T. Dec 14 '11 at 21:45
What document class are you using? If it's one of the KOMA classes (scr...) then you can use \setkomafont{sectioning}{ instructions } to change the behavior. \normalfont in the argument would should take the bold away then. – David Dec 14 '11 at 21:45

Depending on the class you are using there are different more or less easy ways.

If you use* KOMA-Script (which is recommended especially for german texts) you can change the disposition font element:

\documentclass{scrbook}% analogus to book class

\setkomafont{disposition}{\mdseries\rmfamily}

\begin{document}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\end{document}


Otherwise the titlesec package may helps

\documentclass{book}

\usepackage[md]{titlesec}

\begin{document}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\subsubsection{Subsubsection}
\end{document}


The titlesec package would work with KOMA-Script too …

* A full working minimal working example (MWE) would have showed the class so I don’t have to guess ;-)

-
Thank you for your response.I just tried the code and it works, but I'd rather stick to the standard book class. – niels Dec 14 '11 at 21:51
@niels: See my edit. I added an example using titlesec which works with the standard classes as well. – Tobi Dec 14 '11 at 21:52
Thanks that was exactly what I needed! – niels Dec 14 '11 at 21:55
@Tobi: There are some incompatibilities between titlesec and KOMa-Script, see About KOMA-Script and titlesec incompatibility. – Speravir Dec 15 '11 at 0:03
@Speravir: Thanks, I didn’t know that. But I never had problems with this combination in the past … – Tobi Dec 15 '11 at 0:14

You could also patch the standard book document class commands using etoolbox:

\documentclass{book}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\section}{\bfseries}{\relax}{}{}% Non-bold \section
\patchcmd{\subsection}{\bfseries}{\relax}{}{}% Non-bold \subsection
\makeatother
\begin{document}
\chapter{First chapter} This is a chapter.
\section{First section} This is a section.
\subsection{First subsection} This is a subsection.
\end{document}


The reason for patching \@makechapterhead twice is because the name (Chapter) and title is separately typeset in \bfseries.

-
How does etoolbox differentiate between the two \@makechapterhead patches? – Tobi Dec 14 '11 at 22:41
@Tobi: etoolbox patches only the first equal command. – Marco Daniel Dec 14 '11 at 22:44
@Tobi: It patches the first command corresponding to the given string. Therefore, two calls with the same arguments will patch the second occurrence of the same string. This is the case with \@makechapterhead, since \bfseries is used twice - once for the chapter name (\chaptername \thechapter) and once for the chapter title. – Werner Dec 14 '11 at 22:59
@MarcoDaniel, Werner: Thanks for this explanation :-) – Tobi Dec 14 '11 at 23:24

This answer is actually a comment on Werner's answer. Although initially I accepted and used Tobi's answer, in the end I decided to use the method described in Werner's answer.

I noticed some interesting things I'd like to share. It all started when I decided to leave chapter titles (Chapter 1,2...) bold but remove boldface from chapter names (Introduction, ...).

Here is an excerpt from book.cls

\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}


The first \bfseries refers to chapter title (Chapter 1,2...) and the second to chapter name.

So:

If I simultaneously use

\patchcmd{\@makechapterhead}{\bfseries}{}{}{}


neither chapter title nor name should be bold. And indeed this is what happens.

If I use only

\patchcmd{\@makechapterhead}{\huge\bfseries }{\huge }


the chapter title shouldn't be boldface but the chapter name should be. And indeed this is what happens.

BUT

If I use

\patchcmd{\@makechapterhead}{\Huge \bfseries}{\Huge }{}{}


I expect the chapter title to be boldface and the chapter name to be non-boldface. Instead both elements are boldface!!!!

Somehow the first (refering to chapter title) \bfseries also affects the chapter name (I don't know why but I guess people that know more about latex syntax could explain).

In order to bypass this behavior, I had to limit the scope of that first \bfseries. So I used

\patchcmd{\@makechapterhead}{\huge\bfseries \@chapapp\space \thechapter}{\huge{\bfseries \@chapapp\space \thechapter}}{}{}


(note the extra pair of curly brackets inserted to enclose \bfseries \@chapapp\space \thechapter)

After this patch then \patchcmd{\@makechapterhead}{\Huge \bfseries}{\Huge }{}{}

works as expected.

-