spb/uqo_cours_public Public
UQO — matériel de cours en évaluation immobilière (version publique, sans examens ni corrigés).
TeX 89.1%
Python 10.9%
1% ==============================================================================2% uqo-examen.sty — Style commun pour les examens UQO (IMM1003 / IMM1033)3% Université du Québec en Outaouais — Simon-Pierre Boucher4% Design modernisé : couverture pleine page aux bandes UQO, titres sans-serif,5% bandeaux de questions avec pastilles de points, encadrés et graphiques unifiés.6% Compilation : LuaLaTeX (compatible XeLaTeX)7% ==============================================================================8\NeedsTeXFormat{LaTeX2e}9\ProvidesPackage{uqo-examen}[2026/08/04 Style examens UQO v2]1011% --- Option solutionnaire ---12\newif\ifsolutionnaire13\solutionnairefalse14\DeclareOption{solutionnaire}{\solutionnairetrue}15\ProcessOptions\relax1617% --- Polices et langue (LuaLaTeX / XeLaTeX) ---18\RequirePackage{fontspec}19\RequirePackage[french]{babel}20\frenchsetup{StandardLists=true}21\setmainfont{TeX Gyre Termes}22\setsansfont{TeX Gyre Heros}23\RequirePackage{unicode-math}24\setmathfont{TeX Gyre Termes Math}2526% --- Mise en page ---27\RequirePackage[letterpaper,margin=2.3cm,top=2.7cm,bottom=2.7cm]{geometry}28\setlength{\headheight}{15pt}29\RequirePackage{graphicx}30\RequirePackage{amsmath}31\RequirePackage{booktabs}32\RequirePackage{array}33\RequirePackage{tabularx}34\RequirePackage{multirow}35\RequirePackage{longtable}36\RequirePackage[table]{xcolor}37\RequirePackage{enumitem}38\RequirePackage{fancyhdr}39\RequirePackage{lastpage}40\RequirePackage{tikz}41\usetikzlibrary{calc}42\RequirePackage{tcolorbox}43\tcbuselibrary{skins,breakable}44\RequirePackage{needspace}45\RequirePackage{xurl}46\urlstyle{same}47\RequirePackage[font=small, labelfont={sf,bf,color=uqoBleu}, textfont={color=uqoGris}, labelsep=period]{caption}48\RequirePackage{siunitx}49\sisetup{50 locale = FR,51 group-separator = {\,},52 group-minimum-digits = 4,53 output-decimal-marker = {,}54}5556% --- Couleurs UQO ---57\definecolor{uqoBleu}{RGB}{0, 62, 126}58\definecolor{uqoBleuClair}{RGB}{0, 102, 179}59\definecolor{uqoOr}{RGB}{198, 163, 0}60\definecolor{uqoGris}{RGB}{88, 89, 91}61\definecolor{uqoVert}{RGB}{0, 128, 70}62\definecolor{uqoRouge}{RGB}{180, 35, 24}63\definecolor{uqoBgClair}{RGB}{240, 244, 248}6465% --- Métadonnées de l'examen (à définir dans le document) ---66\newcommand{\examCours}{} \newcommand{\setexamCours}[1]{\renewcommand{\examCours}{#1}}67\newcommand{\examTitreCours}{} \newcommand{\setexamTitreCours}[1]{\renewcommand{\examTitreCours}{#1}}68\newcommand{\examType}{} \newcommand{\setexamType}[1]{\renewcommand{\examType}{#1}}69\newcommand{\examSession}{} \newcommand{\setexamSession}[1]{\renewcommand{\examSession}{#1}}70\newcommand{\examDuree}{} \newcommand{\setexamDuree}[1]{\renewcommand{\examDuree}{#1}}71\newcommand{\examRemise}{} \newcommand{\setexamRemise}[1]{\renewcommand{\examRemise}{#1}}72\newcommand{\examPonderation}{}\newcommand{\setexamPonderation}[1]{\renewcommand{\examPonderation}{#1}}73\newcommand{\examCouverture}{} \newcommand{\setexamCouverture}[1]{\renewcommand{\examCouverture}{#1}}7475% --- En-têtes / pieds de page (filet doré, typographie sans) ---76\pagestyle{fancy}77\fancyhf{}78\renewcommand{\headrulewidth}{1.2pt}79\renewcommand{\headrule}{\hbox to\headwidth{\color{uqoOr}\leaders\hrule height \headrulewidth\hfill}}80\renewcommand{\footrulewidth}{0.4pt}81\renewcommand{\footrule}{\hbox to\headwidth{\color{uqoBgClair!60!uqoGris!30}\leaders\hrule height \footrulewidth\hfill}}82\fancyhead[L]{\small\sffamily\textcolor{uqoBleu}{\textbf{\examCours}}\;{\color{uqoGris}·\;\examTitreCours}}83\fancyhead[R]{\small\sffamily\color{uqoGris}\examType\ifsolutionnaire\ --- \textcolor{uqoVert}{\textbf{SOLUTIONNAIRE}}\fi}84\fancyfoot[L]{\small\sffamily\color{uqoGris}UQO --- Simon-Pierre Boucher}85\fancyfoot[R]{\small\sffamily\color{uqoGris}Page \textcolor{uqoBleu}{\textbf{\thepage}} de \pageref{LastPage}}8687% --- Style global des graphiques (pgfplots) ---88\RequirePackage{pgfplots}89\pgfplotsset{compat=1.18}90\usepgfplotslibrary{dateplot}91\pgfplotsset{every axis/.append style={92 axis line style={uqoGris!55},93 tick style={uqoGris!55},94 ticklabel style={font=\footnotesize\sffamily, /pgf/number format/assume math mode},95 xlabel style={font=\small\sffamily, color=uqoBleu},96 ylabel style={font=\small\sffamily, color=uqoBleu},97 grid=major,98 major grid style={uqoGris!16},99 legend style={font=\footnotesize\sffamily, draw=uqoGris!35, fill=white, rounded corners=2pt},100}}101102% --- Pastille de points ---103\newcommand{\uqopastille}[1]{{\sffamily\bfseries\textcolor{uqoBleu}{(#1 points)}}}104\newcommand{\uqopastilleclair}[1]{{\sffamily\bfseries\textcolor{white}{#1 points}}}105106% ==============================================================================107% PAGE COUVERTURE — bandes UQO, typographie institutionnelle (numérotation continue)108% ==============================================================================109\newcommand{\pagetitreexamen}{%110\begingroup111\thispagestyle{empty}%112\begin{tikzpicture}[remember picture, overlay]113 \fill[uqoBleu] (current page.north west) rectangle ([yshift=-4.9cm]current page.north east);114 \fill[uqoOr] ([yshift=-4.9cm]current page.north west) rectangle ([yshift=-5.1cm]current page.north east);115 \node[fill=white, inner xsep=16pt, inner ysep=10pt]116 at ($(current page.north)+(0,-1.75cm)$) {\includegraphics[width=3.1cm]{assets/uqo-logo.png}};117 \node[anchor=north, text=white, font=\sffamily\bfseries\large]118 at ($(current page.north)+(0,-3.45cm)$) {Université du Québec en Outaouais};119 \node[anchor=north, text=uqoBgClair, font=\sffamily\small]120 at ($(current page.north)+(0,-4.15cm)$) {Département des sciences administratives};121 \fill[uqoBleu] (current page.south west) rectangle ([yshift=1.3cm]current page.south east);122 \fill[uqoOr] ([yshift=1.3cm]current page.south west) rectangle ([yshift=1.5cm]current page.south east);123 \node[anchor=south, text=white, font=\sffamily\footnotesize]124 at ($(current page.south)+(0,0.5cm)$)125 {UQO --- Département des sciences administratives --- \examSession};126\end{tikzpicture}%127\vspace*{3.0cm}128\begin{center}129{\fontsize{23}{27}\selectfont\sffamily\bfseries\color{uqoBleu}\examType\par}130\ifsolutionnaire131 \vspace{8pt}132 {\large\sffamily\bfseries\color{uqoVert}SOLUTIONNAIRE --- Réservé à l'enseignant\par}133\fi134\vspace{10pt}135{\color{uqoOr}\rule{4.2cm}{2pt}}\par136\vspace{10pt}137{\LARGE\sffamily\bfseries\color{uqoBleu}\examCours\par}138\vspace{4pt}139{\Large\sffamily\color{uqoBleu}\examTitreCours\par}140\vspace{7pt}141{\small\itshape\color{uqoGris}\examCouverture\par}142143\vspace{18pt}144{\renewcommand{\arraystretch}{1.55}145\begin{tabular}{@{}>{\sffamily\bfseries\color{uqoBleu}}m{3.2cm}>{\raggedright\arraybackslash}m{10.2cm}@{}}146\toprule147Professeur & Simon-Pierre Boucher \\148Session & \examSession \\149Modalité & \examDuree \\150Remise & \examRemise \\151Pondération & \examPonderation \\152Total & 100 points \\153\bottomrule154\end{tabular}\par}155156\ifsolutionnaire\else157\vspace{20pt}158{\renewcommand{\arraystretch}{2.1}159\begin{tabular}{@{}>{\sffamily\bfseries\color{uqoBleu}}m{3.2cm}m{10.2cm}@{}}160\toprule161Nom, prénom & \textcolor{uqoGris!55}{\dotfill} \\162Code permanent & \textcolor{uqoGris!55}{\dotfill} \\163Groupe & \textcolor{uqoGris!55}{\dotfill} \\164Signature & \textcolor{uqoGris!55}{\dotfill} \\165\bottomrule166\end{tabular}\par}167\fi168169\vspace{14pt}170{\footnotesize\color{uqoGris}Ce questionnaire compte \textbf{\pageref{LastPage}} pages, section \emph{Sources} incluse. Vérifiez qu'il est complet avant de commencer.}171\end{center}172\clearpage173\endgroup174}175176% ==============================================================================177% BOÎTES178% ==============================================================================179\newtcolorbox{consignes}{180 enhanced, breakable, sharp corners,181 colback=uqoBgClair, colframe=uqoBleu, boxrule=0.6pt,182 title={Instructions générales},183 fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoBleu,184 left=9pt, right=9pt, top=6pt, bottom=6pt,185 toptitle=3pt, bottomtitle=3pt186}187188\newtcolorbox{miseengarde}[1][Important]{189 enhanced, breakable, sharp corners,190 colback=uqoRouge!4, colframe=uqoRouge, boxrule=0.6pt,191 title={#1},192 fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoRouge,193 left=9pt, right=9pt, top=6pt, bottom=6pt,194 toptitle=3pt, bottomtitle=3pt195}196197\newtcolorbox{donnees}[1][Données]{198 enhanced, breakable, sharp corners,199 colback=white, colframe=uqoBleuClair, boxrule=0.6pt,200 title={#1},201 fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoBleuClair,202 left=9pt, right=9pt, top=7pt, bottom=7pt,203 toptitle=3pt, bottomtitle=3pt204}205206% Boîte solution (solutionnaire seulement)207\newtcolorbox{solution}[1][Solution]{208 enhanced, breakable, sharp corners,209 colback=uqoVert!4, colframe=uqoVert, boxrule=0.6pt,210 title={#1},211 fonttitle=\sffamily\bfseries, coltitle=white, colbacktitle=uqoVert,212 left=9pt, right=9pt, top=6pt, bottom=6pt,213 toptitle=3pt, bottomtitle=3pt214}215216% Notes de correction (solutionnaire seulement)217\newtcolorbox{notescorrection}[1][Notes de correction]{218 enhanced, breakable, sharp corners,219 colback=uqoOr!7, colframe=uqoOr, boxrule=0.6pt,220 title={#1},221 fonttitle=\sffamily\bfseries, coltitle=uqoBleu, colbacktitle=uqoOr!45,222 left=9pt, right=9pt, top=6pt, bottom=6pt,223 toptitle=3pt, bottomtitle=3pt224}225226% ==============================================================================227% SECTIONS ET QUESTIONS228% ==============================================================================229\newcounter{partie}230\newcommand{\partieexamen}[2]{% {Titre}{points ou vide}231 \stepcounter{partie}%232 \needspace{6\baselineskip}%233 \vspace{16pt}%234 \noindent\begin{tcolorbox}[enhanced, sharp corners, colback=uqoBleu, colframe=uqoBleu, boxrule=0pt,235 left=10pt, right=10pt, top=7pt, bottom=7pt,236 borderline south={2pt}{-3pt}{uqoOr},237 before skip=0pt, after skip=10pt]238 {\sffamily\bfseries\large\textcolor{white}{Partie \Alph{partie} --- #1}%239 \if\relax\detokenize{#2}\relax\else\hfill\uqopastilleclair{#2}\fi}240 \end{tcolorbox}\par241}242243\newcounter{questionexam}244\newenvironment{questionexam}[2]{% {Titre}{points}245 \refstepcounter{questionexam}%246 \needspace{9\baselineskip}%247 \vspace{13pt}%248 \noindent{\color{uqoBleu}\rule{\textwidth}{1.6pt}}\par\nopagebreak\vspace{3.5pt}%249 \noindent{\large\sffamily\bfseries\textcolor{uqoBleu}{Question \arabic{questionexam} --- #1}%250 \hfill{\large\sffamily\bfseries\textcolor{uqoBleu}{(#2 points)}}}\par\nopagebreak\vspace{2.5pt}%251 \noindent{\color{uqoOr}\rule{\textwidth}{0.9pt}}\par\nopagebreak\vspace{5pt}%252 \noindent\ignorespaces253}{\par}254255% --- Boîte « formule » : équations mises en évidence, rendu net ---256\newtcolorbox{formule}{257 enhanced, sharp corners,258 colback=white, colframe=uqoBleu, boxrule=0.8pt,259 left=10pt, right=10pt, top=7pt, bottom=7pt,260 before skip=8pt, after skip=8pt,261 halign=center262}263264% --- Espace de réponse (version étudiante : espace vide encadré) ---265\newcommand{\espacereponse}[1]{% hauteur266 \ifsolutionnaire\else267 \par\vspace{4pt}\noindent268 \begin{tikzpicture}269 \draw[uqoGris!60, rounded corners=2pt] (0,0) rectangle (\textwidth-2pt, #1);270 \end{tikzpicture}\par271 \fi272}273274% Lignes de réponse275\newcounter{uqolignes}276\newcommand{\lignesreponse}[1]{% nombre de lignes277 \ifsolutionnaire\else278 \par\vspace{6pt}279 \setcounter{uqolignes}{0}%280 \loop\ifnum\value{uqolignes}<#1281 \noindent\textcolor{uqoGris!55}{\rule{\textwidth}{0.4pt}}\par\vspace{18pt}282 \stepcounter{uqolignes}%283 \repeat284 \fi285}286287% --- Divers ---288\newcommand{\pts}[1]{\textbf{(#1~points)}}289\setlength{\parindent}{0pt}290\setlength{\parskip}{5pt}291\renewcommand{\arraystretch}{1.25}292