3

I want to have my chapter and section in full small caps without any fullcaps. Is it possible to do that within titlesec environment?

I tried dabbling a bit and so far I got something like this (but still have full caps in it).

\documentclass{book}    

\usepackage{titlesec}
        \titleformat{\chapter}[display]
            {\normalfont\center\scshape}{{\chaptertitlename}\thechapter}{0pt}{}
                \titlespacing*{\chapter} {0pt}{-50pt}{24pt}
        \newcommand{\secformat}[1]{\MakeTextLowercase{\so{#1}}}
        \titleformat{\section}
            {\normalfont\scshape}{\thesection}{1em}{}
        \titleformat{\subsection}
            {\normalfont\itshape}{\thesubsection}{1em}{}

\begin{document}
\chapter{Lorem Ipsum}

\section{lOr Em ipSum}

\subsection{Lorem Ipsum}
\end{document}

2 Answers 2

2

I'd avoid soul for this and prefer microtype:

\documentclass{book}    
\usepackage{microtype}
\usepackage{titlesec}
\usepackage{textcase}

\titleformat{\chapter}[display]
  {\normalfont\scshape\filcenter}
  {\secformat{\chaptertitlename} \thechapter}
  {0pt}
  {\secformat}
\titlespacing*{\chapter}{0pt}{-50pt}{24pt}

\titleformat{\section}
  {\normalfont\scshape}
  {\thesection}
  {1em}
  {\secformat}

\titleformat{\subsection}
  {\normalfont}
  {\thesubsection}
  {1em}
  {\itshape}

\DeclareRobustCommand{\secformat}[1]{%
  \textls{\MakeTextLowercase{#1}}%
}


\begin{document}
\chapter{Lorem Ipsum}

\section{lOr Em ipSum}

\subsection{Lorem Ipsum}
\end{document}

enter image description here

1
  • It works perfectly and more tidy than I have, thanks a lot. I'm still in the process of learning. In this case, mind you explain what \DeclareRobustCommand do in this syntax? I tried to find out myself but I can't seem figuring heads and tails of it.
    – sevenorbs
    Dec 2, 2017 at 2:46
0

Here's a solution that uses the sectsty package rather than the titlesec package.

\usepackage{sectsty}
\chapterfont{\centering\normalfont\scshape\MakeLowercase}
\sectionfont{\normalfont\scshape\MakeLowercase}
\subsectionfont{\normalfont\itshape\MakeLowercase} % optional
1
  • It seems more compact than egreg has but I don't feel I need to learn to use another package for now. Anyway thanks.
    – sevenorbs
    Dec 2, 2017 at 2:28

You must log in to answer this question.

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