SPB Git

Repository Public Research preview

uqo-revision.sty 7.2 KB 105 lines latex

1% ==============================================================================2% uqo-revision.sty — complément de style pour les diapositives de préparation3% aux examens (IMM1003 séance 7, IMM1033 révision séance 6). À charger APRÈS4% uqo-style. Auteur : Simon-Pierre Boucher — 2026-10-21.5% Principes : densité maîtrisée (aucun [shrink]), boîtes compactes, cartes à6% bandeau, tuiles chiffrées, barre des parties A–E, étiquettes « Q » dans les7% titres, tableaux zébrés, chronologie.8% ==============================================================================9\NeedsTeXFormat{LaTeX2e}10\ProvidesPackage{uqo-revision}[2026/10/21 complément révision]11\RequirePackage{tikz}12\usetikzlibrary{calc,positioning,shapes.misc}1314% ---------- espacements plus serrés que le cours ----------15\setlength{\parskip}{2pt}16\addtobeamertemplate{itemize/enumerate body begin}{\setlength{\itemsep}{2.5pt}\setlength{\topsep}{2pt}}{}17\setbeamerfont{frametitle}{size=\normalsize, series=\bfseries}1819\definecolor{revFond}{RGB}{247,249,252}20\definecolor{revLigne}{RGB}{222,228,236}2122% ---------- étiquette « questions de l'examen » dans un titre ----------23\newcommand{\examtag}[1]{%24  \hfill\tikz[baseline=-0.55ex]\node[fill=uqoRouge, text=uqoBlanc, rounded corners=2pt,25    inner xsep=4.5pt, inner ysep=2pt, font=\fontsize{6.5}{7}\selectfont\bfseries]26    {\faIcon{pen}\hspace{3pt}#1};}27\newcommand{\ok}{\textcolor{uqoVert}{\ding{51}}}28\newcommand{\ko}{\textcolor{uqoRouge}{\ding{55}}}29\newcommand{\mc}{m\textsuperscript{2}}30\newcommand{\pc}{pi\textsuperscript{2}}3132% ---------- boîtes compactes (surchargent les skins du cours) ----------33\tcbset{revbox/.style={34  enhanced, boxrule=0pt, frame hidden, arc=1.5pt,35  left=7pt, right=7pt, top=3.5pt, bottom=3.5pt,36  before skip=4pt, after skip=4pt,37  fontupper=\small, detach title,38  before upper={\tcbtitle\par\vspace{1.5pt}},39  fonttitle=\bfseries\footnotesize}}40\renewtcolorbox{defbox}[1][Définition]{revbox, colback=uqoBleu!6, borderline west={2.2pt}{0pt}{uqoBleu}, coltitle=uqoBleu, title={\faIcon{book-open}\hspace{4pt}#1}}41\renewtcolorbox{importbox}[1][Important]{revbox, colback=uqoRouge!6, borderline west={2.2pt}{0pt}{uqoRouge}, coltitle=uqoRouge, title={\faIcon{exclamation-triangle}\hspace{4pt}#1}}42\renewtcolorbox{exbox}[1][Exemple]{revbox, colback=uqoVert!7, borderline west={2.2pt}{0pt}{uqoVert}, coltitle=uqoVert, title={\faIcon{lightbulb}\hspace{4pt}#1}}43\renewtcolorbox{notebox}[1][Note]{revbox, colback=uqoOr!9, borderline west={2.2pt}{0pt}{uqoOr}, coltitle=uqoOr!50!uqoGris, title={\faIcon{pen}\hspace{4pt}#1}}44\renewtcolorbox{quizbox}[1][Question]{revbox, colback=uqoBleuClair!8, borderline west={2.2pt}{0pt}{uqoBleuClair}, coltitle=uqoBleuClair!75!uqoNavy, title={\faIcon{question-circle}\hspace{4pt}#1}}45% « À l'examen » — bleu nuit, pour dire COMMENT la notion est testée46\newtcolorbox{exambox}[1][À l'examen]{revbox, colback=uqoNavy!5, borderline west={2.2pt}{0pt}{uqoNavy}, coltitle=uqoNavy, title={\faIcon{pen}\hspace{4pt}#1}}47% réponses qui gagnent / qui perdent48\newtcolorbox{okbox}[1][Réponse qui vaut ses points]{revbox, colback=uqoVert!8, borderline west={2.2pt}{0pt}{uqoVert}, coltitle=uqoVert, title={\ding{51}\hspace{4pt}#1}}49\newtcolorbox{kobox}[1][Réponse qui ne vaut rien]{revbox, colback=uqoRouge!7, borderline west={2.2pt}{0pt}{uqoRouge}, coltitle=uqoRouge, title={\ding{55}\hspace{4pt}#1}}50% panneau de formule51\newtcolorbox{formbox}[1][Formule]{enhanced, boxrule=0pt, frame hidden, arc=2pt, colback=revFond,52  borderline north={1.6pt}{0pt}{uqoOr}, left=8pt, right=8pt, top=4pt, bottom=4pt, before skip=4pt, after skip=4pt,53  fontupper=\small, detach title, before upper={\tcbtitle\par\vspace{2pt}}, fonttitle=\bfseries\footnotesize, coltitle=uqoOr!55!uqoGris,54  title={\faIcon{calculator}\hspace{4pt}#1}}5556% ---------- carte à bandeau : \revcard[couleur]{largeur}{icône}{titre}{corps} ----------57\newcommand{\revcard}[5][uqoBleu]{%58  \begin{tcolorbox}[enhanced, width=#2, boxrule=0pt, frame hidden, arc=2.5pt, colback=revFond,59      left=6pt, right=6pt, top=4pt, bottom=4pt, before skip=0pt, after skip=0pt,60      borderline north={2pt}{0pt}{#1}, nobeforeafter, valign=top]61    {\tikz[baseline=-0.7ex]\node[fill=#1, text=uqoBlanc, circle, minimum size=5.2mm, inner sep=0pt]{\small\faIcon{#3}};\hspace{4pt}%62    \footnotesize\bfseries\color{#1}#4\par}63    \vspace{2.5pt}{\footnotesize #5}64  \end{tcolorbox}}6566% ---------- tuile chiffrée : \kpi[couleur]{valeur}{libellé} ----------67\newcommand{\kpi}[3][uqoBleu]{%68  \begin{tcolorbox}[enhanced, boxrule=0pt, frame hidden, arc=2.5pt, colback=revFond, width=\linewidth,69      left=4pt, right=4pt, top=5pt, bottom=5pt, nobeforeafter, borderline south={2pt}{0pt}{#1}]70    \centering{\Large\bfseries\color{#1}#2}\\[1pt]{\scriptsize\color{uqoGris}#3}71  \end{tcolorbox}}7273% version simple et robuste : \partsrow{A}{B}{C}{D}{E} avec étiquettes complètes dans le deck74\newcommand{\partcell}[4]{% #1 actif (1/0) #2 lettre #3 points #4 thème75  \ifnum#1=176    \node[draw=uqoBleu, fill=uqoBleu, rounded corners=1.5pt, minimum width=24mm, minimum height=10mm, inner sep=0pt, anchor=west] (c#2) at (\partx,0) {};77    \node[anchor=north west, text=uqoBlanc, font=\scriptsize\bfseries] at (\partx+1.4mm,4.3mm) {#2 \textcolor{uqoOr}{\textbullet} #3 pts};78    \node[anchor=north west, text=uqoBlanc, font=\fontsize{5.5}{6}\selectfont, text width=21.5mm] at (\partx+1.4mm,0.6mm) {#4};79  \else80    \node[draw=revLigne, fill=revFond, rounded corners=1.5pt, minimum width=24mm, minimum height=10mm, inner sep=0pt, anchor=west] (c#2) at (\partx,0) {};81    \node[anchor=north west, text=uqoBleu, font=\scriptsize\bfseries] at (\partx+1.4mm,4.3mm) {#2 \textcolor{uqoOr}{\textbullet} #3 pts};82    \node[anchor=north west, text=uqoGris, font=\fontsize{5.5}{6}\selectfont, text width=21.5mm] at (\partx+1.4mm,0.6mm) {#4};83  \fi84  \pgfmathsetlengthmacro{\partx}{\partx+25.2mm}\global\let\partx\partx}85\newenvironment{partsrow}{\begin{center}\begin{tikzpicture}\gdef\partx{0mm}}{\end{tikzpicture}\end{center}}8687% ---------- chronologie horizontale : \timeline{{x/label/sub},...} (x en mm sur 120) ----------88\newcommand{\timelineitem}[4][uqoBleu]{% #1 couleur #2 x #3 haut #4 bas89  \fill[#1] (#2,0) circle (1.1mm);90  \node[anchor=south, font=\scriptsize\bfseries, text=#1, align=center] at (#2,2mm) {#3};91  \node[anchor=north, font=\fontsize{6}{7}\selectfont, text=uqoGris, align=center, text width=30mm] at (#2,-2mm) {#4};}92\newenvironment{timeline}[1][120mm]{\begin{center}\begin{tikzpicture}\draw[revLigne, line width=1.6pt] (0,0) -- (#1,0);}{\end{tikzpicture}\end{center}}9394% ---------- tableau zébré : \begin{revtab}{cols} ... \end{revtab} ----------95\newenvironment{revtab}[1]{\begingroup\small\renewcommand{\arraystretch}{1.12}\rowcolors{2}{revFond}{uqoBlanc}\begin{tabular}{#1}}{\end{tabular}\endgroup}96\newcommand{\thd}[1]{\textcolor{uqoBleu}{\textbf{#1}}}9798% ---------- pastille d'étape et puce « geste » ----------99\newcommand{\stepnum}[1]{\tikz[baseline=-0.68ex]\node[fill=uqoOr, text=uqoNavy, circle, inner sep=0pt, minimum size=2.3ex, font=\scriptsize\bfseries]{#1};}100\newcommand{\geste}[2]{\stepnum{#1}\hspace{4pt}#2}101102% ---------- colonnes raccourcies ----------103\newcommand{\twocol}[3][0.5]{\begin{columns}[T]\begin{column}{#1\textwidth}#2\end{column}\begin{column}{\dimexpr0.98\textwidth-#1\textwidth\relax}#3\end{column}\end{columns}}104\endinput105
Files main
Menu

Theme