I know, that it is possible to add dot after the chapter / section / subsection number. But if I use
\renewcommand{\thechapter}{\arabic{chapter}.}
\renewcommand{\thesection}{\thechapter\arabic{section}.}
\renewcommand{\thesubsection}{\thesection\arabic{subsection}.}
(as in this solution: How to add a dot after the section number?), then I have too many dots in the case of number of figure / theorem etc. For example, if I apply
\documentclass[10pt]{book}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[chapter]{algorithm}
\renewcommand{\thechapter}{\arabic{chapter}.}
\renewcommand{\thesection}{\thechapter\arabic{section}.}
\renewcommand{\thesubsection}{\thesection\arabic{subsection}.}
\newtheorem{defin}{Def.}[chapter]
\newtheorem{tw}[defin]{Th.}
\begin{document}
\chapter{New chapter}
\begin{defin}
Some definition
\end{defin}
\begin{algorithm}
\caption{Some algorithm}
\end{algorithm}
\begin{figure}[hptb]
\caption{Some caption}
\end{figure}
\section{New section}
\begin{defin}
Some definition
\end{defin}
\end{document}
How could I remove the unnecessary dots in 1..1 and similar numbers? Thank you in advance for your answer. Edit: I have realized, that my question can be put in other way. Is this possible to add dots, but only: 1. in the case of titles of chapters / sections etc. 2. and in the case of table of contents, but not for other references?


\renewcommand{\thealgorithm}{\thechapter.\arabic{algorithm}}. ā barbara beeton Dec 16 '19 at 16:48