2

I would like to change the size of the section labeling in my doc. While I can alter the font size of the title (setting it to \normalsize{}), the corresponding section number's size is not affected. Is there a way I can get them both sized evenly?

\documentclass{book}

\usepackage{lipsum}% just to generate text for the example
\usepackage{titleps}

\newpagestyle{main}[\small]{
   % define header
   \sethead[\textbf{\thepage}][\textbf{\chaptertitle}][\textbf{CHAP. \thechapter}] % even left, center, and right
       {\textbf{SEC. \thesection}}{\textbf{\sectiontitle}}{\textbf{\thepage}}} % odd left, center, and right
\pagestyle{main}

\begin{document}
   \chapter[Some Fundamental Concepts]{\textit{\LARGE{Some Fundamental Concepts}}}
   \section[Sets]{\normalsize{SETS}}
   \lipsum[1-6]
   \section[Mappings]{\normalsize{MAPPINGS}}
   \lipsum[1-6]
\end{document}
Will Tech
  • 303

2 Answers2

2

You should avoid setting the font of a sectional units within the argument. Not only does that force you to also supply an optional argument to circumvent these font settings to make it's way into the ToC, you run the risk that you're not being consistent in your formatting.

While there are many options available for setting the sectional unit font, here's one using sectsty:

enter image description here

\documentclass{book}

\usepackage{lipsum,sectsty}

\chapterfont{\itshape\LARGE}
\sectionfont{\normalsize\MakeUppercase}

\begin{document}

\chapter{Some Fundamental Concepts}
\section{Sets}
\lipsum[1-6]
\section{Mappings}
\lipsum[1-6]

\end{document}

\chapterfont and \sectionfont apply to all components of the respective sectional unit - number and title. Also note how the last macro \MakeUppercase passed using \sectionfont actually takes an argument.

Werner
  • 603,163
1

Since you use titleps, replace loading it with the option pagestyles of titlesec, and use its ‘easy’ interface. You won't even have to use the optional argument of \section:

\documentclass{book}

\usepackage{lipsum}% just to generate text for the example
\usepackage[pagestyles]{titlesec}
\newpagestyle{main}[\small]{
   % define header
   \sethead[\textbf{\thepage}][\textbf{\chaptertitle}][\textbf{CHAP. \thechapter}] % even left, center, and right
       {\textbf{SEC. \thesection}}{\textbf{\sectiontitle}}{\textbf{\thepage}}} % odd left, center, and right
\pagestyle{main}
\titleformat*{\section}{\normalsize\bfseries\MakeUppercase}

\begin{document}

   \chapter[Some Fundamental Concepts]{\textit{\LARGE{Some Fundamental Concepts}}}
   \section{Sets}
   \lipsum[1-6]
   \section{Mappings}
   \lipsum[1-6]

\end{document} 

enter image description here

enter image description here

Bernard
  • 271,350