|
65 | 65 | % Insertion de figures \includegraphics
|
66 | 66 | % LuaLaTeX support les formats PDF, PNG, JPEG et EPS
|
67 | 67 | \RequirePackage{graphicx}
|
| 68 | + |
| 69 | +% Utile pour obtenir le numéro de la dernière page du document |
| 70 | +% \fancyfoot[C]{Page \thepage{} sur \pageref{LastPage}} |
| 71 | +% (non utilisé ici) |
68 | 72 | \RequirePackage{lastpage}
|
69 |
| -\RequirePackage{lipsum} |
| 73 | + |
| 74 | +% Alternative à minted pour afficher du code source |
| 75 | +% Plus traditionnel et plus rapide à compiler |
| 76 | +% Ne nécessite pas --shell-escape |
70 | 77 | \RequirePackage{listings}
|
| 78 | + |
| 79 | +% Meilleure gestion des espacements entre les mots et |
| 80 | +% les lettres (microtypographie), meilleure gestion des |
| 81 | +% césures. Très utile quand la font n'est pas CM. |
71 | 82 | \RequirePackage{microtype}
|
| 83 | + |
| 84 | +% Pour gérer l'index. Nécessite une compilation avec makeindex |
| 85 | +% Automatiquement géré par latexmkrc |
72 | 86 | \RequirePackage{makeidx}
|
| 87 | + |
| 88 | +% Permet des encadrés personnalisés, par exemple pour du code |
73 | 89 | \RequirePackage{mdframed}
|
| 90 | + |
| 91 | +% Autorise plus de environ 18 flottents en attente de placement, |
| 92 | +% évite l'erreur ! LaTeX Error: Too many unprocessed floats. |
74 | 93 | \RequirePackage{morefloats}
|
| 94 | + |
| 95 | +% Permet de gérer plusieurs colonnes avec l'environnement multicols |
75 | 96 | \RequirePackage{multicol}
|
| 97 | + |
| 98 | +% Permet de gérer plusieurs figures dans un environnement figure |
| 99 | +\RequirePackage{subcaption} |
| 100 | + |
76 | 101 | \RequirePackage{nomencl}
|
77 | 102 | \RequirePackage{parskip}
|
78 | 103 | \RequirePackage{rotating}
|
|
81 | 106 | \RequirePackage{tikz}
|
82 | 107 | \RequirePackage{makecell}
|
83 | 108 | \RequirePackage{bold-extra}
|
84 |
| -\RequirePackage{tcolorbox} |
| 109 | +\RequirePackage[many]{tcolorbox} |
85 | 110 | \RequirePackage{unicode-math}
|
86 | 111 | \RequirePackage{cellspace}
|
87 | 112 | \RequirePackage{expkv-cs}
|
| 113 | +\RequirePackage{fontawesome5} |
| 114 | + |
88 | 115 |
|
89 | 116 | % Coloration syntaxique du code source avec Python
|
90 | 117 | % Nécessite la compilation avec --shell-escape
|
|
329 | 356 | \newcommand{\thegenre}{\@genre}
|
330 | 357 | \newcommand{\theauthor}{\@author}
|
331 | 358 | \newcommand{\thesignature}{\@signature}
|
332 |
| -\makeatother |
| 359 | +\makeatother |
| 360 | + |
| 361 | +%% Admonitions / Callout |
| 362 | + |
| 363 | +\definecolor{calloutNoteBg}{HTML}{ECF3FF} |
| 364 | +\definecolor{calloutNoteFrame}{HTML}{448AFF} |
| 365 | + |
| 366 | +\definecolor{calloutAbstractBg}{HTML}{E5F7FF} |
| 367 | +\definecolor{calloutAbstractFrame}{HTML}{00B0FF} |
| 368 | + |
| 369 | +\definecolor{calloutInfoBg}{HTML}{E5F8FB} |
| 370 | +\definecolor{calloutInfoFrame}{HTML}{00B8D4} |
| 371 | + |
| 372 | +\definecolor{calloutTipBg}{HTML}{E5F8F6} |
| 373 | +\definecolor{calloutTipFrame}{HTML}{00BFA5} |
| 374 | + |
| 375 | +\definecolor{calloutSuccessBg}{HTML}{E5F9ED} |
| 376 | +\definecolor{calloutSuccessFrame}{HTML}{00C853} |
| 377 | + |
| 378 | +\definecolor{calloutQuestionBg}{HTML}{EFFCE7} |
| 379 | +\definecolor{calloutQuestionFrame}{HTML}{64DD17} |
| 380 | + |
| 381 | +\definecolor{calloutWarningBg}{HTML}{FFF4E5} |
| 382 | +\definecolor{calloutWarningFrame}{HTML}{FF9E1D} |
| 383 | + |
| 384 | +\definecolor{calloutFailureBg}{HTML}{FFEDED} |
| 385 | +\definecolor{calloutFailureFrame}{HTML}{FF5252} |
| 386 | + |
| 387 | +\definecolor{calloutDangerBg}{HTML}{FFE7EC} |
| 388 | +\definecolor{calloutDangerFrame}{HTML}{FF1744} |
| 389 | + |
| 390 | +\definecolor{calloutBugBg}{HTML}{FEE5EE} |
| 391 | +\definecolor{calloutBugFrame}{HTML}{F50057} |
| 392 | + |
| 393 | +\definecolor{calloutExampleBg}{HTML}{F2EDFF} |
| 394 | +\definecolor{calloutExampleFrame}{HTML}{7C4DFF} |
| 395 | + |
| 396 | +\tcbset{ |
| 397 | + callout note/.style={ |
| 398 | + colbacktitle=calloutNoteBg, |
| 399 | + colframe=calloutNoteFrame, |
| 400 | + coltitle=calloutNoteFrame!80!black, |
| 401 | + borderline west={0.3mm}{0mm}{calloutNoteFrame}, |
| 402 | + title={\makebox[1.3em][c]{\faBookmark}~\textbf{Note}}, |
| 403 | + }, |
| 404 | + callout info/.style={ |
| 405 | + colbacktitle=calloutInfoBg, |
| 406 | + colframe=calloutInfoFrame, |
| 407 | + coltitle=calloutInfoFrame!80!black, |
| 408 | + borderline west={0.3mm}{0mm}{calloutInfoFrame}, |
| 409 | + title={\makebox[1.3em][c]{\faComment}~\textbf{Information}}, |
| 410 | + }, |
| 411 | + callout tip/.style={ |
| 412 | + colbacktitle=calloutTipBg, |
| 413 | + colframe=calloutTipFrame, |
| 414 | + coltitle=calloutTipFrame!80!black, |
| 415 | + borderline west={0.3mm}{0mm}{calloutTipFrame}, |
| 416 | + title={\makebox[1.3em][c]{\faLightbulb}~\textbf{Astuce}}, |
| 417 | + }, |
| 418 | + callout success/.style={ |
| 419 | + colbacktitle=calloutSuccessBg, |
| 420 | + colframe=calloutSuccessFrame, |
| 421 | + coltitle=calloutSuccessFrame!80!black, |
| 422 | + borderline west={0.3mm}{0mm}{calloutSuccessFrame}, |
| 423 | + title={\makebox[1.3em][c]{\faCheck}~\textbf{Succès}}, |
| 424 | + }, |
| 425 | + callout warning/.style={ |
| 426 | + colbacktitle=calloutWarningBg, |
| 427 | + colframe=calloutWarningFrame, |
| 428 | + coltitle=calloutWarningFrame!80!black, |
| 429 | + borderline west={0.3mm}{0mm}{calloutWarningFrame}, |
| 430 | + title={\makebox[1.3em][c]{\faBolt}~\textbf{Avertissement}}, |
| 431 | + }, |
| 432 | + callout important/.style={ |
| 433 | + colbacktitle=calloutDangerBg, |
| 434 | + colframe=calloutDangerFrame, |
| 435 | + coltitle=calloutDangerFrame!80!black, |
| 436 | + borderline west={0.3mm}{0mm}{calloutDangerFrame}, |
| 437 | + title={\makebox[1.3em][c]{\faExclamationTriangle}~\textbf{Danger}}, |
| 438 | + }, |
| 439 | + callout hint/.style={ |
| 440 | + colbacktitle=calloutTipBg, |
| 441 | + colframe=calloutTipFrame, |
| 442 | + coltitle=calloutTipFrame!80!black, |
| 443 | + borderline west={0.3mm}{0mm}{calloutTipFrame}, |
| 444 | + title={\makebox[1.3em][c]{\faLightbulb}~\textbf{Indice}}, |
| 445 | + }, |
| 446 | + callout bug/.style={ |
| 447 | + colbacktitle=calloutBugBg, |
| 448 | + colframe=calloutBugFrame, |
| 449 | + coltitle=calloutBugFrame!80!black, |
| 450 | + borderline west={0.3mm}{0mm}{calloutBugFrame}, |
| 451 | + title={\makebox[1.3em][c]{\faBomb}~\textbf{Bogue}}, |
| 452 | + }, |
| 453 | + callout example/.style={ |
| 454 | + colbacktitle=calloutExampleBg, |
| 455 | + colframe=calloutExampleFrame, |
| 456 | + coltitle=calloutExampleFrame!80!black, |
| 457 | + borderline west={0.3mm}{0mm}{calloutExampleFrame}, |
| 458 | + title={\makebox[1.3em][c]{\faFlask}~\textbf{Exemple}}, |
| 459 | + }, |
| 460 | + callout default/.style={ |
| 461 | + colbacktitle=gray!40!white, |
| 462 | + |
| 463 | + title={\textcolor{black}{\makebox[1.3em][l]{\faComment}}}, |
| 464 | + } |
| 465 | +} |
| 466 | + |
| 467 | +\newtcolorbox{callout}[1][]{% |
| 468 | + breakable, |
| 469 | + enhanced, |
| 470 | + arc=0mm, |
| 471 | + boxrule=0mm, |
| 472 | + titlerule=0mm, |
| 473 | + lefttitle=1mm, |
| 474 | + leftupper=1mm, |
| 475 | + colback=white, |
| 476 | + parbox=false, % Allow paragraph breaks inside the box |
| 477 | + frame hidden, |
| 478 | + borderline west={0.3mm}{0mm}{black!70}, |
| 479 | + #1 |
| 480 | +} |
0 commit comments