To complete my memory, I would like to display different numbering format beetween my section in the body of my document and the one in the toc
You will find just below my MWE :
\documentclass{book}
\usepackage{titlesec}
\usepackage{shorttoc}
\usepackage{lipsum}
% --------------------------------------------------
% Paramétrage des chapitres (parties)
% --------------------------------------------------
\titleclass{\chapter}{top}
\titleformat{\chapter}[frame]
{\null\vspace{.10\textheight}\normalfont}
{\filright
\enspace PARTIE~\thechapter\enspace}
{8pt}
{\huge\bfseries\filcenter\textsc}
\titlespacing{\chapter}{0pt}{*0}{*5}
\renewcommand\thechapter{\arabic{chapter}}
% --------------------------------------------------
% Paramétrage des sections (chapitres)
% --------------------------------------------------
\titleclass{\section}{straight}
\titleformat{\section}[block]
{\normalfont\huge\bfseries}
{\textsc{Chapitre}~\thesection~:}
{2.3ex plus.2ex}
{\huge}
\titlespacing{\section}{0pt}{*1.5}{*3}
\renewcommand\thesection{\arabic{section}}
% --------------------------------------------------
% Document
% --------------------------------------------------
\begin{document}
\chapter{Test chapter 1}
\lipsum[1]
\shorttableofcontents{Sommaire}{1}
\chapter{Test chapter 2}
\lipsum[1]
\section{Test section 1}
\lipsum[1]
\tableofcontents
\end{document}
Everything is looking good in the document except in the toc.
I have this for the moment :
1 Test chapter 1 1
2 Test chapter 2 5
1 Test section 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
And I would like to have this without any change in my text content :
1 Test chapter 1 1
2 Test chapter 2 5
2.1 Test section 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
I found a question on the same problem on Different section numbering styles for toc and body.
The MWE document is working great but I can't make it work in mine. I've commented all the lines linked to \titleclass \titleformat \titlespacing in my document, and used the package corrected in the answer but it doesn't reproduce good, I just have one element in the numbering format wanted for a paragraph and I don't have the numerotation of the parents sections.
After this failed test, I tried to go in another way. I tried to adapt it to what I want directly by commenting \title... like previously and edited the aglc.sty file but I didn't see any change at all in the numerotation, I didn't succeed to display a 1.1 format type in my section.
Can anyone help me with this ? Thank you very much in advance. :)
edit after Bernard comment :
Sorry for the confusion about chapter and section headings. I had to do this because of the style headings og shorttoc toc and bibtex because I need to have the style of a part like these elements. This is the reason that pushed me to had a 'Partie' title in a chapter and a 'Chapitre' title in a section.
If I type :
\chapter{Hello world}
\section{I'm a robot}
I would like to have in my body
Partie 1 : Hello World
Chapitre 1 : I'm a robot
This work nicely but with my configuration, I get this in my shorttoc and toc :
1 Hello World
1 I'm a robot
and I would like to have :
1 Hello World
1.1 I'm a robot
Without seeing anychange in my document presentation. It would be like having two different format numerotation for my section, one for shorttoc and toc with the type \thechapter.\thesection and one for the content that is just \thesection.