+\usepackage{xspace}
+
+\usepackage{makeidx}
+
+\usepackage{etoolbox}
+
+\newcommand{\PIPS}{PIPS\xspace}
+
+% Patch the sectioning commands to provide a hook to be used later
+\preto{\chapter}{\def\leveltitle{\chaptertitle}}
+\preto{\section}{\def\leveltitle{\sectiontitle}}
+\preto{\subsection}{\def\leveltitle{\subsectiontitle}}
+\preto{\subsubsection}{\def\leveltitle{\subsubsectiontitle}}
+
+\makeatletter
+% \@sect is called with normal sectioning commands
+% Argument #8 to \@sect is the title
+% Thus \section{Title} will do \gdef\sectiontitle{Title}
+\pretocmd{\@sect}
+ {\expandafter\gdef\leveltitle{#8}}
+ {}{}
+% \@ssect is called with *-sectioning commands
+% Argument #5 to \@ssect is the title
+\pretocmd{\@ssect}
+ {\expandafter\gdef\leveltitle{#5}}
+ {}{}
+% \@chapter is called by \chapter (without *)
+% Argument #2 to \@chapter is the title
+\pretocmd{\@chapter}
+ {\expandafter\gdef\leveltitle{#2}}
+ {}{}
+% \@schapter is called with \chapter*
+% Argument #1 to \@schapter is the title
+\pretocmd{\@schapter}
+ {\expandafter\gdef\leveltitle{#1}}
+ {}{}
+\makeatother
+
+\newcommand{\PIPSPass}{Pass Name in \PIPS : }
+\newcommand{\PIPSExamples}{Validation folder in \PIPS : }
+\newcommand{\BookRef}{Reference: }
+\newcommand{\NameCommun}[1]{\subsection{#1}\index{\sectiontitle!\subsectiontitle}}
+\newcommand{\NamePipsPass}[1]{\xspace#1\index{\sectiontitle!\subsectiontitle!#1}\xspace}
+
+
+\title{\PIPS~--- List of code transformations}
+
+\makeindex