Commit 0b2b33fc authored by 's avatar
Browse files

tests RabbitMQ

parent 5c64f8ce
report.pdf: report.tex
pdflatex -shell-escape report.tex
pdflatex -shell-escape report.tex
clear:
rm -f report.toc report.out
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File Name: imta_core
%
% Description: Overall layout and colours of the IMT Atlantique
% LaTeX Template.
%
% Note: /
%
% Limitations: /
%
% Errors: None known
%
% Dependencies: geometry
% graphicx
% fancyhdr
% fontenc
% hyperref
% inputenc
% secsty
% tikz
% titling
% titlesec
%
% Author: A. Foucault - armand.foucault@telecom-bretagne.eu
% Contributors: B. Porteboeuf - benoit.porteboeuf@telecom-bretagne.eu
%
% University : IMT Atlantique, Brest (France)
%
% TeX Environment: TeXLive + pdfLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Revision List:
% Version Author Date Changes
% 1.0.0 AF 15.10.2017 First Draft
% 1.0.1 BP 31.10.2017 Original preamble .tex file changed
% to a .sty package
% 1.1.0 BP 31.10.2017 Original imta.sty package split into
% imt_core.sty and imta_extra.sty
% 1.1.1 BP 03.11.2017 \imtaMakeCover command added
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
%%%%%%%%%% PACKAGES %%%%%%%%%%
% Document geometry management
\RequirePackage[a4paper, margin=2cm, top=3cm]{geometry}
% Images management
\RequirePackage{graphicx}
% Floats management
%\RequirePackage{float}
% Output font management
\RequirePackage[T1]{fontenc}
% Cross-referencing
\RequirePackage[hidelinks]{hyperref}
% Document encoding management
\RequirePackage[utf8]{inputenc}
% Fancy headers and footers
\RequirePackage{fancyhdr}
% Pictures drawing
\RequirePackage{tikz}
% For title style customization
\RequirePackage{titlesec}
% Metadata access
\RequirePackage{titling}
% Arbitrary font size
%\RequirePackage{anyfontsize}
% Section styling
\RequirePackage{sectsty}
% Import \BeforeBeginEnvironment, \AfterBeginEnvironment, \BeforeEndEnvironment, and \AfterEndEnvironment
\RequirePackage{etoolbox}
\RequirePackage[none]{hyphenat}
%%%%%%%%%% COLORS %%%%%%%%%%
% The three colors of IMTA: green, light blue, and dark blue
\definecolor{imtaGreen}{RGB}{164, 210, 51}
\definecolor{imtaLightBlue}{RGB}{0, 184, 222}
\definecolor{imtaDarkBlue}{RGB}{12, 35, 64}
\definecolor{imtaGray}{RGB}{87, 87, 87}
%%%%%%%%%% GENERAL SETTINGS %%%%%%%%%%
\raggedbottom
\AfterEndEnvironment{itemize}{\hspace{\baselineskip}}
%%%%%%%%%% PACKAGES SETTINGS %%%%%%%%%%
% graphicx
% Globally set the width for figures to \linewidth
\setkeys{Gin}{width=\linewidth}
% fancyhdr
% Define the header and footer
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{\thetitle}
\fancyhead[R]{\theauthor}
\fancyfoot[C]{\thepage}
% Clear the header and footer style for the first page
\fancypagestyle{imtaFirstpage}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
}
%%%%%%%%%% COMMANDS %%%%%%%%%%
% \subtitle
% Command for the cover's subtitle
\newcommand{\subtitleValue}{}
\newcommand{\subtitle}[1]{%
\renewcommand{\subtitleValue}{#1}
}
% \imtaQuestion
% Output "Question" followed by the current question number
% The \imtaQuestionReset command should be called after each new section or subsection,
% in order to resest the question counter
\newcounter{imtaQuestionCounter}
\newcommand{\imtaQuestion}{%
\stepcounter{imtaQuestionCounter}%
\subsection*{Question \arabic{imtaQuestionCounter}}%
}
% \imtaQuestionReset
% Reset the question counter
\newcommand{\imtaQuestionReset}{%
\setcounter{imtaQuestionCounter}{0}%
}
% \imtaLogo
% Include the IMTA logo according to the given width
\newcommand\imtaLogo[1]{\includegraphics[width = #1]{imta_logo.pdf}}
% \imtaLogoTikz
% Outputs the IMT Atlantique logo using tikz according to the given width
\newcommand{\imtaLogoTikz}[1]{%
\resizebox{#1}{!}{%
\begin{tikzpicture}[every node/.style={inner sep=0,outer sep=0}]
% \draw (-1,1) -- (8,1);
% \draw (-1,0) -- (8,0);
% \draw (-1,-1) -- (8,-1);
% \draw (-1,-2) -- (8,-2);
% \draw (-1,-3) -- (8,-3);
% \draw (-1,-4) -- (8,-4);
% \draw (-1,-5) -- (8,-5);
% \draw (-1,1) -- (-1,-5);
% \draw (0,1) -- (0,-5);
% \draw (1,1) -- (1,-5);
% \draw (2,1) -- (2,-5);
% \draw (3,1) -- (3,-5);
% \draw (4,1) -- (4,-5);
% \draw (5,1) -- (5,-5);
% \draw (6,1) -- (6,-5);
% \draw (7,1) -- (7,-5);
% \draw (8,1) -- (8,-5);
\fill[imtaLightBlue] (0,0) -- (2,0) -- (3,-1) -- (4,0) -- (4,-1) -- %
(5,0) -- (7,0) -- (5,-2) -- (5,-1) -- (4,-1) -- %
(4,-2) -- (2,-2) -- (2,0) -- (0,-2) -- (0,0);
\node [anchor=west] at (0,-2.5) {\LARGE\fontfamily{phv}\selectfont \textbf{IMT Atlantique}};
\node [anchor=north west] at (0,-3) {\Large\fontfamily{phv}\selectfont Bretagne - Pays de la Loire};
\node [anchor=south west] at (0,-4) {\Large\fontfamily{phv}\selectfont École Mines-Télécom};
\end{tikzpicture}
}
}
% \imtaMaketitlepage
% Output the title page, with regards for the IMT Atlantique official style
% This is a twocolumns robust titlepage command
\makeatletter
% \imtaGetEltSize
% Gets the 1/10th of the smallest dimension of the paper used
\def\imtaGetEltSize{%
\ifdim \paperwidth < \paperheight
\paperwidth/10
\else
\paperheight/10
\fi%
}
% \imtaMaketitlepage
% Generates the title page
\newcommand\imtaMaketitlepage{%
\clearpage
\if@twocolumn
\onecolumn % we force it to a one column environment
\titleLayout
\twocolumn
\else
\titleLayout
\fi
}
% \titleLayout
% Corresponds to the actual layout used for the cover by \imtaMaketitlepage
\def\titleLayout{%
% \thispagestyle{empty}
\thispagestyle{imtaFirstpage}
\pagenumbering{gobble}
\newgeometry{top = .5cm, bottom = 1.5cm, left = 2cm, right = 1cm}
\begin{flushright}
\begin{tikzpicture}
\filldraw[draw=imtaGreen,fill=imtaGreen] (-3\imtaGetEltSize,0) -- (0,-3\imtaGetEltSize) -- (0\imtaGetEltSize,0) -- cycle;
\filldraw[draw=imtaLightBlue,fill=imtaLightBlue] (-2.24\imtaGetEltSize,-3\imtaGetEltSize) -- (0,-5.24\imtaGetEltSize) -- (0,-3\imtaGetEltSize) -- cycle;
\filldraw[draw=imtaDarkBlue,fill=imtaDarkBlue] (-5.24\imtaGetEltSize,0) -- (-2.24\imtaGetEltSize,-3\imtaGetEltSize) -- (-5.24\imtaGetEltSize,-3\imtaGetEltSize) -- cycle;
\node (date) [draw=none, text width=\textwidth, align=left, anchor=west] at (-\textwidth, -6\imtaGetEltSize) {
\large\fontfamily{phv}\selectfont\thedate \\
\large\fontfamily{phv}\selectfont\theauthor \vspace*{1.5cm}\\
\textcolor{imtaGreen}{\fontsize{25}{40}\fontseries{b}\fontfamily{phv}\selectfont\thetitle} \vspace*{.5cm}\\
\textcolor{imtaGreen}{\Large\fontfamily{phv}\selectfont\subtitleValue}};
\end{tikzpicture}
\vfill
\begin{flushleft}
\imtaLogoTikz{5.3cm}
\end{flushleft}
\end{flushright}
\cleardoublepage
\restoregeometry
\pagenumbering{arabic}
\setcounter{page}{2}
}
\makeatother
% \imtaMakeCover
% Generates a standard back cover which ends on the left side
\makeatletter
\newcommand{\imtaMakeCover}{%
\clearpage
\if@twocolumn
\clearpage
\onecolumn
\fi
\if@twoside
\ifodd\c@page
\shipout\null % We force the left page
\fi
\fi
\newpage \thispagestyle{empty}
\footnotesize
\begin{center}
\begin{minipage}{.85\textwidth}
\vspace*{.73\textheight}
\centerline{\imtaLogoTikz{3cm}}
\vspace*{1.25cm}
% \newline
\begin{flushleft}
IMT Atlantique Bretagne - Pays de la Loire - \href{www.imt-atlantique.fr}{www.imt-atlantique.fr}\\
\end{flushleft}
\begin{minipage}{.28\textwidth}
Campus de Brest\\
Technopôle Brest-Iroise\\
CS 83818\\
29238 Brest Cedex 03\\
T +33 (0)2 29 00 11 11\\
F +33 (0)2 29 00 10 00
\end{minipage}
\hfill
\begin{minipage}{.34\textwidth}
Campus de Nantes\\
4, rue Alfred Kastler - La Chantrerie\\
CS 20722\\
44307 Nantes Cedex 03\\
T +33 (0)2 51 85 81 00\\
F +33 (0)2 51 85 81 99
\end{minipage}
\hfill
\begin{minipage}{.28\textwidth}
Campus de Rennes\\
2, rue de la Châtaigneraie\\
CS 17607\\
35576 Cesson Sévigné Cedex\\
T +33 (0)2 99 12 70 00\\
F +33 (0)2 99 12 70 08
\end{minipage}
\end{minipage}
\end{center}
}
\makeatother
% \imtaSetIMTStyle
% Set a styling that conforms to the official report template
\newcommand{\imtaSetIMTStyle}{%
% Set global font to Helvetica
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
% Set heading style
\sectionfont{\bf\LARGE\color{imtaGreen}}
\subsectionfont{\bf\Large\color{imtaGray}}
\subsubsectionfont{\bf\large\color{imtaGray}}
\paragraphfont{\color{imtaGray}}
\subparagraphfont{\color{imtaGray}}
% Set header and footer style
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyhead[L]{\nouppercase\leftmark}
\fancyfoot[R]{\thepage}
\fancypagestyle{imtaFirstpage}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
}
}
% \subsubsubsection
% We introduce another layer with the \subsubsubsection command
\setcounter{secnumdepth}{4} % We increase the counters' level of visibility to 4
\newcommand\subsubsubsection{} % We create a new command
\titleclass{\subsubsubsection}{straight}[\subsubsection] % Make it a title command
\newcounter{subsubsubsection}[subsubsection] % We create a new counter that inherits from subsubsection
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}} % The complete counter is updated
\titlespacing{\subsubsubsection}{0pt}{2em}{1em} % Spacing is updated
\titleformat{\subsubsubsection}[hang]{\normalsize\it} % Layout is updated
{\thesubsubsubsection.}{1em}{\normalsize\it}[\normalsize] % Formatting is updated
% Adjusting Table Of Contents levels for the \subsubsubsection
\makeatletter
\setcounter{tocdepth}{6} % We increase the level of visibility in the TOC
\def\toclevel@subsubsubsection{4}
\def\l@subsubsubsection{\@dottedtocline{5}{11em}{5em}}
\def\toclevel@paragraph{5}
\def\l@paragraph{\@dottedtocline{5}{14em}{6em}}
\def\toclevel@subparagraph{6}
\def\l@subparagraph{\@dottedtocline{6}{17em}{7em}}
\makeatother
% \chapter
% \chapter is redefined to support other features
\makeatletter
\newif\if@chapterdefined % A new \if statement is created to allow easier checking for the existance of \chapter
\@ifundefined{chapter}{\global \@chapterdefinedfalse}{\global \@chapterdefinedtrue}
% \imtaChapterFigure
% A TikzFigure is defined for chapter pages
\def\imtaChapterFigure{
\vspace*{\fill}
\begin{flushright}
\begin{tikzpicture}
\filldraw[draw=imtaLightBlue,fill=imtaLightBlue] (-5.24\imtaGetEltSize,-5.24\imtaGetEltSize) -- (0,0) -- (0,-5.24\imtaGetEltSize) -- cycle;
\filldraw[draw=imtaDarkBlue,fill=imtaDarkBlue] (0,0) -- (-2.54\imtaGetEltSize,-2.54\imtaGetEltSize) -- (0,-2.54\imtaGetEltSize) -- cycle;
\filldraw[draw=imtaGreen,fill=imtaGreen] (-2.54\imtaGetEltSize,-5.24\imtaGetEltSize) -- (0,-5.24\imtaGetEltSize) -- (0,-2.54\imtaGetEltSize) -- cycle;
\end{tikzpicture}
\end{flushright}
\normalsize
}
% The chapter command is redefined when relevant.
% It becomes more robust to oneside/twoside and onecolumn/twocolumn options and imports a figure
\if@chapterdefined
\let\imtaOldChapter\chapter % The reference command is saved and a new one is redefined, based on the old.
% It is VERY important to catch the star version as well, otherwise it will not compile
\renewcommand*{\chapter}{\@ifstar{\imtaStarChapter}{\@dblarg\imtaNoStarChapter}}
\newcommand*\imtaStarChapter[1]{%
\if@twocolumn % We want to make sure the chapter page is always on a one column full page
\onecolumn
\cleardoublepage
\newgeometry{top = 4cm, bottom = 1cm, left = 2cm, right = 1cm}
\imtaOldChapter*{#1}
\imtaChapterFigure
\clearpage \newpage \restoregeometry \twocolumn
\else
\cleardoublepage
\newgeometry{top = 4cm, bottom = 1cm, left = 2cm, right = 1cm}
\imtaOldChapter*{#1}
\imtaChapterFigure
\clearpage \newpage \restoregeometry
\fi
}
\def\imtaNoStarChapter[#1]#2{%
\if@twocolumn % We want to make sure the chapter page is always on a one column full page
\onecolumn
\cleardoublepage
\newgeometry{top = 4cm, bottom = 1cm, left = 2cm, right = 1cm}
\imtaOldChapter[{#1}]{#2}
\imtaChapterFigure
\clearpage \newpage \restoregeometry \twocolumn
\else
\cleardoublepage
\newgeometry{top = 4cm, bottom = 1cm, left = 2cm, right = 1cm}
\imtaOldChapter[{#1}]{#2}
\imtaChapterFigure
\clearpage \newpage \restoregeometry
\fi
}
% Finally, the chapter formatting is updated
\titleformat
{\chapter} % command
[display] % shape
{\bf\Huge} % format
{Chapitre \thechapter} % label
{1em} % sep
{\hspace{2em}\bf\Huge\thispagestyle{empty}} % before-code
[{}] % after-code ; does not accept \if statements
\else
\relax
\fi
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% File Name: imta_extra
%
% Description: Enables advanced functionalities of the IMT Atlantique
% LaTeX Template.
%
% Note: some functionalities require the Minted Package.
% This package further requires:
% 1. To use the --escape-shell option when compiling
% the document
% 2. To have Pymentize installed (Having Python installed,
% you can simply run the command: pip install Pygments)
%
% Package options: nouppersectioninlof and nouppersectioninlot
%
% Limitations: /
%
% Errors: None known
%
% Dependencies: imta_core
% anyfontsize
% mdframed
% minted
%
% Author: A. Foucault - armand.foucault@telecom-bretagne.eu
% Contributors: B. Porteboeuf - benoit.porteboeuf@telecom-bretagne.eu
%
% University : IMT Atlantique, Brest (France)
%
% TeX Environment: TeXLive + pdfLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Revision List:
% Version Author Date Changes
% 1.0 BP 31.10.2017 Original imta.sty package split into
% imt_core.sty and imta_extra.sty
% 1.1 BP 02.11.2017 \frontmatter & \mainmatter commands
% introduced - support for uppersection
% display in List of Tables/Figures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% P A C K A G E S %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document geometry management
\RequirePackage{imta_core}
% Fancy code listings
\RequirePackage[cache=false]{minted}
% Arbitrary font size
\RequirePackage{anyfontsize}
% Fancy frames and boxes
\RequirePackage{mdframed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% D E F A U L T E X P O R T S E T T I N G S %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Some export-related booleans are introduced
\makeatletter
\newif\if@printuppersectioninLOF \@printuppersectioninLOFtrue
\newif\if@printuppersectioninLOT \@printuppersectioninLOTtrue
\makeatother
\makeatletter
\global\newif\if@uppersectionprintedinLOF \global\@uppersectionprintedinLOFfalse
\global\newif\if@uppersectionprintedinLOT \global\@uppersectionprintedinLOTfalse
\gdef\imtaUpperSectionTitle\doctitle
\gdef\imtaUpperSectionNumber{ }
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% O P T I O N S D E C L A R A T I O N %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
% Disables the printing of the upper section in the List Of Figures
\DeclareOption{nouppersectioninlof}{\@printuppersectioninLOFfalse}
% Disables the printing of the upper section in the List Of Tables
\DeclareOption{nouppersectioninlot}{\@printuppersectioninLOTfalse}
\makeatother
\ExecuteOptions{}
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% C O L O R S %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colors related to code formatting
\definecolor{imtaCodeBackground}{RGB}{245, 245, 245}
\definecolor{imtaInlineCodeBackground}{RGB}{230, 230, 230}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% C O M M A N D S %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \imtaInlinecode
% Typeset inline code
% First parameter is the language of the text to typeset
% Second parameter is the text to typeset
\newcommand{\imtaInlinecode}[2]{%
\setlength{\fboxsep}{2pt}\colorbox{imtaInlineCodeBackground}{\mintinline[breaklines]{#1}{#2}}%
}
% \imtaFrontMatter
% Resets the page counter and switches to roman numbers (useful for the preamble)
\makeatletter
\newif\if@mainmatter \@mainmattertrue
\def\imtaFrontMatter{%
\@mainmatterfalse \pagenumbering{roman} \setcounter{page}{1}}
% \imtaMainMatter
% Resets the page counter and switches to arabic numbers (useful for the main content)
\def\imtaMainMatter{%
\@mainmattertrue \pagenumbering{arabic} \setcounter{page}{1}}
\makeatother
% \chapter
% \chapter is redefined when relevant, in order to update the upper section informations
\makeatletter
\if@chapterdefined
\let\imtaExtraOldChapter\chapter
\renewcommand*{\chapter}{\@ifstar{\imtaStarChapter}{\@dblarg\imtaNoStarChapter}}
\newcommand*\imtaExtraStarChapter[1]{%
\imtaExtraOldChapter*{#1}
\gdef\imtaUpperSectionTitle{#1} \gdef\imtaUpperSectionNumber{ } \global\@uppersectionprintedinLOFfalse \global\@uppersectionprintedinLOTfalse}
\def\imtaExtraNoStarChapter[#1]#2{%
\imtaExtraOldChapter[{#1}]{#2}
\gdef\imtaUpperSectionTitle{#1} \gdef\imtaUpperSectionNumber{\thechapter. } \global\@uppersectionprintedinLOFfalse \global\@uppersectionprintedinLOTfalse}
\else
\relax
\fi
\makeatother
% \section
% \section is redefined, in order to update the upper section informations
\makeatletter
\if@chapterdefined
\relax
\else
\let\imtaExtraOldSection\section
\renewcommand{\section}{\@ifstar{\imtaExtraStarSection}{\@dblarg\imtaExtraNoStarSection}}
\newcommand\imtaExtraStarSection[1]{%
\imtaExtraOldSection*{#1} \gdef\imtaUpperSectionTitle{#1} \gdef\imtaUpperSectionNumber{ } \global\@uppersectionprintedinLOFfalse \global\@uppersectionprintedinLOTfalse}
\def\imtaExtraNoStarSection[#1]#2{%
\imtaExtraOldSection[{#1}]{#2} \gdef\imtaUpperSectionTitle{#1} \gdef\imtaUpperSectionNumber{\thesection. } \global\@uppersectionprintedinLOFfalse \global\@uppersectionprintedinLOTfalse}
\fi
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% E N V I R O N M E N T S %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% imtaCode
% Format a listing of code
% The only argument of this environment is the language of the code to format
% This environment wraps around minted, and is therefore a verbatim environment
\newenvironment{imtaCode}[1]{%
\VerbatimEnvironment%
\renewcommand{\theFancyVerbLine}{\ttfamily \textcolor{gray!150}{\normalsize \oldstylenums{\arabic{FancyVerbLine}}}}%