Hay un doble punto entre "sección de números" y "teorema de números"

Hay un doble punto entre "sección de números" y "teorema de números"

Quiero que la numeración de las secciones sea numberchapter.numbersection.Así que escribo

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

Pero si quiero hacer un teorema, se muestra la numeración del teorema Theorem numberchapter.numbersection..numbertheorem. Hay un doble punto entre numbersectiony numbertheorem. ¿Cómo puedo hacer que muestre solo un punto?

    \documentclass[twoside,11pt]{book}
    \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
    \renewcommand{\thechapter}{\Roman{chapter}}
    \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
    \renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
    \usepackage{amsthm}
    \newtheorem{definition}{Definition}[section]
    \newtheorem{theorem}{Theorem}[section]
    \begin{document}
        \chapter{ABC}
        blablabla
        \section{ONE}
        \begin{theorem}
            dddd
        \end{theorem}
    \end{document}

EDITAR:

Según la respuesta de Egreg, si formateo la sección y la subsección, el punto no aparece. ¿Por qué puede suceder esto y cuál es la solución?

\documentclass{book}
\usepackage{amsthm,titlesec}

\titleformat{\section}
[hang]
{\bfseries}
{\bfseries\thesection}{1ex}{\bfseries}
\titlespacing{\section}{1.5pt}{0.2cm}{0.2cm}

\titleformat{\subsection}
[hang]
{\bfseries}
{\bfseries\thesubsection}{1ex}{\bfseries}
\titlespacing{\subsection}{1.5pt}{0.2cm}{0.2cm}

\renewcommand{\thechapter}{\Roman{chapter}}
\makeatletter
\renewcommand{\@seccntformat}[1]{%
    \ifcsname format#1\endcsname
    \csname format#1\endcsname
    \else
    \csname the#1\endcsname
    \fi
    \quad
}
\makeatother

\newcommand{\formatsection}{\thesection.}
\newcommand{\formatsubsection}{\thesubsection.}

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

\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]

\begin{document}
    
    \chapter{ABC}
    blablabla with \ref{sec:one} and no period.
    
    \section{ONE}\label{sec:one}
    
    \begin{theorem}
        dddd
    \end{theorem}
    
    \subsection{TWO}
    
    Just to see what happens.
    
\end{document}

ingrese la descripción de la imagen aquí

Respuesta1

Es muy probable que no desee que las referencias cruzadas a secciones y subsecciones tengan el punto final. Por lo tanto, no desea cablear el punto dentro \thesectiony dentro \thesubsection.

Con el siguiente código, el punto final se agrega mediante \@seccntformat.

\documentclass{book}
\usepackage{amsthm}

\renewcommand{\thechapter}{\Roman{chapter}}
\makeatletter
\renewcommand{\@seccntformat}[1]{%
  \ifcsname format#1\endcsname
    \csname format#1\endcsname
  \else
    \csname the#1\endcsname
  \fi
  \quad
}
\makeatother

\newcommand{\formatsection}{\thesection.}
\newcommand{\formatsubsection}{\thesubsection.}

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

\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]

\begin{document}

\chapter{ABC}
blablabla with \ref{sec:one} and no period.

\section{ONE}\label{sec:one}

\begin{theorem}
dddd
\end{theorem}

\subsection{TWO}

Just to see what happens.

\end{document}

ingrese la descripción de la imagen aquí

Si lo usas, titleseces aún más fácil, porque puedes agregar explícitamente el punto en el lugar correcto.

\documentclass{book}
\usepackage{amsthm,titlesec}

\titleformat{\section}[hang]
  {\bfseries}
  {\thesection.}
  {1ex}
  {}
\titlespacing{\section}{1.5pt}{0.2cm}{0.2cm}

\titleformat{\subsection}[hang]
  {\bfseries}
  {\thesubsection.}
  {1ex}
  {}
\titlespacing{\subsection}{1.5pt}{0.2cm}{0.2cm}

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

\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]

\begin{document}

\chapter{ABC}
blablabla with \ref{sec:one} and no period.

\section{ONE}\label{sec:one}

\begin{theorem}
dddd
\end{theorem}

\subsection{TWO}

Just to see what happens.

\end{document}

ingrese la descripción de la imagen aquí

Respuesta2

Intentar:

\renewcommand{\thetheorem}{\thesection\arabic{theorem}}

información relacionada