# Theorem and chapter with Dot at the end

I'd like to have dot at end of the number of chapter and at the end of the number of theorem.

I tried to use something like that:

\documentclass{report}
\usepackage{amsthm}

\newtheorem{definition}{Definicja}[chapter]

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

\begin{document}

%EDIT
\tableofcontents
%END EDIT

\chapter{Chapter}
\section{Section}
\begin{definition}
Some content
\end{definition}
\end{document}


but theorem looks like this (two dots):

How to remove this dot in theorem after number of chapter and add dot at end of the theorem. It should be: Definicja 2.1.

• Welcome to TeX SX! Don't do it this way. Any reference to Chapter 2 will appear as Chapter 2.. For a standard document class, you might use \usepackage{titlesec} \titlelabel{\thetitle.\quad} instead. – Bernard Jul 19 '16 at 11:12
• @Bernard I tried your solution and dot at end of the number of the chapter did not appear. – Kedrzu Jul 20 '16 at 5:33
• @Zarko I've just changed post according to your suggestion – Kedrzu Jul 20 '16 at 5:34

To add a dot after the chapter number in the title of the chapter only, you need to patch \@makechapterhead:

\usepackage{etoolbox}
\makeatletter
{\thechapter}% <search>
{\thechapter.}% <replace>
{}{}% <success><failure>
\makeatother


To add a dot after the (any) sectional number in its title only, you can update \@seccntformat:

\makeatletter
\makeatother


The default display for a theorem defined under amsthm is to end its number with a dot.

Here is a complete minimal example highlighting the above:

\documentclass{report}

\usepackage{amsthm}

\newtheorem{definition}{Definicja}[chapter]

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

\usepackage{etoolbox}
\makeatletter
{\thechapter}% <search>
{\thechapter.}% <replace>
{}{}% <success><failure>
\makeatother

\begin{document}

\setcounter{chapter}{6}% Just for this example
\chapter{Chapter}

\setcounter{section}{7}% Just for this example
\section{Section}

\setcounter{definition}{8}% Just for this example
\begin{definition}
Some content
\end{definition}

\end{document}

• Thanks, generally works, but I have one more issue, there is no dots in table of content after number of chapter/section/subsection. – Kedrzu Jul 20 '16 at 6:18
• @Kedrzu: If you're using etoolbox as in my answer, you can also add \patchcmd{\numberline}{\hfil}{.\hfil}{}{} to the preamble. If you're not using etoolbox, you can add \makeatletter \renewcommand{\numberline}[1]{\hb@xt@\@tempdima{#1.\hfil}} \makeatother. Similar changes can be applied using tocloft, or by writing the . when writing the ToC-entry... – Werner Jul 20 '16 at 6:25