summaryrefslogtreecommitdiff
path: root/rapport
diff options
context:
space:
mode:
Diffstat (limited to 'rapport')
-rw-r--r--rapport/document.sty72
-rw-r--r--rapport/frpseudocode.sty74
-rw-r--r--rapport/main.pdfbin0 -> 139724 bytes
-rw-r--r--rapport/main.tex66
-rw-r--r--rapport/titlepage.sty69
5 files changed, 281 insertions, 0 deletions
diff --git a/rapport/document.sty b/rapport/document.sty
new file mode 100644
index 0000000..511d030
--- /dev/null
+++ b/rapport/document.sty
@@ -0,0 +1,72 @@
+\ProvidesPackage{document}
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Packages %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
+% Margin Setup according to University methodology:
+\RequirePackage[top=2.5cm,bottom=2.5cm,inner=3cm,outer=2.5cm]{geometry}
+% IEEE references & bibliography
+\RequirePackage[style=ieee]{biblatex}
+\RequirePackage[T1]{fontenc} % French compatibility
+\RequirePackage[utf8]{inputenc} % Sensible text encoding
+\RequirePackage[french]{babel} % French document environment
+\RequirePackage{fancyhdr} % Footer customisation
+\RequirePackage{booktabs} % Elegant tables
+\RequirePackage{float} % Accurate positionning of figures
+\usepackage{titlesec} % Font sizes for sections/subsection
+\RequirePackage{amsmath} % Mathematics environments
+\RequirePackage{amssymb} % Mathematical symbols
+\RequirePackage{siunitx} % SI Units
+\RequirePackage{setspace} % Line spacing
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Headers/Footers %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
+\renewcommand{\footrulewidth}{.5pt} % Line at the bottom
+\cfoot{\thepage} % Centered page number (footer)
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Sections %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
+% Font size for section (16)
+\titleformat{\section}
+{\normalfont\fontsize{16}{19}\bfseries}{\thesection}{1em}{}
+% Font size for subsection (14)
+\titleformat{\subsection}
+{\normalfont\fontsize{14}{17}\bfseries}{\thesubsection}{1em}{}
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Equations/Math %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
+% Number equation with section number (ex: First equation in section 3 is 3.1)
+\numberwithin{equation}{section}
+% Use french commas when writing numbers
+\sisetup{locale=FR}
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Line Spacing %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
+% Set 1.5 linespacing for the document
+\onehalfspacing
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Figures/Tables %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
+% Count within sections (third table of section 5 would be Table 5.3)
+\counterwithin{figure}{section}
+\counterwithin{table}{section}
+% Separate section number from fig/table with a hyphen (5-3 instead of 5.3)
+\renewcommand{\thefigure}{\thesection-\arabic{figure}}
+\renewcommand{\thetable}{\thesection-\arabic{table}}
+
diff --git a/rapport/frpseudocode.sty b/rapport/frpseudocode.sty
new file mode 100644
index 0000000..06be0cc
--- /dev/null
+++ b/rapport/frpseudocode.sty
@@ -0,0 +1,74 @@
+%% @author Oliver Irwin
+%% DATE
+\ProvidesPackage{frpseudocode}[DATE French Pseudocode VERSION]
+\RequirePackage{algpseudocode}
+
+%% Global mod
+\floatname{algorithm}{Algorithme}
+
+%% Functions %%
+\algrenewcommand\algorithmicprocedure{\textbf{PROCÉDURE}}
+\algrenewcommand\algorithmicfunction{\textbf{FONCTION}}
+\algrenewcommand\algorithmicreturn{\textbf{RENVOYER}}
+
+\algrenewtext{Procedure}[2]%
+{\algorithmicprocedure\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}\ :}
+
+\algrenewtext{Function}[2]%
+{\algorithmicfunction\ \textproc{#1}\ifthenelse{\equal{#2}{}}{}{(#2)}\ :}
+
+%% Inputs
+\algrenewcommand\algorithmicrequire{\textbf{REQUIERT : }}
+\algrenewcommand\algorithmicensure{\textbf{VÉRIFIER : }}
+
+%% Control Instructions %%
+\algrenewcommand\algorithmicwhile{\textbf{TANT QUE}}
+\algnewcommand\algorithmicwhilem{\textbf{TANT QUE}}
+\algrenewcommand\algorithmicdo{\textbf{FAIRE}}
+\algnewcommand\algorithmicdom{\textbf{FAIRE}}
+\algrenewcommand\algorithmicend{\textbf{FIN}}
+\algrenewcommand\algorithmicfor{\textbf{POUR}}
+\algrenewcommand\algorithmicforall{\textbf{POUR TOUT}}
+\algnewcommand\algorithmicfrom{\textbf{DE }}
+\algnewcommand\algorithmicto{\textbf{À}}
+\algnewcommand\algorithmicform{\textbf{POUR}}
+
+\algrenewcommand\algorithmicrepeat{\textbf{RÉPÉTER}}
+\algrenewcommand\algorithmicuntil{\textbf{JUSQU'À}}
+
+\algdef{SE}[FORFT]{ForFT}{EndFor}[3]{}%
+
+%% Change commands
+\algrenewtext{ForFT}[3]%
+{\algorithmicfor\ #1 \algorithmicfrom #2 \algorithmicto\ #3,\ \algorithmicdom\ :}
+
+\algrenewtext{For}[1]%
+{\algorithmicfor\ #1,\ \algorithmicdom\ :}
+
+\algrenewtext{EndFor}[0]%
+{\algorithmicend\ \algorithmicform}
+
+\algrenewtext{While}[1]%
+{\algorithmicwhile\ #1,\ \algorithmicdom\ :}
+
+\algrenewtext{EndWhile}[0]%
+{\algorithmicend\ \algorithmicwhilem}
+
+%% Conditionnals %%
+
+\algrenewcommand\algorithmicif{\textbf{SI}}
+\algnewcommand\algorithmicifm{\textbf{SI}}
+\algrenewcommand\algorithmicelse{\textbf{SINON}}
+\algrenewcommand\algorithmicthen{\textbf{ALORS}}
+\newcommand{\algorithmicelsif}{\algorithmicelse\ \algorithmicif}
+
+\algrenewtext{SINON SI}[1]%
+{\algorithmicelse ,\ \algorithmicifm\ #1}
+
+\algrenewtext{ENDIF}[0]%
+{\algorithmicend\ \algorithmicifm}
+
+%% Logical
+%\algrenewcommand{\algorithmicnot}{\textbf{non}}
+%\algrenewcommand{\algorithmicand}{\textbf{et}}
+%\algrenewcommand{\algorithmicor}{\textbf{ou}}
diff --git a/rapport/main.pdf b/rapport/main.pdf
new file mode 100644
index 0000000..501483a
--- /dev/null
+++ b/rapport/main.pdf
Binary files differ
diff --git a/rapport/main.tex b/rapport/main.tex
new file mode 100644
index 0000000..f7afdcb
--- /dev/null
+++ b/rapport/main.tex
@@ -0,0 +1,66 @@
+\documentclass[a11paper, 11pt]{article}
+
+\usepackage{document}
+\usepackage{titlepage}
+\usepackage{float}
+\usepackage{algorithm}
+\usepackage{algpseudocode}
+\usepackage{frpseudocode}
+\usepackage[T1]{fontenc}
+\usepackage[french]{babel}
+
+% \addbibresource{bibliography.bib}
+% \nofiles
+
+% \institution{Université de Sherbrooke}
+% \faculty{Faculté de génie}
+% \department{Département de génie électrique et de génie informatique}
+\title{Titre du document}
+\classnb{GEN420}
+\class{Mathématiques des circuits logiques}
+\author{
+ \addtolength{\tabcolsep}{-0.4em}
+ \begin{tabular}{rcl} % Ajouter des auteurs au besoin
+ Benjamin Chausse & -- & chab1704 \\
+ Édouard Laurent & -- & laue \\ % TODO: demander le numéro du CIP
+ \end{tabular}
+}
+% \teacher{Benjamin Chausse}
+% \location{Sherbrooke}
+% \date{\today}
+
+
+\begin{document}
+\maketitle
+\newpage
+% \tableofcontents
+% \newpage
+
+\section{Diagrammes UML}
+
+\section{Pseudo-code}
+
+Ceci est un test pour voir comment le package frpseudocode fonctionne.
+Du pseudo-code est pertinent pour l'APP ira ici.
+
+\begin{algorithm}
+\caption{Euclid's algorithm}\label{alg:euclid}
+\begin{algorithmic}[1]
+ \Function{Euclid}{$a, b$}
+ \While{$a \neq b$}
+ \If{$a > b$}
+ \State $a \gets a - b$
+ \Else
+ \State $b \gets b - a$
+ \EndIf
+ \EndWhile
+ \State \Return $a$
+ \EndFunction
+\end{algorithmic}
+\end{algorithm}
+
+
+
+% \newpage
+% \printbibliography[heading=bibintoc]
+\end{document}
diff --git a/rapport/titlepage.sty b/rapport/titlepage.sty
new file mode 100644
index 0000000..72caa5b
--- /dev/null
+++ b/rapport/titlepage.sty
@@ -0,0 +1,69 @@
+\ProvidesPackage{titlepage}[
+Sherbrooke Engineering Title Page by Benjamin Chausse
+]
+\RequirePackage{setspace}
+\RequirePackage{tabularx}
+\RequirePackage[french]{babel}
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Plain Definitions %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+\newcommand*{\institution}[1]{\gdef\@institution{#1}}
+\newcommand*{\faculty}[1]{\gdef\@faculty{#1}}
+\newcommand*{\department}[1]{\gdef\@department{#1}}
+\renewcommand*{\title}[1]{\gdef\@title{#1}}
+\newcommand*{\class}[1]{\gdef\@class{#1}}
+\newcommand*{\classnb}[1]{\gdef\@classnb{#1}}
+\newcommand*{\presentation}[1]{\gdef\@presentation{#1}}
+\newcommand*{\teacher}[1]{\gdef\@teacher{#1}}
+\renewcommand*{\author}[1]{\gdef\@author{#1}}
+\newcommand*{\location}[1]{\gdef\@location{#1}}
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Templated Definitions %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+\newcommand*{\@institution}{Université de Sherbrooke}
+\newcommand*{\@faculty}{Faculté de génie}
+\newcommand*{\@department}{Département de génie électrique et de génie informatique}
+\renewcommand*{\@title}{Titre du document}
+\newcommand*{\@class}{Mathématiques des circuits logiques}
+\newcommand*{\@classnb}{GEN420}
+\newcommand*{\@presentation}{Présenté à}
+\newcommand*{\@teacher}{Prénom Nom}
+\renewcommand*{\@author}{Prénom Nom -- CIP}
+\newcommand*{\@location}{Sherbrooke}
+
+% Simple Macro
+\newcommand{\usp}{\unskip\strut\par}
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Updated Title Page Template %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+\renewcommand*{\maketitle}{
+\begin{titlepage}
+ % \centering\LARGE\setstretch{.7}
+ \centering\normalsize
+
+ {\MakeUppercase{\@institution}\usp}
+ {\@faculty\usp}
+ {\@department}
+ \vfill
+
+ {\LARGE{\@title}}
+ \vfill
+
+ {\@class\usp}
+ {\@classnb}
+ \vfill
+
+ {\@presentation\usp}
+ {\@teacher}
+ \vfill
+
+ {Présenté par\usp}
+ {\@author}
+ \vfill
+
+ {\large \@location\ -- \@date\usp}
+\end{titlepage}
+}