3

I am using the scrartcl class. To make an appendix with tables and figures I am using the command \appendix. After it, I simply continue using \section to make sections.

I noticed that if I use \appendix, then a period is added after the number of the section, say "A.1. Sample section", which is good according to the Koma Script manual. On the other hand, this dot is added also to the preceding sections, i.e. those before \appendix was called. Indeed I get something like "1. Introduction" which I don't want.

For the sake of clarity, there is no dot after the section number if \appendix is not at all called.

1 Answer 1

3

There is an KOMA-Script option numbers. Default is numbers=auto. That means there will be no period at the end of the numbers if only arabic numbers are used. But if there are roman numbers or letters in the numbering scheme there will be a dot at the end of every number.

If you decide there should be no period at the end of the numbers use

numbers=noendperiod

Note that this option can be set only in the preamble for the whole document.

\documentclass[
  numbers=noendperiod
]{scrartcl}
\usepackage{blindtext}
\begin{document}
\blinddocument
\appendix
\blinddocument
\end{document}

If you really want the period only after the section numbers in the appendix you have to redefine \sectionformat, \sectionmarkformat and \addsectiontocentry at the beginning of the appendix:

\documentclass[
   numbers=noendperiod
]{scrartcl}%

\usepackage{etoolbox}
\appto{\appendix}{%
  \renewcommand\sectionformat{\thesection.\enskip}%
  \renewcommand\sectionmarkformat{\thesection.\enskip}%
  \renewcommand\addsectiontocentry[2]{%
     \ifstr{#1}{}{%
       \addtocentrydefault{section}{#1}{#2}%
     }{%
       \addtocentrydefault{section}{\protect\def\protect\autodot{.}#1}{#2}%
     }%
  }%
}

\usepackage{blindtext}% for dummy text
\begin{document}
\tableofcontents
\blinddocument
\appendix
\blinddocument
\end{document}

enter image description here

enter image description here

2
  • Hi esdd, many thanks! What about having the dot still after the letter, for instance A. Appendix, but not in the rest of the document?
    – Pietro
    Nov 25, 2015 at 20:48
  • @Pietro It is possible but unusual - see the Image with the table of contents in my edited answer.
    – esdd
    Nov 25, 2015 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .