How to add a dot for section/subsection numbering in TeX

The Bulgarian standard formatting for section/subsection numbering is as follows:
1. Section 1
1.1. Subsection 1.1.
2. Section 2
2.1. Subsection 2.1.

Notice that both section and subsection have a dot after the number. Well, I've tried \section and \subsection in TeX and the default formatting numbering is without the dots (that's an American style if I'm not mistaken, while the European standard is with dots after a section/subsection number).

How do I add a dot after a section/subsection so that it looks like it belongs to the section/subsection rather than after a whitespace after the section/subsection number?

Thanks in advance for the answers!

2 Answers

This question is answered over at tex.stackexchange.com

There are 4 ways to solve this:

  1. titlesec package:

    \usepackage{titlesec}
    \titlelabel{\thetitle.\quad}
  2. You can use the secdot package:

    \documentclass{report}
    \usepackage{secdot}
    \begin{document}
    \chapter{Chapter}
    \section{Section}
    \end{document}

    The package documentation is your friend. The following adds a dot after the subsection number(s):

    Example:

    \documentclass{article}
    \usepackage{secdot}
    \sectiondot{subsection}
    \begin{document}
    \section{A section}
    \subsection{A subsection}
    \end{document}
  3. If you want that in all places the section number appears as "1.1.", also in cross references, the question is settled quite easily:

    \renewcommand{\thechapter}{\arabic{chapter}.}
    \renewcommand{\thesection}{\thechapter\arabic{section}.}

    (in this case you would also change chapter numbers, for uniformity).

    If you want only the number in the section title to be followed by a period, then you can follow Alan's good suggestion or delve into the internals (see the FAQ entry for more information):

    \makeatletter
    \renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\quad}
    \makeatother

    This will change the format of all the sectional units also below \section. You might prefer the titlesec way to get more control on the appearance of the section headings.

  4. If you use Komascript you may use the option numbers=endperiod.

    Example:

    \documentclass[11pt,english,numbers=endperiod]{scrartcl}
    \usepackage{babel}
    \usepackage{blindtext}
    \begin{document}
    \tableofcontents
    \blinddocument
    \end{document}

Use -{} after your section or subsections or .{} after sections or subsections as follows:

\renewcommand{\thesection}{\arabic{chapter}-\arabic{section}-{}}
\renewcommand{\thesubsection}{\arabic{chapter}-\arabic{section}-\arabic{subsection}-{}}
\renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}-{}}
\renewcommand{\thetable}{\arabic{chapter}-\arabic{table}-{}}

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like