# Problem with subsubsection numbering :

I want the subsubsection starts from 1.1.1 instead its numeration is starting from 1.1.0, where's the problem, note that I used the renewcommand that allows you to custom the book or any class's parts, it worked for the subsection, but it didn't with the subsubsection.

Here's the code :

% !TeX program = xelatex
\documentclass[openany,12pt]{scrbook}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage[tmargin=1.5cm,bmargin=1.5cm,rmargin=1.8cm,lmargin=1.8cm]{geometry}
\frenchbsetup{IndentFirst=false}
\usepackage{tcolorbox}
\usepackage{xcolor}
\usepackage[explicit]{titlesec}
\usepackage{lipsum}

\newtcolorbox{titlecolorbox}[1]{
coltext=white,
colframe=black,
colback=black,
boxrule=0pt,
arc=0pt,
notitle,
width=4.8em,
height=2.4ex,
before=\hfill
}
\titleformat{\chapter}[display]
{\huge}
{}
{2pt}
{\begin{titlecolorbox}{}
{\large\MakeUppercase{\chaptername}}
\end{titlecolorbox}
\vspace*{-3.08ex}\textcolor{black}{\noindent\rule{\textwidth}{0.5pt}}
\parbox[b]{\dimexpr\textwidth-4.8em\relax}{\raggedright\MakeUppercase{#1}}{\hfill\fontsize{70}{60}\selectfont\textcolor{blue}{\thechapter}}
}
[]

\titleformat{\section}[display]
{\Large}
{}
{0pt}

\titleformat{\subsection}[display]
{\large}
{}
{0pt}

\titleformat{\subsubsection}[display]
{\normalsize}
{}
{0pt}

\renewcommand\thechapter{\Roman{chapter}}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand{\thesubsubsection}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
\begin{document}
\chapter{Chapter  :}
\section{section  :}
bla bla bla bla....
\subsection{subsection :}
bla bla bla bla....
\subsubsection{subsubsection :}
bla bla bla bla....
\end{document}


Any thought on how to solve the following problem ?

• Have you tried \setcounter{secnumdepth}{3}?
– Tom
Jun 7 at 23:31
• @Tom No, I'm gonna try it now ! Jun 7 at 23:34
• @Tom It worked, will you consider to edit the code, and publish it as an answer so I can upvote it ? Jun 7 at 23:35
• That's fine, We have already solved it through the comment. initial secnumdepth was set to 2, however subsubsection have secnumdepth equal to 3, So it will not be numbered. It was not start from 0. It will be always 0 if you don't set the secnumdepth equal to 3
– Tom
Jun 7 at 23:41

With a KOMA-Script class you can use

\setcounter{secnumdepth}{\subsubsectionnumdepth}
\setcounter{tocdepth}{\subsubsectiontocdepth}


to get numbered subsubsections and TOC entries for the subsubsections.

1. The redefinitions of \thesection, \thesubsection etc. are not needed. The redefinition of \thechapter is enough.
2. Do not use package titlesec with a KOMA-Script class!

Suggestion:

\documentclass[
open=any,fontsize=12pt,
]{scrbook}
\usepackage[french]{babel}
\frenchbsetup{IndentFirst=false}

\usepackage[T1]{fontenc}
\usepackage[vmargin=1.5cm,hmargin=1.8cm]{geometry}
\usepackage{tcolorbox}% loads packages tikz, xcolor, graphicx, ...
\usepackage{fix-cm}% make font scalable

\setcounter{secnumdepth}{\subsubsectionnumdepth}
\setcounter{tocdepth}{\subsubsectiontocdepth}
\renewcommand\thechapter{\Roman{chapter}}

\newtcolorbox{titlecolorbox}[1]{
coltext=white,
colframe=black,
colback=black,
boxrule=0pt,
arc=0pt,
notitle,
width=4.8em,
height=2.4ex,
before=\myhrulefill{.5pt}
}

\renewcommand\chapterlinesformat[3]{%
\begin{titlecolorbox}{}\large\MakeUppercase{\chaptername}\end{titlecolorbox}\medskip
\parbox[b]{\dimexpr\textwidth-4.8em\relax}{\raggedright\MakeUppercase{#3}}\hfill#2
}

\renewcommand{\chapterformat}{{\usekomafont{chapternumber}{\thechapter\autodot}}}