% ---> Chargement de la class
\documentclass[12pt,openany]{book}
% ---> Packages utilisés {{{1
\usepackage{fontspec}
% \usepackage{xunicode}
\usepackage{microtype}
\usepackage{polyglossia}
\setmainlanguage{french}
% \usepackage{verse}
\usepackage{graphicx}
\usepackage{nopageno}
% \usepackage{comment}
% \usepackage{pdflscape}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{pdfpages}
\hypersetup{colorlinks=true,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black}%,bookmarks=false}
\usepackage{chngcntr}
\usepackage{fancyhdr}
% }}}1
% \counterwithin{section}{part}
% \counterwithout{section}{chapter}
% \counterwithin{chapter}{part}
% ---> Geometry et mise en page
% ------> A5
% =================== para formato A5:
\usepackage[twoside,paperwidth=14.851cm, paperheight=20.997cm, right=35pt, left=65pt, top=40pt, bottom=43pt]{geometry}
%\usepackage[twoside,paperwidth=14.8cm, paperheight=21cm, right=40pt, left=60pt, top=40pt, bottom=43pt]{geometry}
% ===========================================
% \usepackage[paperwidth=14.8cm, paperheight=21cm, right=50pt, left=50pt, top=40pt, bottom=43pt]{geometry}
% % \usepackage[paperwidth=14.8cm, paperheight=21cm, right=30pt, left=52.5pt, top=40pt, bottom=43pt]{geometry}
% % \setlength{\oddsidemargin}{-22.5pt}
% ------> 12x18cm
%\usepackage[twoside,paperwidth=12cm, paperheight=18cm, right=20pt, left=40pt, top=38pt, bottom=41pt]{geometry}
%\usepackage[paperwidth=12cm, paperheight=18cm, right=30pt, left=30pt, top=38pt, bottom=41pt]{geometry}
% nuevo, igual mal:
%\usepackage[twoside,paperwidth=12cm, paperheight=18cm, right=25pt, left=45pt, top=38pt, bottom=45pt]{geometry}
% =================== para formato americano:
% \usepackage[twoside,paperwidth=15.24cm, paperheight=22.86cm, right=40pt, left=80pt, top=45pt, bottom=55pt]{geometry}
% ===========================================
%
%\setlength{\oddsidemargin}{(\parpewidth-\textwidth)/2 - 1in}
%\usepackage[paperwidth=12cm, paperheight=18cm, right=25pt, left=40pt, top=42pt, bottom=48pt]{geometry}
%\setlength{\oddsidemargin}{-29pt}
% \usepackage[paperwidth=12cm, paperheight=18cm, right=32.5pt, left=32.5pt, top=42pt, bottom=48pt]{geometry}
\setlength{\footskip}{20pt}
% \widowpenalties=3 5000 5000 150
\widowpenalty=3000
\clubpenalty=3000
\hyphenpenalty=10000
\hbadness=10000
\sloppy
\raggedbottom
\frenchspacing
\renewcommand{\headrulewidth}{0pt}
\lhead[]{}\chead[]{}\rhead[]{}
\lfoot[]{}\cfoot[\thepage]{\thepage}
\rfoot[]{}
\titleformat{\chapter}[display]
{\thispagestyle{fancy}\normalfont\centering\Large\bfseries}{\chaptertitlename\
\thechapter}{15pt}{\huge}{}{}
\titlespacing*{\chapter}{0pt}{40pt}{40pt}
% ---> mise en page des sections
% \titleformat{\part}[display]
% {\normalfont\centering\huge\bfseries}{Tome \Roman{part}}{20pt}{\Huge}
% \titlespacing*{\part}{0pt}{100pt}{60pt}
% \titleformat{\chapter}[display]
% {\normalfont\centering\huge\bfseries}{partie \thechapter}{20pt}{\Huge}
% \titlespacing*{\chapter}{0pt}{100pt}{60pt}
% \titleformat{\section}[display]
% {\normalfont\centering\huge\bfseries}{\chaptertitlename\
% \thesection}{20pt}{\Huge}{}{}
% \titlespacing*{\section}{0pt}{30pt}{60pt}
% \renewcommand{\thesection}{\arabic{section}}
% \renewcommand{\thechapter}{\arabic{chapter}}
% \newcommand{\sectionbreak}{\thispagestyle{empty}\clearpage\vspace*{1pt}\thispagestyle{fancy}\pagestyle{fancy}}
%\newcommand{\chapterbreak}{\clearpage{\pagestyle{empty}\cleardoublepage}\vspace*{1pt}\thispagestyle{fancy}\pagestyle{fancy}}
% \newcommand{\miparte}[1]{\pagestyle{empty}\cleardoublepage\chapter{#1}\thispagestyle{empty}\cleardoublepage}
% \newcommand{\mitomo}[1]{\pagestyle{empty}\cleardoublepage\thispagestyle{empty}\part{#1}\thispagestyle{empty}\cleardoublepage}
% FIN DU PREAMBULE -----------------------------------------------------
\pagestyle{fancy}

