summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2022-09-13 17:16:14 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2022-09-13 17:16:14 -0400
commit1e870f1e0b16abd3adb790b5b5d036cebb19cc32 (patch)
tree1de327dbce528003d275d516dd89b8f17150e3f0
parented9cf7063fed7ebfc1a28c6b54aa42655d4438dd (diff)
Update master from template branch
-rw-r--r--document.sty9
-rw-r--r--main.tex8
-rw-r--r--titlepage.sty44
3 files changed, 40 insertions, 21 deletions
diff --git a/document.sty b/document.sty
index 493c860..511d030 100644
--- a/document.sty
+++ b/document.sty
@@ -20,7 +20,6 @@
\RequirePackage{amssymb} % Mathematical symbols
\RequirePackage{siunitx} % SI Units
\RequirePackage{setspace} % Line spacing
-\RequirePackage{chngcntr} % Change how to count equations/figures/tables
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
% Headers/Footers %
@@ -48,6 +47,8 @@
% 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}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
@@ -62,8 +63,10 @@
% Figures/Tables %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
-% Count figure within sections (just like equations)
+% Count within sections (third table of section 5 would be Table 5.3)
\counterwithin{figure}{section}
-% Count table within sections (just like equations)
\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/main.tex b/main.tex
index ee8806a..ffcb710 100644
--- a/main.tex
+++ b/main.tex
@@ -10,12 +10,14 @@
% \institution{Université de Sherbrooke}
% \faculty{Faculté de génie}
-\department{Département de génie électrique et de génie informatique}
+% \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{Benjamin CHAUSSE}
-% \location{Sherbrooke (Québec) Canada}
+% \author{Benjamin Chausse -- CIP}
+% \teacher{Benjamin Chausse}
+% \location{Sherbrooke}
+% \date{\today}
\begin{document}
\maketitle
diff --git a/titlepage.sty b/titlepage.sty
index 4806e41..72caa5b 100644
--- a/titlepage.sty
+++ b/titlepage.sty
@@ -2,6 +2,7 @@
Sherbrooke Engineering Title Page by Benjamin Chausse
]
\RequirePackage{setspace}
+\RequirePackage{tabularx}
\RequirePackage[french]{babel}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
@@ -11,8 +12,10 @@ Sherbrooke Engineering Title Page by Benjamin Chausse
\newcommand*{\faculty}[1]{\gdef\@faculty{#1}}
\newcommand*{\department}[1]{\gdef\@department{#1}}
\renewcommand*{\title}[1]{\gdef\@title{#1}}
-\newcommand*{\classnb}[1]{\gdef\@classnb{#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}}
@@ -21,12 +24,14 @@ Sherbrooke Engineering Title Page by Benjamin Chausse
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
\newcommand*{\@institution}{Université de Sherbrooke}
\newcommand*{\@faculty}{Faculté de génie}
-\newcommand*{\@department}{Département de génie en question}
+\newcommand*{\@department}{Département de génie électrique et de génie informatique}
\renewcommand*{\@title}{Titre du document}
-\newcommand*{\@classnb}{EXE 222}
-\newcommand*{\@class}{Numéro et nom du cours}
-\renewcommand*{\@author}{Prénom NOM}
-\newcommand*{\@location}{Sherbrooke (Québec) Canada}
+\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}
@@ -36,20 +41,29 @@ Sherbrooke Engineering Title Page by Benjamin Chausse
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
\renewcommand*{\maketitle}{
\begin{titlepage}
- \centering\LARGE\setstretch{.7}
+ % \centering\LARGE\setstretch{.7}
+ \centering\normalsize
+
{\MakeUppercase{\@institution}\usp}
{\@faculty\usp}
- {\@department\usp}
+ {\@department}
\vfill
- {\Huge\MakeUppercase{\@title}}
+
+ {\LARGE{\@title}}
\vfill
- {\@classnb\hspace{.420cm}\@class\usp}
+
+ {\@class\usp}
+ {\@classnb}
\vfill
- {\@author\usp}
+
+ {\@presentation\usp}
+ {\@teacher}
+ \vfill
+
+ {Présenté par\usp}
+ {\@author}
\vfill
- {\Large \@location\usp}
- \vspace{.69cm}
- {\Large\@date\par}
- \vspace{.420cm}
+
+ {\large \@location\ -- \@date\usp}
\end{titlepage}
}