1

I would like to turn off bold for section-level headers in LaTeX, but keep bold for subsection-level headers. Would this be possible? The document class I'm using is article. Thanks!

A MWE would be:

\documentclass{article}
\begin{document}
\section{This should not appear bold.}
\subsection{This should appear bold.}
\end{document}

EDIT: Would it maybe even be possible to do this only for one section, so:

\documentclass{article}
\begin{document}
\section{This should not appear bold.}
\subsection{This should appear bold.}

\section{This should appear bold again.} \end{document}

Hermi
  • 234

1 Answers1

1

There must be many ways to achieve your formatting objective. A particularly easy way is to exsecute

\usepackage{sectsty}
\sectionfont{\mdseries}

in the preamble.

Observe that these instructions do not change the default relative font sizes -- \Large for section-level headers, \large for subsection-level headers, etc. To change the font size of section-level headers to, say, \large, you'd just have to add \large to the argument of \sectionfont.

enter image description here

\documentclass{article}
\usepackage{sectsty}    % https://www.ctan.org/pkg/sectsty
\sectionfont{\mdseries}

\begin{document} \section{Hello} \subsection{World} \end{document}


Addendum to address the OP's follow-up question: To limit the effect of \sectionfont{\mdseries} to just sectioning header, just issue the instruction \sectionfont{\bfseries} before the next \section directive gets executed.

Mico
  • 506,678
  • Thank you. Just curious: Would it be possible to do this only for a single section, if desired? I edited my question again. – Hermi Nov 28 '21 at 20:02
  • 1
    @Hermi: You can set it and then reset it, like this. – Werner Nov 28 '21 at 20:07
  • @Hermi - Please see the addendum I just posted. (The solution is the same as the one given in Werner's comment.) – Mico Nov 28 '21 at 20:27