Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My question relates to remove boldface from chapter titles, section and subsection names on removing boldface from chapter titles, section and subsection names, the difference being that I need to remove boldface from chapter titles, section and subsection names from an article class document.

share|improve this question
2  
Or the simpler sectsty package that allows to say \allsectionsfont{\normalfont} –  egreg Feb 5 '13 at 16:50

2 Answers 2

up vote 5 down vote accepted

Here are two options:

  1. sectsty:

    \documentclass{article}
    \usepackage{sectsty}% http://ctan.org/pkg/sectsty
    \allsectionsfont{\normalfont}
    \begin{document}
    \section{A section}
    \subsection{A subsection}
    \subsubsection{A subsubsection}
    \end{document}
    

    This provides a clean and understandable input. Another reference using this approach is available in Is it possible to change text color for all headings?

  2. A patch of the section header printing macro \@sect using etoolbox:

    \documentclass{article}
    \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
    \makeatletter
    \patchcmd{\@sect}% <cmd>
      {#6}% <search>
      {#6\normalfont}% <replace>
      {}{}% <success><failure>
    \makeatother
    \begin{document}
    \section{A section}
    \subsection{A subsection}
    \subsubsection{A subsubsection}
    \end{document}
    

    This is a little obscure. The sixth argument to \@sect stems from the same argument to \@startsection - the default section-producing macro in latex.ltx. For example, here's an extract for \section, which provides as argument six \normalfont\Large\bfseries:

    \newcommand\section{\@startsection {section}{1}{\z@}%
                                       {-3.5ex \@plus -1ex \@minus -.2ex}%
                                       {2.3ex \@plus.2ex}%
                                       {\normalfont\Large\bfseries}}
    

    The patch inserts \normalfont after every sixth argument, regardless of the section being produced.

Both options produce the output:

share|improve this answer

Here's a solution using the titlesec package

screenshot

A complete MWE follows. The code is commented which should explain the details- let me know if you need further details.

\documentclass{article}

\usepackage{titlesec}   % customizing sections
\usepackage{lipsum}

% custom section
\titleformat{\section}
{\normalfont\Large}% format applied to label+text
{\thesection}% label
{5pt}% horizontal separation between label and title body
{}% before the title body
[]% after the title body

% custom subsection
\titleformat{\subsection}
{\normalfont\large}% format applied to label+text
{\thesubsection}% label
{5pt}% horizontal separation between label and title body
{}% before the title body
[]% after the title body

\begin{document}

\section{My section}
\lipsum[1]
\subsection{My subsection}
\lipsum[2]
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.