Modification du style de chapitre
Je n'arrive pas à changer les couleurs et tailles des différents chapitres, il doit manquer un package mais je ne sais lequel.
\documentclass[a4paper, english, french, 11pt]{book} % A4 paper size, default 11pt font size and oneside for equal margins
\usepackage[svgnames]{xcolor} % Required for colour specification
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{fouriernc} % Use the New Century Schoolbook font
\usepackage{graphicx}
\usepackage{babel}
\usepackage[explicit]{titlesec}
\usepackage{setspace}
\definecolor{darkblue}{rgb}{0.12,0.47,0.87}
\newlength\chapnumb
\setlength\chapnumb{3cm}
\onehalfspacing
%\titleformat{\chapter}[display] {\fontsize{17pt}{12pt}\selectfont \bfseries}{\textcolor{darkblue} {\chaptertitlename\ \thechapter: #1}}{20pt}{\Huge}
%\titleformat{name=\chapter,numberless}[display] {\fontsize{17pt}{12pt}\selectfont \bfseries}{\textcolor{darkblue} {#1}}{20pt}{\Huge}
\titleformat{\chapter}[block] {
\normalfont\sffamily}{}{0pt} {
\parbox[b]{\chapnumb}{
\fontsize{90}{10}\selectfont\thechapter}
\parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{
\raggedleft
\hfill{{#1}}\\
\rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}
}
}
\titleformat{name=\chapter,numberless}[block]
{\normalfont\sffamily}{}{0pt}
{\parbox[b]{\chapnumb}{%
\mbox{}}%
\parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
\raggedleft%
\hfill{\Large#1}\\
\rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}
\begin{document}
\chapter{Préface}
\chapter{Caractéristiques techniques}
\chapter{test}
\end{document]\end{document]
J'ai déja utilisé ce premier exemple ci dessous mais dans le cas ci dessus je n'arrive pas a changer la taille des chiffres ni a changer les couleurs séparément chiffre/titre
\documentclass[a5paper,12pt]{book}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[explicit]{titlesec}
\usepackage{lmodern}
\usepackage{kpfonts}
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{siunitx}
\usepackage{pgfplots}
\usepackage{floatrow}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{microtype}
\usepackage{subfig}
\usepackage{varioref}
\usepackage{multirow}
\usepackage{array}
\usepackage{chemformula}
\usepackage{xcolor}
\usepackage[xindy,quiet]{imakeidx}
\usepackage[autostyle]{csquotes}
\usepackage[backend=biber,sorting=none,style=numeric-comp]{biblatex}
\usepackage{hyperref}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{kpfonts}
\usepackage{booktabs}
\usepackage{pdfpages}
\usepackage{siunitx}
\usepackage{pgfplots}
\usepackage{floatrow}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{microtype}
\usepackage{subfig}
\usepackage{varioref}
\usepackage{multirow}
\usepackage{array}
\usepackage{xcolor}
\usepackage[xindy,quiet]{imakeidx}
\usepackage[autostyle]{csquotes}
\usepackage[backend=biber,sorting=none,style=numeric-comp]{biblatex}
\usepackage{hyperref}
\usepackage{setspace}
\definecolor{darkblue}{rgb}{0.12,0.47,0.87}
\newlength\chapnumb
\setlength\chapnumb{3cm}
\onehalfspacing
\usepackage[a5paper]{geometry}
%\titleformat{\chapter}[display] {\fontsize{17pt}{12pt}\selectfont \bfseries}{\textcolor{darkblue} {\chaptertitlename\ \thechapter: #1}}{20pt}{\Huge}
%\titleformat{name=\chapter,numberless}[display] {\fontsize{17pt}{12pt}\selectfont \bfseries}{\textcolor{darkblue} {#1}}{20pt}{\Huge}
\titleformat{\chapter}[block] {
\normalfont\sffamily}{}{0pt} {
\parbox[b]{\chapnumb}{
\fontsize{90}{10}\selectfont\thechapter}
\parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{
\raggedleft
\hfill{{#1}}\\
\rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}
}
}
\titleformat{name=\chapter,numberless}[block]
{\normalfont\sffamily}{}{0pt}
{\parbox[b]{\chapnumb}{%
\mbox{}}%
\parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
\raggedleft%
\hfill{\Large#1}\\
\rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}
\begin{document}
\chapter{Préface}
\chapter{chap1}
\end{document}