I have a report type file (my thesis). I have no problems with the numbering in sections and subsections (the get enumerated by itself and appear correctly in the table of contents), but for the subsubsections, the numbering begins from 0 instead of 1 and also these are not getting shown in the table of the contents. In the following picture, we can see that the subsubsection begins his numbering from 0 (7.1.0) instead of 7.1.1 and also this is not getting shown in the table of contents.



I have recompiled my code several times, so the problem is not about refreshing or updates in the code. Any ideas?, thanks in advance and greetings from Chile.

%\usepackage[spanish]{babel} %Defino idioma como español
\usepackage{graphicx} % Para Añadir imagenes
\usepackage{subfigure} %Para las subfiguras
%\usepackage[usenames, dvipsnames]{color}
\usepackage{hyperref} % Para que el pdf referencie directamente las referencias
\usepackage{amssymb,amsmath,amsfonts} %para \textbf y otras cosas
\usepackage{setspace} %sirve para espaciado del documento entre otras cosas
%\usepackage{dsfont}% para conjunto entero, reales.
\usepackage{stackrel}%paquete matematico para algunos simbolos
% nombre y ano
 % citations
%%%%%%%%% TABLAS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{multirow} % para las tablas
\usepackage{multicol}% Para separar columnas
%\usepackage{babelbib} %para que las referencias esten en español


\setlength{\parindent}{0cm} %0 sangria
\spacing{1.5} %Espaciado
\usepackage{times} %Letra times new Roman
\usepackage{anysize}% Para definir margenes
\marginsize{3.5cm}{2cm}{2cm}{2cm}% Controla los márgenes {izquierda}{derecha}{arriba}{abajo}

%%%%%%%%%%%%%%%%%%%%%%INICIO: IMAGEN DE FONDO DE TODO EL DOCUMENTO%%%%%%%%%%%%%%%%%%%%%%%%%%%
%La opción pages puede ser all (para todo el documento) o some, para algunas partes del documento
% configuración
%   scale=.2, %escala de la imagen, es recomendable que sea del mismo tamaño que el pdf
%   color=black, %fondo a usar para transparencia
%   opacity=0.2, %nivel de transparencia
%   angle=0, %en caso de querer una rotación
%   contents={
%       \includegraphics[width=\paperwidth,height=\paperheight]{escudo.png} %nombre de la imagen a utilizar como fonbfseries dasdasd \thecontentslabeldo
%   }

\usepackage{titletoc}% http://ctan.org/pkg/titletoc
%\titlecontents{chapter}% <section-type>
%[0pt]% <left>
%%{\vspace{.08cm}}% <above-code>
%{}%{ \bfseries Cap\'itulo \thecontentslabel . \quad}% <numbered-entry-format>
%{\bfseries}% <numbered-entry-format>
%{\hfill \vfill}% <numberless-entry-format>
%{\bfseries \hfill \contentspage \vfill}% <filler-page-format>

    [0em] % Indentation
    {\normalsize CAP\'ITULO \thecontentslabel. \hspace*{0em} }

    [1em] % Indentation
    {\hspace*{1em}\thecontentslabel \hspace*{1em}}

    [0em] % Indentation
    {\thecontentslabel \hspace*{1em}}

    [0em] % Indentation
    {\thecontentslabel \hspace*{1em}}


%%%%%%%%%%%%%%%%%%%%%%FIN: IMAGEN DE FONDO DE TODO EL DOCUMENTO%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Formato del titulo de los capitulos
\usepackage{titlesec} %paquete para cambiar el formato de los titulos
%Formato secciones
%formato capitulos
\titleformat{\chapter}[block] % cambiamos el formato de los capítulos
{\vspace{-2.6cm}\bfseries\Huge} % por defecto se usarán caracteres de tamaño \Huge en negrita
{% contenido de la etiqueta
%\titlerule % línea horizontal
%\filright % texto alineado a la derecha
%\chaptertitlename % "Capítulo" o "Apéndice" en tamaño \Large en lugar de \Huge
%\text{. }
} % número de capítulo en tamaño \Large
{2mm} % espacio mínimo entre etiqueta y cuerpo
{\filright} % texto del cuerpo alineado a la derecha
[\vspace{-9mm} ] % después del cuerpo, dejar espacio vertical y trazar línea horizontal gruesa

%Numeracion de paginas en esquina superior derecha
% primera pagina de un capitulo
    \fancyfoot[C]{Mag\'ister en Ingenier\'ia Industrial, Direcci\'on de Postgrado - Universidad de Concepci\'on}
\fancyfoot[C]{Mag\'ister en Ingenier\'ia Industrial, Direcci\'on de Postgrado - Universidad de Concepci\'on}
\renewcommand{\headrulewidth}{0 pt}
    \advance \leftskip \cftfigureindent

%%%%%%%%%%%%%%%%%%%%%% PARA MODIFICAR EL INDICE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5

  • 1
    Welcome to TeX.SE..Instead of providing image, please provide a MWE of your code what you tried.
    – MadyYuvi
    Sep 30 '19 at 4:58
  • It is too long, is almost my entire thesis and the problem is almost in the middle, that is why I did not want to post the code. Sep 30 '19 at 5:05
  • Make short (new) example of document, which reproduce your document. Without it we can't help you This document should contain part of your real document preamble which is related to section numbering. Instead of real text you can use text generated by lipsum package.
    – Zarko
    Sep 30 '19 at 5:55
  • Thanks for the advice, I am new in LaTex. I have edited my question. Sep 30 '19 at 6:34
  • As Zarko advised, we need a MWE, i.e., a small piece of code that can be copied and pasted and compiles. Your code does not end with a \end{document].
    – Denis
    Sep 30 '19 at 6:53

Here is an example of a MWE (small and compilable)


If you compile it, subsubsections will be numbered as desired.

In your code, the appearance of section numbers are redefined several times, whereas the default settings seems to give what you are looking for.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.