1

Problem Description

I am using the Sonny style from the fncychap package in a document I am writing. I like it, but if I use just that package I obtain non-bold chapter titles and bold section (and subsection, and subsubsection...) titles which is kind of unpleasant:enter image description here I would like to have the section titles and so on in non bold font as well. How can I achieve this?

MWE:

\documentclass[a4paper,10pt,twoside, DIV=9]{scrbook}
\usepackage[dvipsnames]{xcolor}   
\usepackage{tgadventor}     
\usepackage[sc]{mathpazo} 
\linespread{1.05}   
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[english]{varioref}
\usepackage[Sonny]{fncychap}
3
  • 1
    It would be nice if u post a MWE.
    – itc
    Aug 16, 2022 at 17:59
  • 1
    I use the book class with \usepackage[Sonny]{fncychap} and don't make other changes, I do get bold section and subsection titles, but they're not sans serif like in your screenshot. You're either using a different document class that does that, or loading other packages that affect titles, etc. We need to know what those are, or else our "solutions" may not work. So, yes, please post a minimal working example.
    – frabjous
    Aug 16, 2022 at 18:31
  • Done, @frabjous I think this indeed depends on the fact that I am using scrbook instead of book. Aug 16, 2022 at 18:34

1 Answer 1

1

You need to add three lines to your preamble: the first to have a normal font in the section title and the last two to avoid the scrbook error (fncychap using the old \sf command).

c

\documentclass[a4paper,10pt,twoside, DIV=9]{scrbook}

\usepackage[dvipsnames]{xcolor}   
\usepackage{tgadventor}     
\usepackage[sc]{mathpazo} 
\linespread{1.05}   
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[english]{varioref}
\usepackage[Sonny]{fncychap}

\usepackage{lipsum}

%% **************************************** added <<<<<<<<<<<<

    \addtokomafont{disposition}{\normalfont\sffamily} % avoid bold face
    \ChNameVar{\Large\sffamily} % avoid scrbook Error
    \ChTitleVar{\Large\sffamily}% avoid scrbook Error

%%**********************************************

\begin{document}

    \chapter{Measure theory}
    \lipsum[1]
    
    \section{$\sigma$--algebras and the like}   
    \lipsum[1]
\end{document}
4
  • Thank you! But, sorry, maybe I wasn't clear. I would like the titles of (sub-, subsub- and) sections to be still sans serif Aug 16, 2022 at 20:25
  • @Federico R. Please see the updated answer. Aug 16, 2022 at 20:28
  • 1
    \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} is another way of solving the error regarding the old \sf command.
    – frabjous
    Aug 16, 2022 at 20:30
  • @ frabjous Thank you, The OP doesn't mention the error at all. :) Aug 16, 2022 at 20:34

You must log in to answer this question.

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