As I write a report and needed an other sub section (which gave a subsubsubsection), it appeared that the small summaries at the beginning of each chapter turned to be squared, which was not the case before...
Here is the code (full intro)
Code: Select all
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[frenchb]{babel}
\usepackage{lipsum}
\usepackage{color} % appel pour utilisation couleurs (titres, subs, ...)
\usepackage[T1]{fontenc}
\usepackage{titlesec}
\usepackage{float} % Required for tables and figures in the multi-column environment - they need to be placed in specific locations with the [H] (e.g. \begin{table}[H])\usepackage{microtype} % Slightly tweak font spacing for aesthetics
\usepackage[hmarginratio=1:1,top=30mm,columnsep=20pt]{geometry} % Document margins
\geometry{bottom=3cm}
\usepackage{multicol} % Used for the two-column layout of the document
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} % Custom captions under/above floats in tables or figures
\usepackage[pdftex]{graphicx} %
\usepackage{subfigure} %
\usepackage{float} % insertion images
\usepackage{caption} %
\usepackage{wrapfig} %
\usepackage{array}
\usepackage{tabularx}
% permet de faire une table des matieres par chapitre
\usepackage[french]{minitoc}
% ajoute (entre autre) la bibliographie dans la table des matieres
\usepackage[nottoc]{tocbibind}
%définition de la couleur pour les titres, sections, ...
\usepackage{titlesec}
% biblio ordonnee classique
\bibliographystyle{unsrt}
%\title{Rapport de stage de fin d'études} %
%\author{Loïc Torrecillas} % OSEF, c'est le titre dont je ne me servirai pas.
%\date{\today} %
%%%%%%%%%%%%%%%%%%% mots sans césure et autres mises en page %%%%%%%%%%%%%%%%%%%%%%
\hyphenation{SOMOCOM Torrecillas Christophe Annon \'Etienne Teisserenc Jean-Paul Coppens}
\newcommand{\hsp}{\hspace{20pt}}
\newlength\longest
%%%%%%%%%%%%%%%%%%%%% création couleur titres %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{couleur_chapitre}{rgb}{0,0,0.12}
\definecolor{couleur_section}{rgb}{0.04,0.04,0.38}
\definecolor{couleur_subsection}{rgb}{0.08,0.08,0.54}
\definecolor{couleur_subsubsection}{rgb}{0.16,0.16,0.7}
\definecolor{couleur_subsubsubsection}{rgb}{0.24,0.24,0.86}
\definecolor{dark_blue}{rgb}{0,0,0.07450}
\titleformat{\chapter}[hang]{\color{couleur_chapitre}\Huge\bfseries}
{\thechapter\hsp\textcolor{dark_blue}{|}\hsp}{0pt}{\Huge\bfseries}
%%%%%%%%%%%%%% ajout de la subsubsubsection %%%%%%%%%%%%%
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\makeatletter
\newcounter {subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection .\@alph\c@subsubsubsection}
\newcommand\subsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\newcommand*\l@subsubsubsection{\@dottedtocline{3}{10.0em}{4.1em}}
\newcommand*{\subsubsubsectionmark}[1]{}
\makeatother
\usepackage{hyperref}
\makeatletter
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@subparagraph{6}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%% fin ajout sub sub sub section %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% définition des couleurs des titres %%%%%%%%%%
%\titleformat{\chapter}
%{\color{couleur_chapitre}\normalfont\Huge\bfseries}
%{\color{couleur_chapitre}}{1em}{}
\titleformat{\section}
{\color{couleur_section}\normalfont\Large\bfseries}
{\color{couleur_section}\thesection}{1em}{}
%
\titleformat{\subsection}
{\color{couleur_subsection}\normalfont\Large\bfseries}
{\color{couleur_subsection}\thesubsection}{1em}{}
%
\titleformat{\subsubsection}
{\color{couleur_subsubsection}\normalfont\large\bfseries}
{\color{couleur_subsubsection}\thesubsubsection}{1em}{}
%
\titleformat{\subsubsubsection}
{\color{couleur_subsubsubsection}\normalfont\large\bfseries}
{\color{couleur_subsubsubsection}\thesubsubsubsection}{1em}{}
%
%%%%%%%%%%%%%%%%%%%%% début du document %%%%%%%%%%%%%%%%
\begin{document}
%
here is the result given

and the result wished (that i had before implementing the subsubsubsection)

Can you please help me solve this rpoblem, i don't know why exactly it bebame like that and can't find a way to solve that
