[Tex/LaTex] Defining new subsubsection not working

numberingsectioning

I have defined a new numbering system for sections and subsections as shown below:

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}

If I then try to add:

\renewcommand*\thesubsubsection{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}

This doesn't work and I can't understand why when it's exactly the same as the others!

Any help would be greatly appreciated!

Best Answer

Not an answer, just providing the MWE:

\documentclass{article}

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}
\renewcommand*\thesubsubsection{%
  \arabic{section}.\arabic{subsection}.\arabic{subsubsection}%
}

\begin{document}
\tableofcontents
\section{Section A}
\section{Section B}
\subsection{Subsection A}
\subsection{Subsection B}
\subsubsection{Subsubsection A}
\subsubsection{Subsubsection B}
\end{document}

MWE

The only problem I can see is the narrow distance between the section number and the section title in the table of contents because of the added .0.

Refinement. From the comments it seems the default for counter secnumdepth is two, then the class is probably not article but report or book or similar.

New Example:

\documentclass{report}

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}
\renewcommand*\thesubsubsection{%
  \arabic{section}.\arabic{subsection}.\arabic{subsubsection}%
}

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\begin{document}
\tableofcontents
\chapter{Chapter X}
\section{Section A}
\section{Section B}
\subsection{Subsection A}
\subsection{Subsection B}
\subsubsection{Subsubsection A}
\subsubsection{Subsubsection B}
\end{document}

MWE2