SPB Git

Repository Public Research preview

uqo-examen.sty 12.2 KB 307 lines latex

1% =============================================================================2% SP BOUCHER | ACADEMIC RESEARCH3% =============================================================================4% Project      : UQO5% File         : IMM1003-20_Elements_evaluation_immobiliere/04_Examens/Final_40pct/questionnaire/uqo-examen.sty6% Maintainer   : Simon-Pierre Boucher7% Position     : Professor of Finance8% Institution  : Université du Québec en Outaouais (UQO)9% Website      : https://spboucher.ai10% Research     : research@spboucher.ai11% Copyright    : (c) the author(s) of this work; ownership not asserted here12% License      : None specified (no license file in this repository)13% =============================================================================14% END OF SP BOUCHER SOURCE HEADER15% =============================================================================16% ==============================================================================17% uqo-examen.sty — Style commun pour les examens UQO (IMM1003 / IMM1033)18% Université du Québec en Outaouais — Simon-Pierre Boucher19% Design modernisé : couverture pleine page aux bandes UQO, titres sans-serif,20% bandeaux de questions avec pastilles de points, encadrés et graphiques unifiés.21% Compilation : LuaLaTeX (compatible XeLaTeX)22% ==============================================================================23\NeedsTeXFormat{LaTeX2e}24\ProvidesPackage{uqo-examen}[2026/08/04 Style examens UQO v2]2526% --- Option solutionnaire ---27\newif\ifsolutionnaire28\solutionnairefalse29\DeclareOption{solutionnaire}{\solutionnairetrue}30\ProcessOptions\relax3132% --- Polices et langue (LuaLaTeX / XeLaTeX) ---33\RequirePackage{fontspec}34\RequirePackage[french]{babel}35\frenchsetup{StandardLists=true}36\setmainfont{TeX Gyre Termes}37\setsansfont{TeX Gyre Heros}38\RequirePackage{unicode-math}39\setmathfont{TeX Gyre Termes Math}4041% --- Mise en page ---42\RequirePackage[letterpaper,margin=2.3cm,top=2.7cm,bottom=2.7cm]{geometry}43\setlength{\headheight}{15pt}44\RequirePackage{graphicx}45\RequirePackage{amsmath}46\RequirePackage{booktabs}47\RequirePackage{array}48\RequirePackage{tabularx}49\RequirePackage{multirow}50\RequirePackage{longtable}51\RequirePackage[table]{xcolor}52\RequirePackage{enumitem}53\RequirePackage{fancyhdr}54\RequirePackage{lastpage}55\RequirePackage{tikz}56\usetikzlibrary{calc}57\RequirePackage{tcolorbox}58\tcbuselibrary{skins,breakable}59\RequirePackage{needspace}60\RequirePackage{xurl}61\urlstyle{same}62\RequirePackage[font=small, labelfont={sf,bf,color=uqoBleu}, textfont={color=uqoGris}, labelsep=period]{caption}63\RequirePackage{siunitx}64\sisetup{65  locale = FR,66  group-separator = {\,},67  group-minimum-digits = 4,68  output-decimal-marker = {,}69}7071% --- Couleurs UQO ---72\definecolor{uqoBleu}{RGB}{0, 62, 126}73\definecolor{uqoBleuClair}{RGB}{0, 102, 179}74\definecolor{uqoOr}{RGB}{198, 163, 0}75\definecolor{uqoGris}{RGB}{88, 89, 91}76\definecolor{uqoVert}{RGB}{0, 128, 70}77\definecolor{uqoRouge}{RGB}{180, 35, 24}78\definecolor{uqoBgClair}{RGB}{240, 244, 248}7980% --- Métadonnées de l'examen (à définir dans le document) ---81\newcommand{\examCours}{}      \newcommand{\setexamCours}[1]{\renewcommand{\examCours}{#1}}82\newcommand{\examTitreCours}{} \newcommand{\setexamTitreCours}[1]{\renewcommand{\examTitreCours}{#1}}83\newcommand{\examType}{}       \newcommand{\setexamType}[1]{\renewcommand{\examType}{#1}}84\newcommand{\examSession}{}    \newcommand{\setexamSession}[1]{\renewcommand{\examSession}{#1}}85\newcommand{\examDuree}{}      \newcommand{\setexamDuree}[1]{\renewcommand{\examDuree}{#1}}86\newcommand{\examRemise}{}     \newcommand{\setexamRemise}[1]{\renewcommand{\examRemise}{#1}}87\newcommand{\examPonderation}{}\newcommand{\setexamPonderation}[1]{\renewcommand{\examPonderation}{#1}}88\newcommand{\examCouverture}{} \newcommand{\setexamCouverture}[1]{\renewcommand{\examCouverture}{#1}}8990% --- En-têtes / pieds de page (filet doré, typographie sans) ---91\pagestyle{fancy}92\fancyhf{}93\renewcommand{\headrulewidth}{1.2pt}94\renewcommand{\headrule}{\hbox to\headwidth{\color{uqoOr}\leaders\hrule height \headrulewidth\hfill}}95\renewcommand{\footrulewidth}{0.4pt}96\renewcommand{\footrule}{\hbox to\headwidth{\color{uqoBgClair!60!uqoGris!30}\leaders\hrule height \footrulewidth\hfill}}97\fancyhead[L]{\small\sffamily\textcolor{uqoBleu}{\textbf{\examCours}}\;{\color{uqoGris}·\;\examTitreCours}}98\fancyhead[R]{\small\sffamily\color{uqoGris}\examType\ifsolutionnaire\ --- \textcolor{uqoVert}{\textbf{SOLUTIONNAIRE}}\fi}99\fancyfoot[L]{\small\sffamily\color{uqoGris}UQO --- Simon-Pierre Boucher}100\fancyfoot[R]{\small\sffamily\color{uqoGris}Page \textcolor{uqoBleu}{\textbf{\thepage}} de \pageref{LastPage}}101102% --- Style global des graphiques (pgfplots) ---103\RequirePackage{pgfplots}104\pgfplotsset{compat=1.18}105\usepgfplotslibrary{dateplot}106\pgfplotsset{every axis/.append style={107  axis line style={uqoGris!55},108  tick style={uqoGris!55},109  ticklabel style={font=\footnotesize\sffamily, /pgf/number format/assume math mode},110  xlabel style={font=\small\sffamily, color=uqoBleu},111  ylabel style={font=\small\sffamily, color=uqoBleu},112  grid=major,113  major grid style={uqoGris!16},114  legend style={font=\footnotesize\sffamily, draw=uqoGris!35, fill=white, rounded corners=2pt},115}}116117% --- Pastille de points ---118\newcommand{\uqopastille}[1]{{\sffamily\bfseries\textcolor{uqoBleu}{(#1 points)}}}119\newcommand{\uqopastilleclair}[1]{{\sffamily\bfseries\textcolor{white}{#1 points}}}120121% ==============================================================================122% PAGE COUVERTURE — bandes UQO, typographie institutionnelle (numérotation continue)123% ==============================================================================124\newcommand{\pagetitreexamen}{%125\begingroup126\thispagestyle{empty}%127\begin{tikzpicture}[remember picture, overlay]128  \fill[uqoBleu] (current page.north west) rectangle ([yshift=-4.9cm]current page.north east);129  \fill[uqoOr]   ([yshift=-4.9cm]current page.north west) rectangle ([yshift=-5.1cm]current page.north east);130  \node[fill=white, inner xsep=16pt, inner ysep=10pt]131    at ($(current page.north)+(0,-1.75cm)$) {\includegraphics[width=3.1cm]{assets/uqo-logo.png}};132  \node[anchor=north, text=white, font=\sffamily\bfseries\large]133    at ($(current page.north)+(0,-3.45cm)$) {Université du Québec en Outaouais};134  \node[anchor=north, text=uqoBgClair, font=\sffamily\small]135    at ($(current page.north)+(0,-4.15cm)$) {Département des sciences administratives};136  \fill[uqoBleu] (current page.south west) rectangle ([yshift=1.3cm]current page.south east);137  \fill[uqoOr]   ([yshift=1.3cm]current page.south west) rectangle ([yshift=1.5cm]current page.south east);138  \node[anchor=south, text=white, font=\sffamily\footnotesize]139    at ($(current page.south)+(0,0.5cm)$)140    {UQO --- Département des sciences administratives --- \examSession};141\end{tikzpicture}%142\vspace*{3.0cm}143\begin{center}144{\fontsize{23}{27}\selectfont\sffamily\bfseries\color{uqoBleu}\examType\par}145\ifsolutionnaire146  \vspace{8pt}147  {\large\sffamily\bfseries\color{uqoVert}SOLUTIONNAIRE --- Réservé à l'enseignant\par}148\fi149\vspace{10pt}150{\color{uqoOr}\rule{4.2cm}{2pt}}\par151\vspace{10pt}152{\LARGE\sffamily\bfseries\color{uqoBleu}\examCours\par}153\vspace{4pt}154{\Large\sffamily\color{uqoBleu}\examTitreCours\par}155\vspace{7pt}156{\small\itshape\color{uqoGris}\examCouverture\par}157158\vspace{18pt}159{\renewcommand{\arraystretch}{1.55}160\begin{tabular}{@{}>{\sffamily\bfseries\color{uqoBleu}}m{3.2cm}>{\raggedright\arraybackslash}m{10.2cm}@{}}161\toprule162Professeur & Simon-Pierre Boucher \\163Session & \examSession \\164Modalité & \examDuree \\165Remise & \examRemise \\166Pondération & \examPonderation \\167Total & 100 points \\168\bottomrule169\end{tabular}\par}170171\ifsolutionnaire\else172\vspace{20pt}173{\renewcommand{\arraystretch}{2.1}174\begin{tabular}{@{}>{\sffamily\bfseries\color{uqoBleu}}m{3.2cm}m{10.2cm}@{}}175\toprule176Nom, prénom & \textcolor{uqoGris!55}{\dotfill} \\177Code permanent & \textcolor{uqoGris!55}{\dotfill} \\178Groupe & \textcolor{uqoGris!55}{\dotfill} \\179Signature & \textcolor{uqoGris!55}{\dotfill} \\180\bottomrule181\end{tabular}\par}182\fi183184\vspace{14pt}185{\footnotesize\color{uqoGris}Ce questionnaire compte \textbf{\pageref{LastPage}} pages, section \emph{Sources} incluse. Vérifiez qu'il est complet avant de commencer.}186\end{center}187\clearpage188\endgroup189}190191% ==============================================================================192% BOÎTES193% ==============================================================================194\newtcolorbox{consignes}{195  enhanced, breakable, sharp corners,196  colback=uqoBgClair, colframe=uqoBleu, boxrule=0.6pt,197  title={Instructions générales},198  fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoBleu,199  left=9pt, right=9pt, top=6pt, bottom=6pt,200  toptitle=3pt, bottomtitle=3pt201}202203\newtcolorbox{miseengarde}[1][Important]{204  enhanced, breakable, sharp corners,205  colback=uqoRouge!4, colframe=uqoRouge, boxrule=0.6pt,206  title={#1},207  fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoRouge,208  left=9pt, right=9pt, top=6pt, bottom=6pt,209  toptitle=3pt, bottomtitle=3pt210}211212\newtcolorbox{donnees}[1][Données]{213  enhanced, breakable, sharp corners,214  colback=white, colframe=uqoBleuClair, boxrule=0.6pt,215  title={#1},216  fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoBleuClair,217  left=9pt, right=9pt, top=7pt, bottom=7pt,218  toptitle=3pt, bottomtitle=3pt219}220221% Boîte solution (solutionnaire seulement)222\newtcolorbox{solution}[1][Solution]{223  enhanced, breakable, sharp corners,224  colback=uqoVert!4, colframe=uqoVert, boxrule=0.6pt,225  title={#1},226  fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoVert,227  left=9pt, right=9pt, top=6pt, bottom=6pt,228  toptitle=3pt, bottomtitle=3pt229}230231% Notes de correction (solutionnaire seulement)232\newtcolorbox{notescorrection}[1][Notes de correction]{233  enhanced, breakable, sharp corners,234  colback=uqoOr!7, colframe=uqoOr, boxrule=0.6pt,235  title={#1},236  fonttitle=\sffamily\bfseries, coltitle=uqoBleu, colbacktitle=uqoOr!45,237  left=9pt, right=9pt, top=6pt, bottom=6pt,238  toptitle=3pt, bottomtitle=3pt239}240241% ==============================================================================242% SECTIONS ET QUESTIONS243% ==============================================================================244\newcounter{partie}245\newcommand{\partieexamen}[2]{% {Titre}{points ou vide}246  \stepcounter{partie}%247  \needspace{6\baselineskip}%248  \vspace{16pt}%249  \noindent\begin{tcolorbox}[enhanced, sharp corners, colback=uqoBleu, colframe=uqoBleu, boxrule=0pt,250      left=10pt, right=10pt, top=7pt, bottom=7pt,251      borderline south={2pt}{-3pt}{uqoOr},252      before skip=0pt, after skip=10pt]253    {\sffamily\bfseries\large\textcolor{white}{Partie \Alph{partie} --- #1}%254     \if\relax\detokenize{#2}\relax\else\hfill\uqopastilleclair{#2}\fi}255  \end{tcolorbox}\par256}257258\newcounter{questionexam}259\newenvironment{questionexam}[2]{% {Titre}{points}260  \refstepcounter{questionexam}%261  \needspace{9\baselineskip}%262  \vspace{13pt}%263  \noindent{\color{uqoBleu}\rule{\textwidth}{1.6pt}}\par\nopagebreak\vspace{3.5pt}%264  \noindent{\large\sffamily\bfseries\textcolor{uqoBleu}{Question \arabic{questionexam} --- #1}%265    \hfill{\large\sffamily\bfseries\textcolor{uqoBleu}{(#2 points)}}}\par\nopagebreak\vspace{2.5pt}%266  \noindent{\color{uqoOr}\rule{\textwidth}{0.9pt}}\par\nopagebreak\vspace{5pt}%267  \noindent\ignorespaces268}{\par}269270% --- Boîte « formule » : équations mises en évidence, rendu net ---271\newtcolorbox{formule}{272  enhanced, sharp corners,273  colback=white, colframe=uqoBleu, boxrule=0.8pt,274  left=10pt, right=10pt, top=7pt, bottom=7pt,275  before skip=8pt, after skip=8pt,276  halign=center277}278279% --- Espace de réponse (version étudiante : espace vide encadré) ---280\newcommand{\espacereponse}[1]{% hauteur281  \ifsolutionnaire\else282  \par\vspace{4pt}\noindent283  \begin{tikzpicture}284    \draw[uqoGris!60, rounded corners=2pt] (0,0) rectangle (\textwidth-2pt, #1);285  \end{tikzpicture}\par286  \fi287}288289% Lignes de réponse290\newcounter{uqolignes}291\newcommand{\lignesreponse}[1]{% nombre de lignes292  \ifsolutionnaire\else293  \par\vspace{6pt}294  \setcounter{uqolignes}{0}%295  \loop\ifnum\value{uqolignes}<#1296    \noindent\textcolor{uqoGris!55}{\rule{\textwidth}{0.4pt}}\par\vspace{18pt}297    \stepcounter{uqolignes}%298  \repeat299  \fi300}301302% --- Divers ---303\newcommand{\pts}[1]{\textbf{(#1~points)}}304\setlength{\parindent}{0pt}305\setlength{\parskip}{5pt}306\renewcommand{\arraystretch}{1.25}307
Files main
Menu

Theme