\usepackage{stmaryrd,diagbox,multirow}%listingsutf8
\usepackage[obsolete-environments]{nicematrix}
\usepackage[justification=centering,font+=it,labelsep=endash]{caption}
\graphicspath{{../091575438_IMAGES/}}
\title{ILTNSI}
\author{Stéphane Pasquet\\Mickaël Léopoldoff}
\makeindex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% NATHAN LIVE %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Synthaxe :
% \nathanlive{progmargin}{} : icone à côté d'un listing
% \nathanlive{prog}{texte} : 2 icones à côté d'une phrase
% \nathanlive{web}{lien url} : 2 icones à côté du lien

\newcounter{numprog}
\newcounter{numweb}
\newcounter{numvideo}
\newcounter{numaudio}
\newcommand{\nathanlive}[3][]
{%%%%%%%%%%%%%%%%%%%%%% WEB
\ifthenelse{\equal{#2}{web}}
{%
\refstepcounter{numweb}
\label{web\thenumweb}
\ifthenelse{\equal{#1}{}}{\hspace*{-12mm}}{\hspace*{-#1}}
\raisebox{-2pt}{\includegraphics[width=4mm]{0_NathanLive}\;\includegraphics[width=4mm]{0_pictoWeb}}
\bgroup
\textit{#3}
\egroup
}{}
%%%%%%%%%%%%%%%%%%%%%%%%% PROG
\ifthenelse{\equal{#2}{prog}}
{%
\refstepcounter{numprog}
\label{prog\thenumprog}
\ifthenelse{\equal{#1}{}}{\hspace*{-12mm}}{\hspace*{-#1}}
\raisebox{-2pt}{\includegraphics[width=4mm]{0_NathanLive}\;\includegraphics[width=5mm]{0_pictoProg}}
\textit{#3}
}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROGMARGIN
\ifthenelse{\equal{#2}{progmargin}}
{%
\Par
\refstepcounter{numprog}
\label{prog\thenumprog}
\ifthenelse{\equal{#1}{}}{\hspace*{-6mm}}{\hspace*{-#1}}
\includegraphics[width=4mm]{0_NathanLive}
\vspace*{-8mm}
}{}
%%%%%%%%%%%%%%%%%%%%%%%%% VIDEO
\ifthenelse{\equal{#2}{video}}
{%
\refstepcounter{numvideo}
\label{video\thenumvideo}
\ifthenelse{\equal{#1}{}}{\hspace*{-12mm}}{\hspace*{-#1}}
\raisebox{-2pt}{\includegraphics[width=4mm]{0_NathanLive}\;\includegraphics[width=5mm]{0_pictoVideo}}
\textit{#3}
}{}
%%%%%%%%%%%%%%%%%%%%%%%%% AUDIO
\ifthenelse{\equal{#2}{audio}}
{%
\refstepcounter{numaudio}
\label{audio\thenumaudio}
\ifthenelse{\equal{#1}{}}{\hspace*{-12mm}}{\hspace*{-#1}}
\raisebox{-2pt}{\includegraphics[width=4mm]{0_NathanLive}\;\includegraphics[width=5mm]{0_pictoAudio}}
\textit{#3}
}{}
}

%%%%%%%%%%%%%%%%%%%% \printNL

\newcommand{\printNL}
{%
\newpage
\pagestyle{empty}
\begin{center}
\large\bfseries Liste des pages où figure un renvoi Nathan Live

destiné à un usage interne
\end{center}

\ifnum\thenumprog>0
\sectionnn{Liste des Programmes}
\begin{multicols}{4}
\multido{\i=1+1}{\thenumprog}{%
Page \pageref{prog\i}\\
}
\end{multicols}
\fi 

\ifnum\thenumvideo>0
\sectionnn{Liste des renvois Vidéos}
\begin{multicols}{4}
\multido{\i=1+1}{\thenumvideo}{%
Page \pageref{video\i}\\
}
\end{multicols}
\fi

\ifnum\thenumweb>0
\newpage
\sectionnn{Liste des renvois Web}
\begin{multicols}{4}
\multido{\i=1+1}{\thenumweb}{%
Page \pageref{web\i}\\
}
\end{multicols}
\fi

\ifnum\thenumaudio>0
\sectionnn{Liste des renvois Audios}
\begin{multicols}{4}
\multido{\i=1+1}{\thenumaudio}{%
Page \pageref{audio\i}\\
}
\end{multicols}
\fi
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\DirListing}{src/listings/}
\lstset{tabsize=2}

\newcommand{\pychevrons}{>\hspace*{-1.2ex} >\hspace*{-1.2ex} > }

\renewcommand*{\hrulefill}{\leavevmode \leaders \hrule height .1pt \hfill \kern 0pt}