3

I am using this format for my section and subsection headings (it is centered and numbers have dots):

\documentclass[12pt]{article}
\usepackage[center]{titlesec}

\titlelabel{\thetitle.\quad} %dots after title number

But I cannot unbold it by using most of the unbold commands because centering changes in most of them. Is there way to unbold the section and subsection headings with this format?

Werner
  • 603,163

2 Answers2

2

If you do not want to use the \titleformat command, load the package with

\usepackage[center,md]{titlesec}
Bernard
  • 271,350
1

The easiest way is with sectsty and the “traditional” way for adding a period.

\documentclass{article}
\usepackage{sectsty}

\usepackage{lipsum} % just for the example

% titles are medium weight and centered
\allsectionsfont{\mdseries\centering}

% we want a period after the section number
\makeatletter
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\quad}
\makeatother

\begin{document}
\section{A section}
\lipsum[2]
\subsection{A subsection}
\lipsum[3]
\end{document}

enter image description here

egreg
  • 1,121,712