\NeedsTeXFormat{LaTeX2e}
\PassOptionsToClass{a4paper,oneside,12pt}{book}
\LoadClass{book}
\input{macros.tex}
\input{packages.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Réglages%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Réglages généraux de mise en page
\setcounter{secnumdepth}{10}       %Profondeur de la numérotation
\setcounter{tocdepth}{10}          %Profondeur de la numérotation de la table des matières
\parskip=2pt                       %Espace entre les paragraphes
\renewcommand{\baselinestretch}{1} %Espace entre les lignes
\usepackage{a4wide}

%Réglage des marges
%\setlength{\hoffset}{0pt}
%\setlength{\voffset}{0pt}
%\setlength{\oddsidemargin}{0pt}
%\setlength{\evensidemargin}{0pt}
%\setlength{\topmargin}{0pt}
%\setlength{\headheight}{31pt}
%\setlength{\headsep}{15pt}
%\setlength{\textheight}{625pt}
%\setlength{\textwidth}{424pt}
%\setlength{\marginparsep}{11pt}
%\setlength{\marginparwidth}{70pt}
%\setlength{\footskip}{30pt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Customisation des titres%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Numérotations
\renewcommand \thepart        {\roman{part}}
\renewcommand \thechapter     {\arabic{chapter}}
\renewcommand \thesection     {\arabic{section}}
\renewcommand\thesubsection   {\thesection.\arabic{subsection}}
\renewcommand\thesubsubsection{\thesubsection.\alph{subsubsection}}
\renewcommand\theparagraph    {\arabic{paragraph}}
\renewcommand\thesubparagraph {}

%%%Table des matières
\newcounter{chap}
\newcounter{sec}[chap]
\newcounter{subsec}[sec]
\newcounter{subsubsec}[subsec]
\newcounter{par}[subsubsec]
\newcounter{subpar}[par]
\newcounter{subsubpar}[subpar]


% Les têtes de chapitre sont définies ainsi
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
  \vspace*{10\p@}%
  {\parindent \z@ \centering \reset@font
        {\Huge\bfseries \thechapter }
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge \bfseries #1\par\nobreak
        \par
        \vspace*{10\p@}%
    \vskip 100\p@
  }}
\def\@makeschapterhead#1{%
  \vspace*{10\p@}%
  {\parindent \z@ \centering \reset@font
%        {\Huge\bfseries \vphantom{\thechapter} }
        \par\nobreak
        \vspace*{10\p@}%
        \interlinepenalty\@M
        \hrule
        \vspace*{10\p@}%
        \Huge \bfseries #1\par\nobreak
        \par
        \vspace*{10\p@}%
    \vskip 100\p@
  }}





%Sections
%\titleformat{\section}[frame]
%{\normalfont}
%	{\filleft 
%	\large 
%	  %itshape
%	  \enspace Section \thesection\enspace}
%	  {5pt}
%	  {\Large\bfseries\filcenter}
	 
\titleformat{\section}[frame]
{\normalfont}
	{\filleft 
	\small
	  \itshape
	  \enspace Section \thesection\enspace}
	  {8pt}
	  {\Large\bfseries\filcenter}

	  	 
%Chapitres
%\titleformat{\chapter}[display]
%{\normalfont\Large\filcenter}
%{\titlerule[2pt]%
% \vspace{1pt}%
% \titlerule
% \vspace{1pc}%
% \LARGE{\chaptertitlename} \thechapter}
%{1pc}
%{\titlerule
% \vspace{1pc}%
% \Huge\bfseries}


%Page de garde
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1pt\hfill \kern \z@}
\renewcommand{\maketitle}{\begin{titlepage}
    {\color{blanc} .}
    \let\footnotesize\small
    \let\footnoterule\relax
    \parindent \z@
    \reset@font
    \null
%    \vskip 0\p@
    \hbox{\mbox{%
        \hspace{0pt}%
        \includegraphics[width=3cm]{Logo.eps}%
        \hspace{4pt}
        }%
        {\color{bleu}
          \vrule depth 0.8\textheight width 2pt%
        }
      \mbox{\hspace{2em}}
      \vtop{%
        \parbox{10cm}{
          \begin{flushright}
             \Large {\LARGE \textbf{Université de Liège}}\\Institut Montefiore\\{\scriptsize Département d'électricité, électronique et informatique}
          \end{flushright}
        }
        \vskip 45\p@
        \begin{flushleft}
          \parbox{10cm}{
            \begin{center}
              {\huge \color{bleu} \textsc{\bfseries \@title} \par}
              \vskip 25\p@
              {\normalsize par \par}
              \vskip 25\p@
              {\Large \bfseries \@author}
              \vskip 100\p@
              {\normalsize Liège\\\@date}
              \vskip 38\p@            
              {\par \tiny Dernière modification: \today, \hhmm}
            \end{center}
          }
        \end{flushleft}
        \vfil
        }}
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \thispagestyle{empty}
}

\makeatother

\input{commandes.tex}
