5

Is there an easier way than redefining all commands to have every counter followed by a fullstop?

Chapter counter, theorem counter, figure counter etc. should always look like

1.3.4.

and not like the default

1.3.4


I use the following amsthm-theoremstyle:

\newtheoremstyle{break}
  {\topsep}{\topsep}%
  {\itshape}{}%
  {\bfseries}{}%
  {\newline}{}%
\theoremstyle{break}
6
  • What document class are you using?
    – egreg
    Dec 10, 2011 at 14:14
  • 2
    If you use one of the KOMA-Script document classes, more than half the job will be done with the numbers=enddot class option. Dec 10, 2011 at 14:16
  • I use scrarcl. So numbers=enddot did a good job but still a few counters don't end with a dot e.g. theorem counters etc.
    – Meinzlein
    Dec 10, 2011 at 14:30
  • What package do you use to define your theorem-like structures? Dec 10, 2011 at 14:31
  • 1
    But then the counter for theorems will receive also a full stop (see my answer). If this is not the case, please add to your question a minimal version of your code. Dec 10, 2011 at 14:39

1 Answer 1

6

Using one of the KOMA_Script document classes, the numbers=enddot class option will use a full stop for the counters for sectional units, figures, tables. If you load the amsthm package, counters for theorem-like structure will also have a full stop:

\documentclass[numbers=enddot]{scrartcl}
\usepackage{amsthm}

\newtheorem{theo}{Theorem}[section]

\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\begin{theo}
test
\end{theo}
\end{document}

enter image description here

Since you are using a custom theorem style, use the sixth mandatory argument of \newtheoremstyle to add the necessary punctuation:

\usepackage{amsthm}

\newtheoremstyle{break}
  {\topsep}{\topsep}%
  {\itshape}{}%
  {\bfseries}{.}%
  {\newline}{}%
\theoremstyle{break}
\newtheorem{theo}{Theorem}[section]

To satisfy the requirement mentioned in a comment for the end dot position when the optional argument is used, some additional work will have to be done using the last mandatory argument for \newtheoremstyle:

\documentclass[numbers=enddot]{scrartcl}
\usepackage{amsthm}

\newtheoremstyle{break}
  {\topsep}{\topsep}%
  {\itshape}{}%
  {\bfseries}{}%
  {\newline}{\thmname{#1}\thmnumber{ #2.}\thmnote{ \normalfont(#3)}}%
\theoremstyle{break}
\newtheorem{theo}{Theorem}[section]
\newtheoremstyle{breaknodot}
  {\topsep}{\topsep}%
  {\itshape}{}%
  {\bfseries}{}%
  {\newline}{\thmname{#1}\thmnote{ \normalfont(#3)}}%
\theoremstyle{breaknodot}
\newtheorem*{theo*}{Theorem}

\begin{document}
\section{Test Section}
\subsection{Test Subsection}
\subsubsection{Test Subsubsection}
\begin{theo}[label]
test
\end{theo}
\begin{theo}
test
\end{theo}
\begin{theo*}
test
\end{theo*}

\end{document}

enter image description here

9
  • Sadly this doesn't work for me. Then I think it depends on the theoremstyle. See above for the style I use.
    – Meinzlein
    Dec 10, 2011 at 14:41
  • @Meinzlein: see my updated answer. Dec 10, 2011 at 14:45
  • Thanks for you're update. Now I'm quite there. The only thing is now, that Theorems without a number (begin{theo*}) will have an enddot as well, I only want them to have an enddot if theres a counter.
    – Meinzlein
    Dec 10, 2011 at 14:48
  • I don't know how you defined the theo* environment. Anyway, for unnumbered theorems, you can add a new style: \newtheoremstyle{breaknodot} {\topsep}{\topsep}% {\itshape}{}% {\bfseries}{}% {\newline}{}% \theoremstyle{breaknodot} \newtheorem*{theor}{Theorem} Dec 10, 2011 at 14:54
  • But then I would need to change the style for every single Theorem depending on wether it's numbered or not. I just defined theo as \newtheorem*{\theo*}{Theorem}.
    – Meinzlein
    Dec 10, 2011 at 14:58

You must log in to answer this question.

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