summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/aomart/Makefile6
-rw-r--r--macros/latex/contrib/aomart/README12
-rw-r--r--macros/latex/contrib/aomart/aom-fullref.pl (renamed from macros/latex/contrib/aomart/fullref.pl)0
-rw-r--r--macros/latex/contrib/aomart/aomalpha.bst20
-rw-r--r--macros/latex/contrib/aomart/aomart.dtx66
-rw-r--r--macros/latex/contrib/aomart/aomart.pdfbin510453 -> 515456 bytes
-rw-r--r--macros/latex/contrib/aomart/aomfrench.pdfbin219065 -> 219065 bytes
-rw-r--r--macros/latex/contrib/aomart/aomplain.bst20
-rw-r--r--macros/latex/contrib/aomart/aomsample.bib3
-rw-r--r--macros/latex/contrib/aomart/aomsample.pdfbin517984 -> 509807 bytes
-rw-r--r--macros/latex/contrib/aomart/aomsample.tex2
-rw-r--r--macros/latex/contrib/aomart/aomsample1.pdfbin517970 -> 509813 bytes
-rw-r--r--macros/latex/contrib/aomart/aomsample1.tex2
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/README.md17
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.pdfbin0 -> 237306 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.tex202
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.pdfbin0 -> 188917 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.tex197
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.pdfbin0 -> 106076 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.tex156
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.pdfbin0 -> 103429 bytes
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.tex156
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/latex/beamerthemeCelestia.sty1144
-rw-r--r--macros/latex/contrib/beamertools/README39
-rw-r--r--macros/latex/contrib/beamertools/beamertools.dtx282
-rw-r--r--macros/latex/contrib/beamertools/beamertools.ins44
-rw-r--r--macros/latex/contrib/beamertools/beamertools.pdfbin0 -> 190650 bytes
-rw-r--r--macros/latex/contrib/keytheorems/CHANGELOG.md6
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdfbin161806 -> 169165 bytes
-rw-r--r--macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex46
-rw-r--r--macros/latex/contrib/keytheorems/tex/keytheorems.sty139
-rw-r--r--macros/latex/contrib/neoschool/README.md13
-rw-r--r--macros/latex/contrib/neoschool/doc/neoschool-fr.pdfbin0 -> 259250 bytes
-rw-r--r--macros/latex/contrib/neoschool/doc/neoschool-fr.tex1398
-rw-r--r--macros/latex/contrib/neoschool/doc/neoschool.pdfbin0 -> 242652 bytes
-rw-r--r--macros/latex/contrib/neoschool/doc/neoschool.tex1629
-rw-r--r--macros/latex/contrib/neoschool/latex/neoschool.cls7311
-rw-r--r--macros/latex/contrib/scrlayer-fancyhdr/LICENSE.md2
-rw-r--r--macros/latex/contrib/scrlayer-fancyhdr/README.md17
-rw-r--r--macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.dtx16
-rw-r--r--macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.pdfbin332539 -> 332839 bytes
-rw-r--r--macros/latex/contrib/skdoc/README4
-rw-r--r--macros/latex/contrib/skdoc/skdoc.dtx117
-rw-r--r--macros/latex/contrib/skdoc/skdoc.pdfbin325095 -> 340475 bytes
-rw-r--r--macros/latex/contrib/yb-book/DEPENDS.txt3
-rw-r--r--macros/latex/contrib/yb-book/yb-book.dtx40
-rw-r--r--macros/latex/contrib/yb-book/yb-book.pdfbin288050 -> 289702 bytes
-rw-r--r--macros/luatex/latex/plantuml/CHANGELOG.md11
-rw-r--r--macros/luatex/latex/plantuml/README.md10
-rw-r--r--macros/luatex/latex/plantuml/plantuml.pdfbin48809 -> 49031 bytes
-rw-r--r--macros/luatex/latex/plantuml/plantuml.sty14
51 files changed, 12976 insertions, 168 deletions
diff --git a/macros/latex/contrib/aomart/Makefile b/macros/latex/contrib/aomart/Makefile
index a32946042f..53a7b6f167 100644
--- a/macros/latex/contrib/aomart/Makefile
+++ b/macros/latex/contrib/aomart/Makefile
@@ -3,7 +3,7 @@
#
# This file is in public domain
#
-# $Id: Makefile,v 1.7 2017/12/14 03:25:19 boris Exp $
+# $Id: Makefile,v 1.8 2025/01/08 03:36:54 boris Exp $
#
PACKAGE=aomart
@@ -39,8 +39,8 @@ all: ${PDF}
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
do pdflatex $<; done
-aomsample1.tex: fullref.pl aomsample.tex
- perl fullref.pl aomsample.tex > aomsample1.tex
+aomsample1.tex: aom-fullref.pl aomsample.tex
+ perl aom-fullref.pl aomsample.tex > aomsample1.tex
.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls
diff --git a/macros/latex/contrib/aomart/README b/macros/latex/contrib/aomart/README
index f22da9e38b..98d8b76627 100644
--- a/macros/latex/contrib/aomart/README
+++ b/macros/latex/contrib/aomart/README
@@ -1,12 +1,22 @@
LaTeX Class for The Annals of Mathematics
Boris Veytsman
- Version 1.29
+ Version 1.30
This package provides the class for typesetting articles for The Annals
of Mathematics, http://annals.princeton.edu/.
Changes:
+ Version 1.30
+ Multiple citations now are typeset as [1], [2], [3] according
+ to the house style
+ Footnote marks are now in house style rather AMS style.
+ Tightened enumerate and itemize
+ Zbl and numbers for misc and unpublished entries are no longer
+ output
+ Renamed fullref.pl -> aom-fullref.pl as requested by TeXLive
+
+
Version 1.29
Changed the formatting of addresses at the end of the paper.
diff --git a/macros/latex/contrib/aomart/fullref.pl b/macros/latex/contrib/aomart/aom-fullref.pl
index 0eba808aa8..0eba808aa8 100644
--- a/macros/latex/contrib/aomart/fullref.pl
+++ b/macros/latex/contrib/aomart/aom-fullref.pl
diff --git a/macros/latex/contrib/aomart/aomalpha.bst b/macros/latex/contrib/aomart/aomalpha.bst
index 0a856949ce..e2706c2adb 100644
--- a/macros/latex/contrib/aomart/aomalpha.bst
+++ b/macros/latex/contrib/aomart/aomalpha.bst
@@ -378,6 +378,22 @@ FUNCTION {fin.entry}
newline$
}
+FUNCTION {fin.entry.misc}
+{ add.period$
+ write$
+ arxiv output.nonempty.arxiv
+ doi output.nonempty.doi
+ doi empty$
+ { url output.nonempty.url }
+ { doi missing$
+ { url output.nonempty.url }
+ 'skip$
+ if$}
+ if$
+ newline$
+}
+
+
% Removed new.block, new.block.checka, new.block.checkb, new.sentence,
% new.sentence.checka, and new.sentence.checkb functions here, since they
% don't seem to be needed in the AMS style. Also moved some real
@@ -1003,7 +1019,7 @@ FUNCTION {misc}
format.date output
note output
format.book.pages output
- fin.entry
+ fin.entry.misc
empty.misc.check
}
@@ -1075,7 +1091,7 @@ FUNCTION {unpublished}
titlenote output
note "note" output.check
format.date output
- fin.entry
+ fin.entry.misc
}
FUNCTION {default.type} { misc }
diff --git a/macros/latex/contrib/aomart/aomart.dtx b/macros/latex/contrib/aomart/aomart.dtx
index 3b61461bc2..49100d4961 100644
--- a/macros/latex/contrib/aomart/aomart.dtx
+++ b/macros/latex/contrib/aomart/aomart.dtx
@@ -1,7 +1,7 @@
% \iffalse
-% $Id: aomart.dtx,v 1.82 2024/11/13 23:27:43 boris Exp $
+% $Id: aomart.dtx,v 1.83 2025/01/08 03:35:45 boris Exp $
%
-% Copyright 2010-2024, Princeton University (Mathematics Department)
+% Copyright 2010-2025, Princeton University (Mathematics Department)
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any
@@ -66,7 +66,7 @@
% \GetFileInfo{aomart.dtx}
% \newcommand{\progname}[1]{\textsf{#1}}
% \title{\LaTeX{} Class for The \emph{Annals of
-% Mathematics}\thanks{\copyright 2010--2024, Princeton University
+% Mathematics}\thanks{\copyright 2010--2025, Princeton University
% (Mathematics Department)}}
% \author{Boris Veytsman\thanks{%
% \href{mailto:borisv@lk.net}{\texttt{borisv@lk.net}},
@@ -644,7 +644,7 @@
% \end{verbatim}
% The script converts all instances of combinations
% ``|word \ref{reference}|'', ``|word~\ref{reference}|'' and
-% ``|word~\pageref{reference}|'' to ``|\fullref{word}{reference}|, and
+% ``|word~\pageref{reference}|'' to ``|\fullref{word}| |{reference}|'', and
% similarly for parenthesized references, |\eqref| commands, and page
% references. To prevent the converting, just put |\ref{reference}|
% or |\eqref{reference}| inside braces. The ``word'' here must not
@@ -677,7 +677,7 @@
% To provide backward compatibility with some other classes used
% internally by the \emph{Annals of Mathematics,} the class provides
% yet another optional argument for the command |\newtheorem|,
-% allowing constructions like |\newtheorem[\it]{lem}{Lemma}|. This
+% allowing constructions like |\newtheorem[\it]{lem}| |{Lemma}|. This
% optional parameter is not used in our typesetting.
%
%
@@ -694,6 +694,8 @@
% define the theorem style \textbf{remark,} which is identical to the
% theorem style \textbf{definition.}
%
+%
+%
%\subsection{Illustrations}
%\label{sec:illustrations}
%
@@ -709,7 +711,7 @@
%
% \DescribeMacro{\funding}%
% There is a special command for showing the support for the paper,
-% \cs{funding}\oarg{text}\marg{sponsor}\marg{grantid}. Normally it
+% \cs{funding}\oarg{text} \marg{sponsor}\marg{grantid}. Normally it
% prints the name of the sponsor and in parentheses the id of the
% grant, if it is not empty. However, you can override this using the
% optional argument of the command. For example, the following text
@@ -843,7 +845,7 @@
\ProvidesFile{aomart.dtx}
%</gobble>
%<class>\ProvidesClass{aomart}
-[2024/11/13 v1.29 Typesetting articles for the Annals of Mathematics]
+[2025/01/07 v1.30 Typesetting articles for the Annals of Mathematics]
% \end{macrocode}
%
%
@@ -974,12 +976,50 @@
%\subsection{Loading Class and Packages}
%\label{sec:loading}
%
+% \begin{macro}{\@makefnmark@kernel}
+% \changes{v1.30}{2025/01/07}{Use kernel version of footnote marks}
+% AMS redefines |\@makefnmark|. Here we return to the kernel version
+% \begin{macrocode}
+\let\@makefnmark@kernel\@makefnmark
+% \end{macrocode}
+% \end{macro}
+%
+%
% We start with the base class
% \changes{v1.4}{2011/01/21}{Deleted noamsfonts option}
% \begin{macrocode}
\LoadClass[11pt]{amsart}
% \end{macrocode}
%
+% \begin{macro}{\@makefnmar}
+% \changes{v1.30}{2025/01/07}{Use kernel version of footnote marks}
+% Restoring the kernel version
+% \begin{macrocode}
+\let\@makefnmark\@makefnmark@kernel
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@citex}
+% \changes{v1.30}{2025/01/07}{Redefined macto}
+% We redeine this macro early in case some package wants to patch it.
+% Basically house style for repeated citations is not [1, 2, 3], but
+% [1], [2], [3]:
+% \begin{macrocode}
+\def\@citex[#1]#2{\leavevmode
+ \let\@citea\@empty
+ \@cite{\@for\@citeb:=#2\do
+ {\@citea\def\@citea{], [}%
+ \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
+ \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
+ \@ifundefined{b@\@citeb}{\hbox{\reset@font\bfseries ?}%
+ \G@refundefinedtrue
+ \@latex@warning
+ {Citation `\@citeb' on page \thepage \space undefined}}%
+ {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}}
+% \end{macrocode}
+% \end{macro}
+%
% A bunch of packages:
% \changes{v0.5}{2010/10/24}{Made Roman font the default URL font}
% \changes{v0.10}{2010/12/20}{Screen mode triggers special URL
@@ -1141,6 +1181,7 @@
% \end{macrocode}
% \end{macro}
%
+%
%\subsection{Page Dimensions and Paragraphing}
%\label{sec:page}
%
@@ -1212,6 +1253,17 @@
% \end{macro}
% \end{macro}
%
+% \changes{v2.30}{2025/01/07}{Changed the margins for enumerate}
+% AMS defines the margins for lists |\AtBeginDocument|. Our lists are
+% tighter
+% \begin{macrocode}
+\AtBeginDocument{%
+ \labelsep=5pt\relax
+ \settowidth\leftmargini{\labelenumi\hskip\labelsep}%
+ \leftmargin=\leftmargini
+ \labelwidth=\leftmargini \advance\labelwidth-\labelsep
+ \@listi}
+% \end{macrocode}
%
%\subsection{Headers}
%\label{sec:headers}
diff --git a/macros/latex/contrib/aomart/aomart.pdf b/macros/latex/contrib/aomart/aomart.pdf
index 96e9ab46e3..41ef1a0e43 100644
--- a/macros/latex/contrib/aomart/aomart.pdf
+++ b/macros/latex/contrib/aomart/aomart.pdf
Binary files differ
diff --git a/macros/latex/contrib/aomart/aomfrench.pdf b/macros/latex/contrib/aomart/aomfrench.pdf
index 74aa017ebb..b4035693b0 100644
--- a/macros/latex/contrib/aomart/aomfrench.pdf
+++ b/macros/latex/contrib/aomart/aomfrench.pdf
Binary files differ
diff --git a/macros/latex/contrib/aomart/aomplain.bst b/macros/latex/contrib/aomart/aomplain.bst
index 03d0fe74d1..7e298ef2a4 100644
--- a/macros/latex/contrib/aomart/aomplain.bst
+++ b/macros/latex/contrib/aomart/aomplain.bst
@@ -374,6 +374,22 @@ FUNCTION {fin.entry}
newline$
}
+
+FUNCTION {fin.entry.misc}
+{ add.period$
+ write$
+ arxiv output.nonempty.arxiv
+ doi output.nonempty.doi
+ doi empty$
+ { url output.nonempty.url }
+ { doi missing$
+ { url output.nonempty.url }
+ 'skip$
+ if$}
+ if$
+ newline$
+}
+
% Removed new.block, new.block.checka, new.block.checkb, new.sentence,
% new.sentence.checka, and new.sentence.checkb functions here, since they
% don't seem to be needed in the AMS style. Also moved some real
@@ -998,7 +1014,7 @@ FUNCTION {misc}
format.date output
note output
format.book.pages output
- fin.entry
+ fin.entry.misc
empty.misc.check
}
@@ -1070,7 +1086,7 @@ FUNCTION {unpublished}
titlenote output
note "note" output.check
format.date output
- fin.entry
+ fin.entry.misc
}
FUNCTION {default.type} { misc }
diff --git a/macros/latex/contrib/aomart/aomsample.bib b/macros/latex/contrib/aomart/aomsample.bib
index d0f8f4c0d4..61b4b4a556 100644
--- a/macros/latex/contrib/aomart/aomsample.bib
+++ b/macros/latex/contrib/aomart/aomsample.bib
@@ -20,7 +20,7 @@
S{\'e}minaire Initiation {\`a} l'Analyse, G. Choquet, M. Rogalski, J.
Saint Raymond, at the Universit{\'e} Pierre et Marie Curie, Paris, 23e
ann{\'e}e.},
- year = {1983/194}
+ year = {1983/1984},
}
@@ -190,7 +190,6 @@ url = {http://www.math.leidenuniv.nl/~hwl/PUBLICATIONS/1973a/art.pdf}
}
-
@Unpublished{Minasyan08,
author = {A. Minasyan and D. Osin},
title = {Normal Automorphisms of Relatively Hyperbolic Groups},
diff --git a/macros/latex/contrib/aomart/aomsample.pdf b/macros/latex/contrib/aomart/aomsample.pdf
index 6669b99e2f..d15da8b497 100644
--- a/macros/latex/contrib/aomart/aomsample.pdf
+++ b/macros/latex/contrib/aomart/aomsample.pdf
Binary files differ
diff --git a/macros/latex/contrib/aomart/aomsample.tex b/macros/latex/contrib/aomart/aomsample.tex
index 4009b77565..6cc5ed011f 100644
--- a/macros/latex/contrib/aomart/aomsample.tex
+++ b/macros/latex/contrib/aomart/aomsample.tex
@@ -1751,7 +1751,7 @@ agencies]{Department of Defense}{Special project Secret Defense}.
\bibliography{aomsample}
-\bibliographystyle{aomalpha}
+\bibliographystyle{aomplain}
\end{document}
\endinput
diff --git a/macros/latex/contrib/aomart/aomsample1.pdf b/macros/latex/contrib/aomart/aomsample1.pdf
index 2b6d8d5c5f..602f2b7811 100644
--- a/macros/latex/contrib/aomart/aomsample1.pdf
+++ b/macros/latex/contrib/aomart/aomsample1.pdf
Binary files differ
diff --git a/macros/latex/contrib/aomart/aomsample1.tex b/macros/latex/contrib/aomart/aomsample1.tex
index 5558562436..7e1354ba3a 100644
--- a/macros/latex/contrib/aomart/aomsample1.tex
+++ b/macros/latex/contrib/aomart/aomsample1.tex
@@ -1750,7 +1750,7 @@ agencies]{Department of Defense}{Special project Secret Defense}.
\bibliography{aomsample}
-\bibliographystyle{aomalpha}
+\bibliographystyle{aomplain}
\end{document}
\endinput
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/README.md b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/README.md
new file mode 100644
index 0000000000..f8d3d0be1c
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/README.md
@@ -0,0 +1,17 @@
+# Celestia Beamer Theme
+
+## Description
+
+Celestia is a modern and elegant Beamer theme designed for academic and professional presentations. It offers a clean aesthetic with carefully chosen colors, typography, and layouts.
+
+## License
+
+Copyright 2025 Razik Ikhlef
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.pdf
new file mode 100644
index 0000000000..046414445f
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.tex b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.tex
new file mode 100644
index 0000000000..bd094ec698
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia-fr.tex
@@ -0,0 +1,202 @@
+\documentclass[%
+ 10pt,
+ french,
+ aspectratio=1610,
+ xcolor=svgnames
+]{beamer}
+
+\usetheme[
+ decorative,
+ nocodebox,
+ frametitle=plain,
+ margin=3em,
+ soberblock
+]{Celestia}
+
+\title{Le thème Celestia}
+\subtitle{v1.0.0}
+\author{Razik Ikhlef}
+\date{\today}
+
+\begin{document}
+
+\begin{frame}[plain]
+ \titlepage
+\end{frame}
+
+\begin{frame}[fragile]{Polices}
+ \begin{description}[mainfaceoptions]
+ \item[mainface] Police principale pour le texte et les titres (\alert{Literata} par défaut)
+ \item[mainfaceoptions] Options directement passées à \alert{fontspec} pour la police principale
+ \item[sansface] Police sans empattements pour les éléments structurels (\alert{Inter} par défaut)
+ \item[sansfaceoptions] Options passées à \alert{fontspec} pour la police sans empattements
+ \item[monoface] Police à chasse fixe pour le code (\alert{Roboto Mono} par défaut)
+ \item[monofaceoptions] Options passées à \alert{fontspec} pour la police à chasse fixe
+ \item[allserif] Utilise la police principale avec empattements pour les mathématiques
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ mainface=EB Garamond,
+ mainfaceoptions={Scale=1.1},
+ sansface=Montserrat,
+ monoface=Fira Code,
+ allserif
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Couleurs}
+ \begin{description}[codebackgroundcolor]
+ \item[maincolor] Couleur principale utilisée pour les titres et accents (code \alert{\LaTeX} svgname ou \alert{HTML} hexadécimal)
+ \item[accentcolor] Couleur secondaire pour les éléments spéciaux
+ \item[backgroundcolor] Couleur de fond des diapositives (\alert{F7F9FC} par défaut)
+ \item[codebackgroundcolor] Couleur de fond des blocs de code (\alert{F1F3F6} par défaut)
+ \item[mainblue] Couleur des blocs standards (\alert{045549} par défaut)
+ \item[maingreen] Couleur des blocs exemple (\alert{054924} par défaut)
+ \item[mainred] Couleur des blocs alerte (\alert{490445} par défaut)
+ \item[unicolor] Utilise la couleur principale pour tout le texte
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ maincolor=045549,
+ accentcolor=E63946,
+ backgroundcolor=FAFAFA,
+ codebackgroundcolor=F5F5F5
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Mise en page}
+ \begin{description}[centeredtitle]
+ \item[margin] Marge du contenu (\alert{2em} par défaut)
+ \item[frametitle] Style du titre (\alert{elegant}, \alert{plain}, \alert{centered})
+ \item[decorative] Active les éléments décoratifs
+ \item[nodecorative] Désactive les éléments décoratifs
+ \item[centeredtitle] Centre le titre sur la page de titre
+ \item[titleright] Aligne le titre à droite
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ margin=1.5em,
+ frametitle=centered,
+ decorative,
+ centeredtitle
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{En-têtes}
+ \begin{description}[headweight]
+ \item[headstyle] Famille de police pour les titres : \alert{rmfamily} (avec empattements) ou \alert{sffamily} (sans empattements)
+ \item[headshape] Style des caractères : \alert{sc} (petites capitales), \alert{it} (italique), \alert{normal}
+ \item[headweight] Graisse des titres : \alert{bfseries} (gras) ou \alert{mdseries} (normal)
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ headstyle=sffamily,
+ headshape=sc,
+ headweight=bfseries
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Code}
+ \begin{description}[nocodeframe]
+ \item[codebox] Active l'encadrement du code avec \alert{tcolorbox} (\alert{true} par défaut)
+ \item[nocodebox] Désactive complètement l'encadrement \alert{tcolorbox} du code
+ \item[nocodeframe] Conserve \alert{tcolorbox} mais sans bordure visible
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ nocodebox,
+ nocodeframe
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Pied de page}
+ \begin{description}[quartercirclefooter]
+ \item[nofooter] Supprime entièrement le pied de page, sauf le numéro de diapositive
+ \item[quartercirclefooter] Affiche uniquement le numéro dans un quart de cercle en bas à droite
+ \item[fullbarfooter] Crée une barre complète avec auteur/titre/date et numéro dans un cercle
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ quartercirclefooter
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Table des matières}
+ \begin{description}[twocolumntoc]
+ \item[compacttoc] Réduit l'espacement vertical entre les entrées de la table
+ \item[twocolumntoc] Répartit automatiquement les sections sur deux colonnes équilibrées
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ compacttoc,
+ twocolumntoc
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}{Blocs}
+ \begin{description}[exampleblock]
+ \item[block] Bloc standard pour le contenu normal
+ \item[exampleblock] Bloc pour les exemples
+ \item[alertblock] Bloc pour les alertes
+ \end{description}
+
+ \begin{block}{Bloc standard}Contenu d'un bloc standard\end{block}
+ \begin{exampleblock}{Bloc exemple}Contenu d'un bloc exemple\end{exampleblock}
+ \begin{alertblock}{Bloc alerte}Contenu d'un bloc alerte\end{alertblock}
+\end{frame}
+
+\begin{frame}[fragile]{Style des blocs}
+ \begin{description}[soberblock]
+ \item[soberblock] Le titre adopte la couleur principale du bloc (mainblue/maingreen/mainred) sur le fond général du document, tandis que le corps garde un fond légèrement teinté (10\%)
+ \item[softblock] Le titre et le corps partagent le même fond légèrement teinté (10\%), avec le titre dans la couleur principale correspondante
+ \end{description}
+
+ \begin{exampleblock}{Exemple}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ soberblock % Titre coloré sur fond document
+]{Celestia}
+
+% ou
+
+\usetheme[
+ softblock % Titre coloré sur fond 10%
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+
+\end{frame}
+
+\begin{frame}[standout]{Pages d'emphase}
+ L'option \emph{standout} transforme une diapositive en page d'emphase, idéale pour les moments clés de la présentation : citations marquantes, chiffres essentiels, messages à retenir
+\end{frame}
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.pdf
new file mode 100644
index 0000000000..a5c2934799
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.tex b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.tex
new file mode 100644
index 0000000000..40c658d8c7
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/demo/Celestia.tex
@@ -0,0 +1,197 @@
+\documentclass[10pt,english,aspectratio=1610,xcolor=svgnames]{beamer}
+
+\usetheme[
+ decorative,
+ nocodebox,
+ frametitle=plain,
+ margin=3em,
+ soberblock
+]{Celestia}
+
+\title{The Celestia Theme}
+\subtitle{v1.0.0}
+\author{Razik Ikhlef}
+\date{\today}
+
+\begin{document}
+
+\begin{frame}[plain]
+ \titlepage
+\end{frame}
+
+\begin{frame}[fragile]{Fonts}
+ \begin{description}[mainfaceoptions]
+ \item[mainface] Main font for text and titles (\alert{Literata} by default)
+ \item[mainfaceoptions] Options directly passed to \alert{fontspec} for the main font
+ \item[sansface] Sans-serif font for structural elements (\alert{Inter} by default)
+ \item[sansfaceoptions] Options passed to \alert{fontspec} for the sans-serif font
+ \item[monoface] Monospace font for code (\alert{Roboto Mono} by default)
+ \item[monofaceoptions] Options passed to \alert{fontspec} for the monospace font
+ \item[allserif] Uses the main serif font for mathematics
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ mainface=EB Garamond,
+ mainfaceoptions={Scale=1.1},
+ sansface=Montserrat,
+ monoface=Fira Code,
+ allserif
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Colors}
+ \begin{description}[codebackgroundcolor]
+ \item[maincolor] Main color used for titles and accents (\alert{\LaTeX} svgname or \alert{HTML} hexadecimal code)
+ \item[accentcolor] Secondary color for special elements
+ \item[backgroundcolor] Slide background color (\alert{F7F9FC} by default)
+ \item[codebackgroundcolor] Code block background color (\alert{F1F3F6} by default)
+ \item[mainblue] Standard block color (\alert{045549} by default)
+ \item[maingreen] Example block color (\alert{054924} by default)
+ \item[mainred] Alert block color (\alert{490445} by default)
+ \item[unicolor] Uses the main color for all text
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ maincolor=045549,
+ accentcolor=E63946,
+ backgroundcolor=FAFAFA,
+ codebackgroundcolor=F5F5F5
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Layout}
+ \begin{description}[centeredtitle]
+ \item[margin] Content margin (\alert{2em} by default)
+ \item[frametitle] Title style (\alert{elegant}, \alert{plain}, \alert{centered})
+ \item[decorative] Enables decorative elements
+ \item[nodecorative] Disables decorative elements
+ \item[centeredtitle] Centers the title on the title page
+ \item[titleright] Right-aligns the title
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ margin=1.5em,
+ frametitle=centered,
+ decorative,
+ centeredtitle
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Headers}
+ \begin{description}[headweight]
+ \item[headstyle] Font family for titles: \alert{rmfamily} (serif) or \alert{sffamily} (sans-serif)
+ \item[headshape] Character style: \alert{sc} (small caps), \alert{it} (italic), \alert{normal}
+ \item[headweight] Title weight: \alert{bfseries} (bold) or \alert{mdseries} (normal)
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ headstyle=sffamily,
+ headshape=sc,
+ headweight=bfseries
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Code}
+ \begin{description}[nocodeframe]
+ \item[codebox] Enables code framing with \alert{tcolorbox} (\alert{true} by default)
+ \item[nocodebox] Completely disables \alert{tcolorbox} code framing
+ \item[nocodeframe] Keeps \alert{tcolorbox} but without visible border
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ nocodebox,
+ nocodeframe
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Footer}
+ \begin{description}[quartercirclefooter]
+ \item[nofooter] Completely removes the footer, except for the slide number
+ \item[quartercirclefooter] Displays only the number in a quarter circle at the bottom right
+ \item[fullbarfooter] Creates a complete bar with author/title/date and number in a circle
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ quartercirclefooter
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}[fragile]{Table of Contents}
+ \begin{description}[twocolumntoc]
+ \item[compacttoc] Reduces vertical spacing between table of contents entries
+ \item[twocolumntoc] Automatically distributes sections across two balanced columns
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ compacttoc,
+ twocolumntoc
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+\end{frame}
+
+\begin{frame}{Blocks}
+ \begin{description}[exampleblock]
+ \item[block] Standard block for normal content
+ \item[exampleblock] Block for examples
+ \item[alertblock] Block for alerts
+ \end{description}
+
+ \begin{block}{Standard block}Standard block content\end{block}
+ \begin{exampleblock}{Example block}Example block content\end{exampleblock}
+ \begin{alertblock}{Alert block}Alert block content\end{alertblock}
+\end{frame}
+
+\begin{frame}[fragile]{Block Styles}
+ \begin{description}[soberblock]
+ \item[soberblock] The title adopts the main block color (mainblue/maingreen/mainred) on the document's general background, while the body keeps a slightly tinted background (10%)
+ \item[softblock] The title and body share the same slightly tinted background (10%), with the title in the corresponding main color
+ \end{description}
+
+ \begin{exampleblock}{Example}
+ \begin{lstlisting}[style=latex]
+\usetheme[
+ soberblock % Colored title on document background
+]{Celestia}
+
+% or
+
+\usetheme[
+ softblock % Colored title on 10% background
+]{Celestia}
+ \end{lstlisting}
+ \end{exampleblock}
+
+\end{frame}
+
+\begin{frame}[standout]{Standout Pages}
+ The \texttt{standout} option transforms a slide into a standout page, ideal for key moments in the presentation: striking quotes, essential figures, take-away messages
+\end{frame}
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.pdf
new file mode 100644
index 0000000000..bbea23cdd0
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.tex b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.tex
new file mode 100644
index 0000000000..97ae22ad6c
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia-fr.tex
@@ -0,0 +1,156 @@
+\documentclass[french]{neoschool}
+
+\title{Le thème Celestia}
+\subtitle{v1.0.0}
+\author{Razik Ikhlef}
+\date{\today}
+
+\begin{document}
+
+\maketitle
+
+\section{Polices}
+\begin{description}
+\item[mainface] Police principale pour le texte et les titres (\textcolor{titleColor}{Literata} par défaut)
+\item[mainfaceoptions] Options directement passées à \textcolor{titleColor}{fontspec} pour la police principale
+\item[sansface] Police sans empattements pour les éléments structurels (\textcolor{titleColor}{Inter} par défaut)
+\item[sansfaceoptions] Options passées à \textcolor{titleColor}{fontspec} pour la police sans empattements
+\item[monoface] Police à chasse fixe pour le code (\textcolor{titleColor}{Roboto Mono} par défaut)
+\item[monofaceoptions] Options passées à \textcolor{titleColor}{fontspec} pour la police à chasse fixe
+\item[allserif] Utilise la police principale avec empattements pour les mathématiques
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ mainface=EB Garamond,
+ mainfaceoptions={Scale=1.1},
+ sansface=Montserrat,
+ monoface=Fira Code,
+ allserif
+]{Celestia}
+\end{code}
+
+\section{Couleurs}
+\begin{description}
+\item[maincolor] Couleur principale utilisée pour les titres et accents (code \textcolor{titleColor}{LaTeX} svgname ou \textcolor{titleColor}{HTML} hexadécimal)
+\item[accentcolor] Couleur secondaire pour les éléments spéciaux
+\item[backgroundcolor] Couleur de fond des diapositives (\textcolor{titleColor}{F7F9FC} par défaut)
+\item[codebackgroundcolor] Couleur de fond des blocs de code (\textcolor{titleColor}{F1F3F6} par défaut)
+\item[mainblue] Couleur des blocs standards (\textcolor{titleColor}{045549} par défaut)
+\item[maingreen] Couleur des blocs exemple (\textcolor{titleColor}{054924} par défaut)
+\item[mainred] Couleur des blocs alerte (\textcolor{titleColor}{490445} par défaut)
+\item[unicolor] Utilise la couleur principale pour tout le texte
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ maincolor=045549,
+ accentcolor=E63946,
+ backgroundcolor=FAFAFA,
+ codebackgroundcolor=F5F5F5
+]{Celestia}
+\end{code}
+
+\section{Mise en page}
+\begin{description}
+\item[margin] Marge du contenu (\textcolor{titleColor}{2em} par défaut)
+\item[frametitle] Style du titre (\textcolor{titleColor}{elegant}, \textcolor{titleColor}{plain}, \textcolor{titleColor}{centered})
+\item[decorative] Active les éléments décoratifs
+\item[nodecorative] Désactive les éléments décoratifs
+\item[centeredtitle] Centre le titre sur la page de titre
+\item[titleright] Aligne le titre à droite
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ margin=1.5em,
+ frametitle=centered,
+ decorative,
+ centeredtitle
+]{Celestia}
+\end{code}
+
+\section{En-têtes}
+\begin{description}
+\item[headstyle] Famille de police pour les titres : \textcolor{titleColor}{rmfamily} (avec empattements) ou \textcolor{titleColor}{sffamily} (sans empattements)
+\item[headshape] Style des caractères : \textcolor{titleColor}{sc} (petites capitales), \textcolor{titleColor}{it} (italique), \textcolor{titleColor}{normal}
+\item[headweight] Graisse des titres : \textcolor{titleColor}{bfseries} (gras) ou \textcolor{titleColor}{mdseries} (normal)
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ headstyle=sffamily,
+ headshape=sc,
+ headweight=bfseries
+]{Celestia}
+\end{code}
+
+\section{Code}
+\begin{description}
+\item[codebox] Active l'encadrement du code avec \textcolor{titleColor}{tcolorbox} (\textcolor{titleColor}{true} par défaut)
+\item[nocodebox] Désactive complètement l'encadrement \textcolor{titleColor}{tcolorbox} du code
+\item[nocodeframe] Conserve \textcolor{titleColor}{tcolorbox} mais sans bordure visible
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ nocodebox,
+ nocodeframe
+]{Celestia}
+\end{code}
+
+\section{Pied de page}
+\begin{description}
+\item[nofooter] Supprime entièrement le pied de page, sauf le numéro de diapositive
+\item[quartercirclefooter] Affiche uniquement le numéro dans un quart de cercle en bas à droite
+\item[fullbarfooter] Crée une barre complète avec auteur/titre/date et numéro dans un cercle
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ quartercirclefooter
+]{Celestia}
+\end{code}
+
+\section{Table des matières}
+\begin{description}
+\item[compacttoc] Réduit l'espacement vertical entre les entrées de la table
+\item[twocolumntoc] Répartit automatiquement les sections sur deux colonnes équilibrées
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ compacttoc,
+ twocolumntoc
+]{Celestia}
+\end{code}
+
+\section{Blocs}
+\begin{description}
+\item[block] Bloc standard pour le contenu normal
+\item[exampleblock] Bloc pour les exemples
+\item[alertblock] Bloc pour les alertes
+\end{description}
+
+\section{Style des blocs}
+\begin{description}
+\item[soberblock] Le titre adopte la couleur principale du bloc (mainblue/maingreen/mainred) sur le fond général du document, tandis que le corps garde un fond légèrement teinté (10\%)
+\item[softblock] Le titre et le corps partagent le même fond légèrement teinté (10\%), avec le titre dans la couleur principale correspondante
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ soberblock
+]{Celestia}
+
+% ou
+
+\usetheme[
+ softblock
+]{Celestia}
+\end{code}
+
+\section{Pages d'emphase}
+L'option \texttt{standout} transforme une diapositive en page d'emphase, idéale pour les moments clés de la présentation~: citations marquantes, chiffres essentiels, messages à retenir.
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.pdf b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.pdf
new file mode 100644
index 0000000000..91857b9638
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.pdf
Binary files differ
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.tex b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.tex
new file mode 100644
index 0000000000..c6edfe6455
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/doc/beamerthemeCelestia.tex
@@ -0,0 +1,156 @@
+\documentclass[english]{neoschool}
+
+\title{The Celestia Theme}
+\subtitle{v1.0.0}
+\author{Razik Ikhlef}
+\date{\today}
+
+\begin{document}
+
+\maketitle
+
+\section{Fonts}
+\begin{description}
+\item[mainface] Main font for text and titles (\textcolor{titleColor}{Literata} by default)
+\item[mainfaceoptions] Options directly passed to \textcolor{titleColor}{fontspec} for the main font
+\item[sansface] Sans-serif font for structural elements (\textcolor{titleColor}{Inter} by default)
+\item[sansfaceoptions] Options passed to \textcolor{titleColor}{fontspec} for the sans-serif font
+\item[monoface] Monospace font for code (\textcolor{titleColor}{Roboto Mono} by default)
+\item[monofaceoptions] Options passed to \textcolor{titleColor}{fontspec} for the monospace font
+\item[allserif] Uses the main serif font for mathematics
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ mainface=EB Garamond,
+ mainfaceoptions={Scale=1.1},
+ sansface=Montserrat,
+ monoface=Fira Code,
+ allserif
+]{Celestia}
+\end{code}
+
+\section{Colors}
+\begin{description}
+\item[maincolor] Main color used for titles and accents (\textcolor{titleColor}{LaTeX} svgname or \textcolor{titleColor}{HTML} hexadecimal code)
+\item[accentcolor] Secondary color for special elements
+\item[backgroundcolor] Slide background color (\textcolor{titleColor}{F7F9FC} by default)
+\item[codebackgroundcolor] Code block background color (\textcolor{titleColor}{F1F3F6} by default)
+\item[mainblue] Standard block color (\textcolor{titleColor}{045549} by default)
+\item[maingreen] Example block color (\textcolor{titleColor}{054924} by default)
+\item[mainred] Alert block color (\textcolor{titleColor}{490445} by default)
+\item[unicolor] Uses the main color for all text
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ maincolor=045549,
+ accentcolor=E63946,
+ backgroundcolor=FAFAFA,
+ codebackgroundcolor=F5F5F5
+]{Celestia}
+\end{code}
+
+\section{Layout}
+\begin{description}
+\item[margin] Content margin (\textcolor{titleColor}{2em} by default)
+\item[frametitle] Title style (\textcolor{titleColor}{elegant}, \textcolor{titleColor}{plain}, \textcolor{titleColor}{centered})
+\item[decorative] Enables decorative elements
+\item[nodecorative] Disables decorative elements
+\item[centeredtitle] Centers the title on the title page
+\item[titleright] Right-aligns the title
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ margin=1.5em,
+ frametitle=centered,
+ decorative,
+ centeredtitle
+]{Celestia}
+\end{code}
+
+\section{Headers}
+\begin{description}
+\item[headstyle] Font family for titles: \textcolor{titleColor}{rmfamily} (serif) or \textcolor{titleColor}{sffamily} (sans-serif)
+\item[headshape] Character style: \textcolor{titleColor}{sc} (small caps), \textcolor{titleColor}{it} (italic), \textcolor{titleColor}{normal}
+\item[headweight] Title weight: \textcolor{titleColor}{bfseries} (bold) or \textcolor{titleColor}{mdseries} (normal)
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ headstyle=sffamily,
+ headshape=sc,
+ headweight=bfseries
+]{Celestia}
+\end{code}
+
+\section{Code}
+\begin{description}
+\item[codebox] Enables code framing with \textcolor{titleColor}{tcolorbox} (\textcolor{titleColor}{true} by default)
+\item[nocodebox] Completely disables \textcolor{titleColor}{tcolorbox} code framing
+\item[nocodeframe] Keeps \textcolor{titleColor}{tcolorbox} but without visible border
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ nocodebox,
+ nocodeframe
+]{Celestia}
+\end{code}
+
+\section{Footer}
+\begin{description}
+\item[nofooter] Completely removes the footer, except for the slide number
+\item[quartercirclefooter] Displays only the number in a quarter circle at the bottom right
+\item[fullbarfooter] Creates a complete bar with author/title/date and number in a circle
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ quartercirclefooter
+]{Celestia}
+\end{code}
+
+\section{Table of Contents}
+\begin{description}
+\item[compacttoc] Reduces vertical spacing between table of contents entries
+\item[twocolumntoc] Automatically distributes sections across two balanced columns
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ compacttoc,
+ twocolumntoc
+]{Celestia}
+\end{code}
+
+\section{Blocks}
+\begin{description}
+\item[block] Standard block for normal content
+\item[exampleblock] Block for examples
+\item[alertblock] Block for alerts
+\end{description}
+
+\section{Block Styles}
+\begin{description}
+\item[soberblock] The title adopts the main block color on the document's general background, while the body keeps a slightly tinted background (10\%)
+\item[softblock] The title and body share the same slightly tinted background (10\%), with the title in the corresponding main color
+\end{description}
+
+\begin{code}{latex}
+\usetheme[
+ soberblock
+]{Celestia}
+
+% or
+
+\usetheme[
+ softblock
+]{Celestia}
+\end{code}
+
+\section{Standout Pages}
+La commande \texttt{standout} transforme une diapositive en page spéciale, idéale pour les moments clés de la présentation : citations marquantes, chiffres essentiels, messages à retenir.
+
+\end{document}
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/latex/beamerthemeCelestia.sty b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/latex/beamerthemeCelestia.sty
new file mode 100644
index 0000000000..fad9ba136f
--- /dev/null
+++ b/macros/latex/contrib/beamer-contrib/themes/beamerthemecelestia/latex/beamerthemeCelestia.sty
@@ -0,0 +1,1144 @@
+% beamethemeCelestia.sty
+%
+% copyright (C) 2025 Razik Ikhlef
+% razik.ikhlef@csilyon.fr
+%
+% The newest version of this beamer theme should always be available
+% from the following web page: https://apps.edulatex.xyz/celestia/
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{beamerthemeCelestia}[2025/01/08 v1.0.0]
+
+\RequirePackage{iftex}
+\RequirePackage{etoolbox}
+\RequirePackage{kvoptions}
+\RequirePackage{babel}
+\RequirePackage[most]{tcolorbox}
+
+\RequirePackage{silence}
+\WarningFilter{latexfont}{Font shape}
+\renewcommand{\@font@warning}[1]{}
+
+%------------------
+% Theme options
+%------------------
+\SetupKeyvalOptions{
+ family=celestia,
+ prefix=celestia@
+}
+
+% Boolean declarations using kvoptions
+\DeclareBoolOption{allserif}
+\DeclareBoolOption{unicolor}
+\DeclareBoolOption{standout}
+\DeclareBoolOption{compacttoc}
+\DeclareBoolOption{twocolumntoc}
+\DeclareBoolOption{decorative}
+\DeclareBoolOption{nodecorative}
+\DeclareBoolOption{nofooter}
+\DeclareBoolOption{quartercirclefooter}
+\DeclareBoolOption{fullbarfooter}
+\DeclareBoolOption{centeredtitle}
+\DeclareBoolOption{titleright}
+\DeclareBoolOption[true]{codebox}
+\DeclareBoolOption{nocodebox}
+\DeclareBoolOption{nocodeframe}
+\DeclareBoolOption{soberblock}
+\DeclareBoolOption{softblock}
+
+% String options with defaults
+\DeclareStringOption[sffamily]{headstyle} % rmfamily, sffamily
+\DeclareStringOption[normal]{headshape} % sc, it, normal
+\DeclareStringOption[bfseries]{headweight} % bfseries, mdseries
+
+\DeclareStringOption[045549]{maincolor}
+\DeclareStringOption[specialcolor]{accentcolor}
+\DeclareStringOption{backgroundcolor}
+\DeclareStringOption{codebackgroundcolor}
+\DeclareStringOption[045549]{mainblue}
+\DeclareStringOption[054924]{maingreen}
+\DeclareStringOption[490445]{mainred}
+
+\DeclareStringOption[2em]{margin}
+\DeclareStringOption[elegant]{frametitle} % centered, plain, plain centered
+
+\DeclareStringOption[Literata]{mainface}
+\DeclareStringOption{mainfaceoptions}
+\DeclareStringOption[Inter]{sansface}
+\DeclareStringOption{sansfaceoptions}
+\DeclareStringOption[Roboto Mono]{monoface}
+\DeclareStringOption{monofaceoptions}
+
+% Process options
+\ProcessKeyvalOptions*
+
+\ifcelestia@nodecorative
+ \setbool{celestia@decorative}{false}
+\fi
+
+\ifcelestia@nocodebox
+ \setbool{celestia@codebox}{false}
+\fi
+
+\def\celestia@bfseries{bfseries}
+\def\celestia@mdseries{mdseries}
+
+%------------------
+% Engine detection and package loading
+%------------------
+% Base packages for both engines
+\RequirePackage{tikz}
+\usetikzlibrary{backgrounds,calc,shapes,decorations.fractals}
+\RequirePackage{multicol}
+
+% Engine-specific packages and settings
+\ifluatex
+ \RequirePackage{fontspec}
+ \RequirePackage[T1]{fontenc}
+ \ifcelestia@allserif\RequirePackage{mathpazo}\else\RequirePackage{arev}\fi
+
+ \defaultfontfeatures{Ligatures=TeX,Renderer=HarfBuzz}
+
+ \IfFontExistsTF{\celestia@mainface}{
+ \setmainfont[\celestia@mainfaceoptions]{\celestia@mainface}
+ }{
+ \setmainfont{Source Serif Pro}
+ }
+
+ \IfFontExistsTF{\celestia@sansface}{
+ \setsansfont[\celestia@sansfaceoptions]{\celestia@sansface}
+ }{
+ \setsansfont{Source Sans Pro}
+ }
+
+ \IfFontExistsTF{\celestia@monoface}{
+ \setmonofont[\celestia@monofaceoptions]{\celestia@monoface}
+ }{
+ \setmonofont{Source Code Pro}
+ }
+
+ \RequirePackage[
+ protrusion=true,
+ expansion=true
+ ]{microtype}
+\else
+ \RequirePackage[utf8]{inputenc}
+ \RequirePackage[T1]{fontenc}
+ \RequirePackage{sourceserifpro}
+ \RequirePackage{sourcesanspro}
+ \RequirePackage{roboto-mono}
+ \RequirePackage[
+ protrusion=true,
+ expansion=true,
+ tracking=true,
+ kerning=true,
+ spacing=true,
+ factor=1100,
+ stretch=10,
+ shrink=10
+ ]{microtype}
+\fi
+
+\ifcelestia@allserif
+\usefonttheme{serif}
+\else
+\usefonttheme[stillsansserifmath,stillsansseriftext]{serif}
+\fi
+
+%------------------
+% Color definitions
+%------------------
+
+% Test if the color is a valid SVG name, otherwise use HTML code
+\newcommand{\@testcolor}[2]{%
+ \ifcsname\string\color@#1\endcsname
+ \colorlet{#2}{#1}%
+ \else
+ \definecolor{#2}{HTML}{#1}%
+ \fi
+}
+
+\@testcolor{\celestia@maincolor}{main}
+
+% Main color palette
+\@testcolor{\celestia@mainblue}{mainblue}
+\@testcolor{\celestia@maingreen}{maingreen}
+\@testcolor{\celestia@mainred}{mainred}
+
+\definecolor{rulecolor}{HTML}{888888}
+\definecolor{codeframecolor}{HTML}{95A5A6}
+
+\colorlet{specialcolor}{-main}
+\ifx\celestia@headweight\celestia@bfseries
+\colorlet{specialcolor}{specialcolor!45!black}
+\definecolor{background}{HTML}{F7F9FC}
+\else
+\colorlet{specialcolor}{specialcolor!40!black}
+\definecolor{background}{HTML}{F8FAFC}
+\fi
+
+\@testcolor{\celestia@accentcolor}{accent}
+
+\ifx\celestia@backgroundcolor\@empty\else
+ \@testcolor{\celestia@backgroundcolor}{background}
+\fi
+
+\definecolor{codebackground}{HTML}{F1F3F6}
+\ifx\celestia@codebackgroundcolor\@empty\else
+ \@testcolor{\celestia@codebackgroundcolor}{codebackground}
+\fi
+
+% Special colors based on options
+\setbeamercolor{plain frametitle}{fg=main,bg=background}
+
+%------------------
+% Basic settings
+%------------------
+\setbeamersize{text margin left=\celestia@margin,text margin right=\celestia@margin}
+\setbeamertemplate{navigation symbols}{}
+
+%------------------
+% Font settings
+%------------------
+% Main fonts settings
+\setbeamerfont{subtitle}{series=\mdseries}
+\setbeamerfont{date}{series=\mdseries,size=\small}
+
+\setbeamerfont{title}{size=\Large,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname}
+\setbeamerfont{author}{size=\normalsize,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname}
+\setbeamerfont{description item}{size=\normalsize,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\ifcelestia@allserif\rmfamily\else\sffamily\fi,%
+ }
+\setbeamerfont{frametitle}{size=\large,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname,%
+ parent=structure}
+\setbeamerfont{plain title}{size=\large,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname,%
+ parent=structure}
+\setbeamerfont{section title}{size=\LARGE,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname,%
+ parent=structure}
+\setbeamerfont{section in toc}{size=\large,%
+ series=\mdseries,%
+ family=\ifcelestia@allserif\rmfamily\else\sffamily\fi,%
+ shape=\normalfont,%
+ parent=structure}
+\setbeamerfont{subsection title}{size=\Large,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname,%
+ parent=structure}
+\setbeamerfont{subsection in toc}{size=\normalsize,%
+ series=\mdseries,%
+ family=\ifcelestia@allserif\rmfamily\else\sffamily\fi,%
+ shape=\normalfont,%
+ parent=structure}
+\setbeamerfont{footline text}{size=\tiny,%
+ series=\mdseries,%
+ family=\csname\celestia@headstyle\endcsname,%
+ shape=\csname\celestia@headshape\endcsname,%
+ parent=structure}
+\setbeamerfont{block title}{size=\normalsize,%
+ series=\csname\celestia@headweight\endcsname,%
+ family=\ifcelestia@allserif\rmfamily\else\sffamily\fi,%
+ parent=structure}
+
+% Special fonts
+\setbeamerfont{caption}{size=\small}
+\setbeamerfont{footnote}{size=\small}
+
+% Itemize markers
+\newcommand{\celestiaCircle}{%
+ \raisebox{0.1ex}{\scalebox{1.2}{$\bullet$}}%
+}
+\newcommand{\celestiaSmallCircle}{%
+ \raisebox{0.2ex}{\scalebox{1}{$\circ$}}%
+}
+\newcommand{\celestiaDiamond}{%
+ \raisebox{0.2ex}{\scalebox{0.8}{$\diamond$}}%
+}
+
+% Block margins and spacing
+\setlength{\leftmargini}{2em}
+\setlength{\leftmarginii}{1.5em}
+\setlength{\leftmarginiii}{1.25em}
+
+%------------------
+% Color settings
+%------------------
+% Basic structure colors
+\usecolortheme[named=background]{structure}
+\setbeamercolor{background canvas}{bg=background}
+\ifcelestia@unicolor
+\setbeamercolor{normal text}{fg=main}
+\else
+\setbeamercolor{normal text}{fg=black}
+\fi
+\usebeamercolor[fg]{normal text}
+
+% Title and section colors
+\setbeamercolor{titlelike}{parent=structure}
+\setbeamercolor{title}{fg=main}
+% \setbeamercolor{subtitle}{parent={}}
+% \setbeamercolor{subtitle}{fg=black}
+\setbeamercolor{author}{fg=main}
+\setbeamercolor{section title}{fg=main}
+\setbeamercolor{subsection title}{fg=accent}
+\setbeamercolor{frametitle}{bg=main,fg=background}
+
+% Navigation and structural elements
+\setbeamercolor{item}{fg=main}
+\setbeamercolor{description}{fg=main}
+\setbeamercolor{section in toc}{fg=main}
+
+% Block colors with opacity control
+\newcommand{\setblockopacity}[1][10]{%
+ \setbeamercolor{block title}{fg=background,bg=mainblue!90!white}
+ \setbeamercolor{block body}{bg=mainblue!#1!white}
+}
+
+% Colors for different block types
+\ifcelestia@soberblock
+ \setbeamercolor{block title}{fg=mainblue,bg=background}
+ \setbeamercolor{block body}{bg=mainblue!10!white}
+ \setbeamercolor{block title example}{fg=maingreen,bg=background}
+ \setbeamercolor{block body example}{bg=maingreen!10!white}
+ \setbeamercolor{block title alerted}{fg=mainred,bg=background}
+ \setbeamercolor{block body alerted}{bg=mainred!10!white}
+\else
+ \ifcelestia@softblock
+ \setbeamercolor{block title}{fg=mainblue,bg=mainblue!10!white}
+ \setbeamercolor{block body}{bg=mainblue!10!white}
+ \setbeamercolor{block title example}{fg=maingreen,bg=maingreen!10!white}
+ \setbeamercolor{block body example}{bg=maingreen!10!white}
+ \setbeamercolor{block title alerted}{fg=mainred,bg=mainred!10!white}
+ \setbeamercolor{block body alerted}{bg=mainred!10!white}
+ \else
+ \setbeamertemplate{blocks}[rounded]
+ \setbeamercolor{block title}{fg=background,bg=mainblue!90!white}
+ \setbeamercolor{block body}{bg=mainblue!10!white}
+ \setbeamercolor{block title example}{fg=background,bg=maingreen!90!white}
+ \setbeamercolor{block body example}{bg=maingreen!10!white}
+ \setbeamercolor{block title alerted}{fg=background,bg=mainred!90!white}
+ \setbeamercolor{block body alerted}{bg=mainred!10!white}
+ \fi
+\fi
+
+% Caption colors
+\setbeamercolor{caption}{fg=main}
+\setbeamercolor{caption name}{parent=caption}
+
+%------------------
+% Basic templates
+%------------------
+% List settings
+\setbeamertemplate{itemize/enumerate subbody begin}{\normalsize}
+
+% Itemize markers
+\setbeamertemplate{itemize item}{\celestiaCircle}
+\setbeamertemplate{itemize subitem}{\celestiaSmallCircle}
+\setbeamertemplate{itemize subsubitem}{\celestiaDiamond}
+
+% Enumeration settings
+% Level 1: Circled numbers with main color background
+\setbeamertemplate{enumerate item}[circle]
+\setbeamercolor{enumerate item}{fg=background,bg=main}
+
+% Level 2: Circled letters with white background
+\setbeamertemplate{enumerate subitem}{%
+ \begin{tikzpicture}[baseline=(char.base)]
+ \node[circle, draw=main, inner sep=0.5pt, fill=white] (char) {\textcolor{main}{\alph{enumii}}};
+ \end{tikzpicture}%
+}
+\setbeamercolor{enumerate subitem}{fg=main,bg=background}
+
+% Level 3: Numbers with parentheses
+\setbeamertemplate{enumerate subsubitem}{%
+ (\insertsubsubenumlabel)%
+}
+\setbeamercolor{enumerate subsubitem}{fg=main}
+
+% Special commands for text formatting
+\renewcommand{\texttt}[1]{\textcolor{accent}{{\ttfamily\csname\celestia@headweight\endcsname #1}}}
+\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \ttfamily\bfseries
+ \color{main}
+ \let\do\@makeother\dospecials
+ \verbatim@font\@noligs
+ \@ifstar\@verb\@sverb}
+\renewcommand{\alert}[1]{{\csname\celestia@headweight\endcsname\textcolor{accent}{#1}}}
+
+% Caption template
+\setbeamertemplate{caption}{%
+ \raggedright%
+ \insertcaption\par%
+}
+
+% Hyperlink setup
+\hypersetup{urlcolor=mainblue}
+
+% Additional spacing settings
+\setlength{\parskip}{0.5ex}
+\setlength{\itemsep}{0.5ex}
+
+%------------------
+% Table of contents
+%------------------
+% Base TOC style
+\setbeamertemplate{section in toc}[sections numbered]
+\setbeamertemplate{subsection in toc}{%
+ \leavevmode\leftskip=3.2em%
+ \rlap{\hskip-2em\inserttocsectionnumber.\inserttocsubsectionnumber}%
+ \inserttocsubsection\par%
+}
+
+% Compact TOC handling
+\ifcelestia@compacttoc
+ \patchcmd{\beamer@sectionintoc}
+ {\vfill}
+ {\vskip\itemsep}
+ {}
+ {}
+\fi
+
+% Two-column TOC handling
+\NewDocumentCommand{\twocolumntoc}{ O{} O{} O{} }{%
+ \ifcelestia@twocolumntoc
+ \setlength{\columnsep}{2em}
+ \begin{multicols}{2}
+ \tableofcontents[sections={#1-\the\numexpr#2-1}]
+ \columnbreak
+ \tableofcontents[sections={#2-#3}]
+ \end{multicols}
+ \else
+ \tableofcontents
+ \fi
+}
+
+%------------------
+% Frame title
+%------------------
+% Define colors for different frame title styles
+\setbeamercolor{elegant frametitle}{bg=main,fg=background}
+\setbeamercolor{plain frametitle}{fg=main,bg=}
+\setbeamercolor{centered frametitle}{bg=main,fg=background}
+\setbeamercolor{plaincentered frametitle}{fg=main,bg=}
+
+% Elegant frame title (default) with decorative line
+\defbeamertemplate{frametitle}{elegant}{%
+ \nointerlineskip%
+ \begin{beamercolorbox}[wd=\paperwidth,sep=0.5em]{elegant frametitle}
+ \usebeamerfont{frametitle}\insertframetitle%
+ \ifx\insertframesubtitle\@empty\else%
+ \par{\usebeamerfont{framesubtitle}\insertframesubtitle}%
+ \fi%
+ \end{beamercolorbox}%
+ \ifcelestia@quartercirclefooter\ifcelestia@nofooter\vskip-.5em\else\vskip-1em\fi\else\ifcelestia@fullbarfooter\vskip-1em\else\vskip-1em\fi\fi%
+ \begin{tikzpicture}[remember picture,overlay]
+ \draw[main,line width=0.3pt]
+ ([yshift=-1pt]current page.north west) --
+ ([yshift=-1pt]current page.north east);
+ \ifcelestia@decorative
+ \fill[main,opacity=0.1]
+ ([xshift=1em]current page.north west) --
+ ([xshift=3em]current page.north west) --
+ ([xshift=2em,yshift=-1em]current page.north west) -- cycle;
+ \fi
+ \end{tikzpicture}%
+}
+
+% Plain frame title (no background, left-aligned)
+\defbeamertemplate{frametitle}{plain}{%
+ \nointerlineskip%
+ \begin{beamercolorbox}[wd=\paperwidth,sep=1em]{plain frametitle}
+ \usebeamerfont{plain title}\insertframetitle%
+ \ifx\insertframesubtitle\@empty\else%
+ \par{\usebeamerfont{framesubtitle}\insertframesubtitle}%
+ \fi%
+ \end{beamercolorbox}%
+ \ifcelestia@quartercirclefooter\ifcelestia@nofooter\vskip-.25em\else\vskip-.75em\fi\else\ifcelestia@fullbarfooter\vskip-1em\else\vskip-1em\fi\fi%
+}
+
+% Centered frame title (like elegant but centered)
+\defbeamertemplate{frametitle}{centered}{%
+ \nointerlineskip%
+ \begin{beamercolorbox}[wd=\paperwidth,sep=0.5em,center]{centered frametitle}
+ \usebeamerfont{frametitle}\insertframetitle%
+ \ifx\insertframesubtitle\@empty\else%
+ \par{\usebeamerfont{framesubtitle}\insertframesubtitle}%
+ \fi%
+ \end{beamercolorbox}%
+ \ifcelestia@quartercirclefooter\ifcelestia@nofooter\vskip-.25em\else\vskip-.75em\fi\else\ifcelestia@fullbarfooter\vskip-1em\else\vskip-1em\fi\fi%
+ \begin{tikzpicture}[remember picture,overlay]
+ \draw[main,line width=0.3pt]
+ ([yshift=-1pt]current page.north west) --
+ ([yshift=-1pt]current page.north east);
+ \ifcelestia@decorative
+ \fill[main,opacity=0.1]
+ ([xshift=1em]current page.north west) --
+ ([xshift=3em]current page.north west) --
+ ([xshift=2em,yshift=-1em]current page.north west) -- cycle;
+ \fi
+ \end{tikzpicture}%
+}
+
+% Plain centered frame title (no background, centered)
+\defbeamertemplate{frametitle}{plaincentered}{%
+ \nointerlineskip%
+ \begin{beamercolorbox}[wd=\paperwidth,sep=1em,center]{plaincentered frametitle}
+ \usebeamerfont{plain title}\insertframetitle%
+ \ifx\insertframesubtitle\@empty\else%
+ \par{\usebeamerfont{framesubtitle}\insertframesubtitle}%
+ \fi%
+ \end{beamercolorbox}%
+ \ifcelestia@quartercirclefooter\ifcelestia@nofooter\vskip-.25em\else\vskip-0.75em\fi\else\ifcelestia@fullbarfooter\vskip-1em\else\vskip-1em\fi\fi%
+}
+
+% Set the default style to elegant
+\setbeamertemplate{frametitle}[\celestia@frametitle]
+
+%------------------
+% Frame continuation
+%------------------
+\setbeamertemplate{frametitle continuation}{\usebeamerfont{frametitle}(\insertcontinuationcount)}
+
+%------------------
+% Footline
+%------------------
+
+\setbeamertemplate{footline}{%
+ \leavevmode%
+ \setbeamercolor{current author}{fg=main,bg=background}%
+ \setbeamercolor{current title}{fg=background,bg=main}%
+ \setbeamercolor{current date}{fg=main,bg=background}%
+ \setbeamercolor{current page}{fg=background,bg=main}%
+ \ifcelestia@nofooter%
+ \hfill\usebeamerfont{footline text}\textcolor{main}{\insertframenumber/\inserttotalframenumber}%
+ \hspace*{2em}%
+ \vspace*{1em}%
+ \else%
+ \ifcelestia@quartercirclefooter%
+ \begin{tikzpicture}[overlay]
+ \usebeamercolor[bg]{current title}
+ \draw[fill] (\paperwidth,0ex) circle (8ex);
+ \usebeamercolor[fg]{current title}
+ \node at (\paperwidth-3.25ex,3.25ex) {\footnotesize\insertframenumber};
+ \end{tikzpicture}
+ \else%
+ \ifcelestia@fullbarfooter%
+ \hbox{%
+ \begin{beamercolorbox}[wd=.275\paperwidth,ht=2.75ex,dp=1.5ex,left]{current title}%
+ \usebeamerfont{footline text}\hspace{1em}\insertshortauthor%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.45\paperwidth,ht=2.75ex,dp=1.5ex,center]{current title}%
+ \usebeamerfont{footline text}\insertshorttitle%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.275\paperwidth,ht=2.75ex,dp=1.5ex,right]{current title}%
+ \usebeamerfont{footline text}\insertshortdate{}\hspace*{6.5em}%
+ \end{beamercolorbox}%
+ }%
+ \begin{tikzpicture}[overlay]
+ \usebeamercolor[fg]{title in head/foot}
+ \draw (.275\paperwidth,0) -- (.275\paperwidth,3.25ex);
+ \draw (.725\paperwidth,0) -- (.725\paperwidth,3.25ex);
+ \end{tikzpicture}
+
+ \begin{tikzpicture}[overlay]
+ \usebeamercolor[bg]{current title}
+ \draw[fill] (\paperwidth-5ex,3.625ex) circle (6ex);
+ \usebeamercolor[fg]{current title}
+ \draw[fill] (\paperwidth-5ex,3.625ex) circle (5ex);
+ \usebeamercolor[bg]{current title}
+ \node at (\paperwidth-5ex,4ex) {{\footnotesize\mathversion{bold}${}^{\insertframenumber}/_{\inserttotalframenumber}$}};
+ \end{tikzpicture}
+ \else%
+ \hbox{%
+ \begin{beamercolorbox}[wd=.3\paperwidth,ht=3ex,dp=1.5ex,center,sep=-1ex]{current author}%
+ \usebeamerfont{footline text}\insertshortauthor%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.4\paperwidth,ht=3ex,dp=1.5ex,center,sep=-1ex]{current title}%
+ \usebeamerfont{footline text}\insertshorttitle%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.2\paperwidth,ht=3ex,dp=1.5ex,center,sep=-1ex]{current date}%
+ \usebeamerfont{footline text}\insertshortdate%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[wd=.1\paperwidth,ht=3ex,dp=1.5ex,center,sep=-1ex]{current page}%
+ \usebeamerfont{footline text}\insertframenumber/\inserttotalframenumber%
+ \end{beamercolorbox}%
+ }%
+ \fi%
+ \fi%
+ \fi%
+}
+
+%------------------
+% Standout frames
+%------------------
+\define@key{beamerframe}{standout}[true]{%
+ \booltrue{celestia@standout}%
+ \begingroup
+ % Center the frame and remove frame number
+ \setkeys{beamerframe}{c}%
+ \setkeys{beamerframe}{noframenumbering}%
+
+ % Set the colors for standout frame
+ \setbeamercolor{background canvas}{bg=accent!10}%
+ \setbeamercolor{frametitle}{fg=background,bg=accent}%
+ \setbeamercolor{normal text}{fg=accent}%
+ \usebeamercolor[fg]{normal text}%
+
+ \setbeamercolor{block title}{parent={}}%
+ \setbeamercolor{block title}{fg=mainblue,bg=accent!10}%
+ \setbeamercolor{block title example}{parent={}}%
+ \setbeamercolor{block title example}{fg=maingreen,bg=accent!10}%
+ \setbeamercolor{block title alerted}{parent={}}%
+ \setbeamercolor{block title alerted}{fg=mainred,bg=accent!10}%
+
+ % Remove footline for standout frames
+ \setbeamertemplate{footline}{}%
+}
+
+% Close the group at the end of the frame
+\pretocmd{\beamer@reseteecodes}{%
+ \ifbool{celestia@standout}{%
+ \endgroup
+ \boolfalse{celestia@standout}%
+ }{}%
+}{}{}
+
+% Format standout content
+\AtBeginEnvironment{beamer@frameslide}{%
+ \ifbool{celestia@standout}{%
+ \centering
+ \bfseries
+ }{}%
+}
+
+%------------------
+% Special pages
+%------------------
+% Title page
+\setbeamertemplate{title page}{%
+ \ifcelestia@nofooter\vskip3em\else\vskip2em\fi%
+ \vfill%
+ \begingroup
+ \def\titlealignment{left}
+ \ifcelestia@centeredtitle
+ \def\titlealignment{center}%
+ \fi
+ \ifcelestia@titleright
+ \def\titlealignment{right}%
+ \fi
+ \begin{beamercolorbox}[sep=8pt,wd=\textwidth,\titlealignment]{title}
+ \usebeamerfont{title}\inserttitle\par%
+ \ifx\insertsubtitle\@empty\else%
+ \vskip0.5em%
+ {\usebeamerfont{subtitle}\ifcelestia@unicolor\color{main}\else\color{black}\fi\insertsubtitle\par}%
+ \fi%
+ \vskip2pt%
+ {\color{rulecolor}\ifx\celestia@headwight\celestia@bfseries
+ \ifcelestia@centeredtitle
+ \rule{.5\linewidth}{1pt}%
+ \else
+ \rule{.95\linewidth}{1pt}%
+ \fi
+ \else
+ \ifcelestia@centeredtitle
+ \rule{.5\linewidth}{0.5pt}%
+ \else
+ \rule{.95\linewidth}{0.5pt}%
+ \fi
+ \fi}%
+ \end{beamercolorbox}%
+ \begin{beamercolorbox}[sep=8pt,wd=\textwidth,\titlealignment]{author}
+ \usebeamerfont{author}\insertauthor
+ \end{beamercolorbox}%
+ \vskip-8pt%
+ \begin{beamercolorbox}[sep=8pt,wd=\textwidth,\titlealignment]{institute}
+ \usebeamerfont{institute}\insertinstitute%
+ \end{beamercolorbox}%
+ \vskip-4pt%
+ \begin{beamercolorbox}[sep=8pt,wd=\textwidth,\titlealignment]{date}
+ \usebeamerfont{date}\insertdate%
+ \end{beamercolorbox}%
+ \endgroup
+ \vfill%
+}
+
+% Apply background to title page
+\ifcelestia@decorative
+\addtobeamertemplate{title page}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \fill[background] (current page.south west) rectangle (current page.north east);
+
+ \begin{scope}
+ \fill[accent!85!white,opacity=0.045] ([xshift=-1.4cm,yshift=-1.1cm]current page.north east) circle (0.55cm);
+ \fill[accent!78!white,opacity=0.055] ([xshift=-0.7cm,yshift=-1.6cm]current page.north east) circle (0.45cm);
+
+ \fill[accent!88!white,opacity=0.04] ([xshift=-1.9cm,yshift=-0.8cm]current page.north east) circle (0.32cm);
+ \fill[accent!92!white,opacity=0.05] ([xshift=-1.2cm,yshift=-0.6cm]current page.north east) circle (0.25cm);
+
+ \fill[accent!89!white,opacity=0.045] ([xshift=-0.5cm,yshift=-0.9cm]current page.north east) circle (0.2cm);
+ \end{scope}
+
+ \shade[ball color=accent!5!white,opacity=0.2]
+ ([xshift=-1.3cm,yshift=-1.2cm]current page.north east) circle (0.5cm);
+ \end{tikzpicture}%
+}{}
+\fi
+
+%------------------
+% Section pages
+%------------------
+\setbeamertemplate{section page}{%
+ \ifcelestia@decorative
+ \begin{tikzpicture}[remember picture,overlay]
+ \fill[accent!92!white,opacity=0.038] ([xshift=3.82cm,yshift=1.18cm]current page.center) circle (2.85cm);
+ \fill[accent!78!white,opacity=0.032] ([xshift=4.55cm,yshift=-0.73cm]current page.center) circle (2.15cm);
+
+ \fill[accent!85!white,opacity=0.042] ([xshift=-3.23cm,yshift=2.85cm]current page.center) circle (1.62cm);
+ \fill[accent!72!white,opacity=0.034] ([xshift=-3.95cm,yshift=1.48cm]current page.center) circle (1.23cm);
+
+ \fill[accent!88!white,opacity=0.022] ([xshift=2.25cm,yshift=3.45cm]current page.center) circle (0.92cm);
+ \fill[accent!84!white,opacity=0.028] ([xshift=-2.65cm,yshift=-2.15cm]current page.center) circle (1.08cm);
+ \fill[accent!76!white,opacity=0.019] ([xshift=1.85cm,yshift=-2.95cm]current page.center) circle (0.73cm);
+ \fill[accent!90!white,opacity=0.016] ([xshift=-1.52cm,yshift=1.78cm]current page.center) circle (0.48cm);
+
+ \shade[ball color=accent!4.5!white,opacity=0.19]
+ ([xshift=2.82cm,yshift=-1.58cm]current page.center) circle (1.95cm);
+ \shade[ball color=accent!3.2!white,opacity=0.17]
+ ([xshift=-2.18cm,yshift=0.92cm]current page.center) circle (1.42cm);
+
+ \fill[accent!88!white,opacity=0.022] ([xshift=3.48cm,yshift=-2.38cm]current page.center) circle (0.28cm);
+ \fill[accent!85!white,opacity=0.018] ([xshift=-3.12cm,yshift=-1.25cm]current page.center) circle (0.35cm);
+ \fill[accent!92!white,opacity=0.014] ([xshift=1.15cm,yshift=2.72cm]current page.center) circle (0.25cm);
+ \fill[accent!86!white,opacity=0.016] ([xshift=-2.85cm,yshift=0.95cm]current page.center) circle (0.32cm);
+ \fill[accent!90!white,opacity=0.012] ([xshift=2.95cm,yshift=0.85cm]current page.center) circle (0.22cm);
+
+ \fill[accent!95!white,opacity=0.008] ([xshift=0.95cm,yshift=-2.45cm]current page.center) circle (0.18cm);
+ \fill[accent!93!white,opacity=0.009] ([xshift=-1.85cm,yshift=-1.65cm]current page.center) circle (0.15cm);
+ \end{tikzpicture}
+\fi
+
+\begin{center}
+ \parbox{.95\textwidth}{%
+ \centering
+ \begin{tikzpicture}[overlay,remember picture]
+ \node[fill=main!3!white,opacity=0.11,inner sep=1.72cm,shape=circle] at ([yshift=-0.382\textheight]current page.north) {};
+ \node[fill=main!4!white,opacity=0.13,inner sep=1.45cm,shape=circle] at ([yshift=-0.382\textheight]current page.north) {};
+ \node[fill=main!5!white,opacity=0.15,inner sep=1.18cm,shape=circle] at ([yshift=-0.382\textheight]current page.north) {};
+ \node[fill=main!6!white,opacity=0.17,inner sep=0.91cm,shape=circle] at ([yshift=-0.382\textheight]current page.north) {};
+ \node[fill=main!7!white,opacity=0.19,inner sep=0.64cm,shape=circle] at ([yshift=-0.382\textheight]current page.north) {};
+ \node[align=center,text width=.95\textwidth] at (0,0) {
+ \centering
+ {\usebeamercolor[fg]{section title}%
+ \usebeamerfont{section title}%
+ \insertsectionhead\par}%
+ };
+ \end{tikzpicture}
+ }
+\end{center}
+}
+
+\setbeamertemplate{subsection page}{%
+ \begin{center}
+ \parbox{.95\textwidth}{%
+ \centering
+ \begin{tikzpicture}[overlay,remember picture]
+ \node[align=center,text width=.95\textwidth] at (0,0) {
+ \centering
+ {\usebeamercolor[fg]{subsection title}%
+ \usebeamerfont{subsection title}%
+ \insertsubsectionhead\par}%
+ };
+ \end{tikzpicture}
+ }
+ \end{center}
+}
+
+\AtBeginSection{%
+ \begin{frame}[noframenumbering,plain]
+ \sectionpage
+ \end{frame}
+}
+
+\AtBeginSubsection{%
+ \begin{frame}[noframenumbering,plain]
+ \subsectionpage
+ \end{frame}
+}
+
+%------------------
+% Math and Theorem Settings
+%------------------
+
+% Set basic theorem colors
+\setbeamercolor{theorem text}{parent=normal text}
+\setbeamercolor{theorem title}{parent=structure}
+
+% Define theorem environments
+\theoremstyle{plain}
+\newtheorem{proposition}[theorem]{\translate{Proposition}}
+
+\theoremstyle{remark}
+\newtheorem{remark}[theorem]{\translate{Remark}}
+% \newtheorem{note}[theorem]{\translate{Note}}
+
+% Set theorem templates to normal font
+\setbeamertemplate{theorems}[normal font]
+
+% Math-specific commands for formatting
+\newcommand{\mathterm}[1]{\textcolor{mainblue}{\mathbf{#1}}}
+\newcommand{\mathdef}[1]{\textcolor{maingreen}{\mathit{#1}}}
+
+% Caption style
+\setbeamertemplate{caption}{%
+ \raggedright
+ \insertcaption\par
+ }
+
+%------------------
+% Listings Settings
+%------------------
+
+\RequirePackage{listings}
+
+\AtEndPreamble{
+ \colorlet{codeKeyword}{main}
+ \definecolor{codeString}{HTML}{333333}
+ \definecolor{codeComment}{HTML}{6A737D}
+ \colorlet{codeEmph}{accent}
+ \colorlet{codeNumber}{accent}
+ \definecolor{codeNumber}{HTML}{C84E3F}
+
+ \ifcelestia@unicolor
+ \colorlet{codeIdentifier}{main}
+ \else
+ \colorlet{codeIdentifier}{black}
+ \fi
+
+ \lstset{
+ basicstyle=\ttfamily\footnotesize\color{codeIdentifier},
+ keywordstyle=\color{codeKeyword}\csname\celestia@headweight\endcsname,
+ stringstyle=\color{codeString},
+ commentstyle=\color{codeComment},
+ emphstyle=\color{codeEmph}\csname\celestia@headweight\endcsname,
+ numberstyle=\color{codeNumber},
+ numbersep=5pt,
+ columns=fullflexible,
+ breaklines=true,
+ showstringspaces=false,
+ inputencoding=utf8,
+ extendedchars=true,
+ escapeinside={(*@}{@*)},
+ aboveskip=.25\baselineskip,
+ belowskip=.25\baselineskip,
+ literate={%
+ á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
+ {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
+ {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
+ {À}{{\`A}}1 {È}{{\`E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
+ {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
+ {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
+ {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
+ {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
+ {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
+ {ẞ}{{\SS}}1 {ç}{{\c{c}}}1 {Ç}{{\c{C}}}1 {ø}{{\o}}1 {Ø}{{\O}}1
+ {å}{{\aa}}1 {Å}{{\AA}}1 {ã}{{\~a}}1 {õ}{{\~o}}1 {Ã}{{\~A}}1
+ {Õ}{{\~O}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 {¡}{{!`}}1
+ {°}{{\textdegree}}1 {º}{{\textordmasculine}}1 {ª}{{\textordfeminine}}1
+ {€}{{\euro}}1 {£}{{\pounds}}1 {©}{{\copyright}}1 {®}{{\textregistered}}1
+ {«}{{\guillemotleft}}1 {»}{{\guillemotright}}1 {Ð}{{\DH}}1 {ð}{{\dh}}1
+ {Ý}{{\'Y}}1 {ý}{{\'y}}1 {Þ}{{\TH}}1 {þ}{{\th}}1 {Ă}{{\u{A}}}1
+ {ă}{{\u{a}}}1 {Ą}{{\k{A}}}1 {ą}{{\k{a}}}1 {Ć}{{\'C}}1 {ć}{{\'c}}1
+ {Č}{{\v{C}}}1 {č}{{\v{c}}}1 {Ď}{{\v{D}}}1 {ď}{{\v{d}}}1 {Đ}{{\DJ}}1
+ {đ}{{\dj}}1 {Ė}{{\.{E}}}1 {ė}{{\.{e}}}1 {Ę}{{\k{E}}}1 {ę}{{\k{e}}}1
+ {Ě}{{\v{E}}}1 {ě}{{\v{e}}}1 {Ğ}{{\u{G}}}1 {ğ}{{\u{g}}}1 {Ĩ}{{\~I}}1
+ {ĩ}{{\~\i}}1 {Į}{{\k{I}}}1 {į}{{\k{i}}}1 {İ}{{\.{I}}}1 {ı}{{\i}}1
+ {Ĺ}{{\'L}}1 {ĺ}{{\'l}}1 {Ľ}{{\v{L}}}1 {ľ}{{\v{l}}}1 {Ł}{{\L{}}}1
+ {ł}{{\l{}}}1 {Ń}{{\'N}}1 {ń}{{\'n}}1 {Ň}{{\v{N}}}1 {ň}{{\v{n}}}1
+ {Ő}{{\H{O}}}1 {ő}{{\H{o}}}1 {Ŕ}{{\'{R}}}1 {ŕ}{{\'{r}}}1 {Ř}{{\v{R}}}1
+ {ř}{{\v{r}}}1 {Ś}{{\'S}}1 {ś}{{\'s}}1 {Ş}{{\c{S}}}1 {ş}{{\c{s}}}1
+ {Š}{{\v{S}}}1 {š}{{\v{s}}}1 {Ť}{{\v{T}}}1 {ť}{{\v{t}}}1 {Ũ}{{\~U}}1
+ }
+
+\lstdefinelanguage{json}{%
+ keywords={true,false,null},
+ sensitive=false,
+ morestring=[b]",
+ morecomment=[l]{//},
+ morecomment=[s]{/*}{*/},
+ literate=
+ *{0}{{{\color{codeComment}0}}}{1}
+ {1}{{{\color{codeComment}1}}}{1}
+ {2}{{{\color{codeComment}2}}}{1}
+ {3}{{{\color{codeComment}3}}}{1}
+ {4}{{{\color{codeComment}4}}}{1}
+ {5}{{{\color{codeComment}5}}}{1}
+ {6}{{{\color{codeComment}6}}}{1}
+ {7}{{{\color{codeComment}7}}}{1}
+ {8}{{{\color{codeComment}8}}}{1}
+ {9}{{{\color{codeComment}9}}}{1}
+ {:}{{{\color{codeKeyword}{:}}}}{1}
+ {,}{{{\color{codeKeyword}{,}}}}{1}
+ {\{}{{{\color{codeKeyword}{\{}}}}{1}
+ {\}}{{{\color{codeKeyword}{\}}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1},
+}
+
+% YAML
+\lstdefinelanguage{yaml}{%
+ keywords={true,false,null,yes,no,on,off},
+ sensitive=false,
+ morestring=[b]",
+ morestring=[b]',
+ morecomment=[l]{\#},
+ literate=
+ *{:}{{{\color{codeKeyword}{:}}}}{1}
+ {-}{{{\color{codeKeyword}{-}}}}{1}
+ {>}{{{\color{codeKeyword}{>}}}}{1}
+ {|}{{{\color{codeKeyword}{|}}}}{1},
+}
+
+% TOML
+\lstdefinelanguage{toml}{%
+ keywords={true,false},
+ sensitive=false,
+ morestring=[b]",
+ morestring=[b]',
+ morecomment=[l]{\#},
+ literate=
+ *{=}{{{\color{codeKeyword}{=}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1}
+ {.}{{{\color{codeKeyword}{.}}}}{1},
+}
+
+% CSV
+\lstdefinelanguage{csv}{%
+ sensitive=false,
+ morestring=[b]",
+ morecomment=[l]{\#},
+ literate=
+ *{,}{{{\color{codeKeyword}{,}}}}{1}
+ {;}{{{\color{codeKeyword}{;}}}}{1},
+}
+
+% Markdown
+\lstdefinelanguage{markdown}{%
+ sensitive=false,
+ morecomment=[l]{\%},
+ literate=
+ *{\#}{{{\color{codeKeyword}{\#}}}}{1}
+ {-}{{{\color{codeKeyword}{-}}}}{1}
+ {*}{{{\color{codeKeyword}{*}}}}{1}
+ {>}{{{\color{codeKeyword}{>}}}}{1}
+ {`}{{{\color{codeKeyword}{`}}}}{1}
+ {|}{{{\color{codeKeyword}{|}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1}
+ {(}{{{\color{codeKeyword}{(}}}}{1}
+ {)}{{{\color{codeKeyword}{)}}}}{1},
+}
+
+%% Language-Specific Styles
+%% ----------------------------------
+\lstdefinestyle{python}{%
+ language=Python,
+ morekeywords={%
+ @property,@classmethod,@staticmethod,
+ },
+ emph={%
+ range,int,str,list,dict,set,bool,float,
+ tuple,super,type,print,len,sum,min,max,
+ enumerate,zip,map,filter,any,all,as,assert,
+ nonlocal,with,yield,self,True,False,None,
+ lambda,raise,await,async,
+ },
+ morestring=[b]""",
+}
+
+\lstdefinestyle{java}{%
+ language=Java,
+ morekeywords={%
+ @Override,@Deprecated,@SuppressWarnings,
+ @FunctionalInterface,@SafeVarargs,
+ var,record,sealed,permits,
+ public,private,protected,static,final,
+ abstract,interface,extends,implements
+ },
+ morecomment=[s]{/*}{*/},
+ morecomment=[l]//,
+ morestring=[b]",
+}
+
+\lstdefinestyle{cpp}{%
+ language=C++,
+ morekeywords={%
+ nullptr,constexpr,override,final,
+ template,typename,concept,requires,
+ auto,decltype,noexcept,static_assert,
+ thread_local,alignas,alignof
+ },
+ morecomment=[s]{/*}{*/},
+ morecomment=[l]//,
+ morestring=[b]",
+}
+
+\lstdefinestyle{javascript}{%
+ language=JavaScript,
+ morekeywords={%
+ let,const,var,function,class,extends,
+ static,get,set,new,this,super,
+ import,export,default,from,as,
+ async,await,yield,return,
+ undefined,null,true,false
+ },
+ morecomment=[s]{/*}{*/},
+ morecomment=[l]//,
+ morestring=[b]",
+ morestring=[b]',
+ morestring=[b]`,
+}
+
+\lstdefinestyle{sql}{%
+ language=SQL,
+ morekeywords={%
+ CREATE,TABLE,INSERT,INTO,VALUES,
+ SELECT,FROM,WHERE,GROUP,BY,HAVING,
+ ORDER,LIMIT,JOIN,LEFT,RIGHT,INNER,
+ UPDATE,SET,DELETE,ALTER,DROP,
+ CONSTRAINT,PRIMARY,KEY,FOREIGN,
+ REFERENCES,CASCADE,INDEX
+ },
+ sensitive=false,
+}
+
+\lstdefinestyle{latex}{%
+ language=[latex]TeX,
+ texcsstyle=*\bfseries\color{codeKeyword},
+ moretexcs = {usetheme,tableofcontents,index,footnote,sout,part,chapter,subsection,subsubsection,paragraph,maketitle,leqslant,geqslant,varnothing,includegraphics,draw,node,theoremstyle,newtcolorbox,tcbuselibrary,newtcbtheorem,SI,ang,ce,chemfig,norm,abs,deriv,R,N,Z,ProvidesPackage,color,ps,montitre,lstset,lstinline,lstinputlisting,definecolor,textcolor,colorlet,setlength,colorbox,fcolorbox,addplot,pgfplotsset,opadd,opsub,opmul,opdiv,opgcd,metre,second,squared,kelvin,coulomb,volt,per,opprint,legend,tkzDefPoint,tkzInterLL,tkzGetPoint,tkzDrawPolygon,tkzDrawSegments,tkzMarkRightAngles,tkzMarkSegments,tkzLabelPoints,boxed,boldsymbol,boldmath,multirow,addbibresource,printbibliography,bm,dfrac,meter,thead,makecell,euro,cellcolor,rowcolor,columncolor,base,repere,rog,ron,rond,derpart,drv,integrer,nuplet,anuplet,ensemble,E,V,suite,suitar,suitgeo,vect,norme,tr,rank,adj,sgn,im,di,intabfx,integrale,e,moinsinf,plusinf,sisetup,restoregeometry,newgeometry},
+ emph={width,axis~lines,xlabel,ylabel,xmin,ymin,grid,domain,samples,displayshiftintermediary,colback,colframe,colbacktitle,coltitle,enhanced,,fonttitle,margin,leftmargin,publisher,year,carrysub,lastcarry,locale,xmax,ymax,coordinates,mark,style,hmargin,vmargin,top,bottom,left,right,showframe,includeheadfoot,opacity,fill,above,},
+ morecomment=[l]{\%},
+ morestring=[b]",
+ sensitive=true
+ }
+
+\lstdefinestyle{bash}{%
+ language=bash,
+ morekeywords={%
+ source, alias, bg, bind, break, builtin, cd, command, compgen,
+ complete, continue, declare, dirs, disown, echo, enable, eval,
+ exec, exit, export, fc, fg, getopts, hash, help, history, jobs,
+ kill, let, local, logout, mapfile, popd, printf, pushd, pwd,
+ read, readarray, readonly, return, set, shift, shopt, suspend,
+ test, times, trap, type, typeset, ulimit, umask, unalias,
+ unset, wait
+ },
+ morestring=[b]",
+ morestring=[b]',
+ morestring=[b]\`,
+ morecomment=[l]{\#},
+ literate=
+ *{\$}{{{\color{codeKeyword}{\$}}}}{1}
+ {|}{{{\color{codeKeyword}{|}}}}{1}
+ {>}{{{\color{codeKeyword}{>}}}}{1}
+ {<}{{{\color{codeKeyword}{<}}}}{1}
+ {&}{{{\color{codeKeyword}{\&}}}}{1},
+}
+
+\lstdefinestyle{assembly}{%
+ language=[x86]Assembler,
+ morekeywords={%
+ section, global, extern
+ },
+ morecomment=[l]{;},
+ morecomment=[l]{\#},
+ literate=
+ *{,}{{{\color{codeKeyword}{,}}}}{1}
+ {:}{{{\color{codeKeyword}{:}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1}
+ {\$}{{{\color{codeKeyword}{\$}}}}{1}
+ {\%}{{{\color{codeKeyword}{\%}}}}{1},
+}
+
+\lstdefinestyle{lisp}{%
+ language=Lisp,
+ morekeywords={%
+ setq, setf, loop, do, progn, when, unless
+ },
+ literate=
+ *{(}{{{\color{codeKeyword}{(}}}}{1}
+ {)}{{{\color{codeKeyword}{)}}}}{1}
+ {'}{{{\color{codeKeyword}{'}}}}{1}
+ {`}{{{\color{codeKeyword}{`}}}}{1}
+ {,}{{{\color{codeKeyword}{,}}}}{1},
+}
+
+\lstdefinestyle{json}{%
+ language=json,
+}
+
+\lstdefinestyle{yaml}{%
+ language=yaml,
+}
+
+\lstdefinestyle{toml}{%
+ language=toml,
+}
+
+\lstdefinestyle{csv}{%
+ language=csv,
+}
+
+\lstdefinestyle{markdown}{%
+ language=markdown,
+}
+
+}
+
+\newtcolorbox{lstbox}{
+ enhanced,
+ boxrule=0.5pt,
+ colback=codebackground,
+ colframe=\ifcelestia@nocodeframe background\else codeframecolor\fi,
+ left=1ex,
+ right=1ex,
+ top=0pt,
+ bottom=0pt,
+ boxsep=0pt
+}
+
+\ifcelestia@codebox
+ \BeforeBeginEnvironment{lstlisting}{\begin{lstbox}}
+ \AfterEndEnvironment{lstlisting}{\end{lstbox}}
+
+ \let\oldlstinputlisting\lstinputlisting
+ \renewcommand{\lstinputlisting}[2][]{%
+ \begin{lstbox}%
+ \oldlstinputlisting[#1]{#2}%
+ \end{lstbox}%
+ }
+\else
+ \BeforeBeginEnvironment{lstlisting}{}
+ \AfterEndEnvironment{lstlisting}{}
+\fi
+
+% Mode declaration
+\mode<all>
diff --git a/macros/latex/contrib/beamertools/README b/macros/latex/contrib/beamertools/README
new file mode 100644
index 0000000000..0fc7482f39
--- /dev/null
+++ b/macros/latex/contrib/beamertools/README
@@ -0,0 +1,39 @@
+___________________
+The beamertools package
+v0.1
+
+This package provides a collection of programming tools for beamer.
+
+If you want to report any bugs or typos and corrections in the
+documentation, or ask for any new features, or suggest any
+improvements, or ask any questions about the package, then
+please use the issue tracker:
+
+ <https://github.com/xepersian/beamertools/issues>
+
+In doing so, please always explain your issue well enough,
+and always include a minimal working example showing the
+issue.
+
+You may also have conversations, ask questions and post answers
+without opening issues using the Discussions space:
+
+ <https://github.com/xepersian/beamertools/discussions>
+
+The announcements for the new releases of the package will
+also appear in the Discussions space under the Announcements
+category.
+
+Current version release date: 2025/01/09
+
+___________________________________________
+Vafa Khalighi
+
+Copyright (c) Vafa Khalighi 2025
+
+It may be distributed and/or modified under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is “author-maintained” (as per LPPL maintenance status)
+by Vafa Khalighi.
diff --git a/macros/latex/contrib/beamertools/beamertools.dtx b/macros/latex/contrib/beamertools/beamertools.dtx
new file mode 100644
index 0000000000..bfada6eace
--- /dev/null
+++ b/macros/latex/contrib/beamertools/beamertools.dtx
@@ -0,0 +1,282 @@
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+___________________
+The beamertools package
+v0.1
+
+This package provides a collection of programming tools for beamer.
+
+If you want to report any bugs or typos and corrections in the
+documentation, or ask for any new features, or suggest any
+improvements, or ask any questions about the package, then
+please use the issue tracker:
+
+ <https://github.com/xepersian/beamertools/issues>
+
+In doing so, please always explain your issue well enough,
+and always include a minimal working example showing the
+issue.
+
+You may also have conversations, ask questions and post answers
+without opening issues using the Discussions space:
+
+ <https://github.com/xepersian/beamertools/discussions>
+
+The announcements for the new releases of the package will
+also appear in the Discussions space under the Announcements
+category.
+
+Current version release date: 2025/01/09
+
+___________________________________________
+Vafa Khalighi
+
+Copyright (c) Vafa Khalighi 2025
+
+It may be distributed and/or modified under the LaTeX Project Public License,
+version 1.3c or higher (your choice). The latest version of
+this license is at: http://www.latex-project.org/lppl.txt
+
+This work is “author-maintained” (as per LPPL maintenance status)
+by Vafa Khalighi.
+%</readme>
+%<*internal>
+\fi
+\begingroup
+%</internal>
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\preamble
+
+ __________________________________________________
+ Vafa Khalighi
+
+ Copyright (c) 2025 Vafa Khalighi
+
+ It may be distributed and/or modified under the LaTeX Project Public License,
+ version 1.3c or higher (your choice). The latest version of
+ this license is at: http://www.latex-project.org/lppl.txt
+
+ This work is “author-maintained” (as per LPPL maintenance status)
+ by Vafa Khalighi.
+
+
+\endpreamble
+\askforoverwritefalse
+\generate{\file{beamertools.sty}{\from{\jobname.dtx}{table,beamertools.sty}}}
+%</batchfile>
+%<batchfile>\endbatchfile
+%<*internal>
+\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
+\nopreamble\nopostamble
+\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}}
+\endgroup
+\immediate\write18{mv README.txt README}
+\immediate\write18{makeindex -s gind.ist -o \jobname.ind \jobname.idx}
+\immediate\write18{makeindex -s gglo.ist -o \jobname.gls \jobname.glo}
+%</internal>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{bidicode}
+\usepackage{microtype}
+\definecolor{niceblue}{rgb}{0.2,0.4,0.8}
+\usepackage[numbered]{hypdoc}
+\hypersetup{%
+ pdfauthor={Vafa Khalighi},%
+ linkcolor=niceblue,%
+ urlcolor=niceblue,%
+ citecolor=niceblue%
+}
+\pdfstringdefDisableCommands{%
+\renewcommand\Lcs[1]{\textbackslash#1}
+}
+\EnableCrossrefs
+\CodelineIndex
+%\RecordChanges
+\begin{document}
+ \DocInput{\jobname.dtx}
+ \PrintIndex
+% \PrintChanges
+\end{document}
+%</driver>
+%
+%
+% \fi
+%
+% \GetFileInfo{\jobname.dtx}
+% \title{The \textsf{beamertools} Package}
+% \author{Vafa Khalighi}
+%\date{Version 0.1\quad\today}
+%\maketitle
+%
+%\begingroup
+%\parindent 0pt
+%\vskip 0pt plus 3fill
+%{\color{red!85!black}\fbox{\begin{minipage}{\dimexpr\textwidth-2\fboxsep-2\fboxrule}
+%If you want to report any bugs or typos and corrections in the documentation,
+%or ask for any new features, or suggest any improvements, or ask any questions about the package, then please use the issue tracker:
+%
+%\medskip
+% \centerline{\url{https://github.com/xepersian/beamertools/issues}}
+%
+%\medskip
+%In doing so, please always explain your issue well enough, and always include
+%a minimal working example showing the issue.
+%
+%\bigskip
+%You may also have conversations, ask questions and post answers
+%without opening issues using the Discussions space:
+%
+%\medskip
+% \centerline{\url{https://github.com/xepersian/beamertools/discussions}}
+%
+%\medskip
+%The announcements for the new releases of the package will
+%also appear in the Discussions space under the Announcements
+%category.
+%\end{minipage}
+%}}
+%
+%\vskip 0pt plus 3fill
+%
+%Copyright (c) 2025 Vafa Khalighi
+%
+%\medskip
+%Permission is granted to distribute and/or modify \emph{both the documentation and the code} under the conditions of the \LaTeX{} Project Public License, either version 1.3c of this license or (at your option) any later version.
+%\endgroup
+%
+%\clearpage
+% \tableofcontents
+% \section{Introduction}
+%If you want to redefine any predefined beamer template and try
+%something like
+%\begin{lstlisting}[gobble=1,numbers=none]
+%\defbeamertemplate{itemize item}{square}{\hbox{\vrule width 2ex height 2ex}}
+%\end{lstlisting}
+%then beamer will give the following unhelpful
+%error message
+%\begin{lstlisting}[gobble=1,numbers=none,backgroundcolor=\color{blue!30},frame=none,framexleftmargin=1mm]
+%./test.tex:4: LaTeX Error: Command \beamer@@tmpop@itemize item@square already d
+%efined.
+% Or name \end... illegal, see p.192 of the manual.
+%
+%See the LaTeX manual or LaTeX Companion for explanation.
+%Type H <return> for immediate help.
+% ...
+%
+%l.4 \begin
+% {document}
+%?
+%\end{lstlisting}
+%and one is puzzled as what to do.
+%
+%beamer does not provide a control sequence for redefining a
+%predefined beamer template. One way to get around this issue
+%is to undefine the control sequence shown above and then to redefine
+%the beamer template using the control sequence \Lcs{defbeamertemplate}. But this is
+%really ugly and unpleasant.
+%
+%Of course, this is just a silly example for illustrating the issue. I found
+%myself redefining a lot of predefined beamer templates in my
+%\textsf{bidi}\footnote{\url{https://ctan.org/pkg/bidi}} package and the
+%workaround above is just ugly and painful.
+%
+%The \textsf{beamertools} package solves this exact issue. It provides a
+%control sequence for redefining a predefined beamer template and
+%unlike beamer unhelpful error message, it provides an informative
+%error message if the beamer template you are trying to redefine is not
+%predefined.
+%
+%
+%\section{Using the package}
+%\subsection{Loading The Package}
+%You can load the package in the ordinary way:
+%\begin{BDef}
+%\Lcs{usepackage}\Largb{beamertools}
+%\end{BDef}
+%\subsection{The user interface}
+%The packages provides the control sequence \Lcs{redefbeamertemplate} for redefining a predefined beamer template and has exactly the same syntax as the control sequence
+%\Lcs{defbeamertemplate} that beamer provides.
+% \StopEventually{}
+% \section{Implementation}
+%\iffalse
+%<*table>
+%\fi
+%% \CheckSum{0}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%%
+% \iffalse
+%</table>
+%<*beamertools.sty>
+%\fi
+%
+%
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{beamertools}[2025/01/09 v0.1 A collection of programming tools for beamer]
+\newcommand<>\redefbeamertemplate{
+ \ifblank{#1}
+ {\def\beamer@@oar{<presentation>}}
+ {\def\beamer@@oar{#1}}\beamer@redefbeamertemplate}
+
+\def\beamer@redefbeamertemplate{\@ifstar{\beamer@sbttrue\beamer@redef@sbtoo}{\beamer@sbtfalse\beamer@redef@sbtoo}}
+
+\def\beamer@redef@sbtoo#1#2{\@ifnextchar[{\beamer@redef@sbto{#1}{#2}}{\beamer@redef@sbto{#1}{#2}[0]}}
+
+\def\beamer@redef@sbto#1#2[#3]{\@ifnextchar[{\beamer@@redef@sbto{#1}{#2}[{#3}]}{\def\beamer@sbtotemp{}\beamer@@@redef@sbto{#1}{#2}[{#3}]}}
+
+\long\def\beamer@@redef@sbto#1#2[#3][#4]{\long\def\beamer@sbtotemp{[{#4}]}\beamer@@@redef@sbto{#1}{#2}[{#3}]}
+
+\long\def\beamer@@@redef@sbto#1#2[#3]#4{%
+ \beamer@sbttoks={\beamer@@@@redef@sbto{#1}{#2}[{#3}]{#4}}%
+ \@ifnextchar[{\the\beamer@sbttoks}{\the\beamer@sbttoks[action]{}}%
+}
+
+\long\def\beamer@@@@redef@sbto#1#2[#3]#4[#5]#6{%
+ \edef\beamer@@sbtoarg{\expandafter\noexpand\csname beamer@@tmpop@#1@#2\endcsname[{#3}]}%
+\@ifundefined{beamer@@tmpop@#1@#2}{%
+ \PackageError{beamertools}{beamer template with element name `#1' and predefined option `#2' undefined}\@ehc
+}
+\expandafter\expandafter\expandafter\renewcommand\expandafter\beamer@@sbtoarg\beamer@sbtotemp{%
+ \expandafter\long\expandafter\def\csname beamer@@tmpl@#1\endcsname{#4}#6}%
+ \let\beamer@@next=\beamer@resetsbtoarg%
+ \expandafter\mode\beamer@@oar{\let\beamer@@next=\relax}%
+ \beamer@@next%
+ \ifbeamer@sbt\setbeamertemplate{#1}[{#2}]\relax\relax\relax\relax\relax\relax\relax\relax\relax\fi%
+}
+% \end{macrocode}
+% \iffalse
+%</beamertools.sty>
+%\fi
+%
+%
+% \Finale
+%
+%
+% \typeout{*************************************************************}
+% \typeout{*}
+% \typeout{* To finish the installation you have to move the file}
+% \typeout{* `beamertools.sty' into a directory searched by TeX.}
+% \typeout{*************************************************************}
+%
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/beamertools/beamertools.ins b/macros/latex/contrib/beamertools/beamertools.ins
new file mode 100644
index 0000000000..20861aaebd
--- /dev/null
+++ b/macros/latex/contrib/beamertools/beamertools.ins
@@ -0,0 +1,44 @@
+%%
+%% This is file `beamertools.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% beamertools.dtx (with options: `batchfile')
+%%
+%% __________________________________________________
+%% Vafa Khalighi
+%%
+%% Copyright (c) 2025 Vafa Khalighi
+%%
+%% It may be distributed and/or modified under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is “author-maintained” (as per LPPL maintenance status)
+%% by Vafa Khalighi.
+%%
+%%
+\input docstrip.tex
+\keepsilent
+\preamble
+
+ __________________________________________________
+ Vafa Khalighi
+
+ Copyright (c) 2025 Vafa Khalighi
+
+ It may be distributed and/or modified under the LaTeX Project Public License,
+ version 1.3c or higher (your choice). The latest version of
+ this license is at: http://www.latex-project.org/lppl.txt
+
+ This work is “author-maintained” (as per LPPL maintenance status)
+ by Vafa Khalighi.
+
+\endpreamble
+\askforoverwritefalse
+\generate{\file{beamertools.sty}{\from{\jobname.dtx}{table,beamertools.sty}}}
+\endbatchfile
+\endinput
+%%
+%% End of file `beamertools.ins'.
diff --git a/macros/latex/contrib/beamertools/beamertools.pdf b/macros/latex/contrib/beamertools/beamertools.pdf
new file mode 100644
index 0000000000..66bd00e322
--- /dev/null
+++ b/macros/latex/contrib/beamertools/beamertools.pdf
Binary files differ
diff --git a/macros/latex/contrib/keytheorems/CHANGELOG.md b/macros/latex/contrib/keytheorems/CHANGELOG.md
index 48b4f9e29d..4050d96127 100644
--- a/macros/latex/contrib/keytheorems/CHANGELOG.md
+++ b/macros/latex/contrib/keytheorems/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog for keytheorems package
+## [v0.2.3]
+- add many translations; some missing translation of "continuing from p."
+- add `manual-num` key
+- `leftmargin` and `rightmargin` now work correctly with tagging loaded
+
## [v0.2.2]
- fix implementation of `inherit-style` so it can contain thm keys
- add support for zref-clever in `refname` and `Refname`
@@ -53,6 +58,7 @@
## 0.1.0 - 2024-09-04
- First release
+[v0.2.3]: https://github.com/mbertucci47/keytheorems/compare/v0.2.2...v0.2.3
[v0.2.2]: https://github.com/mbertucci47/keytheorems/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/mbertucci47/keytheorems/compare/v0.1.8...v0.2.1
[v0.1.8]: https://github.com/mbertucci47/keytheorems/compare/v0.1.7...v0.1.8
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
index 8e220a48c8..5eb96e99bd 100644
--- a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
index d80d4cd0ba..9008b4300c 100644
--- a/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
+++ b/macros/latex/contrib/keytheorems/doc/keytheorems-doc.tex
@@ -5,6 +5,7 @@
\usepackage{geometry}
\geometry{margin=1.5in}
\usepackage{tcolorbox}
+\PassOptionsToPackage{cachedir=keythms-doc-minted}{minted}
\tcbuselibrary{documentation,minted,breakable,hooks}
\ifTUTeX
@@ -15,21 +16,11 @@
\usepackage{amssymb}
\fi
\usetikzlibrary{cd}
+\usepackage{fontawesome5}
\usepackage{booktabs}
\usepackage{keytheorems}
-\usepackage{cleveref}
-
-%%% TEMPORARY (https://tex.stackexchange.com/q/730126/208544)
-\RemoveFromHook{label}[firstaid/cleveref]
-\makeatletter
-\AddToHook{label}[firstaid/cleveref]
- {\ifx
- \@currentcounter\@empty
- \else
- \firstaid@cref@updatelabeldata{\@currentcounter}%<--- was missing
- \fi}
-\makeatother
-%%% END TEMPORARY
+\usepackage{zref-clever}
+\zcsetup{nameinlink=false}
\makeatletter
\newcommand\keythmsversion{\@keythms@version}
@@ -265,7 +256,7 @@ These texts can be manually customized with the \refKey{title} and \refKey{conti
{initially\\ \cs{GetTranslation}\ttbraces{keythms\string_continues}\cs{pageref}\ttbraces{\#1}}
The code used to typeset the note produced by the \refKey{continues} key.
If English or an unknown language is used, defaults to \texttt{continuing from p.}\cs{,}\cs{pageref}\ttbraces{\#1}.
-Currently (likely inaccurate!) translations exist for French, German, Italian, Portuguese, and Spanish.
+Currently (likely inaccurate!) translations exist for several European languages.
\end{docKey}
\begin{docKey}{qed-symbol}
@@ -379,6 +370,22 @@ Some text
\end{docKey}
+\begin{docKey}{manual-num}
+ {=\marg{text}}
+ {initially unset}
+Use this to override the printed number of a theorem.
+It is useful for making ``starred'' versions of other theorems, perhaps to represent a reformulated or more difficult version.
+
+\begin{keythmscode}[]
+\begin{theorem}[manual-num=\ref*{foo}*]
+A reformulated version of \zcref[S]{foo}.
+\end{theorem}
+\begin{theorem}[manual-num=\faRocket] % requires fontawesome5
+Don't confuse your readers by changing the numbering without good reason.
+\end{theorem}
+\end{keythmscode}
+
+\end{docKey}
\begin{docKey}{continues}
{\sarg=\meta{label name}}
{initially unset}
@@ -657,7 +664,7 @@ Some text
Some more text
\end{prop}
\begin{theorem}
-Consider \cref{abc,def}. \Autoref{abc} \dots
+Consider \zcref{abc,def}. \Autoref{abc} \dots
\end{theorem}
\end{keythmscode}
@@ -861,19 +868,19 @@ In \refKey{headformat}, you may also use the traditional \pkg{amsthm} commands \
\end{docKey}
\begin{docKey}{postheadspace}
- {=\meta{length}}
+ {=\meta{skip expr}}
{initially |5pt plus 1pt minus 1pt|}
Do not use this with the \refKey{break} key.
\end{docKey}
\begin{docKey}{spaceabove}
- {=\meta{length}}
+ {=\meta{skip expr}}
{initially \cs{topsep}}
\end{docKey}
\begin{docKey}{spacebelow}
- {=\meta{length}}
+ {=\meta{skip expr}}
{initially \cs{topsep}}
\end{docKey}
@@ -1030,7 +1037,7 @@ For the AMS classes, this is initially |1.5pc|.
{=\meta{text}}
{initially \cs{GetTranslation}\ttbraces{keythms\string_listof\string_title}}
Defaults to ``List of Theorems'' if English or an unknown language is used.
-Currently French, German, Italian, Portuguese, and Spanish have (likely inaccurate!) translations.
+Currently several European languages have (likely inaccurate!) translations.
A translation can be added with a GitHub pull request or manually with
\begin{center}
\cs{DeclareTranslation}\marg{lang}\ttbraces{keythms\string_listof\string_title}\marg{text}.
@@ -1241,7 +1248,6 @@ The \LaTeX{} team has been working hard to support the creation of tagged PDFs (
The current |dev| formats make \pkg{amsthm} compatible with the kernel tagging code.
Most of \pkg{keytheorems} is supported too, and anything that doesn't work should be reported.
Explicitly not supported are the \refKey{tcolorbox} and \refKey{tcolorbox-no-titlebar} keys.
-There is only partial support for \refKey{leftmargin} and \refKey{rightmargin}, namely only the latter works.
To produce a tagged PDF, add \cs{DocumentMetadata} in the first line of your document (additional instructions are found on the Tagging Project \href{https://latex3.github.io/tagging-project/documentation/prototype-usage-instructions.html}{website}).
An example invocation might look like
diff --git a/macros/latex/contrib/keytheorems/tex/keytheorems.sty b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
index 0c025cce0c..efc25150be 100644
--- a/macros/latex/contrib/keytheorems/tex/keytheorems.sty
+++ b/macros/latex/contrib/keytheorems/tex/keytheorems.sty
@@ -2,8 +2,8 @@
% Please report all issues and feature requests at https://github.com/mbertucci47/keytheorems
% This work is licensed under the LPPL version 1.3c or later: https://www.latex-project.org/lppl.txt
\NeedsTeXFormat{LaTeX2e}[2023-06-01]
-\def\@keythms@date{2024-11-11}
-\def\@keythms@version{0.2.2}
+\def\@keythms@date{2025-01-07}
+\def\@keythms@version{0.2.3}
\ProvidesExplPackage{keytheorems}{\@keythms@date}{\@keythms@version}
{l3keys interface to amsthm}
@@ -176,6 +176,10 @@
\cs_gset:Npn \theHkeythms_unnumbered_dummyctr
{ unnumbered.\arabic{keythms_unnumbered_dummyctr} }
\cs_gset:Npn \thekeythms_unnumbered_dummyctr { }
+\newcounter{keythms_manualnum_dummyctr}
+\cs_gset:Npn \theHkeythms_manualnum_dummyctr
+ { manualnum.\arabic{keythms_manualnum_dummyctr} }
+\cs_gset:Npn \thekeythms_manualnum_dummyctr { }
\cs_generate_variant:Nn \hook_gput_code:nnn { nnv }
\cs_generate_variant:Nn \keys_precompile:nnN { ne, nVc }
@@ -190,12 +194,12 @@
\tl_set:Nn \l__keythms_thmstyle_lnotebrace_tl { #1 }
\tl_set:Nn \l__keythms_thmstyle_rnotebrace_tl { #2 }
}
-\cs_new_protected:Npn \keythms_thmstyle_savethmkey_reqval:n #1
+\cs_new_protected:Npn \__keythms_thmstyle_savethmkey_reqval:n #1
{ % #1 = key value
\clist_put_right:No \l__keythms_thmstyle_savedkeys_clist
{ \l_keys_key_str = { #1 } }
}
-\cs_new_protected:Npn \keythms_thmstyle_savethmkey_optval:n #1
+\cs_new_protected:Npn \__keythms_thmstyle_savethmkey_optval:n #1
{ % #1 = key value
\tl_if_empty:NTF \l_keys_value_tl
{
@@ -258,15 +262,15 @@
spaceabove .tl_set:N = \l__keythms_thmstyle_spaceabove_tl,
spacebelow .tl_set:N = \l__keythms_thmstyle_spacebelow_tl,
% thm keys that are saved for later
- leftmargin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- numbered .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
- numberlike .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- numberwithin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- parent .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- postfoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- postheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- prefoothook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- preheadhook .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ leftmargin .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ numbered .code:n = \__keythms_thmstyle_savethmkey_optval:n { #1 },
+ numberlike .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ numberwithin .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ parent .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ postfoothook .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ postheadhook .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ prefoothook .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ preheadhook .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
qed .code:n =
{ % qed needs special treatment to distinguish qed from qed={}
\tl_if_novalue:nTF { #1 }
@@ -280,12 +284,12 @@
}
},
qed .default:o = \c_novalue_tl,
- rightmargin .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- sharenumber .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- sibling .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
- tcolorbox .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
- tcolorbox-no-titlebar .code:n = \keythms_thmstyle_savethmkey_optval:n { #1 },
- within .code:n = \keythms_thmstyle_savethmkey_reqval:n { #1 },
+ rightmargin .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ sharenumber .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ sibling .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
+ tcolorbox .code:n = \__keythms_thmstyle_savethmkey_optval:n { #1 },
+ tcolorbox-no-titlebar .code:n = \__keythms_thmstyle_savethmkey_optval:n { #1 },
+ within .code:n = \__keythms_thmstyle_savethmkey_reqval:n { #1 },
}
\cs_new_protected:Nn \keythms_thmstyle_thmname:n { \thmname{#1} }
@@ -360,8 +364,8 @@
\@onlypreamble \providekeytheoremstyle
\@onlypreamble \declarekeytheoremstyle
-\cs_new_eq:NN \keythms_thmstyle_new:nnnnnnnnn \newtheoremstyle
-\cs_generate_variant:Nn \keythms_thmstyle_new:nnnnnnnnn { nVVVVVVVe }
+\cs_new_eq:NN \__keythms_thmstyle_new:nnnnnnnnn \newtheoremstyle
+\cs_generate_variant:Nn \__keythms_thmstyle_new:nnnnnnnnn { nVVVVVVVe }
\tl_put_right:Nn \l_text_expand_exclude_tl { \thmnote \thmnumber \thmname }
% ^ allows \thmnote, etc. to work in headstyle; hope no bad side effects!
@@ -393,7 +397,7 @@
\clist_clear:N \l__keythms_thmstyle_savedkeys_clist
\tl_use:N \l__keythms_thmstyle_defaultkeys_tl
\keys_set:nn { keytheorems/thmstyle } { #2 }
- \keythms_thmstyle_new:nVVVVVVVe { #1 }
+ \__keythms_thmstyle_new:nVVVVVVVe { #1 }
\l__keythms_thmstyle_spaceabove_tl
\l__keythms_thmstyle_spacebelow_tl
\l__keythms_thmstyle_bodyfont_tl
@@ -800,6 +804,11 @@
{ \cs_set_eq:NN \trivlist \__keythms_thm_origtrivlist: }
}
+\hook_gput_code:nnn { begindocument/end } { . }
+ { % use /end because hyperref redefines \Hy@theorem@makelinktarget in begindocument
+ \cs_new_eq:NN \__keythms_thm_origdeferred@thm@head:n \deferred@thm@head
+ \cs_new_eq:NN \__keythms_thm_origHy@theorem@makelinktarget:n \Hy@theorem@makelinktarget
+ }
\cs_new_protected:Npn \__keythms_thm_tcbcode:nn #1#2
{ % #1 = name, #2 = tcolorbox keys
\tl_gput_right:cn { g__keythms_thm_preheadfromkeys_#1_tl }
@@ -810,6 +819,11 @@
% % it because hyperref tries to add to para hook which doesn't work
% % when title set up the way we do it
}
+ \tl_gput_right:cn { g__keythms_thm_postheadfromkeys_#1_tl }
+ {
+ \cs_set_eq:NN \deferred@thm@head \__keythms_thm_origdeferred@thm@head:n
+ \cs_set_eq:NN \Hy@theorem@makelinktarget \__keythms_thm_origHy@theorem@makelinktarget:n
+ }
\__keythms_thm_tcbshared:nn { #1 }
{
title={ \__keythms_thm_tcbtemphead: },
@@ -892,19 +906,9 @@
}
}
}
-% what below is unnecessary? I really don't understand this code.
+
\cs_new_protected:Npn \__keythms_thm_storedeferred@thm@head:n #1
{
- \if@inlabel \indent \par \fi % eject a section head if one is pending
- \if@nobreak
- \adjust@parskip@nobreak
- \else
- \addpenalty\@beginparpenalty
- \addvspace\@topsep
- \addvspace{-\parskip}
- \fi
- % \global\@inlabeltrue % MB: if this is uncommented then spacing after sections is wrong
- \everypar\dth@everypar
\cs_set:Npn \__keythms_thm_tcbtemphead: { \normalfont #1 }
\ignorespaces
}
@@ -1000,8 +1004,8 @@
\DeclareEnvironmentCopy { keythms_orig_withparent_#1 } { #1 }
\renewenvironment { #1 } % opt arg is implicit
{
- \setuniqmark{ #1. \use:c {the #3} }
- \ifuniq{ #1. \use:c {the #3} }
+ \setuniqmark{ #1. \use:c { the #3 } }
+ \ifuniq{ #1. \use:c { the #3 } }
{
\keythms_if_restating:F
{ \refstepcounter{ keythms_unnumbered_dummyctr } }
@@ -1015,7 +1019,7 @@
}
}
{
- \ifuniq{ #1. \use:c {the #3} }
+ \ifuniq{ #1. \use:c { the #3 } }
{ \end{keythms_orig_nonumber_#1} }
{ \end{keythms_orig_withparent_#1} }
}
@@ -1075,10 +1079,11 @@
% ^ for compatibility. "name" is ambiguous and doesn't match amsthm language
note .tl_set:N = \l__keythms_thmuse_note_tl,
note .initial:n = {},
+ manual-num .tl_set:N = \l__keythms_thmuse_manualnum_tl,
restate .meta:n = { store = {#1} }, % thmtools compatibility
restate* .meta:n = { store* = {#1} },
restate-keys .clist_set:N = \l__keythms_thmuse_restatekeys_clist,
- seq .code:n = {},
+ seq .code:n = {},
short-note .code:n = {}, % these do nothing at point of use
short-name .code:n = {},
store .tl_set:N = \l__keythms_thmuse_store_tl, % should this be .tl_set_e:N ?
@@ -1293,6 +1298,12 @@
\cs_set_eq:cN { theH #1 } \theHkeythms_continues_dummyctr
%\cs_set_eq:NN \setuniqmark \use_none:n % not the right fix
}
+ \tl_if_empty:NF \l__keythms_thmuse_manualnum_tl
+ {
+ \cs_set:cpn { the #1 } { \l__keythms_thmuse_manualnum_tl }
+ \cs_set_eq:cN { c@ #1 } \c@keythms_manualnum_dummyctr
+ \cs_set_eq:cN { theH #1 } \theHkeythms_manualnum_dummyctr
+ }
\hook_use:n { keytheorems/#1/prehead }
\hook_use:n { keytheorems/allthms/prehead }
% \use:c instead of \tl_use:c so doesn't error if tl doesn't exist
@@ -2534,8 +2545,8 @@
}
\keys_define:nn { keytheorems/thmstyle }
{
- shaded .code:n = \keythms_thmstyle_savethmkey_optval:n { ##1 },
- thmbox .code:n = \keythms_thmstyle_savethmkey_optval:n { ##1 },
+ shaded .code:n = \__keythms_thmstyle_savethmkey_optval:n { ##1 },
+ thmbox .code:n = \__keythms_thmstyle_savethmkey_optval:n { ##1 },
mdframed .code:n = \msg_error:nn { keytheorems } { mdframed-undefined },
}
}
@@ -2555,16 +2566,54 @@
\ProvideTranslation { English } { keythms_listof_title } { List~of~Theorems }
\ProvideTranslation { English } { keythms_continues } { continuing~from~p.\, }
% from DeepL; I don't know these languages!
+ \ProvideTranslation { Albanian } { keythms_listof_title } { Lista~e~teoremave }
+ \ProvideTranslation { Bulgarian } { keythms_listof_title } { Списък~на~теоремите }
+ \ProvideTranslation { Czech } { keythms_listof_title } { Seznam~teorémů }
+ \ProvideTranslation { Czech } { keythms_continues } { pokračování~ze~strany~ }
+ \ProvideTranslation { Croatian } { keythms_listof_title } { Popis~teorema }
+ \ProvideTranslation { Croatian } { keythms_continues } { nastavak~od~stranice~ }
+ \ProvideTranslation { Danish } { keythms_listof_title } { Liste~over~sætninger }
+ \ProvideTranslation { Danish } { keythms_continues } { fortsætter~fra~side~ }
+ \ProvideTranslation { Dutch } { keythms_listof_title } { Liste~over~sætninger }
+ \ProvideTranslation { Dutch } { keythms_continues } { fortsætter~fra~side~ }
+ \ProvideTranslation { Estonian } { keythms_listof_title } { Teoreemide~loetelu }
+ \ProvideTranslation { Estonian } { keythms_continues } { jätkub~leheküljelt~ }
+ \ProvideTranslation { Finnish } { keythms_listof_title } { Luettelo~teoreemoista }
+ \ProvideTranslation { Finnish } { keythms_continues } { jatkuu~sivulta~ }
\ProvideTranslation { French } { keythms_listof_title } { Liste~des~théorèmes }
\ProvideTranslation { French } { keythms_continues } { suite~de~la~p.\, }
\ProvideTranslation { German } { keythms_listof_title } { Liste~der~Theoreme }
\ProvideTranslation { German } { keythms_continues } { weiter~von~Seite~ }
+ \ProvideTranslation { Greek } { keythms_listof_title } { Κατάλογος~θεωρημάτων }
+ \ProvideTranslation { Hungarian } { keythms_listof_title } { A~tételek~listája }
+ \ProvideTranslation { Icelandic } { keythms_listof_title } { Listi~yfir~setningar }
+ \ProvideTranslation { Indonesian } { keythms_listof_title } { Daftar~Teorema }
\ProvideTranslation { Italian } { keythms_listof_title } { Elenco~dei~teoremi }
\ProvideTranslation { Italian } { keythms_continues } { continua~da~p.\, }
+ \ProvideTranslation { Latvian } { keythms_listof_title } { Teorēmu~saraksts }
+ \ProvideTranslation { Lithuanian } { keythms_listof_title } { Teoremų~sąrašas }
+ \ProvideTranslation { Macedonian } { keythms_listof_title } { Список~на~теореми }
+ \ProvideTranslation { Norwegian } { keythms_listof_title } { Liste~over~teoremer }
+ \ProvideTranslation { Norwegian } { keythms_continues } { fortsetter~fra~side~ }
\ProvideTranslation { Spanish } { keythms_listof_title } { Lista~de~teoremas }
\ProvideTranslation { Spanish } { keythms_continues } { continúa~de~la~p.\, }
+ \ProvideTranslation { Polish } { keythms_listof_title } { Lista~twierdzeń }
+ \ProvideTranslation { Polish } { keythms_continues } { ciąg~dalszy~ze~strony~ }
\ProvideTranslation { Portuguese } { keythms_listof_title } { Lista~de~teoremas }
\ProvideTranslation { Portuguese } { keythms_continues } { continua~da~p.\, }
+ \ProvideTranslation { Romanian } { keythms_listof_title } { Lista~teoremelor }
+ \ProvideTranslation { Romanian } { keythms_continues } { continuare~de~la~p.\, }
+ \ProvideTranslation { Russian } { keythms_listof_title } { Список~теорем }
+ \ProvideTranslation { Slovak } { keythms_listof_title } { Zoznam~teorém }
+ \ProvideTranslation { Slovak } { keythms_continues } { pokračovanie~zo~strany~ }
+ \ProvideTranslation { Slovenian } { keythms_listof_title } { Seznam~trditev }
+ \ProvideTranslation { Slovenian } { keythms_continues } { nadaljevanje~s~strani~ }
+ \ProvideTranslation { Swedish } { keythms_listof_title } { Lista~över~teorem }
+ \ProvideTranslation { Swedish } { keythms_continues } { fortsättning~från~sidan~ }
+ \ProvideTranslation { Turkish } { keythms_listof_title } { Teoremler~Listesi }
+ \ProvideTranslation { Ukrainian } { keythms_listof_title } { Список~теорем }
+ \ProvideTranslation { Welsh } { keythms_listof_title } { Rhestr~o~Theoremau }
+ \ProvideTranslation { Welsh } { keythms_continues } { yn~parhau~o~dudalen~ }
}
}
@@ -2717,15 +2766,25 @@
{ \makeatletter \@input { \jobname.##1 } }
},
}
+ \IfFormatAtLeastTF { 2025-06-01 }
+ { % dev formats use theoremblock instance
+ \tl_const:Nn \c__keythms_tagging_instance_tl { theoremblock-0 }
+ }
+ { % current format uses displayblock instance
+ \tl_const:Nn \c__keythms_tagging_instance_tl { displayblock-0 }
+ }
\cs_set_protected:Npn \__keythms_thm_margincode:nnn #1#2#3
{ % tagging code does not define theorems with lists
\tl_gput_right:cn { g__keythms_thm_preheadfromkeys_#1_tl }
{
- \SetTemplateKeys{ block }{ display }
+ \exp_args:Nne \EditInstance { block }
+ { \c__keythms_tagging_instance_tl }
{
leftmargin = #2,
rightmargin = #3,
}
+ % hack until https://github.com/latex3/tagging-project/issues/755 is fixed
+ \EditInstance { block } { list-1 } { rightmargin = 0pt }
}
}
}
diff --git a/macros/latex/contrib/neoschool/README.md b/macros/latex/contrib/neoschool/README.md
new file mode 100644
index 0000000000..1cc0f6ed02
--- /dev/null
+++ b/macros/latex/contrib/neoschool/README.md
@@ -0,0 +1,13 @@
+README file for neoschool class 1.0.0 [2025/01/04]
+
+neoschool is a document class designed for secondary school teachers. Features pre-configured templates, color themes, and specialized environments for educational documents. Simplifies LaTeX usage in education through integration of common packages and multilingual support.
+
+Copyright 2025 Razik Ikhlef
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3c
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
diff --git a/macros/latex/contrib/neoschool/doc/neoschool-fr.pdf b/macros/latex/contrib/neoschool/doc/neoschool-fr.pdf
new file mode 100644
index 0000000000..d0fd9fe978
--- /dev/null
+++ b/macros/latex/contrib/neoschool/doc/neoschool-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/neoschool/doc/neoschool-fr.tex b/macros/latex/contrib/neoschool/doc/neoschool-fr.tex
new file mode 100644
index 0000000000..d8f73939da
--- /dev/null
+++ b/macros/latex/contrib/neoschool/doc/neoschool-fr.tex
@@ -0,0 +1,1398 @@
+\documentclass[
+ french,
+ margin=2cm
+]{neoschool}
+
+\title{La classe \texttt{neoschool}}
+\author{Version : 1.0.0 \quad\textemdash{}\quad Auteur : Razik Ikhlef}
+\date{04/01/2025}
+
+\begin{document}
+
+\maketitle
+
+La classe \texttt{neoschool} propose aux enseignants du secondaire un
+ensemble d'outils pour concevoir leurs documents pédagogiques (évaluations,
+supports de cours, fiches d'exercices avec leur correction, etc). Pour répondre
+aux différents besoins, elle propose huit thèmes de couleurs prédéfinis, des
+options de classe variées pour la mise en page et la typographie, des
+environnements spécialisés, des commandes dédiées et différents styles
+d'en-têtes préformatés pour chaque type de document. Elle intègre plusieurs
+dizaines d'extensions LaTeX couramment utilisées (voir la liste ci-dessous), ce
+qui allège considérablement le préambule et évite autant que possible les
+incompatibilités. Multilingue, elle prend en charge le français, l'anglais et
+l'allemand.
+
+\tableofcontents
+
+\section{Extensions chargées}
+
+Les extensions suivantes sont automatiquement chargées par la classe \texttt{neoschool}.
+
+\texttt{adforn}, \texttt{adjustbox}, \texttt{algpseudocode}, \texttt{amssymb}, \texttt{babel}, \texttt{bookmark}, \texttt{calc}, \texttt{changespace}, \texttt{cuted}, \texttt{environ}, \texttt{fancyvrb}, \texttt{fontawesome5}, \texttt{forest}, \texttt{iftex}, \texttt{ifthen}, \texttt{kvoptions}, \texttt{lastpage}, \texttt{marginnote}, \texttt{microtype}, \texttt{mismath} (qui charge \texttt{mathtools}), \texttt{multicol}, \texttt{needspace}, \texttt{pdftexcmds}, \texttt{pgffor}, \texttt{pgfplots}, \texttt{qrcode}, \texttt{scrlayer-scrpage}, \texttt{silence}, \texttt{siunitx}, \texttt{tabularray}, \texttt{tasks}, \texttt{tcolorbox} (avec l'option \texttt{most} qui charge les extensions \texttt{listings} et \texttt{minted}), \texttt{textcase}, \texttt{tikz}, \texttt{tikzpagenodes}, \texttt{tikzsymbols}, \texttt{ulem} (avec l'option \texttt{normalem}), \texttt{xcolor} (avec les options \texttt{table}, \texttt{svgnames}, \texttt{dvipsnames} et \texttt{x11names}), \texttt{xhfill}, \texttt{xkeyval}, \texttt{xsim} (avec les options \texttt{use-files} et \texttt{clear-aux}), \texttt{xstring}.
+
+La compilation en \texttt{pdflatex} charge les extensions \texttt{fonttenc} (avec l'option \texttt{T1}), \texttt{inputenc} (avec l'option \texttt{utf8}), \texttt{newpxtext} et \texttt{newpxmath}. La compilation en \texttt{lualatex} rend disponible les extensions \texttt{fontspec}, \texttt{luacas}, \texttt{lua-ul}, \texttt{luacolor} et applique les polices \texttt{TeX Gyre PagellaX} et \texttt{TeX Gyre Heros} en plus de \texttt{newpxmath}.
+
+L'options \texttt{graphics} charge les extensions \texttt{graphicx} et \texttt{wrapfig}, l'option \texttt{draft} les extensions \texttt{blindtext} et \texttt{lipsum} et l'option \texttt{mathastext} l'extension \texttt{mathastext}.
+
+L'option \texttt{math} charge les extensions \texttt{annotate-equations}, \texttt{bm}, \texttt{cancel}, \texttt{mathrsfs}, \texttt{nncomma}, \texttt{numprint}, \texttt{tdsfrmath} (avec les options \texttt{suite} et \texttt{taupe}), \texttt{tkz-euclide}, \texttt{witharrows} et \texttt{xlop}.
+
+L'option \texttt{notes} permet d'afficher des notes encadrées et à fond coloré dans les marges gauche et droite, de façon alternée. Elle charge l'extension \texttt{todonotes}.
+
+L'option \texttt{apmep}, qui permet de compiler directement les sujets d'annales de l'association du même nom, définit une ensemble de commandes mathématiques et charge les extensions \texttt{esvect}, \texttt{fourier-ons}, \texttt{numprint} (avec l'option \texttt{np}), \texttt{pstricks} (et de nombreux paquets de l'écosystème \texttt{pstricks}), \texttt{tabularx} et \texttt{textcomp}.
+
+L'option \texttt{mathics} permet de faire du calcul formel via \texttt{mathics} (version libre de \texttt{mathematica}) et charge les extensions \texttt{asymptote} et \texttt{latexalpha2}.
+
+\section{Options de configuration}
+
+\subsection{Langue}
+
+\begin{itemize}
+\item
+ \textbf{english, french, german} : active les traductions et
+ conventions liées à chaque langue. Ces options affectent les intitulés des théorèmes et environnements, la typographie et les conventions mathématiques.
+\item
+ \textbf{nofrenchlist} : désactive le style français des listes (remet
+ des points à la place des tirets).
+\item
+ \textbf{frenchlistaspar} : traite les listes comme des paragraphes en
+ français.
+\item
+ \textbf{frenchmath} : applique les conventions mathématiques
+ françaises (majuscules et lettres grecques droites).
+\end{itemize}
+
+\subsection{Apparence globale}
+
+\subsubsection{Thèmes prédéfinis}
+
+L'option \textbf{theme} = \texttt{nom-du-theme} définit
+le thème de couleurs du document. Les thèmes disponibles sont : \texttt{cyprus}, \texttt{kassio}, \texttt{frost}, \texttt{spring}, \texttt{arbutus}, \texttt{duo}, \texttt{navy}, \texttt{royal}. La plupart d'entre eux sont inspirés des \textit{ef-themes} pour \textit{emacs} de Protesilaos Stavrou.
+
+\subsubsection{Modes de couleur}
+
+\begin{itemize}
+\item \textbf{normal} : utilise des couleurs différentes pour chaque type
+ d'environnement.
+\item \textbf{unicolor} : utilise une couleur unique pour tous les
+ environnements :
+ \begin{itemize}
+ \item la couleur du titre est utilisée comme base ;
+ \item les variations sont obtenues par transparence.
+ \end{itemize}
+\item \textbf{print} : convertit toutes les couleurs en noir pour
+ l'impression.
+\item \textbf{gradientheadpalette} : utilise un dégradé de la couleur du titre pour les autres titres (sections, sous-sections, titre de théorèmes, etc.).
+\end{itemize}
+
+\subsubsection{Personnalisation des couleurs}
+
+\begin{itemize}
+\item \textbf{globalcolor} = \texttt{couleur} : définit la
+ couleur du texte.
+\item \textbf{titlecolor} = \texttt{couleur} ou \textbf{titlehexcolor} = \texttt{code hex} : définit la
+ couleur du titre.
+\item \textbf{headcolor} = \texttt{couleur} : définit la
+ couleur des en-têtes de section.
+\item \textbf{subcolor} = \texttt{couleur} : définit la
+ couleur des sous-sections.
+\item \textbf{subsubcolor} = \texttt{couleur} : définit la
+ couleur des sous-sous-sections.
+\item \textbf{headfootcolor} = \texttt{couleur} : définit
+ la couleur des en-têtes et pieds de page.
+\end{itemize}
+
+\subsubsection{Options d'affichage}
+
+\begin{itemize}
+\item \textbf{noframe} : supprime les cadres des environnements.
+\item \textbf{noback} : supprime les fonds colorés.
+\item \textbf{nocodeframe} : supprime les cadres des blocs de code.
+\item \textbf{scale} : harmonise les dimensions des polices en \texttt{lualatex}.
+\end{itemize}
+
+\subsection{Personnalisation du résumé}
+
+L'option \texttt{abstracttitle} permet de personnaliser
+le titre de l'environnement \texttt{abstract} :
+
+\begin{code}{latex}
+% Dans le préambule
+\documentclass[abstracttitle=Résumé]{neoschool}
+
+% Dans le document
+\begin{abstract}
+ Contenu du résumé...
+\end{abstract}
+\end{code}
+
+\subsection{Typographie}
+
+\begin{itemize}
+\item \textbf{sfbody} : active la police sans empattements pour le corps du
+ texte.
+\item \textbf{sfall} : active la police sans empattements pour tout le
+ document.
+\item \textbf{mathastext} : utilise la police de texte pour les
+ mathématiques.
+\item \textbf{mainface} = \texttt{police} : police
+ principale du document.
+\item \textbf{mainfaceoptions} = \texttt{options} : options
+ de la police principale.
+\item \textbf{sansface} = \texttt{police} : police sans
+ empattements.
+\item \textbf{sansfaceoptions} = \texttt{options} : options
+ de la police sans empattements.
+\item \textbf{monoface} = \texttt{police} : police à chasse
+ fixe.
+\item \textbf{monofaceoptions} = \texttt{options} : options
+ de la police à chasse fixe.
+\item \textbf{mathface} = \texttt{police} : police
+ mathématique.
+\item \textbf{mathfaceoptions} = \texttt{options} : options
+ de la police mathématique (uniquement en \texttt{pdflatex}).
+\item \textbf{facefamily} = \texttt{famille} : famille de
+ polices complète.
+\item \textbf{facefamilyoptions} = \texttt{options} :
+ options de la famille de polices.
+\end{itemize}
+
+\subsection{Mise en page}
+
+\subsubsection{Marges et espacement}
+
+\begin{itemize}
+\item \textbf{margin} = \texttt{longueur} : définit la
+ largeur des marges horizontales (2,5 cm par défaut) ; les marges verticales s'adaptent en conséquence.
+\item \textbf{notes} = \texttt{longueur} : active les \textit{todonotes}
+ dans les marges et définit leur largeur.
+\item \textbf{noindent} : supprime l'indentation des paragraphes.
+\item \textbf{indent} = \texttt{longueur} : définit la
+ largeur de l'indentation (1 em par défaut).
+\item \textbf{compact} :
+ \begin{itemize}
+ \item réduit l'espacement entre les paragraphes ;
+ \item diminue les marges des environnements ;
+ \item compresse l'interligne.
+ \end{itemize}
+\end{itemize}
+
+\subsubsection{Options de sortie}
+
+\begin{itemize}
+\item \textbf{2a5toa4} : affiche deux fois la même page A5 sur une page A4 en mode paysage.
+\item \textbf{2a4toa3} : affiche deux fois la même page A4 sur une page A3 en mode paysage.
+\item \textbf{4a5toa3} : affiche quatre fois la même page A5 sur une page A3.
+\item \textbf{2toa3} : affiche deux pages A4 quelconques sur une page A3 en mode paysage.
+\item \textbf{bookleta5} : génère un livret en A5 (quatre pages par feuille A4).
+\item \textbf{bookleta4} : génère un livret en A4 (quatre pages par feuille A3).
+\end{itemize}
+
+\subsubsection{En-têtes et pieds de page}
+
+\begin{itemize}
+
+\item
+ \textbf{fullheader} : active l'en-tête et le pied de page complets.
+ \begin{itemize}
+ \item En-tête : type de document à gauche, titre au centre et niveau de classe à
+ droite.
+ \item Pied de page : date à gauche, établissement au centre et pagination
+ à droite.
+ \end{itemize}
+\item \textbf{headrule} : ajoute un filet sous l'en-tête.
+\item \textbf{footrule} : ajoute un filet au-dessus du pied de page.
+\item \textbf{headfootrule} : active les deux filets.
+\end{itemize}
+
+\section{Styles de document}
+
+\subsection{Styles de titre}
+
+\subsubsection{Styles d'examen}
+
+\begin{itemize}
+
+\item \textbf{exam} : style complet pour examens avec en-tête détaillé.
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[exam]{neoschool}
+
+\neoheader{
+ type = Devoir surveillé,
+ school = Lycée Poincarré,
+ level = Terminale,
+ duration = 2h,
+ calculator = true % ou false ou exam
+}
+\end{code}
+
+\begin{itemize}
+
+\item \textbf{shortexam} : style compact pour examens avec en-tête simplifié.
+\item \textbf{mockexam} : style pour épreuves type baccalauréat ou brevet blancs
+ avec page de garde normalisée.
+\end{itemize}
+
+\subsubsection{Styles d'évaluation}
+
+\begin{itemize}
+
+\item \textbf{eval} : style standard pour évaluations.
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[eval]{neoschool}
+
+\neoheader{
+ type = Contrôle,
+ school = Collège Alan Turing,
+ level = Quatrième
+}
+\end{code}
+
+\begin{itemize}
+\item \textbf{evalicons} : ajoute des icônes à l'en-têtes \texttt{evel}.
+\item \textbf{evalgrade} : ajoute un bandeau de notation.
+\item \textbf{evaliconsgrade} : style complet avec icônes et notation.
+\item \textbf{shorteval} : style compact pour évaluations.
+\end{itemize}
+
+\subsubsection{Styles avec bulles}
+
+\begin{itemize}
+\item \textbf{bubbles} : style avec fond à bulles colorées.
+\item \textbf{shortbubbles} : version compacte du style bulles.
+\end{itemize}
+
+\subsubsection{Autres styles de titre}
+
+\begin{itemize}
+\item \textbf{titleornament} : ajoute des ornements en-dessous du titre.
+\item \textbf{titlerule} : ajoute un filet sous le titre.
+\item \textbf{titlemidrule} : ajoute un filet central sous le titre.
+\item \textbf{titlefullrule} : ajoute un filet en pleine largeur sous le titre.
+\item \textbf{fancybox} : titre avec boîte grise élégante.
+\item \textbf{onlytitleleft} : affiche uniquement le titre, aligné à gauche.
+\item \textbf{onlytitle} : affiche uniquement le titre, centré.
+\item \textbf{onlytitleright} : affiche uniquement titre, aligné à droite.
+\item \textbf{shorttitle} : style de titre compact.
+\item \textbf{shortlesson} : style compact pour les leçons.
+\end{itemize}
+
+\subsection{Configuration de l'en-tête}
+
+L'en-tête du document peut être configuré avec la commande
+\texttt{\textbackslash neoheader} :
+
+\begin{code}{latex}
+\neoheader{
+ type = {Type de document},
+ school = {Nom de l'établissement},
+ academy = {Nom de l'académie},
+ level = {Niveau de classe},
+ duration = {Durée},
+ calculator = {true/false/exam},
+ leftcontent = {\faIcon{...}},
+ rightcontent = {\faIcon{...}},
+}
+\end{code}
+
+\subsection{Options de formatage des titres}
+
+\subsubsection{Styles globaux}
+
+\begin{itemize}
+\item \textbf{headstyle} = \texttt{style} : style de police
+ pour tous les en-têtes (\texttt{sffamily} par défaut).
+ \begin{itemize}
+ \item Sections, sous-sections, etc.
+ \item En-têtes de théorèmes et exercices.
+ \end{itemize}
+\begin{code}{latex}
+\documentclass[headstyle=rmfamily]{neoschool}
+\end{code}
+\item \textbf{headweight} = \texttt{graisse} : graisse pour
+ tous les en-têtes (\texttt{bfseries} par défaut).
+\begin{code}{latex}
+\documentclass[
+ headstyle=sffamily,
+ headweight=mdseries
+]{neoschool}
+\end{code}
+\item \textbf{headshape} = \texttt{forme} : forme pour tous
+ les en-têtes (\texttt{scshape} par défaut).
+\begin{code}{latex}
+\documentclass[
+ headstyle=sffamily,
+ headshape=upshape
+]{neoschool}
+\end{code}
+\end{itemize}
+
+\subsubsection{Style du titre principal}
+
+\begin{itemize}
+\item \textbf{titlestyle} = \texttt{style} : style pour le
+ titre principal (hérite de \texttt{headstyle}).
+\item \textbf{titleweight} = \texttt{graisse} : graisse du
+ titre principal (hérite de \texttt{headweight}).
+\item \textbf{titleshape} = \texttt{forme} : forme du titre
+ principal (\texttt{upshape} par défaut).
+\item \textbf{titlealign} = \texttt{alignement} :
+ alignement du titre (\texttt{center} par défaut).
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[
+ titlestyle=sffamily,
+ titleweight=bfseries,
+ titleshape=upshape,
+ titlealign=left
+]{neoschool}
+\end{code}
+
+\subsubsection{Style des sections}
+
+\begin{itemize}
+\item \textbf{sectionnumstyle} = \texttt{style} : style de
+ numérotation.
+ \begin{itemize}
+ \item \texttt{circle} : numéro encerclé.
+ \item \texttt{box} : numéro encadré.
+ \item \texttt{dash} : tiret après le numéro.
+ \item \texttt{plain} : numéro simple.
+ \end{itemize}
+\item \textbf{sectiontextstyle} = \texttt{style} : style du
+ texte.
+ \begin{itemize}
+ \item \texttt{sc} : petites capitales.
+ \item \texttt{upper} : majuscules.
+ \item \texttt{lower} : minuscules.
+ \end{itemize}
+\item \textbf{sectionstyle} = \texttt{style} : style global
+ de la section.
+ \begin{itemize}
+ \item \texttt{ornaments} : avec ornements décoratifs.
+ \item \texttt{underline} : souligné.
+ \item \texttt{normal} : style simple.
+ \item \texttt{highlighted} : avec surlignage.
+ \item \texttt{shadedline} : avec ligne ombrée.
+ \end{itemize}
+\item \textbf{sectionalign} = \texttt{alignement} :
+ alignement des sections.
+ \begin{itemize}
+ \item \texttt{left} : à gauche.
+ \item \texttt{center} : centré
+ \item \texttt{right} : à droite.
+ \end{itemize}
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[
+ sectionnumstyle=circle,
+ sectiontextstyle=upper,
+ sectionstyle=highlighted,
+ sectionalign=left
+]{neoschool}
+\end{code}
+
+\subsubsection{Style des en-têtes/pieds de page}
+
+\begin{itemize}
+\item \textbf{headfootstyle} = \texttt{style} : style des
+ en-têtes/pieds de page (basé sur \texttt{headstyle}).
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[headfootstyle=sffamily]{neoschool}
+\end{code}
+
+\subsubsection{Exemple complet de configuration}
+
+\begin{code}{latex}
+\documentclass[
+ % Style global
+ headstyle=sffamily,
+ headweight=bfseries,
+ headshape=scshape,
+
+ % Titre principal
+ titlestyle=sffamily,
+ titleweight=bfseries,
+ titleshape=upshape,
+ titlealign=center,
+
+ % Sections
+ sectionnumstyle=circle,
+ sectiontextstyle=upper,
+ sectionstyle=highlighted,
+ sectionalign=left,
+
+ % En-têtes/pieds de page
+ headfootstyle=sffamily
+]{neoschool}
+\end{code}
+
+\section{Disposition des contenus}
+
+\subsection{Positionnement absolu d'objets}
+
+La commande \texttt{\textbackslash positionobject} permet de placer
+précisément un élément sur la page :
+
+\begin{code}{latex}
+% Syntaxe
+\positionobject{x-shift}{y-shift}{scale}{contenu}
+
+\begin{itemize}
+\item \texttt{x-shift} : décalage horizontal depuis le coin
+ supérieur gauche.
+\item \texttt{y-shift} : décalage vertical depuis le coin
+ supérieur gauche.
+\item \texttt{scale} : facteur d'échelle pour le contenu.
+\item \texttt{contenu} : élément à positionner (image,
+ texte, etc.).
+\end{itemize}
+
+% Exemple : Image en haut à droite
+\positionobject{15cm}{1cm}{0.5}{\includegraphics{logo.png}}
+
+% Exemple : Texte en bas de page
+\positionobject{2cm}{25cm}{1}{Note de bas de page spéciale}
+\end{code}
+
+\subsection{Mise en page à deux colonnes}
+
+La commande \textbf{\textbackslash splitcontent} permet de diviser le
+contenu horizontalement :
+
+\begin{code}{latex}
+% Syntaxe : \splitcontent[largeur1][espace]{contenu1}{contenu2}
+
+% Exemple avec valeurs personnalisées
+\splitcontent[0.6][0.05]{
+ Cette partie occupe 60 %
+ de la largeur totale
+}{
+ Cette partie occupe 35 %
+ (5 % d'espace entre les deux)
+}
+
+% Exemple avec valeurs par défaut (50 % / 50 %)
+\splitcontent{
+ Première colonne
+}{
+ Seconde colonne
+}
+\end{code}
+
+\subsection{Environnements côte à côte}
+
+L'environnement \texttt{sidebyside} permet de créer des
+boîtes à deux colonnes avec des styles cohérents :
+
+\begin{code}{latex}
+\begin{sidebyside}[options]
+ % Contenu gauche
+ \tcblower
+ % Contenu droit
+\end{sidebyside}
+\end{code}
+
+Les options sont celles de \texttt{tcolorbox}.
+
+\begin{code}{latex}
+\begin{sidebyside}[
+ title=Comparaison,
+ colback=exampleColor!5,
+ colbacklower=exampleColor!10
+]
+ Première version
+ \tcblower
+ Version améliorée
+\end{sidebyside}
+\end{code}
+
+\subsection{Association texte et image}
+
+La commande \textbf{\textbackslash textwithimage} combine texte et image~:
+
+\begin{code}{latex}
+% Syntaxe : \textwithimage[*]{largeur_image}{échelle_image}{texte}{chemin_image}
+% L'étoile (*) inverse la position de l'image (droite par défaut)
+
+% Image à droite (30 % de la largeur)
+\textwithimage{0.3}{0.95}{
+ Ce texte décrit l'image ci-contre...
+}{images/figure.png}
+
+% Image à gauche (40 % de la largeur)
+\textwithimage*{0.4}{0.9}{
+ Description à droite de l'image...
+}{images/schema.png}
+\end{code}
+
+\subsection{QR codes et contenus}
+
+La commande \textbf{\textbackslash withqrcode} intègre un QR code avec
+du contenu associé :
+
+\begin{code}{latex}
+% Syntaxe : \withqrcode[*][taille]{url}{contenu}
+% L'étoile (*) place le QR code à droite (gauche par défaut)
+
+% QR code à gauche (2 cm par défaut)
+\withqrcode{https://example.com}{
+ Scanner pour plus d'informations
+}
+
+% QR code de 3cm à droite
+\withqrcode*[3cm]{https://exercises.com}{
+ Accéder aux exercices en ligne
+}
+\end{code}
+
+\subsection{Grilles et papiers}
+
+\subsubsection{Grilles personnalisables}
+
+\begin{itemize}
+\item \textbf{\textbackslash grid} : grille à petits carreaux.
+\end{itemize}
+
+\begin{code}{latex}
+\grid[blue]{10cm}{5cm} % Grille bleue de 10 x 5 cm
+\end{code}
+
+\begin{itemize}
+\item \textbf{\textbackslash customgrid} : grille avec espacement.
+ personnalisé
+\end{itemize}
+
+\begin{code}{latex}
+\customgrid[red][4mm][4mm]{12cm}{8cm} % Grille rouge, mailles de 4 mm
+\end{code}
+
+\begin{itemize}
+\item \textbf{\textbackslash frenchgrid} : grille à grands carreaux de type Seyès.
+\end{itemize}
+
+\begin{code}{latex}
+\frenchgrid{15cm}{10cm} % Grille de type cahier français
+\end{code}
+
+\subsubsection{Pages entières}
+
+\begin{itemize}
+\item \textbf{\textbackslash notebook} : page de type cahier avec lignes horizontales et
+ marge rouge.
+\end{itemize}
+
+\begin{code}{latex}
+\notebook % Active le style cahier ligné
+\end{code}
+
+\begin{itemize}
+\item \textbf{\textbackslash nbminorgrid} : page entièrement recouverte de petits carreaux.
+\end{itemize}
+
+\begin{code}{latex}
+\nbminorgrid % Active le quadrillage fin
+\end{code}
+
+\begin{itemize}
+\item \textbf{\textbackslash nbmajorgrid} : page entièrement recouverte de grands carreaux.
+\end{itemize}
+
+\begin{code}{latex}
+\nbmajorgrid % Active le quadrillage Seyès
+\end{code}
+
+\subsection{Boîtes simples}
+
+L'environnement \texttt{neobox} permet de créer rapidement des boîtes simples. Il existe en deux variantes : \texttt{neobox} avec cadre et \texttt{neobox*} sans cadre visible :
+
+\begin{code}{latex}
+% Boîte standard
+\begin{neobox}[colframe=blue,colback=blue!5]
+ Texte dans une boîte...
+\end{neobox}
+
+% Boîte sans cadre avec fond coloré
+\begin{neobox*}[colback=gray!10]
+ Texte sur fond gris...
+\end{neobox*}
+\end{code}
+
+\section{Exercices}
+
+\subsection{Exercices et évaluations}
+
+\subsubsection{Configuration des exercices}
+
+L'environnement \texttt{exercise} accepte les options
+suivantes.
+
+\begin{itemize}
+\item \textbf{points} = \texttt{nombre} : nombre de points
+ de l'exercice.
+\item \textbf{level} = \texttt{nombre} : niveau de
+ difficulté (affiché sous forme d'étoiles).
+\item \textbf{subtitle} = \texttt{texte} : sous-titre ou
+ description de l'exercice.
+\item \textbf{icon} = \texttt{icône} : icône personnalisée
+ (utilise la bibliothèque d'icônes \textit{Font Awesome}).
+\item \textbf{topic} = \texttt{thème} : thème ou chapitre
+ concerné.
+\item \textbf{subject} = \texttt{matière} : matière
+ concernée.
+\item \textbf{ID} = \texttt{identifiant} : identifiant
+ unique pour référencement.
+\item \textbf{template} = \texttt{style} : style
+ d'affichage spécifique pour cet exercice.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{exercise}[
+ points=4,
+ level=2,
+ subtitle=Dérivation,
+ icon=\faPencil,
+ topic=Analyse,
+ subject=Mathématiques,
+ ID=der01,
+ template=elegant-box
+]
+ Calculer la dérivée de la fonction $f$ définie sur $]0 ; +\infty[$
+ par $f(x)=x^2\ln(x)$.
+\end{exercise}
+
+L'environnement \texttt{solution} doit immédiatement suivre l'environnement \texttt{exercise} correspondant. La correction des exercices ne s'affiche pas par défaut.
+
+\begin{solution}
+ On utilise la formule du produit...
+\end{solution}
+
+% Pour référencer l'exercice ailleurs :
+Comme vu dans l'exercice~\exercisenumber{der01}.
+\end{code}
+
+\subsubsection{Options globales}
+
+\begin{itemize}
+\item \textbf{exerciseicons} : active les icônes pour tous les exercices.
+\item \textbf{answers} : affiche automatiquement toutes les corrections des exercices.
+\item \textbf{shuffle} : mélange les choix de réponse dans les QCM.
+\item \textbf{sectionthmcounter} : numérote les exercices par section.
+\item \textbf{sharedexcounter} : partage le compteur avec les théorèmes.
+\end{itemize}
+
+\subsubsection{Templates d'exercices}
+
+La classe offre de nombreux styles prédéfinis pour les exercices.
+
+\begin{itemize}
+\item \textbf{box} : boîte standard avec bordure et titre.
+\item \textbf{elegant-box} : boîte avec barre latérale colorée.
+\item \textbf{shaded-box} : boîte avec ombrage et titre en bannière.
+\item \textbf{slanted-box} : boîte avec titre en bandeau incliné.
+\item \textbf{sober-box} : boîte minimaliste avec titre en couleur.
+\item \textbf{classic-box} : boîte classique avec titre en bandeau.
+\item \textbf{classy-box} : boîte sophistiquée avec titre décoratif.
+\item \textbf{rect-box} : boîte rectangulaire simple.
+\item \textbf{rect-box-outlined} : boîte rectangulaire avec contour.
+\item \textbf{num-box} : boîte numérotée compacte.
+\item \textbf{num-box-outlined} : boîte numérotée avec contour.
+\item \textbf{ex-num-box} : boîte ``Ex.'' numérotée.
+\item \textbf{ex-num-box-outlined} : boîte ``Ex.'' numérotée avec contour.
+\item \textbf{box-hrule} : boîte avec règle horizontale.
+\item \textbf{box-hrule-out} : boîte avec règle horizontale et contour.
+\item \textbf{box-hrule-in} : boîte avec règle horizontale intérieure.
+\item \textbf{boxed} : simple boîte avec titre.
+\item \textbf{boxed-out} : boîte avec contour et titre.
+\item \textbf{inline} : texte en ligne avec titre.
+\item \textbf{section} : titre de type section.
+\item \textbf{subsection} : titre de type sous-section.
+\item \textbf{terminal} : style console avec icône terminal.
+\item \textbf{block} : style minimaliste.
+\item \textbf{hrule} : avec règle horizontale.
+\end{itemize}
+
+Pour définir un template pour tout le document, il suffit d'utiliser la commande \texttt{\textbackslash xsimsetup} dans la préambule :
+
+\begin{code}{latex}
+\xsimsetup{
+ exercise/template = elegant-box, % template des exercices
+ solution/template = sol-box % template des solutions
+}
+\end{code}
+
+\subsubsection{QCM et choix multiples}
+
+\begin{itemize}
+\item \textbf{choices} : pour les QCM à réponse unique.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{exercise}[points=2,ID=qcm01]
+ Quelle est la dérivée de $e^x$ ?
+ \begin{choices}
+ \choice $x e^x$
+ \choice[\correct] $e^x$
+ \choice $e^{x-1}$
+ \choice $\ln(x)$
+ \end{choices}
+\end{exercise}
+\end{code}
+
+\begin{itemize}
+
+\item
+ \textbf{checkboxes} : pour les QCM à réponses multiples.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{exercise}[points=3,ID=qcm02]
+ Parmi ces nombres, lesquels sont premiers ?
+ \begin{checkboxes}
+ \checkbox[\correct*] 2
+ \checkbox[\correct*] 3
+ \checkbox 4
+ \checkbox[\correct*] 5
+ \end{checkboxes}
+\end{exercise}
+\end{code}
+
+\section{Environnements mathématiques}
+
+\subsection{Styles de théorèmes}
+
+Les styles suivants sont disponibles pour tous les environnements de
+type théorème : \textbf{amslikethm} (style minimaliste), \textbf{boxedthm}, \textbf{classicthm}, \textbf{classythm}, \textbf{elegantthm}, \textbf{shadedthm}, \textbf{slantedthm}, \textbf{soberthm}.
+
+Options communes :
+
+\begin{itemize}
+\item \textbf{title} = \texttt{texte} : titre du théorème.
+\item \textbf{label} = \texttt{nom} : étiquette pour
+ référencement.
+\item \textbf{colback} = \texttt{couleur} : couleur de fond.
+\item \textbf{colframe} = \texttt{couleur} : couleur du
+ cadre.
+\item \textbf{coltitle} = \texttt{couleur} : couleur du
+ titre.
+\item \textbf{fonttitle} = \texttt{commandes} : style du
+ titre.
+\end{itemize}
+
+\subsection{Options de numérotation}
+
+\begin{itemize}
+\item \textbf{sectionthmcounter} : compteurs relatifs à chaque section.
+\item \textbf{sharedthmcounter} : compteur partagé entre tous les
+ environnements.
+\item \textbf{theoremgroup} : regroupe certains environnements de théorèmes.
+\item \textbf{thmgroupcounter} : active un compteur pour les groupes.
+\end{itemize}
+
+\subsection{Environnements mathématiques}
+
+\begin{itemize}
+\item \textbf{theorem} : pour les théorèmes.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{theorem}[title=Théorème de Pythagore,label=pyth]
+ Dans un triangle rectangle, le carré de
+ l'hypoténuse est égal à la somme des carrés
+ des deux autres côtés.
+\end{theorem}
+
+% Référencement :
+D'après le théorème~\ref{thm:pyth}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{lemma} : pour les lemmes.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{lemma}[title=Lemme préparatoire,label=prep]
+ Contenu du lemme...
+\end{lemma}
+
+% Référencement :
+Selon le lemme~\ref{lem:prep}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{corollary} : pour les corollaires.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{corollary}[
+ title=Réciproque de Pythagore,
+ label=pythrecip
+]
+ Si $a^2 + b^2 = c^2$, alors le triangle est
+ rectangle en $A$.
+\end{corollary}
+
+% Référencement :
+Selon le corollaire~\ref{cor:pythrecip}
+\end{code}
+
+\begin{itemize}
+\item \textbf{proposition} : pour les propositions (\textbf{propo} pour le
+ référencement).
+\item \textbf{property} : pour les propriétés (\textbf{prop} pour le
+ référencement).
+\item \textbf{definition} : pour les définitions (\textbf{def} pour le
+ référencement).
+\item \textbf{method} : pour les méthodes (\textbf{meth} pour le
+ référencement).
+\item \textbf{activity} : pour les activités (\textbf{act} pour le
+ référencement).
+\item \textbf{application} : pour les applications (\textbf{appl} pour le
+ référencement).
+\item \textbf{remark} : pour les remarques.
+\item \textbf{remarks} : pour une série de remarques.
+\item \textbf{example} : pour les exemples.
+\item \textbf{examples} : pour une série d'exemples.
+\end{itemize}
+
+\section{Code informatique}
+
+La classe \texttt{neoschool} propose deux options pour la
+gestion du code.
+
+\begin{itemize}
+\item \textbf{listings} (par défaut) : utilise l'extension \texttt{listings}.
+\item \textbf{minted} : utilise l'extension \texttt{minted} (qui nécessite le langage \textit{Python} et sa bibliothèque
+ \texttt{Pygments}).
+\end{itemize}
+
+\subsection{Option listings}
+
+\subsubsection{Styles de code disponibles}
+
+\begin{itemize}
+\item \textbf{lststyle} = \texttt{style} : style de
+ coloration.
+ \begin{itemize}
+ \item \texttt{colorful} : coloration complète (par défaut).
+ \item \texttt{minimal} : style minimaliste.
+ \item \texttt{academic} : style ``académique'' avec numéros de ligne.
+ \item \texttt{modern} : style ``moderne'' avec fond coloré.
+ \end{itemize}
+\end{itemize}
+
+\subsubsection{Boîtes de code personnalisées}
+
+La classe définit l'environnement \texttt{code} dont la structure est la suivante :
+
+\begin{lstlisting}[style=latex]
+\begin{code}[options]{langage}[titre][style-boite]
+ code source...
+\end{code}
+\end{lstlisting}
+
+Styles de boîtes : \textbf{box-minimal}, \textbf{box-fancy}, \textbf{box-classic}, \textbf{box-elegant}, \textbf{box-diagonal}, \textbf{box-bevel}, \textbf{box-corner}, \textbf{box-rounded}, \textbf{box-downhill}, \textbf{box-bottomtitle}, \textbf{box-bottomtitlef}.
+
+\begin{lstlisting}[language=TeX]
+\begin{code}[numbers=left]{python}[Exemple de fonction][box-fancy]
+def hello(name):
+ print(f"Hello, {name}!")
+\end{code}
+\end{lstlisting}
+
+\subsubsection{Langages et styles préconfigurés}
+
+\begin{itemize}
+\item Python
+\item Java
+\item C++
+\item JavaScript
+\item SQL
+\item LaTeX
+\item Bash
+\item Assembly
+\item Lisp
+\item JSON
+\item YAML
+\item TOML
+\item CSV
+\item Markdown
+\end{itemize}
+
+\subsubsection{Commandes additionnelles}
+
+\begin{itemize}
+\item \textbf{\textbackslash codeinline} : code en ligne.
+\end{itemize}
+
+\begin{code}{latex}
+\codeinline[python]{print("Hello")}
+\end{code}
+
+\begin{itemize}
+
+\item \textbf{\textbackslash codeinput} : code chargé depuis un fichier.
+\end{itemize}
+
+\begin{code}{latex}
+\codeinput[options]{langage}{fichier.py}[titre][style-boite]
+\end{code}
+
+\subsection{Option minted}
+
+Lorsque l'option \textbf{minted} est activée, les environnements de code utilisent \texttt{Pygments} pour la coloration
+syntaxique. L'environnement \texttt{code} est également disponible avec l'option \texttt{minted}, avec la même syntaxe :
+
+\begin{lstlisting}[language=TeX]
+\usemintedstyle{tango}
+\begin{code}[linenos,highlightlines={2,3}]{python}[Fonction][box-fancy]
+def greet(name):
+ message = f"Hello, {name}!"
+ print(message)
+ return message
+\end{code}
+\end{lstlisting}
+
+\section{Notes et annotations}
+
+\subsection{Notes marginales}
+
+Les notes peuvent être placées dans la marge avec différentes options :
+
+\begin{itemize}
+\item \textbf{\textbackslash tdnote} : notes colorées et encadrées dans la
+ marge, alternant entre gauche et droite.
+\end{itemize}
+
+\begin{code}{latex}
+\tdnote{Point important à retenir}
+\tdnote[backgroundcolor=blue!5]{Note avec fond bleu clair}
+\end{code}
+
+\begin{itemize}
+\item \textbf{\textbackslash boxnote/\textbackslash tdmark} : l'extension \texttt{todonote} ne permettant pas de placer des notes directement dans des environnements, il est nécessaire d'utiliser un point d'ancrage (\textbf{\textbackslash tdmark}) ayant le même label que le contenu de la note proprement dite (\textbf{\textbackslash boxnote}).
+\end{itemize}
+
+\begin{code}{latex}
+\boxnote[thm1]{Ce théorème est important}
+\begin{theorem}
+ \tdmark[thm1] % Point de référence pour la note (même label)
+ Contenu du théorème...
+\end{theorem}
+\end{code}
+
+Les options possibles pour les notes sont les suivantes.
+
+\begin{itemize}
+\item \textbf{backgroundcolor} = \texttt{couleur} : couleur
+ de fond.
+\item \textbf{color} = \texttt{couleur} : couleur du texte.
+\item \textbf{bordercolor} = \texttt{couleur} : couleur de
+ la bordure.
+\item \textbf{width} = \texttt{longueur} : largeur de la
+ note.
+\item \textbf{linecolor} = \texttt{couleur} : couleur de la
+ ligne de référence.
+\end{itemize}
+
+\subsection{Admonitions}
+
+Les environnements d'admonition permettent de mettre en avant des
+informations importantes. Chaque type a sa propre couleur et icône par
+défaut.
+
+\begin{itemize}
+\item \textbf{note} : remarques générales.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{note}[Remarque importante][\faInfo]
+ Points à retenir...
+\end{note}
+\end{code}
+
+\begin{itemize}
+\item \textbf{info} : informations complémentaires.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{info}[Pour aller plus loin]
+ Informations additionnelles...
+\end{info}
+\end{code}
+
+\begin{itemize}
+\item \textbf{warning} : avertissements.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{warning}[Attention !][\faExclamationTriangle]
+ Points critiques à ne pas oublier...
+\end{warning}
+\end{code}
+
+\begin{itemize}
+\item \textbf{important} : points essentiels.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{important}[Point clé]
+ Concept fondamental...
+\end{important}
+\end{code}
+
+\begin{itemize}
+\item \textbf{tip} : conseils et astuces.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{tip}[Astuce de calcul][\faLightbulb]
+ Une méthode plus rapide...
+\end{tip}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{reminder} : points à retenir.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{reminder}[À mémoriser]
+ Formules essentielles...
+\end{reminder}
+\end{code}
+
+\begin{itemize}
+\item \textbf{summary} : résumés.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{summary}[En bref]
+ Points principaux du chapitre...
+\end{summary}
+\end{code}
+
+\begin{itemize}
+\item \textbf{toolbox} : boîte à outils.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{toolbox}[Outils nécessaires]
+ \begin{itemize}
+ \item Calculatrice
+ \item Règle graduée
+ \item Compas
+ \end{itemize}
+\end{toolbox}
+\end{code}
+
+Toutes les admonitions acceptent trois paramètres optionnels :
+
+\begin{itemize}
+\item un titre optionnel ;
+\item une icône personnalisée ;
+\item des options de personnalisation (couleurs, bordures).
+\end{itemize}
+
+\section{Notation et correction}
+
+\subsection{Outils de notation}
+
+\begin{itemize}
+\item \textbf{\textbackslash gradingstrip} : bandeau de notation (note et appréciation).
+\end{itemize}
+
+\begin{code}{latex}
+% Bandeau simple
+\gradingstrip
+
+% Bandeau avec total spécifié
+\gradingstrip[20]
+\end{code}
+
+L'option \textbf{totalpoints} définit le nombre total de points par défaut.
+
+\begin{code}{latex}
+\documentclass[totalpoints=20]{neoschool}
+\end{code}
+
+\begin{itemize}
+
+\item \textbf{\textbackslash mrk, \textbackslash mrks} : points dans la
+ marge.
+\end{itemize}
+
+\begin{code}{latex}
+% Un point
+\mrk[Bien vu !]{1} % Marge droite avec commentaire
+\mrk*{1} % Marge gauche
+
+% Plusieurs points
+\mrks{3} % 3 points marge droite
+\mrks*[Barème]{3} % 3 points marge gauche avec texte
+\end{code}
+
+\subsection{Zones de réponse}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash answerfield} : zone de réponse avec fond coloré.
+\end{itemize}
+
+\begin{code}{latex}
+% Zone pleine largeur, 3 lignes
+\answerfield{3}
+
+% Zone 80% largeur, 5 lignes
+\answerfield[0.8\linewidth]{5}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash answerframe} : zone de réponse encadrée.
+\end{itemize}
+
+\begin{code}{latex}
+% Cadre pleine largeur, 3 lignes
+\answerframe{3}
+
+% Cadre 80% largeur, 5 lignes
+\answerframe[0.8\linewidth]{5}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash vardots} : ligne pointillée de longueur
+ variable.
+\end{itemize}
+
+\begin{code}{latex}
+% Ligne pointillée pleine largeur
+\vardots
+
+% Ligne pointillée de 5cm
+\vardots[5cm]
+\end{code}
+
+\subsection{Marqueurs et symboles}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash cmark} : symbole de validation (\cmark)
+\item
+ \textbf{\textbackslash xmark} : symbole d'erreur (\xmark)
+\item
+ \textbf{\textbackslash unchecked} : case à cocher vide \unchecked
+\item
+ \textbf{\textbackslash done} : case cochée avec \done
+\item
+ \textbf{\textbackslash wontfix} : case cochée avec \wontfix
+\end{itemize}
+
+\begin{code}{latex}
+\begin{itemize}
+ \unchecked Objectif 1 à réaliser
+ \done Objectif 2 terminé
+ \wontfix Objectif 3 abandonné
+\end{itemize}
+\end{code}
+
+\subsection{Compétences et évaluation}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash competencies} : tableau d'évaluation par
+ compétences.
+\end{itemize}
+
+\begin{code}{latex}
+\competencies{
+ Calculer une dérivée\\
+ Étudier les variations\\
+ Résoudre une équation
+}
+\end{code}
+
+Le tableau affiche automatiquement :
+\begin{itemize}
+\item 4 niveaux de maîtrise avec émojis ;
+\item des cases à cocher pour l'évaluation.
+\end{itemize}
+
+\section{Commandes mathématiques et outils spéciaux}
+
+\subsection{Commandes
+mathématiques}\label{commandes-mathuxe9matiques}
+
+\subsubsection{Mise en valeur et
+coloration}\label{mise-en-valeur-et-coloration}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash mhl} : surlignage d'expressions mathématiques.
+\end{itemize}
+
+\begin{code}{latex}
+% Surlignage jaune par défaut
+$\mhl{x^2}$
+
+% Surlignage personnalisé
+$\mhl[blue!20]{f'(x)}$
+
+% Dans une équation sur plusieurs lignes
+\begin{align*}
+ f(x) &= x^2 + \mhl{2x} + 1 \\
+ f'(x) &= 2x + \mhl{2}
+\end{align*}
+\end{code}
+
+\begin{itemize}
+
+\item
+ \textbf{\textbackslash mc} : coloration d'expressions mathématiques.
+\end{itemize}
+
+\begin{code}{latex}
+% Couleur du thème par défaut
+$\mc{f(x)}$
+
+% Couleur personnalisée
+$\mc[red]{g(x)}$
+
+% Dans une équation
+\[ \mc{f'(x)} = \lim_{h \to 0} \mc[blue]{\frac{f(x+h)-f(x)}{h}} \]
+\end{code}
+
+\subsubsection{Support APMEP}
+
+Lorsque l'option \textbf{apmep} est activée, les commandes suivantes sont disponibles.
+\begin{itemize}
+\item Commandes de vecteurs :
+\end{itemize}
+
+\begin{code}{latex}
+\vect{u} % Vecteur u avec flèche
+\vectt{AB} % Vecteur AB avec espacement
+\end{code}
+
+\begin{itemize}
+\item Repères et coordonnées :
+\end{itemize}
+
+\begin{code}{latex}
+\Oij % Repère (O; i,j)
+\Oijk % Repère (O; i,j,k)
+\Ouv % Repère (O; u,v)
+\end{code}
+
+\begin{itemize}
+\item Commandes spéciales :
+\end{itemize}
+
+\begin{code}{latex}
+\euro % Symbole euro
+\cg % Crochet gauche
+\cd % Crochet droit
+\pg % Plus grand ou égal
+\pp % Plus petit ou égal
+\barre{x} % x surligné
+\ds % \displaystyle
+\end{code}
+
+\subsection{Outils spéciaux}
+
+\subsubsection{Arbres et graphes}
+
+\begin{itemize}
+\item
+ Arbres avec \emph{l}xtension \texttt{forest} :
+\end{itemize}
+
+\begin{code}{latex}
+\begin{neotree}
+A
+ [B
+ [D]
+ [E]
+ ]
+ [C
+ [F]
+ [G]
+ ]
+\end{neotree}
+
+% Avec poids sur les arêtes
+\begin{neotree}
+A
+ [B, w=\frac{1}{3}
+ [D]
+ [E]
+ ]
+ [C, w=\frac{2}{3}]
+\end{neotree}
+\end{code}
+
+\begin{itemize}
+\item
+ Graphes (uniquement avec une compilation en \texttt{lualatex}) :
+\end{itemize}
+
+\begin{code}{latex}
+\neograph{
+ A -- {B, C, D, F},
+ B -- {C, D, F},
+ C -> ["3"] D,
+ D -- [bend left=10] {E},
+ E -- [bend left=10] {D},
+ E -- [bend left=10] {F},
+ F -- [bend left=10] {E},
+ A -- [loop] A
+}
+\end{code}
+
+\subsubsection{Grille mathématique}
+
+L'environnement \texttt{mathgrid} permet de disposer
+des équations en grille :
+
+\begin{code}{latex}
+\begin{mathgrid}{3}
+ \neoline
+ \neocol{
+ T &= 7xx+9x\\
+ &= (7+9)x \\
+ &= 16x
+ }
+ \neocol{
+ U &= 8x^{2}-5x^{2}+x^{2}\\
+ &= (8-5+1)x^{2} \\
+ &= 4x^{2}
+ }
+ \neocol{
+ V &= 5a^{2}-6a\\
+ &= a(5a-6)
+ }
+ \neoline
+ \neocol[2]{
+ W &= 5a^{2}-6a+3+7a^{2}+a-6\\
+ &= (5+7)a^{2}+(-6+1)a+(3-6)\\
+ &= 12a^{2}-5a-3
+ }
+ \neocol{
+ A &= 2x + 3x\\
+ &= 5x
+ }
+\end{mathgrid}
+\end{code}
+
+\end{document}
diff --git a/macros/latex/contrib/neoschool/doc/neoschool.pdf b/macros/latex/contrib/neoschool/doc/neoschool.pdf
new file mode 100644
index 0000000000..5ddb2fccad
--- /dev/null
+++ b/macros/latex/contrib/neoschool/doc/neoschool.pdf
Binary files differ
diff --git a/macros/latex/contrib/neoschool/doc/neoschool.tex b/macros/latex/contrib/neoschool/doc/neoschool.tex
new file mode 100644
index 0000000000..c58862155d
--- /dev/null
+++ b/macros/latex/contrib/neoschool/doc/neoschool.tex
@@ -0,0 +1,1629 @@
+\documentclass[
+ margin=2cm
+]{neoschool}
+
+\title{The \texttt{neoschool} Class}
+\author{Version : 1.0.0 \quad\textemdash{}\quad Author : Razik Ikhlef}
+\date{2025/01/04}
+
+\begin{document}
+\maketitle
+
+The \texttt{neoschool} class provides secondary school
+teachers with a comprehensive set of tools to create their educational
+documents (assessments, course materials, exercise sheets with
+solutions, etc.). To meet various needs, it offers eight predefined
+color themes, diverse class options for layout and typography,
+specialized environments, dedicated commands, and different preformatted
+header styles for each type of document. It integrates dozens of
+commonly used LaTeX packages (see list below), which significantly
+reduces the preamble and avoids compatibility issues as much as
+possible. It's multilingual, supporting French, English, and German.
+
+\tableofcontents
+
+\section{Loaded Packages}
+
+The following packages are automatically loaded by the
+\texttt{neoschool} class:
+
+\texttt{adforn}, \texttt{adjustbox}, \texttt{algpseudocode},
+\texttt{amssymb}, \texttt{babel}, \texttt{bookmark}, \texttt{calc},
+\texttt{changespace}, \texttt{cuted}, \texttt{environ},
+\texttt{fancyvrb}, \texttt{fontawesome5}, \texttt{forest},
+\texttt{iftex}, \texttt{ifthen}, \texttt{kvoptions}, \texttt{lastpage},
+\texttt{marginnote}, \texttt{microtype}, \texttt{mismath} (which loads
+\texttt{mathtools}), \texttt{multicol}, \texttt{needspace},
+\texttt{pdftexcmds}, \texttt{pgffor}, \texttt{pgfplots},
+\texttt{qrcode}, \texttt{scrlayer-scrpage}, \texttt{silence},
+\texttt{siunitx}, \texttt{tabularray}, \texttt{tasks},
+\texttt{tcolorbox} (with the \texttt{most} option loading
+\texttt{listings} and \texttt{minted} packagess), \texttt{textcase},
+\texttt{tikz}, \texttt{tikzpagenodes}, \texttt{tikzsymbols},
+\texttt{ulem} (with \texttt{normalem} option), \texttt{xcolor} (with
+\texttt{table}, \texttt{svgnames}, \texttt{dvipsnames}, and
+\texttt{x11names} options), \texttt{xhfill}, \texttt{xkeyval},
+\texttt{xsim} (with \texttt{use-files} and \texttt{clear-aux} options),
+\texttt{xstring}.
+
+Compilation in \texttt{pdflatex} loads \texttt{fonttenc} (with
+\texttt{T1} option), \texttt{inputenc} (with \texttt{utf8} option),
+\texttt{newpxtext}, and \texttt{newpxmath}. Compilation in
+\texttt{lualatex} makes available \texttt{fontspec}, \texttt{luacas},
+\texttt{lua-ul}, \texttt{luacolor} packagess and applies
+\texttt{TeX\ Gyre\ PagellaX} and \texttt{TeX\ Gyre\ Heros} fonts in
+addition to \texttt{newpxmath}.
+
+The \texttt{graphics} option loads \texttt{graphicx} and
+\texttt{wrapfig}, the \texttt{draft} option loads \texttt{blindtext} and
+\texttt{lipsum}, and the \texttt{mathastext} option loads the
+\texttt{mathastext} packages.
+
+The \texttt{math} option loads \texttt{annotate-equations}, \texttt{bm},
+\texttt{cancel}, \texttt{mathrsfs}, \texttt{nncomma}, \texttt{numprint},
+\texttt{tdsfrmath} (with \texttt{suite} and \texttt{taupe} options),
+\texttt{tkz-euclide}, \texttt{witharrows}, and \texttt{xlop}.
+
+The \texttt{notes} option enables colored and framed notes in the left
+and right margins alternately and loads the \texttt{todonotes}
+packages.
+
+The \texttt{apmep} option, which allows direct compilation of
+examination papers from the association of the same name, defines a set
+of mathematical commands and loads \texttt{esvect},
+\texttt{fourier-ons}, \texttt{numprint} (with \texttt{np} option),
+\texttt{pstricks} (and many packages from the \texttt{pstricks}
+ecosystem), \texttt{tabularx}, and \texttt{textcomp}.
+
+The \texttt{mathics} option enables computer algebra via
+\texttt{mathics} (free version of \texttt{mathematica}) and loads
+\texttt{asymptote} and \texttt{latexalpha2} packagess.
+
+\section{Configuration Options}
+
+\subsection{Language}
+
+\begin{itemize}
+\item
+ \textbf{english, french, german}: Activates translations and
+ conventions for each language. These options affect theorem and
+ environment titles, typography, and mathematical conventions.
+\item
+ \textbf{nofrenchlist}: Disables French-style lists (restores dots
+ instead of dashes).
+\item
+ \textbf{frenchlistaspar}: Treats lists as paragraphs in French.
+\item
+ \textbf{frenchmath}: Applies French mathematical conventions (upright
+ capitals and Greek letters).
+\end{itemize}
+
+\subsection{Global Appearance}
+
+\subsubsection{Predefined Themes}
+
+The \textbf{theme} = \texttt{theme-name} option sets the document's color theme.
+Available themes are: \texttt{cyprus}, \texttt{kassio}, \texttt{frost},
+\texttt{spring}, \texttt{arbutus}, \texttt{duo}, \texttt{navy}, \texttt{royal}.
+Most of them are inspired by the \textit{ef-themes} for \textit{Emacs} by
+Protesilaos Stavrou.
+
+\subsubsection{Color Modes}
+
+\begin{itemize}
+\item
+ \textbf{normal}: Uses different colors for each type of environment.
+\item
+ \textbf{unicolor}: Uses a single color for all environments:
+
+ \begin{itemize}
+ \item
+ The title color is used as the base
+ \item
+ Variations are obtained through transparency
+ \end{itemize}
+\item
+ \textbf{print}: Converts all colors to black for printing.
+\item
+ \textbf{gradientheadpalette}: Uses a gradient of the title color for
+ other headings (sections, subsections, theorem titles, etc.).
+\end{itemize}
+
+\subsubsection{Custom Colors}
+
+\begin{itemize}
+\item
+ \textbf{globalcolor} = \texttt{color}: Sets the text
+ color.
+\item
+ \textbf{titlecolor} = \texttt{color} or
+ \textbf{titlehexcolor} = \texttt{hex code}: Sets the
+ title color.
+\item
+ \textbf{headcolor} = \texttt{color}: Sets the section
+ header color.
+\item
+ \textbf{subcolor} = \texttt{color}: Sets the
+ subsection color.
+\item
+ \textbf{subsubcolor} = \texttt{color}: Sets the
+ subsubsection color.
+\item
+ \textbf{headfootcolor} = \texttt{color}: Sets the
+ header and footer color.
+\end{itemize}
+
+\subsubsection{Display Options}
+
+\begin{itemize}
+\item
+ \textbf{noframe}: Removes environment frames.
+\item
+ \textbf{noback}: Removes colored backgrounds.
+\item
+ \textbf{nocodeframe}: Removes code block frames.
+\item
+ \textbf{scale}: Harmonizes font dimensions in
+ \texttt{lualatex}.
+\end{itemize}
+
+\subsection{Abstract Customization}
+
+The \texttt{abstracttitle} option allows customization
+of the \texttt{abstract} environment title:
+
+\begin{code}{latex}
+\documentclass[abstracttitle=Summary]{neoschool}
+
+% In the document
+\begin{abstract}
+ Abstract content...
+\end{abstract}
+\end{code}
+
+\subsection{Typography}
+
+\begin{itemize}
+\item
+ \textbf{sfbody}: Activates sans-serif font for body text.
+\item
+ \textbf{sfall}: Activates sans-serif font for the entire document.
+\item
+ \textbf{mathastext}: Uses text font for mathematics.
+\item
+ \textbf{mainface} = \texttt{font}: Main document
+ font.
+\item
+ \textbf{mainfaceoptions} = \texttt{options}: Main
+ font options.
+\item
+ \textbf{sansface} = \texttt{font}: Sans-serif font.
+\item
+ \textbf{sansfaceoptions} = \texttt{options}:
+ Sans-serif font options.
+\item
+ \textbf{monoface} = \texttt{font}: Monospace font.
+\item
+ \textbf{monofaceoptions} = \texttt{options}:
+ Monospace font options.
+\item
+ \textbf{mathface} = \texttt{font}: Mathematical font.
+\item
+ \textbf{mathfaceoptions} = \texttt{options}:
+ Mathematical font options (only in
+ \texttt{pdflatex}).
+\item
+ \textbf{facefamily} = \texttt{family}: Complete font
+ family.
+\item
+ \textbf{facefamilyoptions} = \texttt{options}: Font
+ family options.
+\end{itemize}
+
+\subsection{Layout}
+
+\subsubsection{Margins and Spacing}
+
+\begin{itemize}
+\item
+ \textbf{margin} = \texttt{length}: Sets horizontal
+ margin width (2.5cm default); vertical margins adjust accordingly.
+\item
+ \textbf{notes} = \texttt{length}: Activates
+ \emph{todonotes} in margins and sets their width.
+\item
+ \textbf{noindent}: Removes paragraph indentation.
+\item
+ \textbf{indent} = \texttt{length}: Sets indentation
+ width (1em default).
+\item
+ \textbf{compact}:
+
+ \begin{itemize}
+ \item
+ Reduces paragraph spacing
+ \item
+ Decreases environment margins
+ \item
+ Compresses line spacing
+ \end{itemize}
+\end{itemize}
+
+\subsubsection{Output Options}
+
+\begin{itemize}
+\item
+ \textbf{2a5toa4}: Displays two copies of A5 page on A4 in landscape.
+\item
+ \textbf{2a4toa3}: Displays two copies of A4 page on A3 in landscape.
+\item
+ \textbf{4a5toa3}: Displays four copies of A5 page on A3.
+\item
+ \textbf{2toa3}: Displays two different A4 pages on A3 in landscape.
+\item
+ \textbf{bookleta5}: Generates A5 booklet (four pages per A4 sheet).
+\item
+ \textbf{bookleta4}: Generates A4 booklet (four pages per A3 sheet).
+\end{itemize}
+
+\subsubsection{Headers and Footers}
+
+\begin{itemize}
+\item
+ \textbf{fullheader}: Activates complete header and footer.
+
+ \begin{itemize}
+ \item
+ Header: document type on left, title in center, class level on
+ right.
+ \item
+ Footer: date on left, institution in center, pagination on right.
+ \end{itemize}
+\item
+ \textbf{headrule}: Adds line under header.
+\item
+ \textbf{footrule}: Adds line above footer.
+\item
+ \textbf{headfootrule}: Activates both lines.
+\end{itemize}
+
+\section{Document Styles}
+
+\subsection{Title Styles}
+
+\subsubsection{Exam Styles}
+
+\begin{itemize}
+\item
+ \textbf{exam}: Complete style for exams with detailed header.
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[exam]{neoschool}
+
+\neoheader{
+ type = Test,
+ school = Poincarré High School,
+ level = Senior Year,
+ duration = 2h,
+ calculator = true % or false or exam
+}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{shortexam}: Compact style for exams with simplified header.
+\item
+ \textbf{mockexam}: Style for mock exams with standardized cover page.
+\end{itemize}
+
+\subsubsection{Assessment Styles}
+
+\begin{itemize}
+\item
+ \textbf{eval}: Standard style for assessments.
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[eval]{neoschool}
+
+\neoheader{
+ type = Quiz,
+ school = Alan Turing Middle School,
+ level = 8th Grade
+}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{evalicons}: Adds icons to \texttt{eval}
+ header.
+\item
+ \textbf{evalgrade}: Adds grading banner.
+\item
+ \textbf{evaliconsgrade}: Complete style with icons and grading.
+\item
+ \textbf{shorteval}: Compact style for assessments.
+\end{itemize}
+
+\subsubsection{Bubble Styles}
+
+\begin{itemize}
+\item
+ \textbf{bubbles}: Style with colored bubble background.
+\item
+ \textbf{shortbubbles}: Compact version of bubble style.
+\end{itemize}
+
+\subsubsection{Other Title Styles}
+
+\begin{itemize}
+\item
+ \textbf{titleornament}: Adds ornaments below title.
+\item
+ \textbf{titlerule}: Adds line under title.
+\item
+ \textbf{titlemidrule}: Adds center line under title.
+\item
+ \textbf{titlefullrule}: Adds full-width line under title.
+\item
+ \textbf{fancybox}: Title with elegant gray box.
+\item
+ \textbf{onlytitleleft}: Displays only title, left-aligned.
+\item
+ \textbf{onlytitle}: Displays only title, centered.
+\item
+ \textbf{onlytitleright}: Displays only title, right-aligned.
+\item
+ \textbf{shorttitle}: Compact title style.
+\item
+ \textbf{shortlesson}: Compact style for lessons.
+\end{itemize}
+
+\subsection{Header Configuration}
+
+The document header can be configured with the
+\texttt{\textbackslash neoheader} command:
+
+\begin{code}{latex}
+\neoheader{
+ type = {Document Type},
+ school = {School Name},
+ academy = {Academy Name},
+ level = {Grade Level},
+ duration = {Duration},
+ calculator = {true/false/exam},
+ leftcontent = {\faIcon{...}},
+ rightcontent = {\faIcon{...}},
+}
+\end{code}
+
+\subsection{Title Formatting Options}
+
+\subsubsection{Global Styles}
+
+\begin{itemize}
+\item
+ \textbf{headstyle} = \texttt{style}: Font style for
+ all headers (\texttt{sffamily} default).
+
+ \begin{itemize}
+ \item
+ Sections, subsections, etc.
+ \item
+ Theorem and exercise headers.
+ \end{itemize}
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[headstyle=rmfamily]{neoschool}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{headweight} = \texttt{weight}: Weight for all
+ headers (\texttt{bfseries} default).
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[
+ headstyle=sffamily,
+ headweight=mdseries
+]{neoschool}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{headshape} = \texttt{shape}: Shape for all
+ headers (\texttt{scshape} default).
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[
+ headstyle=sffamily,
+ headshape=upshape
+]{neoschool}
+\end{code}
+
+\subsubsection{Main Title Style}
+
+\begin{itemize}
+\item
+ \textbf{titlestyle} = \texttt{style}: Style for main
+ title (inherits from \texttt{headstyle}).
+\item
+ \textbf{titleweight} = \texttt{weight}: Weight for
+ main title (inherits from \texttt{headweight}).
+\item
+ \textbf{titleshape} = \texttt{shape}: Shape for main
+ title (\texttt{upshape} default).
+\item
+ \textbf{titlealign} = \texttt{alignment}: Title
+ alignment (\texttt{center} default).
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[
+ titlestyle=sffamily,
+ titleweight=bfseries,
+ titleshape=upshape,
+ titlealign=left
+]{neoschool}
+\end{code}
+
+\subsubsection{Section Style}
+
+\begin{itemize}
+\item
+ \textbf{sectionnumstyle} = \texttt{style}: Numbering
+ style.
+
+ \begin{itemize}
+ \item
+ \texttt{circle}: Circled number.
+ \item
+ \texttt{box}: Boxed number.
+ \item
+ \texttt{dash}: Dash after number.
+ \item
+ \texttt{plain}: Simple number.
+ \end{itemize}
+\item
+ \textbf{sectiontextstyle} = \texttt{style}: Text
+ style.
+
+ \begin{itemize}
+ \item
+ \texttt{sc}: Small caps.
+ \item
+ \texttt{upper}: Uppercase.
+ \item
+ \texttt{lower}: Lowercase.
+ \end{itemize}
+\item
+ \textbf{sectionstyle} = \texttt{style}: Global
+ section style.
+
+ \begin{itemize}
+ \item
+ \texttt{ornaments}: With decorative ornaments.
+ \item
+ \texttt{underline}: Underlined.
+ \item
+ \texttt{normal}: Simple style.
+ \item
+ \texttt{highlighted}: With highlighting.
+ \item
+ \texttt{shadedline}: With shaded line.
+ \end{itemize}
+\item
+ \textbf{sectionalign} = \texttt{alignment}: Section
+ alignment.
+
+ \begin{itemize}
+ \item
+ \texttt{left}: Left-aligned.
+ \item
+ \texttt{center}: Centered.
+ \item
+ \texttt{right}: Right-aligned.
+ \end{itemize}
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[
+ sectionnumstyle=circle,
+ sectiontextstyle=upper,
+ sectionstyle=highlighted,
+ sectionalign=left
+]{neoschool}
+\end{code}
+
+\subsubsection{Header/Footer Style}
+
+\begin{itemize}
+\item
+ \textbf{headfootstyle} = \texttt{style}:
+ Header/footer style (based on \texttt{headstyle}).
+\end{itemize}
+
+\begin{code}{latex}
+\documentclass[headfootstyle=sffamily]{neoschool}
+\end{code}
+
+\subsubsection{Complete Configuration
+Example}
+
+\begin{code}{latex}
+\documentclass[
+ % Global style
+ headstyle=sffamily,
+ headweight=bfseries,
+ headshape=scshape,
+
+ % Main title
+ titlestyle=sffamily,
+ titleweight=bfseries,
+ titleshape=upshape,
+ titlealign=center,
+
+ % Sections
+ sectionnumstyle=circle,
+ sectiontextstyle=upper,
+ sectionstyle=highlighted,
+ sectionalign=left,
+
+ % Headers/footers
+ headfootstyle=sffamily
+]{neoschool}
+\end{code}
+
+\section{Content Layout}
+
+\subsection{Absolute Object
+Positioning}
+
+The \texttt{\textbackslash positionobject} command allows precise
+placement of elements on the page:
+
+\begin{code}{latex}
+\positionobject{x-shift}{y-shift}{scale}{content}
+
+\begin{itemize}
+\item \texttt{x-shift}: Horizontal offset from top-left corner.
+\item \texttt{y-shift}: Vertical offset from top-left corner.
+\item \texttt{scale}: Scale factor for content.
+\item \texttt{content}: Element to position (image, text, etc.).
+\end{itemize}
+
+% Example: Image in top-right corner
+\positionobject{15cm}{1cm}{0.5}{\includegraphics{logo.png}}
+
+% Example: Special footer text
+\positionobject{2cm}{25cm}{1}{Special footer note}
+\end{code}
+
+\subsection{Two-Column Layout}
+
+The \textbf{\textbackslash splitcontent} command divides content horizontally:
+
+\begin{code}{latex}
+% Example with custom values
+\splitcontent[0.6][0.05]{
+ This part takes up 60%
+ of total width
+}{
+ This part takes up 35%
+ (5% space between)
+}
+
+% Example with default values (50% / 50%)
+\splitcontent{
+ First column
+}{
+ Second column
+}
+\end{code}
+
+\subsection{Side-by-Side
+Environments}
+
+The \texttt{sidebyside} environment creates two-column
+boxes with consistent styling:
+
+\begin{code}{latex}
+\begin{sidebyside}[options]
+ % Left content
+ \tcblower
+ % Right content
+\end{sidebyside}
+\end{code}
+
+Options are those of \texttt{tcolorbox}.
+
+\begin{code}{latex}
+\begin{sidebyside}[
+ title=Comparison,
+ colback=exampleColor!5,
+ colbacklower=exampleColor!10
+]
+ First version
+ \tcblower
+ Improved version
+\end{sidebyside}
+\end{code}
+
+\subsection{Text and Image
+Combination}
+
+The \textbf{\textbackslash textwithimage} command combines text and image:
+
+\begin{code}{latex}
+% Star (*) reverses image position (right by default)
+
+% Image on right (30% width)
+\textwithimage{0.3}{0.95}{
+ This text describes the adjacent image...
+}{images/figure.png}
+
+% Image on left (40% width)
+\textwithimage*{0.4}{0.9}{
+ Description to the right of the image...
+}{images/schema.png}
+\end{code}
+
+\subsection{QR Codes and Content}
+
+The \textbf{\textbackslash withqrcode} command integrates a QR code with associated
+content:
+
+\begin{code}{latex}
+% Star (*) places QR code on right (left by default)
+
+% QR code on left (2cm default)
+\withqrcode{https://example.com}{
+ Scan for more information
+}
+
+% 3cm QR code on right
+\withqrcode*[3cm]{https://exercises.com}{
+ Access online exercises
+}
+\end{code}
+
+\subsection{Grids and Papers}
+
+\subsubsection{Custom Grids}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash grid}: Small square grid.
+\end{itemize}
+
+\begin{code}{latex}
+\grid[blue]{10cm}{5cm} % Blue grid 10 x 5 cm
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash customgrid}: Grid with custom spacing.
+\end{itemize}
+
+\begin{code}{latex}
+\customgrid[red][4mm][4mm]{12cm}{8cm} % Red grid, 4mm mesh
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash frenchgrid}: Seyes-style grid.
+\end{itemize}
+
+\begin{code}{latex}
+\frenchgrid{15cm}{10cm} % French-style notebook grid
+\end{code}
+
+\subsubsection{Full Pages}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash notebook}: Notebook-style page with horizontal lines and red
+ margin.
+\end{itemize}
+
+\begin{code}{latex}
+\notebook % Activates lined notebook style
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash nbminorgrid}: Page fully covered with small squares.
+\end{itemize}
+
+\begin{code}{latex}
+\nbminorgrid % Activates fine grid
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash nbmajorgrid}: Page fully covered with large squares.
+\end{itemize}
+
+\begin{code}{latex}
+\nbmajorgrid % Activates Seyes grid
+\end{code}
+
+\subsection{Simple Boxes}
+
+The \texttt{neobox} environment provides a quick way to create simple boxes. It comes in two variants: \texttt{neobox} with frame and \texttt{neobox*} without visible frame:
+
+\begin{code}{latex}
+% Standard box
+\begin{neobox}[colframe=blue,colback=blue!5]
+ Text in a box...
+\end{neobox}
+
+% Frameless box with colored background
+\begin{neobox*}[colback=gray!10]
+ Text on gray background...
+\end{neobox*}
+\end{code}
+
+\section{Exercises}
+
+\subsection{Exercises and
+Assessments}
+
+\subsubsection{Exercise Configuration}
+
+The \texttt{exercise} environment accepts the following
+options:
+
+\begin{itemize}
+\item
+ \textbf{points} = \texttt{number}: Points for the
+ exercise.
+\item
+ \textbf{level} = \texttt{number}: Difficulty level
+ (displayed as stars).
+\item
+ \textbf{subtitle} = \texttt{text}: Exercise subtitle
+ or description.
+\item
+ \textbf{icon} = \texttt{icon}: Custom icon (uses Font
+ Awesome library).
+\item
+ \textbf{topic} = \texttt{theme}: Related theme or
+ chapter.
+\item
+ \textbf{subject} = \texttt{subject}: Related subject.
+\item
+ \textbf{ID} = \texttt{identifier}: Unique identifier
+ for referencing.
+\item
+ \textbf{template} = \texttt{style}: Specific display
+ style for this exercise.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{exercise}[
+ points=4,
+ level=2,
+ subtitle=Derivatives,
+ icon=\faPencil,
+ topic=Analysis,
+ subject=Mathematics,
+ ID=der01,
+ template=elegant-box
+]
+ Calculate the derivative of the function $f$ defined on $]0 ; +\infty[$
+ by $f(x)=x^2\ln(x)$.
+\end{exercise}
+
+The \texttt{solution} environment must immediately follow its corresponding \texttt{exercise} environment. Exercise solutions are not displayed by default.
+
+\begin{solution}
+ We use the product rule...
+\end{solution}
+
+% To reference the exercise elsewhere:
+As seen in exercise~\exercisenumber{der01}.
+\end{code}
+
+\subsubsection{Global Options}
+
+\begin{itemize}
+\item
+ \textbf{exerciseicons}: Activates icons for all exercises.
+\item
+ \textbf{answers}: Automatically displays all exercise solutions.
+\item
+ \textbf{shuffle}: Randomizes answer choices in multiple choice
+ questions.
+\item
+ \textbf{sectionthmcounter}: Numbers exercises by section.
+\item
+ \textbf{sharedexcounter}: Shares counter with theorems.
+\end{itemize}
+
+\subsubsection{Exercise Templates}
+
+The class offers numerous predefined styles for exercises:
+
+\begin{itemize}
+\item
+ \textbf{box}: Standard box with border and title.
+\item
+ \textbf{elegant-box}: Box with colored sidebar.
+\item
+ \textbf{shaded-box}: Box with shading and banner title.
+\item
+ \textbf{slanted-box}: Box with slanted banner title.
+\item
+ \textbf{sober-box}: Minimalist box with colored title.
+\item
+ \textbf{classic-box}: Classic box with banner title.
+\item
+ \textbf{classy-box}: Sophisticated box with decorative title.
+\item
+ \textbf{rect-box}: Simple rectangular box.
+\item
+ \textbf{rect-box-outlined}: Rectangular box with outline.
+\item
+ \textbf{num-box}: Compact numbered box.
+\item
+ \textbf{num-box-outlined}: Numbered box with outline.
+\item
+ \textbf{ex-num-box}: Numbered ``Ex.'' box.
+\item
+ \textbf{ex-num-box-outlined}: Numbered ``Ex.'' box with outline.
+\item
+ \textbf{box-hrule}: Box with horizontal rule.
+\item
+ \textbf{box-hrule-out}: Box with horizontal rule and outline.
+\item
+ \textbf{box-hrule-in}: Box with inner horizontal rule.
+\item
+ \textbf{boxed}: Simple box with title.
+\item
+ \textbf{boxed-out}: Box with outline and title.
+\item
+ \textbf{inline}: Inline text with title.
+\item
+ \textbf{section}: Section-style title.
+\item
+ \textbf{subsection}: Subsection-style title.
+\item
+ \textbf{terminal}: Console style with terminal icon.
+\item
+ \textbf{block}: Minimalist style.
+\item
+ \textbf{hrule}: With horizontal rule.
+\end{itemize}
+
+To set a template for the entire document, use the
+\texttt{\textbackslash xsimsetup} command in the preamble:
+
+\begin{code}{latex}
+\xsimsetup{
+ exercise/template = elegant-box, % exercise template
+ solution/template = sol-box % solution template
+}
+\end{code}
+
+\subsubsection{Multiple Choice Questions}
+
+\begin{itemize}
+\item
+ \textbf{choices}: For single-answer MCQs.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{exercise}[points=2,ID=mcq01]
+ What is the derivative of $e^x$?
+ \begin{choices}
+ \choice $x e^x$
+ \choice[\correct] $e^x$
+ \choice $e^{x-1}$
+ \choice $\ln(x)$
+ \end{choices}
+\end{exercise}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{checkboxes}: For multiple-answer MCQs.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{exercise}[points=3,ID=mcq02]
+ Which of these numbers are prime?
+ \begin{checkboxes}
+ \checkbox[\correct*] 2
+ \checkbox[\correct*] 3
+ \checkbox 4
+ \checkbox[\correct*] 5
+ \end{checkboxes}
+\end{exercise}
+\end{code}
+
+\section{Math Environments}
+
+\subsection{Theorem Styles}
+
+The following styles are available for all theorem-type environments:
+\textbf{amslikethm} (minimalist style), \textbf{boxedthm},
+\textbf{classicthm}, \textbf{classythm}, \textbf{elegantthm},
+\textbf{shadedthm}, \textbf{slantedthm}, \textbf{soberthm}.
+
+Common options:
+
+\begin{itemize}
+\item
+ \textbf{title} = \texttt{text}: Theorem title.
+\item
+ \textbf{label} = \texttt{name}: Label for
+ referencing.
+\item
+ \textbf{colback} = \texttt{color}: Background color.
+\item
+ \textbf{colframe} = \texttt{color}: Frame color.
+\item
+ \textbf{coltitle} = \texttt{color}: Title color.
+\item
+ \textbf{fonttitle} = \texttt{commands}: Title style.
+\end{itemize}
+
+\subsection{Numbering Options}
+
+\begin{itemize}
+\item
+ \textbf{sectionthmcounter}: Counters relative to each section.
+\item
+ \textbf{sharedthmcounter}: Counter shared between all environments.
+\item
+ \textbf{theoremgroup}: Groups certain theorem environments.
+\item
+ \textbf{thmgroupcounter}: Activates counter for groups.
+\end{itemize}
+
+\subsection{Mathematical
+Environments}
+
+\begin{itemize}
+\item
+ \textbf{theorem}: For theorems.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{theorem}[title=Pythagorean Theorem,label=pyth]
+ In a right triangle, the square of the
+ hypotenuse equals the sum of squares
+ of the other two sides.
+\end{theorem}
+
+% Referencing:
+According to theorem~\ref{thm:pyth}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{lemma}: For lemmas.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{lemma}[title=Preparatory Lemma,label=prep]
+ Lemma content...
+\end{lemma}
+
+% Referencing:
+According to lemma~\ref{lem:prep}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{corollary}: For corollaries.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{corollary}[
+ title=Pythagorean Converse,
+ label=pythrecip
+]
+ If $a^2 + b^2 = c^2$, then the triangle is
+ right-angled at $A$.
+\end{corollary}
+
+% Referencing:
+According to corollary~\ref{cor:pythrecip}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{proposition}: For propositions (\textbf{propo} for
+ referencing).
+\item
+ \textbf{property}: For properties (\textbf{prop} for referencing).
+\item
+ \textbf{definition}: For definitions (\textbf{def} for referencing).
+\item
+ \textbf{method}: For methods (\textbf{meth} for referencing).
+\item
+ \textbf{activity}: For activities (\textbf{act} for referencing).
+\item
+ \textbf{application}: For applications (\textbf{appl} for
+ referencing).
+\item
+ \textbf{remark}: For remarks.
+\item
+ \textbf{remarks}: For a series of remarks.
+\item
+ \textbf{example}: For examples.
+\item
+ \textbf{examples}: For a series of examples.
+\end{itemize}
+
+\section{Listings}
+
+The \texttt{neoschool} class offers two options for
+code handling.
+
+\begin{itemize}
+\item
+ \textbf{listings} (default): Uses the
+ \texttt{listings} package.
+\item
+ \textbf{minted}: Uses the \texttt{minted} package
+ (requires Python and the \texttt{Pygments} library).
+\end{itemize}
+
+\subsection{\texttt{listings} Option}
+
+\subsubsection{Available Code Styles}
+
+\begin{itemize}
+\item
+ \textbf{lststyle} = \texttt{style}: Coloring style.
+
+ \begin{itemize}
+ \item
+ \texttt{colorful}: Complete coloring (default).
+ \item
+ \texttt{minimal}: Minimalist style.
+ \item
+ \texttt{academic}: ``Academic'' style with line
+ numbers.
+ \item
+ \texttt{modern}: ``Modern'' style with colored
+ background.
+ \end{itemize}
+\end{itemize}
+
+\subsubsection{Custom Code Boxes}
+
+The class defines the \texttt{code} environment with
+the following structure:
+
+\begin{lstlisting}[language=TeX]
+\begin{code}[options]{language}[title][box-style]
+ source code...
+\end{code}
+\end{lstlisting}
+
+Box styles: \textbf{box-minimal}, \textbf{box-fancy},
+\textbf{box-classic}, \textbf{box-elegant}, \textbf{box-diagonal},
+\textbf{box-bevel}, \textbf{box-corner}, \textbf{box-rounded},
+\textbf{box-downhill}, \textbf{box-bottomtitle},
+\textbf{box-bottomtitlef}.
+
+\begin{lstlisting}[language=TeX]
+\begin{code}[numbers=left]{python}[Function Example][box-fancy]
+def hello(name):
+ print(f"Hello, {name}!")
+\end{code}
+\end{lstlisting}
+
+\subsubsection{Preconfigured Languages and
+Styles}
+
+\begin{itemize}
+\item
+ Python
+\item
+ Java
+\item
+ C++
+\item
+ JavaScript
+\item
+ SQL
+\item
+ LaTeX
+\item
+ Bash
+\item
+ Assembly
+\item
+ Lisp
+\item
+ JSON
+\item
+ YAML
+\item
+ TOML
+\item
+ CSV
+\item
+ Markdown
+\end{itemize}
+
+\subsubsection{Additional Commands}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash codeinline}: Inline code.
+\end{itemize}
+
+\begin{code}{latex}
+\codeinline[python]{print("Hello")}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash codeinput}: Code loaded from file.
+\end{itemize}
+
+\begin{code}{latex}
+\codeinput[options]{language}{file.py}[title][box-style]
+\end{code}
+
+\subsection{\texttt{minted} Option}
+
+When the \textbf{minted} option is activated, code environments use
+\texttt{Pygments} for syntax highlighting. The
+\texttt{code} environment is also available with the
+\texttt{minted} option, using the same syntax:
+
+\begin{code}{latex}
+\usemintedstyle{tango}
+\begin{code}[linenos,highlightlines={2,3}]{python}[Function][box-fancy]
+def greet(name):
+ message = f"Hello, {name}!"
+ print(message)
+ return message
+\end{code}
+\end{code}
+
+\section{Notes and Annotations}
+
+\subsection{Margin Notes}
+
+Notes can be placed in the margin with different options:
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash tdnote}: Colored and framed notes in the margin, alternating
+ between left and right.
+\end{itemize}
+
+\begin{code}{latex}
+\tdnote{Important point to remember}
+\tdnote[backgroundcolor=blue!5]{Note with light blue background}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash boxnote}/\textbf{\textbackslash tdmark}: Since the \texttt{todonote}
+ package doesn't allow direct note placement in environments, use an
+ anchor point (\textbf{\textbackslash tdmark}) with the same label as the note content
+ (\textbf{\textbackslash boxnote}).
+\end{itemize}
+
+\begin{code}{latex}
+\boxnote[thm1]{This theorem is important}
+\begin{theorem}
+ \tdmark[thm1] % Reference point for note (same label)
+ Theorem content...
+\end{theorem}
+\end{code}
+
+Available note options:
+
+\begin{itemize}
+\item
+ \textbf{backgroundcolor} = \texttt{color}: Background
+ color.
+\item
+ \textbf{color} = \texttt{color}: Text color.
+\item
+ \textbf{bordercolor} = \texttt{color}: Border color.
+\item
+ \textbf{width} = \texttt{length}: Note width.
+\item
+ \textbf{linecolor} = \texttt{color}: Reference line
+ color.
+\end{itemize}
+
+\subsection{Admonitions}
+
+Admonition environments highlight important information. Each type has
+its default color and icon.
+
+\begin{itemize}
+\item
+ \textbf{note}: General remarks.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{note}[Important Note][\faInfo]
+ Points to remember...
+\end{note}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{info}: Additional information.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{info}[Further Reading]
+ Additional information...
+\end{info}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{warning}: Warnings.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{warning}[Caution!][\faExclamationTriangle]
+ Critical points to remember...
+\end{warning}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{important}: Essential points.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{important}[Key Point]
+ Fundamental concept...
+\end{important}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{tip}: Tips and tricks.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{tip}[Calculation Tip][\faLightbulb]
+ A faster method...
+\end{tip}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{reminder}: Points to remember.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{reminder}[Memorize]
+ Essential formulas...
+\end{reminder}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{summary}: Summaries.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{summary}[In Brief]
+ Main chapter points...
+\end{summary}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{toolbox}: Toolbox.
+\end{itemize}
+
+\begin{code}{latex}
+\begin{toolbox}[Required Tools]
+ \begin{itemize}
+ \item Calculator
+ \item Ruler
+ \item Compass
+ \end{itemize}
+\end{toolbox}
+\end{code}
+
+All admonitions accept three optional parameters: - An optional title -
+A custom icon - Customization options (colors, borders)
+
+\section{Grading and Correction}
+
+\subsection{Grading Tools}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash gradingstrip}: Grading banner (grade and comments).
+\end{itemize}
+
+\begin{code}{latex}
+\gradingstrip
+
+% Banner with specified total
+\gradingstrip[20]
+\end{code}
+
+The \textbf{totalpoints} option sets the default total points.
+
+\begin{code}{latex}
+\documentclass[totalpoints=20]{neoschool}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash mrk}, \textbf{\textbackslash mrks}: Points in margin.
+\end{itemize}
+
+\begin{code}{latex}
+\mrk[Well done!]{1} % Right margin with comment
+\mrk*{1} # Left margin
+
+% Multiple points
+\mrks{3} % 3 points right margin
+\mrks*[Scale]{3} % 3 points left margin with text
+\end{code}
+
+\subsection{Answer Areas}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash answerfield}: Answer area with colored background.
+\end{itemize}
+
+\begin{code}{latex}
+\answerfield{3}
+
+% Area 80% width, 5 lines
+\answerfield[0.8\linewidth]{5}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash answerframe}: Framed answer area.
+\end{itemize}
+
+\begin{code}{latex}
+\answerframe{3}
+
+% Frame 80% width, 5 lines
+\answerframe[0.8\linewidth]{5}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash vardots}: Variable-length dotted line.
+\end{itemize}
+
+\begin{code}{latex}
+\vardots
+
+% 5cm dotted line
+\vardots[5cm]
+\end{code}
+
+\subsection{Markers and Symbols}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash cmark}: Check mark symbol (✓)
+\item
+ \textbf{\textbackslash xmark}: Error symbol (✗)
+\item
+ \textbf{\textbackslash unchecked}: Empty checkbox
+\item
+ \textbf{\textbackslash done}: Checked box with ✓
+\item
+ \textbf{\textbackslash wontfix}: Checked box with ✗
+\end{itemize}
+
+\begin{code}{latex}
+\begin{itemize}
+ \unchecked Goal 1 to complete
+ \done Goal 2 completed
+ \wontfix Goal 3 abandoned
+\end{itemize}
+\end{code}
+
+\subsection{Skills and Assessment}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash competencies}: Skills assessment table.
+\end{itemize}
+
+\begin{code}{latex}
+\competencies{
+ Calculate derivatives\\
+ Study variations\\
+ Solve equations
+}
+\end{code}
+
+The table automatically displays: - 4 mastery levels with emojis -
+Checkboxes for assessment
+
+\section{Math Commands and Special
+Tools}
+
+\subsection{Math Commands}
+
+\subsubsection{Highlighting and Coloring}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash mhl}: Highlighting math expressions.
+\end{itemize}
+
+\begin{code}{latex}
+$\mhl{x^2}$
+
+% Custom highlighting
+$\mhl[blue!20]{f'(x)}$
+
+% In multi-line equations
+\begin{align*}
+ f(x) &= x^2 + \mhl{2x} + 1 \\
+ f'(x) &= 2x + \mhl{2}
+\end{align*}
+\end{code}
+
+\begin{itemize}
+\item
+ \textbf{\textbackslash mc}: Coloring math expressions.
+\end{itemize}
+
+\begin{code}{latex}
+$\mc{f(x)}$
+
+% Custom color
+$\mc[red]{g(x)}$
+
+% In equation
+\[ \mc{f'(x)} = \lim_{h \to 0} \mc[blue]{\frac{f(x+h)-f(x)}{h}} \]
+\end{code}
+
+\subsubsection{APMEP Support}
+
+When the \textbf{apmep} option is activated, the following commands
+become available:
+
+\begin{itemize}
+\item
+ Vector commands:
+\end{itemize}
+
+\begin{code}{latex}
+\vect{u} % Vector u with arrow
+\vectt{AB} % Vector AB with spacing
+\end{code}
+
+\begin{itemize}
+\item
+ Reference frames and coordinates:
+\end{itemize}
+
+\begin{code}{latex}
+\Oij % Frame (O; i,j)
+\Oijk % Frame (O; i,j,k)
+\Ouv % Frame (O; u,v)
+\end{code}
+
+\begin{itemize}
+\item
+ Special commands:
+\end{itemize}
+
+\begin{code}{latex}
+\euro % Euro symbol
+\cg % Left bracket
+\cd % Right bracket
+\pg % Greater than or equal
+\pp % Less than or equal
+\barre{x} % Overlined x
+\ds % \displaystyle
+\end{code}
+
+\subsection{Special Tools}
+
+\subsubsection{Trees and Graphs}
+
+\begin{itemize}
+\item
+ Trees with \texttt{forest} package:
+\end{itemize}
+
+\begin{code}{latex}
+\begin{neotree}
+A
+ [B
+ [D]
+ [E]
+ ]
+ [C
+ [F]
+ [G]
+ ]
+\end{neotree}
+
+% With edge weights
+\begin{neotree}
+A
+ [B, w=\frac{1}{3}
+ [D]
+ [E]
+ ]
+ [C, w=\frac{2}{3}]
+\end{neotree}
+\end{code}
+
+\begin{itemize}
+\item
+ Graphs (only with \texttt{lualatex} compilation):
+\end{itemize}
+
+\begin{code}{latex}
+\neograph{
+ A -- {B, C, D, F},
+ B -- {C, D, F},
+ C -> ["3"] D,
+ D -- [bend left=10] {E},
+ E -- [bend left=10] {D},
+ E -- [bend left=10] {F},
+ F -- [bend left=10] {E},
+ A -- [loop] A
+}
+\end{code}
+
+\subsubsection{Math Grid}
+
+The \texttt{mathgrid} environment allows arranging
+equations in a grid:
+
+\begin{code}{latex}
+\begin{mathgrid}{3}
+ \neoline
+ \neocol{
+ T &= 7xx+9x\\
+ &= (7+9)x \\
+ &= 16x
+ }
+ \neocol{
+ U &= 8x^{2}-5x^{2}+x^{2}\\
+ &= (8-5+1)x^{2} \\
+ &= 4x^{2}
+ }
+ \neocol{
+ V &= 5a^{2}-6a\\
+ &= a(5a-6)
+ }
+ \neoline
+ \neocol[2]{
+ W &= 5a^{2}-6a+3+7a^{2}+a-6\\
+ &= (5+7)a^{2}+(-6+1)a+(3-6)\\
+ &= 12a^{2}-5a-3
+ }
+ \neocol{
+ A &= 2x + 3x\\
+ &= 5x
+ }
+\end{mathgrid}
+\end{code}
+
+
+\end{document}
diff --git a/macros/latex/contrib/neoschool/latex/neoschool.cls b/macros/latex/contrib/neoschool/latex/neoschool.cls
new file mode 100644
index 0000000000..388cb45ab6
--- /dev/null
+++ b/macros/latex/contrib/neoschool/latex/neoschool.cls
@@ -0,0 +1,7311 @@
+% neoschool.cls
+%
+% copyright (C) 2025 Razik Ikhlef
+% razik.ikhlef@csilyon.fr
+%
+% The newest version of this documentclass should always be available
+% from the following web page: https://apps.edulatex.xyz/neoschool/
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{neoschool}[2025/01/03 v1.0.0]
+
+\RequirePackage[table,svgnames,dvipsnames,x11names]{xcolor}
+
+\RequirePackage{kvoptions}
+\RequirePackage{siunitx}
+\RequirePackage{pgffor}
+
+\SetupKeyvalOptions{
+ family=neoschool,
+ prefix=neoschool@
+}
+
+\DeclareStringOption[cyprus]{theme}
+\def\neo@cyprus{cyprus}
+\def\neo@kassio{kassio}
+\def\neo@frost{frost}
+\def\neo@spring{spring}
+\def\neo@arbutus{arbutus}
+\def\neo@duo{duo}
+\def\neo@navy{navy}
+\def\neo@royal{royal}
+
+\ProcessKeyvalOptions*\relax
+
+% Main Colors
+\ifx\neoschool@theme\neo@cyprus
+ \definecolor{titleColor}{HTML}{a7601f}
+ \definecolor{theoremColor}{HTML}{557400}
+ \definecolor{definitionColor}{HTML}{bf4400}
+ \definecolor{methodColor}{HTML}{3f6faf}
+ \definecolor{remarkColor}{HTML}{7f475a}
+ \definecolor{alternateColor}{HTML}{59786f}
+ \definecolor{applicationColor}{HTML}{00824f}
+ \definecolor{codeColor}{HTML}{9a456f}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+\else\ifx\neoschool@theme\neo@kassio
+ \definecolor{titleColor}{HTML}{3c3bbe}
+ \definecolor{theoremColor}{HTML}{a01f64}
+ \definecolor{definitionColor}{HTML}{2f5f9f}
+ \definecolor{methodColor}{HTML}{a04646}
+ \definecolor{remarkColor}{HTML}{af4988}
+ \definecolor{alternateColor}{HTML}{776f79}
+ \definecolor{applicationColor}{HTML}{7022bf}
+ \definecolor{codeColor}{HTML}{9f248a}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \else\ifx\neoschool@theme\neo@frost
+ \definecolor{titleColor}{HTML}{007a85}
+ \definecolor{theoremColor}{HTML}{004fc0}
+ \definecolor{definitionColor}{HTML}{00845f}
+ \definecolor{methodColor}{HTML}{7f5ae0}
+ \definecolor{remarkColor}{HTML}{204f9a}
+ \definecolor{alternateColor}{HTML}{66657f}
+ \definecolor{applicationColor}{HTML}{1f6fbf}
+ \definecolor{codeColor}{HTML}{004fc0}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \else\ifx\neoschool@theme\neo@spring
+ \definecolor{titleColor}{HTML}{cf2f4f}
+ \definecolor{theoremColor}{HTML}{007f68}
+ \definecolor{definitionColor}{HTML}{cb26a0}
+ \definecolor{methodColor}{HTML}{5f5fdf}
+ \definecolor{remarkColor}{HTML}{9d5e7a}
+ \definecolor{alternateColor}{HTML}{777294}
+ \definecolor{applicationColor}{HTML}{b6540f}
+ \definecolor{codeColor}{HTML}{1f6fbf}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \else\ifx\neoschool@theme\neo@arbutus
+ \definecolor{titleColor}{HTML}{007000}
+ \definecolor{theoremColor}{HTML}{8f2f30}
+ \definecolor{definitionColor}{HTML}{00704f}
+ \definecolor{methodColor}{HTML}{906200}
+ \definecolor{remarkColor}{HTML}{8a5f4a}
+ \definecolor{alternateColor}{HTML}{6e678f}
+ \definecolor{applicationColor}{HTML}{557000}
+ \definecolor{codeColor}{HTML}{0f7688}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \else\ifx\neoschool@theme\neo@duo
+ \definecolor{titleColor}{HTML}{375cd8}
+ \definecolor{theoremColor}{HTML}{9f4a00}
+ \definecolor{definitionColor}{HTML}{4250ef}
+ \definecolor{methodColor}{HTML}{8f5a3a}
+ \definecolor{remarkColor}{HTML}{856f4a}
+ \definecolor{alternateColor}{HTML}{63728f}
+ \definecolor{applicationColor}{HTML}{6052cf}
+ \definecolor{codeColor}{HTML}{4a7d00}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \else\ifx\neoschool@theme\neo@navy
+ \definecolor{titleColor}{RGB}{25,75,125}
+ \definecolor{theoremColor}{RGB}{145,45,45}
+ \definecolor{definitionColor}{RGB}{35,105,85}
+ \definecolor{methodColor}{RGB}{125,75,25}
+ \definecolor{remarkColor}{RGB}{125,75,95}
+ \definecolor{alternateColor}{RGB}{85,95,105}
+ \definecolor{applicationColor}{RGB}{75,55,125}
+ \definecolor{codeColor}{RGB}{45,95,115}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \else\ifx\neoschool@theme\neo@royal
+ \definecolor{titleColor}{RGB}{5,80,174}
+ \definecolor{theoremColor}{RGB}{161,40,40}
+ \definecolor{definitionColor}{RGB}{0,115,85}
+ \definecolor{methodColor}{RGB}{180,95,45}
+ \definecolor{remarkColor}{RGB}{130,75,95}
+ \definecolor{alternateColor}{RGB}{90,100,110}
+ \definecolor{applicationColor}{RGB}{180,145,35}
+ \definecolor{codeColor}{RGB}{60,89,90}
+ \colorlet{sectionColor}{theoremColor}
+ \colorlet{subsectionColor}{definitionColor}
+ \colorlet{subsubsectionColor}{methodColor}
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+
+% Colors for code environments
+\colorlet{codeBackground}{codeColor!5}
+\colorlet{codeEmph}{methodColor}
+\colorlet{codeKeyword}{titleColor}
+\colorlet{codeString}{theoremColor}
+\colorlet{codeComment}{alternateColor}
+\colorlet{codeNumber}{alternateColor}
+
+% Initial setup
+\def\neo@palette{unicolor}
+
+% Basic boolean declarations
+\newif\ifneo@normal
+\newif\ifneo@unicolor
+\newif\ifneo@english
+\newif\ifneo@french
+\newif\ifneo@german
+
+% Style booleans
+\newif\ifneo@classythm
+\newif\ifneo@soberthm
+\newif\ifneo@elegantthm
+\newif\ifneo@classicthm
+\newif\ifneo@slantedthm
+\newif\ifneo@shadedthm
+\newif\ifneo@boxedthm
+\newif\ifneo@amslikethm
+
+% Title booleans
+\newif\ifneo@eval
+\newif\ifneo@evalicons
+\newif\ifneo@evalgrade
+\newif\ifneo@evaliconsgrade
+\newif\ifneo@exam
+\newif\ifneo@fancybox
+\newif\ifneo@onlytitleleft
+\newif\ifneo@onlytitle
+\newif\ifneo@onlytitleright
+\newif\ifneo@bubbles
+\newif\ifneo@shortbubbles
+\newif\ifneo@mockexam
+\newif\ifneo@shortexam
+\newif\ifneo@shorteval
+\newif\ifneo@shorttitle
+\newif\ifneo@shortlesson
+
+% Layout booleans
+\newif\ifneo@noframe
+\newif\ifneo@nocodeframe
+\newif\ifneo@noback
+
+% Font booleans
+\newif\ifneo@sfbody
+\newif\ifneo@sfall
+\newif\ifneo@mathastext
+
+% Other booleans
+\newif\ifneo@print
+\newif\ifneo@fullheader
+\newif\ifneo@headrule
+\newif\ifneo@footrule
+\newif\ifneo@headfootrule
+\newif\ifneo@shuffle
+\newif\ifneo@titlerule
+\newif\ifneo@titlemidrule
+\newif\ifneo@titlefullrule
+\newif\ifneo@titleornament
+
+%% Package specific options
+\newif\ifneo@apmep
+\newif\ifneo@mathics
+\newif\ifneo@listings
+\newif\ifneo@minted
+\newif\ifneo@frenchmath
+
+%% ==============================================================================
+%% Basic Options and Setup Commands
+%% ==============================================================================
+
+% String options declarations
+\DeclareStringOption[black]{globalcolor}
+\DeclareStringOption[sectionColor]{headcolor}
+\DeclareStringOption[subsectionColor]{subcolor}
+\DeclareStringOption[subsubsectionColor]{subsubcolor}
+\DeclareStringOption[titleColor]{titlecolor}
+\DeclareStringOption[]{titlehexcolor}
+\DeclareStringOption[alternateColor]{headfootcolor}
+
+\ProcessKeyvalOptions*\relax
+
+\ifx\neoschool@titlehexcolor\@empty
+\else
+ \definecolor{titleColor}{HTML}{\neoschool@titlehexcolor}
+ \colorlet{subjectColor}{titleColor!80}
+ \colorlet{subtitleColor}{titleColor!60}
+\fi
+
+\DeclareOption{normal}{%
+ \neo@normaltrue\neo@unicolorfalse
+ \colorlet{lemmaColor}{theoremColor}
+ \colorlet{corollaryColor}{theoremColor}
+ \colorlet{propertyColor}{theoremColor}
+ \colorlet{propositionColor}{theoremColor}
+ \colorlet{solutionColor}{theoremColor}
+ \colorlet{activityColor}{applicationColor}
+ \colorlet{codebackColor}{codeColor!5}
+ \colorlet{exerciseColor}{\neoschool@titlecolor}
+ \colorlet{exampleColor}{titleColor}
+ \colorlet{subjectColor}{sectionColor!80!white}
+ \colorlet{subtitleColor}{sectionColor!60!white}
+}
+
+% Unicolor option setup
+\DeclareOption{unicolor}{%
+ \def\neo@palette{unicolor}
+ \neo@normalfalse\neo@unicolortrue
+ \colorlet{definitionColor}{\neoschool@titlecolor}
+ \colorlet{theoremColor}{\neoschool@titlecolor}
+ \colorlet{lemmaColor}{\neoschool@titlecolor}
+ \colorlet{corollaryColor}{\neoschool@titlecolor}
+ \colorlet{propositionColor}{\neoschool@titlecolor}
+ \colorlet{propertyColor}{\neoschool@titlecolor}
+ \colorlet{activityColor}{\neoschool@titlecolor}
+ \colorlet{methodColor}{\neoschool@titlecolor}
+ \colorlet{applicationColor}{\neoschool@titlecolor}
+ \colorlet{codeColor}{\neoschool@titlecolor}
+ \colorlet{exerciseColor}{\neoschool@titlecolor}
+ \colorlet{remarkColor}{\neoschool@titlecolor}
+ \colorlet{exampleColor}{\neoschool@titlecolor}
+ \colorlet{solutionColor}{\neoschool@titlecolor}
+ \colorlet{codebackColor}{\neoschool@titlecolor!5!white}
+ \colorlet{subjectColor}{\neoschool@titlecolor!80}
+ \colorlet{subtitleColor}{\neoschool@titlecolor!60}
+ \renewcommand{\neoschool@headcolor}{\neoschool@titlecolor}
+ \renewcommand{\neoschool@subcolor}{\neoschool@titlecolor}
+ \renewcommand{\neoschool@subsubcolor}{\neoschool@titlecolor}
+}
+
+% Palette of headings color
+\DeclareOption{gradientheadpalette}{%
+ \renewcommand{\neoschool@headcolor}{\neoschool@titlecolor!80!white}
+ \renewcommand{\neoschool@subcolor}{\neoschool@titlecolor!70!white}
+ \renewcommand{\neoschool@subsubcolor}{\neoschool@titlecolor!60!white}
+ \colorlet{subjectColor}{\neoschool@titlecolor!80}
+ \colorlet{subtitleColor}{\neoschool@titlecolor!60}
+}
+
+%% ==============================================================================
+%% Font Options
+%% ==============================================================================
+
+% Fonts
+\DeclareStringOption{mainface}
+\DeclareStringOption{mainfaceoptions}
+\DeclareStringOption{sansface}
+\DeclareStringOption{sansfaceoptions}
+\DeclareStringOption{monoface}
+\DeclareStringOption{monofaceoptions}
+\DeclareStringOption{mathface}
+\DeclareStringOption{mathfaceoptions}
+\DeclareStringOption{facefamily}
+\DeclareStringOption{facefamilyoptions}
+
+%% ==============================================================================
+%% Heading Style Options
+%% ==============================================================================
+
+% Global heading styles
+\DeclareStringOption[sffamily]{headstyle}
+\DeclareStringOption[bfseries]{headweight}
+\DeclareStringOption[scshape]{headshape}
+
+% Title-specific styles
+\DeclareStringOption[\neoschool@headstyle]{titlestyle}
+\DeclareStringOption[\neoschool@headweight]{titleweight}
+\DeclareStringOption[upshape]{titleshape}
+\DeclareStringOption[center]{titlealign}
+
+% Header and Footer styles
+\DeclareStringOption[\neoschool@titlestyle]{headfootstyle}
+
+% Section-specific styles
+\DeclareStringOption[circle]{sectionnumstyle} % circle, box, dash, plain
+\DeclareStringOption[sc]{sectiontextstyle} % sc, upper, lower
+\DeclareStringOption[normal]{sectionstyle} % ornaments, underline, normal, highlighted, shadedline
+\DeclareStringOption[center]{sectionalign}
+
+%% ==============================================================================
+%% Language Support and Setup
+%% ==============================================================================
+
+% Language setup command
+\newcommand{\neo@setupLanguage}[1]{%
+ \neo@englishfalse
+ \neo@frenchfalse
+ \neo@germanfalse
+ \@nameuse{neo@#1true}
+ \renewcommand{\neo@lang}{#1}
+}
+
+% Names definition commands
+\newcommand{\neo@definenames@one}[9]{%
+ \expandafter\def\csname neo@theoremname\endcsname{#1}
+ \expandafter\def\csname neo@propositionname\endcsname{#2}
+ \expandafter\def\csname neo@propertyname\endcsname{#3}
+ \expandafter\def\csname neo@lemmaname\endcsname{#4}
+ \expandafter\def\csname neo@corollaryname\endcsname{#5}
+ \expandafter\def\csname neo@definitionname\endcsname{#6}
+ \expandafter\def\csname neo@examplename\endcsname{#7}
+ \expandafter\def\csname neo@exercisename\endcsname{#8}
+ \expandafter\def\csname neo@remarkname\endcsname{#9}
+}
+
+\newcommand{\neo@definenames@two}[9]{%
+ \expandafter\def\csname neo@problemname\endcsname{#1}
+ \expandafter\def\csname neo@conjecturename\endcsname{#2}
+ \expandafter\def\csname neo@activityname\endcsname{#3}
+ \expandafter\def\csname neo@methodname\endcsname{#4}
+ \expandafter\def\csname neo@applicationname\endcsname{#5}
+ \expandafter\def\csname neo@competencies\endcsname{#6}
+ \expandafter\def\csname neo@codename\endcsname{#7}
+ \expandafter\def\csname neo@algorithmname\endcsname{#8}
+ \expandafter\def\csname neo@pagename\endcsname{#9}
+}
+
+\newcommand{\neo@definenames@three}[1]{%
+ \expandafter\def\csname neo@solutionname\endcsname{#1}
+}
+
+\newcommand{\neo@definepath}[1]{%
+ \expandafter\def\csname neo@pathname\endcsname{#1}
+}
+
+\newcommand{\neo@defineextra}[2]{%
+ \expandafter\def\csname neo@examplesname\endcsname{#1}
+ \expandafter\def\csname neo@solutiongaptext\endcsname{#2}
+}
+
+% Language options
+\DeclareOption{english}{%
+ \neo@setupLanguage{english}
+ \AtEndOfClass{\sisetup{locale = US,detect-all}}
+ \neo@definenames@one{Theorem}{Proposition}{Property}{Lemma}{Corollary}{Definition}{Example}{Exercise}{Remark}
+ \neo@definenames@two{Problem}{Conjecture}{Activity}{Method}{Application}{Competencies}{Listing}{Algorithm}{Page}
+ \neo@definenames@three{Solution}
+ \neo@defineextra{Examples}{of exercise }
+ \neo@definepath{Path}
+}
+
+\DeclareOption{french}{%
+ \neo@setupLanguage{french}
+ \AtEndOfClass{%
+ \sisetup{locale = FR,detect-all}%
+ \renewcommand*{\today}{\number\day\space\ifcase\month\or
+ janvier\or février\or mars\or avril\or mai\or juin\or
+ juillet\or août\or septembre\or octobre\or novembre\or
+ décembre\fi\space\number\year}%
+ }
+ \neo@definenames@one{Théorème}{Proposition}{Propriété}{Lemme}{Corollaire}{Définition}{Exemple}{Exercice}{Remarque}
+ \neo@definenames@two{Problème}{Conjecture}{Activité}{Méthode}{Application}{Compétences}{Programme}{Algorithme}{Page}
+ \neo@definenames@three{Corrigé}
+ \neo@defineextra{Exemples}{de l'exercice }
+ \neo@definepath{Parcours}
+}
+
+\DeclareOption{german}{%
+ \neo@setupLanguage{german}
+ \AtEndOfClass{\sisetup{locale = DE,detect-all}}
+ \neo@definenames@one{Theorem}{Proposition}{Eigenschaft}{Lemma}{Korollar}{Definition}{Beispiel}{Übung}{Bemerkung}
+ \neo@definenames@two{Problem}{Vermutung}{Aktivität}{Methode}{Anwendung}{Fähigkeiten}{Auflistung}{Algorithmus}{Seite}
+ \neo@definenames@three{Lösung}
+ \neo@defineextra{Beispiele}{von Übung }
+ \neo@definepath{Stufe}
+}
+
+\DeclareOption{nofrenchlist}{\AtEndOfClass{\frenchsetup{StandardItemLabels=true}}}
+\DeclareOption{frenchlistaspar}{\AtEndOfClass{\frenchsetup{ListItemsAsPar=true}}}
+
+%% ==============================================================================
+%% Style Setup
+%% ==============================================================================
+
+% Style setup command
+\newcommand{\neo@setupstyle}[1]{%
+ \neo@classythmfalse
+ \neo@soberthmfalse
+ \neo@elegantthmfalse
+ \neo@classicthmfalse
+ \neo@slantedthmfalse
+ \neo@shadedthmfalse
+ \neo@boxedthmfalse
+ \neo@amslikethmfalse
+ \@nameuse{neo@#1true}
+ \def\neo@style{#1}
+}
+
+% Style options
+\DeclareOption{classythm}{\neo@setupstyle{classythm}}
+\DeclareOption{soberthm}{\neo@setupstyle{soberthm}}
+\DeclareOption{classicthm}{\neo@setupstyle{classicthm}}
+\DeclareOption{slantedthm}{\neo@setupstyle{slantedthm}}
+\DeclareOption{shadedthm}{\neo@setupstyle{shadedthm}}
+\DeclareOption{boxedthm}{\neo@setupstyle{boxedthm}}
+\DeclareOption{amslikethm}{\neo@setupstyle{amslikethm}}
+\DeclareOption{elegantthm}{\neo@setupstyle{elegantthm}}
+
+\DeclareStringOption[colorful]{lststyle}
+
+%% ==============================================================================
+%% Layout Settings
+%% ==============================================================================
+
+% Layout setup command
+\newcommand{\neo@setuplayout}[1]{%
+ \@nameuse{neo@#1true}
+}
+
+% Frame and background options
+\DeclareOption{noback}{\neo@setuplayout{noback}}
+\DeclareOption{noframe}{\neo@setuplayout{noframe}}
+\DeclareOption{nocodeframe}{\neo@setuplayout{nocodeframe}}
+
+\DeclareStringOption[1em]{indent}
+\DeclareBoolOption{noindent}
+
+\AtEndOfPackage{%
+ \ifneoschool@noindent
+ \AtBeginDocument{\setlength{\parindent}{0pt}}%
+ \else
+ \AtBeginDocument{\setlength{\parindent}{\neoschool@indent}}%
+ \fi
+}
+
+%% ==============================================================================
+%% Font Settings
+%% ==============================================================================
+
+% Font setup command
+\newcommand{\neo@setupfont}[1]{%
+ \@nameuse{neo@#1true}
+ \ifx#1sfall
+ \neo@sfbodytrue
+ \fi
+}
+
+% Font options
+\DeclareOption{sfbody}{\neo@setupfont{sfbody}}
+\DeclareOption{sfall}{\neo@setupfont{sfall}}
+\DeclareOption{mathastext}{\neo@setupfont{mathastext}}
+
+%% ==============================================================================
+%% Title Settings
+%% ==============================================================================
+
+% Title setup command
+\newcommand{\neo@setuptitle}[1]{%
+ \neo@evalfalse
+ \neo@evaliconsfalse
+ \neo@evalgradefalse
+ \neo@evaliconsgradefalse
+ \neo@examfalse
+ \neo@fancyboxfalse
+ \neo@onlytitleleftfalse
+ \neo@onlytitlefalse
+ \neo@onlytitlerightfalse
+ \neo@bubblesfalse
+ \neo@shortbubblesfalse
+ \neo@mockexamfalse
+ \neo@shortexamfalse
+ \@nameuse{neo@#1true}
+}
+
+% Title options
+\DeclareOption{exam}{\neo@setuptitle{exam}}
+\DeclareOption{eval}{\neo@setuptitle{eval}}
+\DeclareOption{evalicons}{\neo@setuptitle{evalicons}}
+\DeclareOption{evalgrade}{\neo@setuptitle{evalgrade}}
+\DeclareOption{evaliconsgrade}{\neo@setuptitle{evaliconsgrade}}
+\DeclareOption{fancybox}{\neo@setuptitle{fancybox}}
+\DeclareOption{onlytitleleft}{\neo@setuptitle{onlytitleleft}}
+\DeclareOption{onlytitle}{\neo@setuptitle{onlytitle}}
+\DeclareOption{onlytitleright}{\neo@setuptitle{onlytitleright}}
+\DeclareOption{bubbles}{\neo@setuptitle{bubbles}}
+\DeclareOption{shortbubbles}{\neo@setuptitle{shortbubbles}}
+\DeclareOption{mockexam}{\neo@setuptitle{mockexam}}
+\DeclareOption{shortexam}{\neo@setuptitle{shortexam}}
+\DeclareOption{shorteval}{\neo@setuptitle{shorteval}}
+\DeclareOption{shorttitle}{\neo@setuptitle{shorttitle}}
+\DeclareOption{shortlesson}{\neo@setuptitle{shortlesson}}
+
+%% ==============================================================================
+%% Print and Color Settings
+%% ==============================================================================
+
+% Print setup command
+\newcommand{\neo@setupprint}{%
+ \neo@printtrue%
+ \neo@normaltrue\neo@unicolortrue% Force unicolor mode
+ % Set all colors to black
+ \renewcommand{\neoschool@globalcolor}{black}%
+ \renewcommand{\neoschool@headcolor}{black}%
+ \renewcommand{\neoschool@subcolor}{black}%
+ \renewcommand{\neoschool@subsubcolor}{black}%
+ \renewcommand{\neoschool@titlecolor}{black}%
+ \renewcommand{\neoschool@headfootcolor}{black}%
+ \colorlet{subjectColor}{black!80}%
+ \colorlet{subtitleColor}{black!60}%
+ \AtEndOfClass{%
+ \colorlet{verbColor}{\neoschool@titlecolor}%
+ }
+ % Override all theme colors to black
+ \colorlet{definitionColor}{black}%
+ \colorlet{theoremColor}{black}%
+ \colorlet{lemmaColor}{black}%
+ \colorlet{corollaryColor}{black}%
+ \colorlet{propertyColor}{black}%
+ \colorlet{propositionColor}{black}%
+ \colorlet{activityColor}{black}%
+ \colorlet{methodColor}{black}%
+ \colorlet{applicationColor}{black}%
+ \colorlet{codeColor}{black}%
+ \colorlet{codebackColor}{black!5}%
+ \colorlet{exerciseColor}{black}%
+ \colorlet{exampleColor}{black}%
+ \colorlet{solutionColor}{black}%
+ \colorlet{alternateColor}{black}%
+ % Override admonition colors
+ \colorlet{noteColor}{black}%
+ \colorlet{infoColor}{black}%
+ \colorlet{warningColor}{black}%
+ \colorlet{importantColor}{black}%
+ \colorlet{tipColor}{black}%
+ \colorlet{reminderColor}{black}%
+ \colorlet{summaryColor}{black}%
+ \colorlet{toolboxColor}{black}%
+ % Override hyperref colors
+ \def\Hy@linkcolor{black}
+ \def\Hy@anchorcolor{black}
+ \def\Hy@citecolor{black}
+ \def\Hy@filecolor{black}
+ \def\Hy@menucolor{black}
+ \def\Hy@runcolor{black}
+ \def\Hy@urlcolor{black}
+ % Code syntax colors
+ \def\neo@keywordstyle{\color{black}\bfseries}%
+ \def\neo@commentstyle{\color{black!75}}%
+ \def\neo@stringstyle{\color{black}}%
+ \def\neo@emphstyle{\color{black}\bfseries}%
+ % Set minted style to bw if minted is used
+ \ifneo@minted
+ \usemintedstyle{bw}%
+ \fi
+}
+
+% Print option
+\DeclareOption{print}{\neo@setupprint}
+
+%% ==============================================================================
+%% Header and Footer Settings
+%% ==============================================================================
+
+% Header/footer setup command
+\newcommand{\neo@setupheadfoot}[1]{%
+ \@nameuse{neo@#1true}
+}
+
+% Header/footer options
+\DeclareOption{fullheader}{\neo@setupheadfoot{fullheader}}
+\DeclareOption{headrule}{\neo@setupheadfoot{headrule}}
+\DeclareOption{footrule}{\neo@setupheadfoot{footrule}}
+\DeclareOption{headfootrule}{\neo@setupheadfoot{headfootrule}}
+
+%% ==============================================================================
+%% Title Formatting Settings
+%% ==============================================================================
+
+% Title formatting setup command
+\newcommand{\neo@setuptitleformat}[1]{%
+ \@nameuse{neo@#1true}
+}
+
+% Title formatting options
+\DeclareOption{titlerule}{\neo@setuptitleformat{titlerule}}
+\DeclareOption{titlemidrule}{\neo@setuptitleformat{titlemidrule}}
+\DeclareOption{titlefullrule}{\neo@setuptitleformat{titlefullrule}}
+\DeclareOption{titleornament}{\neo@setuptitleformat{titleornament}}
+
+%% ==============================================================================
+%% Package Specific Options
+%% ==============================================================================
+
+% Package setup command
+\newcommand{\neo@setuppackage}[1]{%
+ \@nameuse{neo@#1true}
+}
+
+% Package options
+\DeclareOption{math}{\neo@setuppackage{math}}
+\DeclareOption{apmep}{\neo@setuppackage{apmep}}
+\DeclareOption{mathics}{\neo@setuppackage{mathics}}
+\DeclareOption{listings}{\neo@setuppackage{listings}}
+\DeclareOption{minted}{\neo@setuppackage{minted}}
+\DeclareOption{frenchmath}{\neo@setuppackage{frenchmath}}
+
+%% ==============================================================================
+%% Abstract Name
+%% ==============================================================================
+
+\DeclareStringOption[abstractname]{abstracttitle}
+
+%% ==============================================================================
+%% Margin Options
+%% ==============================================================================
+
+\DeclareStringOption{margin}
+\DeclareStringOption{notes}
+
+%% ==============================================================================
+%% Solution Settings
+%% ==============================================================================
+
+% Solution options
+\DeclareBoolOption{answers}
+\DeclareOption{shuffle}{\neo@shuffletrue}
+
+%% ==============================================================================
+%% Grading Total
+%% ==============================================================================
+
+\DeclareStringOption[20]{totalpoints}
+
+%% ==============================================================================
+%% Box Settings
+%% ==============================================================================
+
+% Box options
+\DeclareStringOption{boxtitle}
+\DeclareStringOption[2mm]{boxarc}
+\DeclareStringOption[2pt]{pseudoboxarc}
+
+% Box setup command
+\newcommand{\neo@setupbox}[2]{%
+ \expandafter\def\csname neo@box@#1\endcsname{#2}
+}
+
+%% ==============================================================================
+%% Theorem Settings
+%% ==============================================================================
+
+\DeclareBoolOption{sectionthmcounter}
+\DeclareBoolOption{sharedthmcounter}
+\DeclareBoolOption{thmgroupcounter}
+
+\newif\ifneoschool@sharedexcounter
+\DeclareOption{sharedexcounter}{%
+ \neoschool@sharedexcountertrue
+ \neoschool@sharedthmcountertrue
+}
+
+%% ==============================================================================
+%% Exercices With Icons
+%% ==============================================================================
+
+\newif\ifneo@exerciseicons
+\DeclareOption{exerciseicons}{\neo@exerciseiconstrue}
+
+%% ==============================================================================
+%% Font Scaling Options
+%% ==============================================================================
+
+\newif\ifneo@scale
+\DeclareBoolOption{scale}
+
+%% ==============================================================================
+%% Graphics Mode
+%% ==============================================================================
+
+\DeclareBoolOption{graphics}
+
+%% ==============================================================================
+%% Extended Math Mode
+%% ==============================================================================
+
+\DeclareBoolOption{math}
+
+%% ==============================================================================
+%% Draft Mode
+%% ==============================================================================
+
+\DeclareBoolOption{faketext}
+
+%% ==============================================================================
+%% Compact Option
+%% ==============================================================================
+
+\newif\ifneo@compact
+\DeclareOption{compact}{\neo@compacttrue}
+
+%% ==============================================================================
+%% Output Options
+%% ==============================================================================
+
+\newif\ifneo@twoupafourmode
+\newif\ifneo@twoupathreemode
+\newif\ifneo@fourupathreemode
+\newif\ifneo@simpletwoupmode
+\newif\ifneo@bookletafourmode
+\newif\ifneo@bookletathreemode
+
+\DeclareOption{2a5toa4}{\neo@twoupafourmodetrue}
+\DeclareOption{2a4toa3}{\neo@twoupathreemodetrue}
+\DeclareOption{4a5toa3}{\neo@fourupathreemodetrue}
+\DeclareOption{2toa3}{\neo@simpletwoupmodetrue}
+\DeclareOption{bookleta5}{\neo@bookletafourmodetrue}
+\DeclareOption{bookleta4}{\neo@bookletathreemodetrue}
+
+\ifneo@twoupafourmode
+ \PassOptionsToClass{a5paper}{scrartcl}
+ \AtEndPreamble{
+ \KOMAoptions{paper=a5}
+ \neo@setupmargins{last}
+ \areaset{12cm}{19cm}
+ }
+\fi
+
+\ifneo@twoupathreemode
+ \PassOptionsToClass{a4paper}{scrartcl}
+\fi
+
+\ifneo@fourupathreemode
+ \PassOptionsToClass{a5paper}{scrartcl}
+ \AtEndPreamble{
+ \KOMAoptions{paper=a5}
+ \neo@setupmargins{last}
+ \areaset{12cm}{19cm}
+ }
+\fi
+
+\ifneo@simpletwoupmode
+ \PassOptionsToClass{a4paper}{scrartcl}
+ \AtEndPreamble{
+ \KOMAoptions{paper=a4}
+ \neo@setupmargins{30}
+ \areaset{19cm}{29cm}
+ }
+\fi
+
+\ifneo@bookletafourmode
+ \PassOptionsToClass{a5paper}{scrartcl}
+ \AtEndPreamble{
+ \KOMAoptions{paper=a5}
+ \neo@setupmargins{last}
+ \areaset{12cm}{19cm}
+ }
+\fi
+
+\ifneo@bookletathreemode
+ \PassOptionsToClass{a4paper}{scrartcl}
+\fi
+
+%% ==============================================================================
+%% Final Class Setup
+%% ==============================================================================
+
+% Define default language and style
+\def\neo@lang{english}
+\def\neo@style{classic}
+
+% Pass unknown options to scrartcl
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+
+% Process keyval options
+\ProcessKeyvalOptions*\relax
+
+% Default options
+\ExecuteOptions{%
+ english, % Default language
+ amslikethm, % Default theorem style
+ normal, % Default color palette
+ listings, % Default packages for Listings
+}
+
+% Process remaining options
+\ProcessOptions\relax
+
+% Load base class
+\LoadClass{scrartcl}
+
+\KOMAoptions{%
+ DIV=last,
+ parskip=half
+}
+
+\let\@unusedoptionlist\@empty
+
+%% ==============================================================================
+%% Page Layout Configuration
+%% ==============================================================================
+
+\newcommand{\neo@setupmargins}[1]{%
+ \KOMAoptions{%
+ DIV=calc,
+ DIV=#1,
+ BCOR=0pt,
+ headinclude=true,
+ footinclude=true
+ }%
+}
+
+% Intentionally small margins for teaching materials - ignore typearea warning
+\neo@setupmargins{last}
+\areaset{19cm}{29.25cm}
+\setlength{\headheight}{27pt}
+\setlength{\footskip}{27pt}
+
+\widowpenalty=10000
+\clubpenalty=10000
+
+\displaywidowpenalty=10000
+\predisplaypenalty=10000
+\postdisplaypenalty=10000
+\interlinepenalty=10000
+
+\raggedbottom
+
+%% ==============================================================================
+%% Output Options
+%% ==============================================================================
+
+\AtEndPreamble{
+ \ifneo@twoupafourmode
+ \usepackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{repeated 2-up}[a4paper,landscape]
+ \pgfpagesphysicalpage{2}{}
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{2}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}
+ }
+ \fi
+
+ \ifneo@twoupathreemode
+ \usepackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{repeated 2-up}[a3paper,landscape]
+ \areaset{19cm}{29cm}
+ \pgfpagesphysicalpage{2}{}
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}
+ }
+ \fi
+
+ \ifneo@fourupathreemode
+ \usepackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{repeated 4-up}[a3paper]
+ \pgfpagesphysicalpage{4}{}
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}
+ }
+ \fi
+
+ \ifneo@simpletwoupmode
+ \usepackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{2 on 1}[a3paper,landscape]
+ \pgfpagesphysicalpage{2}{}
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{2}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}
+ }
+ \fi
+
+ \ifneo@bookletafourmode
+ \usepackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{4 on 2, book format}[a4paper,landscape]
+ \pgfpagesphysicalpage{4}{}
+ \pgfpageslogicalpageoptions{4}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{2}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{3}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}
+ } \fi
+
+ \ifneo@bookletathreemode
+ \usepackage{pgfmorepages}
+ \pgfmorepagesloadextralayouts
+ \pgfpagesuselayout{4 on 2, book format}[a3paper,landscape]
+ \areaset{19cm}{29.25cm}
+ \setlength{\headheight}{27pt}
+ \setlength{\footskip}{27pt}
+ \pgfpagesphysicalpage{4}{}
+ \pgfpageslogicalpageoptions{4}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{1}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{2}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight}
+ }
+ \pgfpageslogicalpageoptions{3}{
+ resized width=.9\pgfphysicalwidth,
+ resized height=\pgfphysicalheight,
+ center=\pgfpoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}
+ }
+ \fi
+}
+
+%% ==============================================================================
+%% Box and Frame Conditions Setup
+%% ==============================================================================
+
+% Basic color definitions for tcolorbox
+\newcommand{\neo@tcbcolback}{tcbcolframe!5}
+\newcommand{\neo@tcbcolbacklower}{white}
+\newcommand{\neo@tcbcolupper}{black}
+\newcommand{\neo@tcbcoltitle}{white}
+
+% Frame options definitions
+\newcommand{\neo@framehidden}{}
+\newcommand{\neo@thmborder}{1pt}
+\newcommand{\neo@leftpadding}{1ex}
+\newcommand{\neo@rightpadding}{1ex}
+\newcommand{\neo@toppadding}{1ex}
+\newcommand{\neo@bottompadding}{1ex}
+\newcommand{\neo@titleleftpadding}{0.5em}
+\newcommand{\neo@titlerightpadding}{0.5em}
+\newcommand{\neo@titletoppadding}{3pt}
+\newcommand{\neo@titlebottompadding}{3pt}
+\newcommand{\neo@beforeskip}{0.5\baselineskip}
+\newcommand{\neo@afterskip}{0.5\baselineskip}
+
+% Handle noback option:
+% Changes background colors to white for main boxes
+\ifneo@noback
+ \renewcommand{\neo@tcbcolback}{white}
+ \colorlet{codebackColor}{white}
+ \renewcommand{\neo@tcbcolbacklower}{tcbcolframe!5}
+\fi
+
+% Handle noframe option:
+% Hides frames and adjusts title color
+\ifneo@noframe
+ \renewcommand{\neo@framehidden}{frame hidden}
+ \renewcommand{\neo@thmborder}{0pt}
+ \renewcommand{\neo@tcbcoltitle}{tcbcolframe}
+ \ifneo@noback
+ \renewcommand{\neo@leftpadding}{-2pt}
+ \renewcommand{\neo@rightpadding}{-2pt}
+ \renewcommand{\neo@toppadding}{-1pt}
+ \renewcommand{\neo@bottompadding}{-1pt}
+ \renewcommand{\neo@titleleftpadding}{-2.5pt}
+ \renewcommand{\neo@titlerightpadding}{-2.5pt}
+ \renewcommand{\neo@titletoppadding}{-2pt}
+ \renewcommand{\neo@titlebottompadding}{-2pt}
+ \renewcommand{\neo@beforeskip}{0.25\baselineskip}
+ \renewcommand{\neo@afterskip}{0.25\baselineskip}
+ \fi
+\fi
+
+% Handle nocodeframe option:
+% Hides code block frames and adjusts colors
+\ifneo@nocodeframe
+ \colorlet{codeColor}{codebackColor}
+\fi
+
+% Adjust spacing for two-column mode
+\if@twocolumn
+ \setlength{\columnsep}{1em}
+\fi
+
+%% ==============================================================================
+%% Required Packages Setup
+%% ==============================================================================
+
+%% Core packages
+\RequirePackage{iftex} % Engine detection
+\RequirePackage{xkeyval} % Extended key-value support
+\RequirePackage{xstring} % String manipulation
+\RequirePackage{calc} % Length calculations
+\RequirePackage{ifthen} % Boolean expression
+\RequirePackage{pdftexcmds} % Conditionals
+\RequirePackage{environ} % New Environments
+
+% Hide Some Warnings
+\RequirePackage{silence}
+\WarningFilter{latexfont}{Font shape}
+\renewcommand{\@font@warning}[1]{}
+\WarningFilter{mismath}{}
+\WarningFilter{multicol}{}
+
+%% Language support
+\ifluatex
+ \RequirePackage{fontspec}
+\fi
+
+\ifneo@french
+ \RequirePackage[main=french,shorthands=off]{babel}
+\else\ifneo@german
+ \RequirePackage[main=german]{babel}
+ \else
+ \RequirePackage[main=english]{babel}
+ \fi\fi
+
+\RequirePackage{scrlayer-scrpage} % Headers and footers
+
+\RequirePackage{multicol} % Multiple columns
+\RequirePackage{changepage} % Dynamic page dimensions
+\RequirePackage{needspace} % Control page breaks
+
+%% Graphics and colors
+\RequirePackage[most]{tcolorbox} % Colored boxes and frames
+\RequirePackage{tikz} % Drawing tools
+\RequirePackage{pgfplots} % Plotting tools
+\pgfplotsset{compat=1.8} % Set pgfplots version
+
+%% TikZ libraries
+\usetikzlibrary{%
+ backgrounds,
+ calc,
+ decorations.shapes,
+ positioning,
+ shadows,
+ shapes.arrows,
+ shapes.geometric,
+ shapes.misc
+}
+
+\ifneoschool@faketext
+ \RequirePackage{blindtext} % Fake Text in English and German
+ \RequirePackage{lipsum} % Fake Text in Latin
+\fi
+
+\ifneoschool@graphics
+ \RequirePackage{wrapfig} % Wrapped figures
+ \RequirePackage{graphicx} % Images
+\fi
+
+%% Additional TikZ-related packages
+\RequirePackage{tikzsymbols} % Additional symbols
+\RequirePackage{tikzpagenodes} % Page coordinate system
+\RequirePackage{forest} % Tree diagrams
+\useforestlibrary{linguistics}
+
+%% LuaTeX specific packages
+\ifluatex
+ \usetikzlibrary{graphs,graphdrawing,quotes}
+ \usegdlibrary{circular,force,layered,routing,trees}
+ \RequirePackage{luacolor} % Color support for LuaTeX
+ \RequirePackage{lua-ul} % Underlining for LuaTeX
+ \RequirePackage{luacas} % Computer algebra for LuaTeX
+\fi
+
+%% Tables and arrays
+\RequirePackage{tabularray} % Advanced tables
+\UseTblrLibrary{%
+ amsmath,
+ booktab,
+ diagbox,
+ functional,
+ varwidth,
+ siunitx
+}
+
+\RequirePackage{adjustbox} % Adjusting box dimensions
+
+%% Extended Math packages
+\ifneoschool@math
+ \RequirePackage[suite,taupe]{tdsfrmath} % French Math macros
+\fi
+
+\RequirePackage{mismath} % Miscellaneous math macros (includes mathtools)
+
+\ifneoschool@math
+ \RequirePackage{amssymb} % Mathematical symbols
+ \RequirePackage{ncccomma} % Math Comma
+\fi
+
+%% APMEP Compatibility Mode - Option 'apmep'
+
+\ifneo@apmep
+ %% APMEP required packages
+ \RequirePackage{textcomp} % Text companion fonts
+ \RequirePackage{esvect} % Vector arrows
+ \RequirePackage{fourier-orns} % Ornaments
+ \RequirePackage{tabularx} % Extended tables
+ \RequirePackage[np]{numprint} % Number printing
+
+ %% PSTricks suite for APMEP
+ \RequirePackage{pstricks} % Base PSTricks
+ \RequirePackage{pst-plot} % Plotting
+ \RequirePackage{pst-tree} % Trees
+ \RequirePackage{pst-node} % Nodes
+ \RequirePackage{pst-text} % Text effects
+ \RequirePackage{pst-eucl} % Euclidean geometry
+ \RequirePackage{pst-3dplot} % 3D plotting
+ \undef\pscalculate
+ \RequirePackage{pst-bezier} % Bezier curves
+ \RequirePackage{pst-all} % Loads most PSTricks packages
+ \RequirePackage{pstricks-add} % Additional features
+
+ %% APMEP specific commands
+ \newcommand{\euro}{\eurologo{}}
+ \newcommand{\cg}{\texttt{]}} % Left bracket
+ \newcommand{\cd}{\texttt{[}} % Right bracket
+ \newcommand{\pg}{\geqslant} % Greater than or equal
+ \newcommand{\pp}{\leqslant} % Less than or equal
+ \newcommand{\vectt}[1]{\overrightarrow{\,\mathstrut\text{#1}\,}}
+ \newcommand{\barre}[1]{\overline{\,\mathstrut#1\,}}
+ \renewcommand{\d}{\,\text{d}} % Differential d
+ \renewcommand{\i}{\,\text{i}\,} % Complex i
+
+ %% APMEP enumeration style
+ \renewcommand{\theenumi}{\textbf{\arabic{enumi}}}
+ \renewcommand{\labelenumi}{\textbf{\theenumi.}}
+ \renewcommand{\theenumii}{\textbf{\alph{enumii}}}
+ \renewcommand{\labelenumii}{\textbf{\theenumii.}}
+
+ %% APMEP coordinate systems
+ \def\Oij{$\left(\text{O}~;~\vect{\imath},~\vect{\jmath}\right)$}
+ \def\Oijk{$\left(\text{O}~;~\vect{\imath},~\vect{\jmath},~\vect{k}\right)$}
+ \def\Ouv{$\left(\text{O}~;~\vect{u},~\vect{v}\right)$}
+
+ %% APMEP font declaration
+ \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\fi
+
+%% Computer algebra system support
+\ifneo@mathics
+ \RequirePackage[mathics]{latexalpha2}
+ \RequirePackage{asymptote}
+\fi
+
+%% Lists and enumerations
+\RequirePackage{tasks} % Horizontal lists
+
+%% Utilities and tools
+\RequirePackage{cuted} % Abstract settings
+\RequirePackage{qrcode} % QR code generation
+\RequirePackage{xhfill} % Extended filling
+\RequirePackage{fontawesome5} % Icons
+\RequirePackage{adforn} % Ornaments
+\ifx\neoschool@notes\@empty\else
+ \RequirePackage[%
+ \neo@lang,
+ textsize=scriptsize
+ ]{todonotes} % Todo notes
+\fi
+\RequirePackage{marginnote} % Margin notes
+\RequirePackage{algpseudocode} % Algorithms
+\RequirePackage{textcase} % Text case changing
+\RequirePackage[use-files,clear-aux]{xsim} % Exercise sheets
+\RequirePackage[normalem]{ulem} % Underlining
+
+%% Microtype
+\AtEndOfClass{\RequirePackage{microtype}}
+
+%% Hyperref setup
+\definecolor{neo@linkcolor}{named}{\neoschool@titlecolor}
+\definecolor{neo@filecolor}{named}{\neoschool@titlecolor}
+\definecolor{neo@urlcolor}{named}{\neoschool@titlecolor}
+
+\RequirePackage{bookmark}
+\RequirePackage{lastpage}
+
+\hypersetup{%
+ colorlinks=true,
+ linkcolor=neo@linkcolor,
+ filecolor=neo@filecolor,
+ urlcolor=neo@urlcolor,
+}%
+
+%% ==============================================================================
+%% Font Settings
+%% ==============================================================================
+
+% Font variable definitions
+\edef\mainface{\expandonce{\neoschool@mainface}}
+\edef\sansface{\expandonce{\neoschool@sansface}}
+\edef\monoface{\expandonce{\neoschool@monoface}}
+\edef\mathface{\expandonce{\neoschool@mathface}}
+\edef\facefamily{\expandonce{\neoschool@facefamily}}
+
+% PdfLaTeX configuration
+\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0
+\RequirePackage[utf8]{inputenc}
+\RequirePackage[T1]{fontenc}
+
+\expandafter\ifblank\expandafter{\facefamily}{%
+ % Load individual fonts if facefamily is not defined
+ \expandafter\ifblank\expandafter{\mathface}{\ifneo@mathastext
+ \RequirePackage[italic,eulergreek]{mathastext}\else\RequirePackage{newpxmath}\fi}{\RequirePackage[\neoschool@mathfaceoptions]{\neoschool@mathface}}
+
+ \expandafter\ifblank\expandafter{\mainface}{\RequirePackage{newpxtext}}{\RequirePackage[\neoschool@mainfaceoptions]{\neoschool@mainface}}
+ \expandafter\ifblank\expandafter{\sansface}{}{\RequirePackage[\neoschool@sansfaceoptions]{\neoschool@sansface}}
+ \expandafter\ifblank\expandafter{\monoface}{}{\RequirePackage[\neoschool@monofaceoptions]{\neoschool@monoface}}
+}{
+ % Load font family if defined
+ \RequirePackage[\neoschool@facefamilyoptions]{\neoschool@facefamily}
+}
+\else
+% % LuaLaTeX configuration
+\RequirePackage{fontspec}
+
+\ifneo@scale
+ \defaultfontfeatures[\rmfamily]{Scale=1}
+ \defaultfontfeatures{Scale=MatchLowercase}
+\fi
+
+\defaultfontfeatures{Ligatures=TeX,Renderer=HarfBuzz}
+
+\expandafter\ifblank\expandafter{\mathface}{%
+ \ifneo@mathastext
+ \RequirePackage[italic,eulergreek]{mathastext}
+ \else
+ \RequirePackage{newpxmath}
+ \fi
+ }{%
+ \RequirePackage{\mathface}
+ }
+\expandafter\ifblank\expandafter{\mainface}{%
+ \setmainfont{TeX Gyre PagellaX}
+ }{%
+ \setmainfont[\neoschool@mainfaceoptions]{\neoschool@mainface}
+ }
+\expandafter\ifblank\expandafter{\sansface}{%
+ \setsansfont{TeX Gyre Heros}
+ }{%
+ \setsansfont[\neoschool@sansfaceoptions]{\neoschool@sansface}
+ }
+\expandafter\ifblank\expandafter{\monoface}{%
+ \setmonofont{Cascadia Code}
+ }{%
+ \setmonofont[\neoschool@monofaceoptions]{\neoschool@monoface}
+ }
+\fi
+
+\RequirePackage{bm} % Bold Math
+
+% Common configuration
+\ifneo@sfbody
+ \renewcommand{\familydefault}{\sfdefault}
+\fi
+
+% Advances Math Packages
+\ifneoschool@math
+ \RequirePackage{mathrsfs} % Mathematical script font
+ \RequirePackage{annotate-equations} % Equation annotations
+ \RequirePackage{witharrows} % Step-by-step solutions
+ \RequirePackage[np]{numprint} % Number printing
+ \RequirePackage{xlop} % Arithmetic operations
+ \RequirePackage{breqn} % Multiline Equations
+ \RequirePackage{tkz-euclide} % Euclidean geometry
+ \RequirePackage{cancel} % Cancel an expression
+\fi
+
+\AtBeginDocument{
+ \mathcode`\;="303B
+}
+
+% Upright Capital and Greek Letters
+\ifneo@frenchmath
+ \DeclareMathSymbol{A}{\mathalpha}{operators}{65}
+ \DeclareMathSymbol{B}{\mathalpha}{operators}{66}
+ \DeclareMathSymbol{C}{\mathalpha}{operators}{67}
+ \DeclareMathSymbol{D}{\mathalpha}{operators}{68}
+ \DeclareMathSymbol{E}{\mathalpha}{operators}{69}
+ \DeclareMathSymbol{F}{\mathalpha}{operators}{70}
+ \DeclareMathSymbol{G}{\mathalpha}{operators}{71}
+ \DeclareMathSymbol{H}{\mathalpha}{operators}{72}
+ \DeclareMathSymbol{I}{\mathalpha}{operators}{73}
+ \DeclareMathSymbol{J}{\mathalpha}{operators}{74}
+ \DeclareMathSymbol{K}{\mathalpha}{operators}{75}
+ \DeclareMathSymbol{L}{\mathalpha}{operators}{76}
+ \DeclareMathSymbol{M}{\mathalpha}{operators}{77}
+ \DeclareMathSymbol{N}{\mathalpha}{operators}{78}
+ \DeclareMathSymbol{O}{\mathalpha}{operators}{79}
+ \DeclareMathSymbol{P}{\mathalpha}{operators}{80}
+ \DeclareMathSymbol{Q}{\mathalpha}{operators}{81}
+ \DeclareMathSymbol{R}{\mathalpha}{operators}{82}
+ \DeclareMathSymbol{S}{\mathalpha}{operators}{83}
+ \DeclareMathSymbol{T}{\mathalpha}{operators}{84}
+ \DeclareMathSymbol{U}{\mathalpha}{operators}{85}
+ \DeclareMathSymbol{V}{\mathalpha}{operators}{86}
+ \DeclareMathSymbol{W}{\mathalpha}{operators}{87}
+ \DeclareMathSymbol{X}{\mathalpha}{operators}{88}
+ \DeclareMathSymbol{Y}{\mathalpha}{operators}{89}
+ \DeclareMathSymbol{Z}{\mathalpha}{operators}{90}
+
+ \let\alpha\alphaup
+ \let\beta\betaup
+ \let\gamma\gammaup
+ \let\delta\deltaup
+ \let\epsilon\epsilonup
+ \let\zeta\zetaup
+ \let\eta\etaup
+ \let\theta\thetaup
+ \let\iota\iotaup
+ \let\kappa\kappaup
+ \let\lambda\lambdaup
+ \let\mu\muup
+ \let\nu\nuup
+ \let\xi\xiup
+ \let\pi\piup
+ \let\rho\rhoup
+ \let\sigma\sigmaup
+ \let\tau\tauup
+ \let\upsilon\upsilonup
+ \let\phi\phiup
+ \let\chi\chiup
+ \let\psi\psiup
+ \let\omega\omegaup
+\fi
+
+%% ==============================================================================
+%% KOMA-Script Typography
+%% ==============================================================================
+
+\newcommand{\LARGEplus}{\fontsize{15.5}{18.6}\selectfont}
+\newcommand{\LARGEhuge}{\fontsize{16.74}{20.09}\selectfont}
+\newcommand{\hugeminus}{\fontsize{18.5}{22.2}\selectfont}
+
+% Monospace font and color configuration
+\AtEndOfClass{%
+ \colorlet{verbColor}{\neoschool@titlecolor}%
+ \let\oldtexttt\texttt
+ \renewrobustcmd{\texttt}[1]{\oldtexttt{\color{verbColor}#1}}
+}
+
+\setkomafont{disposition}{\mdseries}
+
+% Header style configuration
+\setkomafont{title}{\csname\neoschool@titlestyle\endcsname\csname\neoschool@titleweight\endcsname\color{\neoschool@titlecolor}\hugeminus}
+\setkomafont{subtitle}{\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{subtitleColor}}
+\setkomafont{subject}{\csname\neoschool@headweight\endcsname\color{subjectColor}\large}
+\setkomafont{author}{\large}
+\setkomafont{date}{\large}
+\setkomafont{subsection}{\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\color{\neoschool@subcolor}\large}
+\setkomafont{subsubsection}{\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\color{\neoschool@subsubcolor}}
+% \renewcommand{\subsubsection}{%
+% \@startsection{subsubsection}{3}{\z@}%
+% {1ex plus 1ex minus .2ex}%
+% {-2em}%
+% {\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\color{\neoschool@subsubcolor}\itshape\secpunct}%
+% }
+% \newcommand{\secpunct}[1]{#1\hspace{-3ex}}
+\setkomafont{pagenumber}{\csname\neoschool@headstyle\endcsname\color{\neoschool@headfootcolor}}
+\setkomafont{descriptionlabel}{\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname}
+
+% Page number format
+\renewcommand*\pagemark{%
+ {\usekomafont{pagenumber}
+ \color{\neoschool@headfootcolor}
+ \csname neo@pagename\endcsname\nobreakspace\thepage\nobreakspace/\nobreakspace
+ {\hypersetup{linkcolor=\neoschool@headfootcolor}\pageref{LastPage}}
+ }
+}
+
+\newpairofpagestyles{firstpage}{%
+ \ihead{}\chead{}\ohead{}%
+ \ifoot{\@date}\cfoot{}\ofoot{\pagemark}%
+ \KOMAoptions{headsepline=0pt}
+}{%
+ \ihead{}\chead{}\ohead{}%
+ \ifoot{\@date}\cfoot{}\ofoot{\pagemark}%
+ \KOMAoptions{headsepline=0pt}
+}
+
+\newpairofpagestyles{followingpages}{%
+ \ihead{}\chead{}\ohead{}%
+ \ifoot{\@title}\cfoot{}\ofoot{\pagemark}%
+}{%
+ \ihead{}\chead{}\ohead{}%
+ \ifoot{\@title}\cfoot{}\ofoot{\pagemark}%
+}
+
+\newpairofpagestyles{pagenum}{%
+ \ihead{}\chead{}\ohead{}
+ \ifoot{}\cfoot{\pagemark}\ofoot{}
+ \KOMAoptions{headsepline=0pt,footsepline=0pt}
+}
+
+% Header font configuration
+\renewcommand*{\headfont}{%
+ \small
+ \csname\neoschool@headfootstyle\endcsname
+ \color{\neoschool@headfootcolor}
+}
+
+%% ==============================================================================
+%% Title Styles and Setting
+%% ==============================================================================
+
+% Core definitions and lengths
+\def\neo@left{left}
+\def\neo@right{right}
+\def\neo@center{center}
+\newlength{\varspace}
+\newlength{\titlespacing}
+\setlength{\titlespacing}{1.5\baselineskip}
+\newcommand\myscaleratio{0.5}
+
+% Define tight spacing commands
+\newcommand{\neo@tightspacing}{%
+ \setlength\topsep{0pt}
+ \setlength\parskip{0pt}
+}
+
+% Redefine center, flushright, and flushleft environments with tight spacing
+\let\oldcenter\center
+\let\oldendcenter\endcenter
+\renewenvironment{center}{%
+ \neo@tightspacing
+ \oldcenter
+}{%
+ \oldendcenter
+}
+
+\let\oldflushright\flushright
+\let\oldendflushright\endflushright
+\renewenvironment{flushright}{%
+ \neo@tightspacing
+ \oldflushright
+}{%
+ \oldendflushright
+}
+
+\let\oldflushleft\flushleft
+\let\oldendflushleft\endflushleft
+\renewenvironment{flushleft}{%
+ \neo@tightspacing
+ \oldflushleft
+}{%
+ \oldendflushleft
+}
+
+% Title decoration handler
+\newcommand{\neo@titledecoration}{%
+ \ifneo@titlerule
+ \vspace{1.25\titlespacing}%
+ {\color{\neoschool@titlecolor}\rule{5em}{0.4pt}}
+ \else
+ \ifneo@titlemidrule
+ \vspace{1.25\titlespacing}%
+ {\color{\neoschool@titlecolor}\rule{0.5\linewidth}{0.4pt}}
+ \else
+ \ifneo@titlefullrule
+ \vspace{1.25\titlespacing}%
+ {\color{\neoschool@titlecolor}\rule{\linewidth}{0.4pt}}%
+ \vspace{-0.75\titlespacing}%
+ \else
+ \ifneo@titleornament
+ \vspace{1.25\titlespacing}%
+ {\color{\neoschool@titlecolor}\scalebox{2}[1.5]{\adforn{21}\,\adforn{11}\,\adforn{49}}}
+ \fi
+ \fi
+ \fi
+ \fi
+ \vspace*{.15\baselineskip}
+}
+
+% Full title creation with all elements
+\newcommand{\createfulltitle}{%
+% Subject
+\ifx\@subject\@empty\else
+ {\usekomafont{subject}{\@subject\par}}
+ \vspace{\titlespacing}
+\fi
+
+% Main title
+{\noindent\usekomafont{title}{\@title\par}}
+
+% Subtitle
+\ifx\@subtitle\@empty\else
+ \vspace{\titlespacing}
+ {\noindent\usekomafont{subtitle}{\@subtitle\par}}
+\fi
+
+% Author
+\ifx\@author\@empty\else
+ \vspace{\titlespacing}
+ {\noindent\usekomafont{author}{\@author\par}}
+\fi
+
+% Decorative elements
+\neo@titledecoration
+\if@twocolumn\vspace{2\titlespacing}\else\vspace{\titlespacing}\fi
+}
+
+% Only title creation (no author, subject, etc.)
+\newcommand{\createonlytitle}{%
+ {\noindent\usekomafont{title}{\@title\par}}
+ \neo@titledecoration%
+}
+
+\renewcommand\maketitle{%
+ \thispagestyle{firstpage}
+ \bgroup
+ \setlength{\varspace}{\dimexpr\titlespacing+\myscaleratio\oddsidemargin}
+ \if@twocolumn
+ \twocolumn[{%
+ \ifx\neoschool@titlealign\neo@left
+ \begin{flushleft}
+ \createfulltitle
+ \end{flushleft}
+ \else
+ \ifx\neoschool@titlealign\neo@right
+ \begin{flushright}
+ \createfulltitle
+ \end{flushright}
+ \else
+ \begin{center}
+ \createfulltitle
+ \end{center}
+ \fi
+ \fi
+ }]
+ \else
+ \ifx\neoschool@titlealign\neo@left
+ \begin{flushleft}
+ \createfulltitle
+ \end{flushleft}
+ \else
+ \ifx\neoschool@titlealign\neo@right
+ \begin{flushright}
+ \createfulltitle
+ \end{flushright}
+ \else
+ \begin{center}
+ \createfulltitle
+ \end{center}
+ \fi
+ \fi
+ \fi
+ \egroup
+}
+
+% Enhanced fancy title box with rotation
+\ifneo@fancybox
+ \newcommand{\neo@fancycolor}{exerciseColor!5!white}
+ \AtBeginDocument{%
+ \begin{tikzpicture}[remember picture,overlay]
+ % Rotated background box
+ \fill[\neo@fancycolor,rotate=-15]
+ ($(current page.north west) +(0,-1in)$)
+ rectangle ($(current page.north west) +(2.25in,2.0in)$);
+
+ % Title node with improved positioning
+ \node[anchor=west] (title) at
+ ($([xshift=-1ex,yshift=2ex]current page text area.north west)$)
+ {\LARGE\csname\neoschool@titlestyle\endcsname
+ \csname\neoschool@titleweight\endcsname
+ \csname\neoschool@titleshape\endcsname
+ \color{\neoschool@titlecolor}\@title};
+ \end{tikzpicture}
+ \vspace*{\dimexpr1.25in+\oddsidemargin\relax}\par
+ \let\maketitle\relax
+ \thispagestyle{firstpage}
+ }
+\fi
+
+% Unified handling of single-column and two-column title layouts with only title
+\newcommand{\neo@handleonlytitle}[2]{%
+ \if@twocolumn
+ \AfterEndPreamble{%
+ \twocolumn[{#1\vspace*{.5in}\par}]
+ }
+ \else
+ \AtBeginDocument{%
+ #2\vspace*{0.25in}\par
+ }
+ \fi
+ \let\maketitle\relax
+ \thispagestyle{firstpage}
+}
+
+% Left-aligned title implementation
+\ifneo@onlytitleleft
+ \neo@handleonlytitle
+ {\begin{flushleft}\createonlytitle\end{flushleft}}
+ {\begin{flushleft}\createonlytitle\end{flushleft}}
+\fi
+
+% Centered title implementation
+\ifneo@onlytitle
+ \neo@handleonlytitle
+ {\begin{center}\createonlytitle\end{center}}
+ {\begin{center}\createonlytitle\end{center}}
+\fi
+
+% Right-aligned title implementation
+\ifneo@onlytitleright
+ \neo@handleonlytitle
+ {\begin{flushright}\createonlytitle\end{flushright}}
+ {\begin{flushright}\createonlytitle\end{flushright}}
+\fi
+
+%% ==============================================================================
+%% Table of Contents
+%% ==============================================================================
+
+\addto\captionsfrench{\renewcommand{\contentsname}{Sommaire}}
+
+\DeclareTOCStyleEntry[
+ entryformat={\sffamily\csname\neoschool@headweight\endcsname\color{\neoschool@headcolor}}
+]{tocline}{section}
+
+\DeclareTOCStyleEntry[
+ entryformat={\sffamily}
+]{tocline}{subsection}
+
+\DeclareTOCStyleEntry[
+ entryformat={\sffamily}
+]{tocline}{subsubsection}
+
+%% ==============================================================================
+%% Abstract formatting
+%% ==============================================================================
+
+\if@twocolumn
+ \renewenvironment{abstract}{%
+ \begin{strip}
+ \ifx\neoschool@abstracttitle\@empty
+ \vspace{-4em}
+ \quotation
+ \else
+ \vspace{-5em}
+ \section*{\csname\neoschool@abstracttitle\endcsname}%
+ \quotation
+ \fi}
+ {\endquotation\end{strip}}
+\else
+ \renewenvironment{abstract}{%
+ \ifx\neoschool@abstracttitle\@empty
+ % \vspace{-1em}
+ \quotation
+ \else
+ \vspace{-2em}
+ \section*{\csname\neoschool@abstracttitle\endcsname}%
+ \quotation
+ \fi}
+ {\endquotation}
+\fi
+
+%% ==============================================================================
+%% Section formatting utilities
+%% ==============================================================================
+
+% Style definitions
+\def\neo@align@right{right}
+\def\neo@align@left{left}
+\def\neo@align@center{center}
+
+\def\neo@numstyle@circle{circle}
+\def\neo@numstyle@box{box}
+\def\neo@numstyle@dash{dash}
+\def\neo@numstyle@plain{plain}
+
+\def\neo@textstyle@sc{sc}
+\def\neo@textstyle@upper{upper}
+\def\neo@textstyle@lower{lower}
+
+\def\neo@style@ornaments{ornaments}
+\def\neo@style@underline{underline}
+\def\neo@style@normal{normal}
+\def\neo@style@highlighted{highlighted}
+\def\neo@style@shadedline{shadedline}
+
+% Utility command for circular number style
+\newcommand*\circled[1]{\tikz[baseline=(char.base)]{%
+ \node[shape=circle,draw,inner sep=2pt,line width=1.5pt,baseline=-1.25mm] (char) {#1};}
+ \vspace{-2pt}
+}
+
+% Check for small caps availability
+\newcommand*{\IfSCAvailableTF}{%
+ \ifcsname\f@encoding/\f@family/\f@series/sc\endcsname
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+
+% Apply text style based on options
+\newcommand{\applytextstyle}[1]{%
+ \ifx\neoschool@sectiontextstyle\neo@textstyle@sc
+ \IfSCAvailableTF{\scshape\Large\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname #1}{\MakeUppercase{\large \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname #1}}%
+ \else
+ \ifx\neoschool@sectiontextstyle\neo@textstyle@upper
+ \MakeUppercase{\large \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname #1}%
+ \else
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\Large #1%
+ \fi
+ \fi
+}
+
+% Section number formatting based on style option
+\renewcommand{\sectionformat}{%
+ \ifx\neoschool@sectionnumstyle\neo@numstyle@circle
+ \circled{{\large\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\thesection}}\enskip%
+ \else
+ \ifx\neoschool@sectionnumstyle\neo@numstyle@box
+ \raisebox{0ex}{%
+ \setlength{\fboxrule}{1.5pt}%
+ \fcolorbox{\neoschool@headcolor}{white}{%
+ \color{\neoschool@headcolor}%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ % \csname\neoschool@headshape\endcsname
+ \large\thesection%
+ }%
+ }\enskip%
+ \else
+ \ifx\neoschool@sectionnumstyle\neo@numstyle@dash
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\thesection\enskip\textendash\enskip
+ \else
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\thesection\autodot\enskip
+ \fi
+ \fi
+ \fi
+}
+
+% Set section alignment
+\newcommand{\setsectionraggedstyle}{%
+ \ifx\neoschool@sectionalign\neo@align@right
+ \renewcommand*{\raggedsection}{\raggedleft}%
+ \else
+ \ifx\neoschool@sectionalign\neo@align@left
+ \renewcommand*{\raggedsection}{\raggedright}%
+ \else
+ \renewcommand*{\raggedsection}{\centering}%
+ \fi
+ \fi
+}
+
+% Main section format handler
+\renewcommand{\sectionlinesformat}[4]{%
+ \Ifstr{#1}{section}{%
+ % \vspace*{0.5em}%
+ \ifx\neoschool@sectionstyle\neo@style@ornaments
+ \sectionformat@ornaments{#3}{#4}%
+ \else
+ \ifx\neoschool@sectionstyle\neo@style@highlighted
+ \sectionformat@highlighted{#3}{#4}%
+ \else
+ \ifx\neoschool@sectionstyle\neo@style@shadedline
+ \sectionformat@shadedline{#3}{#4}%
+ \else
+ \ifx\neoschool@sectionstyle\neo@style@normal
+ \sectionformat@normal{#2}{#3}{#4}%
+ \else
+ \sectionformat@other{#3}{#4}%
+ \fi
+ \fi
+ \fi
+ \fi
+ % \vspace*{-0.15em}%
+ }{%
+ \@hangfrom{\hskip #2#3}{#4}%
+ }%
+}
+
+% Individual style implementations
+\newcommand{\sectionformat@normal}[3]{%
+ \setsectionraggedstyle
+ \parbox[t]{\linewidth}{%
+ \raggedsection
+ \@hangfrom{\color{\neoschool@headcolor}#2}{%
+ \color{\neoschool@headcolor}%
+ \applytextstyle{#3}%
+ }%
+ }%
+ \par\nobreak
+}
+
+\newcommand{\sectionformat@ornaments}[2]{%
+ \renewcommand*{\raggedsection}{\centering}%
+ \raggedsection
+ \vspace*{0.5em}%
+ \adforn{36}\enskip
+ {\color{\neoschool@headcolor}\applytextstyle{#1#2}}%
+ \enskip\adforn{36}%
+ \par\nobreak
+ \vspace*{0.2em}%
+}
+
+% Helper commands for TikZ styles
+\newcommand{\setsectiontikzalign}{%
+ \ifx\neoschool@sectionalign\neo@align@left
+ left%
+ \else
+ \ifx\neoschool@sectionalign\neo@align@right
+ right%
+ \else
+ center%
+ \fi
+ \fi
+}
+
+\newcommand{\setsectiontikzcolor}[1]{%
+ \ifx\neoschool@sectionalign\neo@align@left
+ \ifnum\pdf@strcmp{#1}{left}=0
+ \neoschool@headcolor!120
+ \else
+ \neoschool@headcolor!20
+ \fi
+ \else
+ \ifx\neoschool@sectionalign\neo@align@right
+ \ifnum\pdf@strcmp{#1}{right}=0
+ \neoschool@headcolor!120
+ \else
+ \neoschool@headcolor!20
+ \fi
+ \else
+ \neoschool@headcolor!25
+ \fi
+ \fi
+}
+
+\newcommand{\setsectiontikzmiddle}{%
+ \ifx\neoschool@sectionalign\neo@align@left
+ \neoschool@headcolor!90
+ \else
+ \ifx\neoschool@sectionalign\neo@align@right
+ \neoschool@headcolor!90
+ \else
+ \neoschool@headcolor!120
+ \fi
+ \fi
+}
+
+\newcommand{\sectionformat@highlighted}[2]{%
+ \noindent\begin{tikzpicture}[baseline]
+ \node[
+ anchor=base,
+ inner sep=3pt,
+ outer sep=0pt,
+ align=\setsectiontikzalign,
+ text width=.985\linewidth,
+ text=white,
+ line width=0.5pt,
+ left color={\setsectiontikzcolor{left}},
+ right color={\setsectiontikzcolor{right}},
+ middle color={\setsectiontikzmiddle},
+ rounded corners=0pt,
+ ] (title) {%
+ \vspace{-1pt}\hspace*{0.25em}\applytextstyle{#1#2}\hspace*{0.25em}%
+ \vspace{3pt}
+ };
+ \end{tikzpicture}%
+ \par\vspace{0.4em}%
+}
+
+\newcommand{\sectionformat@shadedline}[2]{%
+ \noindent
+ \begin{tikzpicture}[baseline]
+ \node[
+ text=\neoschool@headcolor,
+ anchor=base,
+ inner sep=0pt,
+ outer sep=0pt,
+ align=\setsectiontikzalign,
+ text width=\linewidth
+ ] (title) {%
+ \color{\neoschool@headcolor}%
+ \applytextstyle{#1#2}%
+ };
+
+ \ifx\neoschool@sectionalign\neo@align@center
+ \fill[
+ left color=\neoschool@headcolor!20,
+ right color=\neoschool@headcolor
+ ] ([yshift=-0.5em]title.south west) rectangle ++(.33\linewidth,-0.1em);
+ \fill[
+ left color=\neoschool@headcolor,
+ middle color=\neoschool@headcolor!120,
+ right color=\neoschool@headcolor
+ ] ([yshift=-0.5em]title.south west) ++(.33\linewidth,0) rectangle ([yshift=-0.6em]title.south east) ++(-0.33\linewidth,0);
+ \fill[
+ left color=\neoschool@headcolor,
+ right color=\neoschool@headcolor!20
+ ] ([yshift=-0.5em]title.south east) ++(-0.33\linewidth,0) rectangle ([yshift=-0.6em]title.south east);%
+ \else
+ \ifx\neoschool@sectionalign\neo@align@left
+ \fill[%
+ left color=\neoschool@headcolor,
+ right color=\neoschool@headcolor!20
+ ] ([yshift=-0.5em]title.south west) rectangle ([yshift=-0.6em]title.south east);%
+ \else
+ \fill[%
+ left color=\neoschool@headcolor!20,
+ right color=\neoschool@headcolor
+ ] ([yshift=-0.5em]title.south west) rectangle ([yshift=-0.6em]title.south east);%
+ \fi
+ \fi
+ \end{tikzpicture}%
+ \par\vspace{0.7em}%
+}
+
+\newcommand{\sectionformat@other}[2]{%
+ \setsectionraggedstyle
+ \ifx\neoschool@sectionstyle\neo@style@underline
+ \sectionformat@underline{#1}{#2}%
+ \else
+ \sectionformat@default{#1}{#2}%
+ \fi
+}
+
+\newcommand{\sectionformat@underline}[2]{%
+ \parbox[t]{\linewidth}{%
+ \raggedsection
+ {\color{\neoschool@headcolor}\applytextstyle{#1#2}}%
+ \par\nobreak
+ \kern-.75\ht\strutbox\color{\neoschool@headcolor!30}\rule{\linewidth}{1pt}%
+ }%
+}
+
+\newcommand{\sectionformat@default}[2]{%
+ \raggedsection
+ {\color{\neoschool@headcolor}\applytextstyle{#1#2}}%
+ \par\nobreak
+}
+
+%% ==============================================================================
+%% Header and Footer Styles and Setting
+%% ==============================================================================
+
+% Configuration defaults for header fields
+\def\neo@header@type{}
+\def\neo@header@school{}
+\def\neo@header@academy{}
+\def\neo@header@level{}
+\def\neo@header@duration{}
+\def\neo@header@calculator{false}
+\def\neo@header@leftcontent{\faBookOpen}
+\def\neo@header@rightcontent{\faSchool}
+\def\neo@header@leftcontentfill{true}
+\def\neo@header@rightcontentfill{true}
+
+\define@key[neo]{header}{type}{\def\neo@header@type{#1}}
+\define@key[neo]{header}{school}{\def\neo@header@school{#1}}
+\define@key[neo]{header}{academy}{\def\neo@header@academy{#1}}
+\define@key[neo]{header}{level}{\def\neo@header@level{#1}}
+\define@key[neo]{header}{duration}{\def\neo@header@duration{#1}}
+\define@key[neo]{header}{calculator}[false]{%
+ \def\@tempa{#1}%
+ \def\@tempb{true}\def\@tempc{false}\def\@tempd{exam}%
+ \ifx\@tempa\@tempb
+ \def\neo@header@calculator{true}%
+ \else
+ \ifx\@tempa\@tempc
+ \def\neo@header@calculator{false}%
+ \else
+ \ifx\@tempa\@tempd
+ \def\neo@header@calculator{exam}%
+ \else
+ \PackageError{neoschool}{Invalid calculator value: #1}
+ {Use 'true', 'false' or 'exam'}%
+ \fi
+ \fi
+ \fi
+}
+\define@key[neo]{header}{leftcontent}[\faBookOpen]{\def\neo@header@leftcontent{#1}}
+\define@key[neo]{header}{rightcontent}[\faSchool]{\def\neo@header@rightcontent{#1}}
+\define@key[neo]{header}{leftcontentfill}[true]{\def\neo@header@leftcontentfill{#1}}
+\define@key[neo]{header}{rightcontentfill}[true]{\def\neo@header@rightcontentfill{#1}}
+
+\newcommand{\neo@header@setkeys}{\setkeys[neo]{header}}
+
+\newcommand{\neoheader}[1]{%
+ \neo@header@setkeys{#1}%
+}
+
+% Full header configuration
+\ifneo@fullheader
+ \ihead{\neo@header@type}
+ \chead{\@title}
+ \ohead{\neo@header@level}
+ \ifoot{\@date}
+ \cfoot{\neo@header@school}
+ \ofoot{\pagemark}
+ \pagestyle{scrheadings}
+ \thispagestyle{firstpage}
+\else
+ \pagestyle{followingpages}
+ \thispagestyle{firstpage}
+\fi
+
+\ifneo@headrule
+ \KOMAoptions{headsepline=.4pt}
+\fi
+\ifneo@footrule
+ \KOMAoptions{footsepline=.4pt}
+\fi
+\ifneo@headfootrule
+ \KOMAoptions{headsepline=.4pt, footsepline=.4pt}
+\fi
+
+%% ==============================================================================
+%% Evaluation Headers and Special Styles
+%% ==============================================================================
+
+%% Dimensions and Basic Configuration
+%% ----------------------------------
+\newlength{\neo@headerheight}
+\setlength{\neo@headerheight}{35mm}
+
+\newlength{\neo@iconsize}
+\setlength{\neo@iconsize}{1.5cm}
+
+%% Colors Setup
+%% ----------------------------------
+\newcommand{\neo@setupevalcolors}{%
+ \def\neo@evalrulecolor{\neoschool@headfootcolor!25!white}%
+}
+
+%% Basic Title Components
+%% ----------------------------------
+\newcommand{\neo@completetitle}[1][]{%
+ % Main title
+ \node[
+ align=center,
+ anchor=center,
+ text width=0.85\textwidth,
+ #1
+ ] (title) at ([yshift=-24mm]current page.north) {%
+ \baselineskip=30pt
+ \Large
+ \csname\neoschool@titlestyle\endcsname
+ \csname\neoschool@titleweight\endcsname
+ \csname\neoschool@titleshape\endcsname
+ \color{\neoschool@titlecolor}\@title
+ };
+
+ % Subject (if provided)
+ \ifx\@subject\empty\else
+ \node[
+ above=1.5mm of title.north,
+ anchor=south,
+ text width=0.85\textwidth,
+ align=center,
+ font=\normalsize
+ ] {%
+ \usekomafont{subject}{\@subject}
+ };
+ \fi
+
+ % Subtitle (if provided)
+ \ifx\@subtitle\empty\else
+ \node[
+ below=1.5mm of title.south,
+ anchor=north,
+ text width=0.85\textwidth,
+ align=center,
+ font=\normalsize
+ ] {%
+ \usekomafont{subtitle}{\@subtitle}
+ };
+ \fi
+}
+
+\newcommand{\neo@completegradetitle}[1][]{%
+ % Main title
+ \node[
+ align=center,
+ anchor=center,
+ text width=0.85\textwidth,
+ #1
+ ] (title) at ([yshift=-24mm]current page.north) {%
+ \baselineskip=30pt
+ \Large
+ \csname\neoschool@titlestyle\endcsname
+ \csname\neoschool@titleweight\endcsname
+ \csname\neoschool@titleshape\endcsname
+ \color{\neoschool@titlecolor}\@title
+ };
+ % Subject (if provided)
+ \ifx\@subject\empty\else
+ \node[
+ above=1.5mm of title.north,
+ anchor=south,
+ text width=0.85\textwidth,
+ align=center,
+ font=\normalsize
+ ] {%
+ \usekomafont{subject}{\@subject}
+ };
+ \fi
+ % Subtitle (if provided)
+ \ifx\@subtitle\empty\else
+ \node[
+ below=1.5mm of title.south,
+ anchor=north,
+ text width=0.85\textwidth,
+ align=center,
+ font=\normalsize
+ ] {%
+ \usekomafont{subtitle}{\@subtitle}
+ };
+ \fi
+ % Duration
+ \node[
+ below=10mm of title.south,
+ anchor=north,
+ align=center,
+ font=\small\sffamily
+ ] {%
+ Durée : \neo@header@duration\quad\textbullet\quad\neo@calculator
+ };
+ % Name field
+ \node[
+ below=17.5mm of title.south,
+ anchor=north,
+ align=center,
+ font=\small\sffamily
+ ] {%
+ \color{\neoschool@globalcolor}Nom : \vardots[4cm]
+ };
+}
+
+%% ==============================================================================
+%% Enhanced Header without Icons
+%% ==============================================================================
+
+%% Configuration for Simple Header
+%% ----------------------------------
+\newcommand{\neo@setupheaderconfig}{%
+ \def\neo@cornershift{5mm}%
+ \def\neo@topyshift{8mm}%
+ \def\neo@topyshiftgrade{8mm}%
+ \def\neo@bottomyshift{40mm}%
+}
+
+%% Corner Text Nodes
+%% ----------------------------------
+\newcommand{\neo@cornernode}[4]{%
+ \node[
+ anchor=#1,
+ font={\color{\neoschool@headfootcolor}\small\sffamily}
+ ] at ([xshift=#2,yshift=-#3]current page.north #1) {%
+ \begingroup
+ #4%
+ \endgroup
+ };
+}
+
+%% ==============================================================================
+%% Header with Icons
+%% ==============================================================================
+
+%% Icon Node Definition
+%% ----------------------------------
+\newcommand{\neo@iconnode}[5]{%
+ % Icon node with color inversion
+ \node[
+ rectangle,
+ minimum height=\neo@iconsize,
+ minimum width=\neo@iconsize,
+ fill=white,
+ text=\neoschool@titlecolor,
+ draw=\neoschool@titlecolor,
+ line width=0.5pt,
+ anchor=center,
+ font=\normalsize,
+ rounded corners=2pt
+ ] (#1) at #2 {#3};
+
+ % Top text
+ \node[
+ above=2mm of #1,
+ anchor=south,
+ font={\color{\neoschool@headfootcolor}\small\sffamily}
+ ] (#1-top) {%
+ \begingroup
+ #4%
+ \endgroup
+ };
+
+ % Bottom text
+ \node[
+ below=2mm of #1,
+ anchor=north,
+ font={\color{\neoschool@headfootcolor}\small\sffamily}
+ ] (#1-bottom) {%
+ \begingroup
+ #5%
+ \endgroup
+ };
+}
+
+%% ==============================================================================
+%% Header Type Selection and Setup
+%% ==============================================================================
+
+\newcommand{\neo@basetitlecontent}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \neo@completetitle
+ \end{tikzpicture}%
+}
+
+%% Header without Icons
+\ifneo@eval
+ \newcommand{\neo@evaltitlecontent}{%
+ \neo@setupevalcolors
+ \neo@setupheaderconfig
+ \begin{tikzpicture}[remember picture,overlay]
+ \draw[\neo@evalrulecolor,line width=0.4pt]
+ ([yshift=-1.3\neo@headerheight]current page.north west) --
+ ([yshift=-1.3\neo@headerheight]current page.north east);
+ \neo@completetitle
+ \neo@cornernode{west}{\neo@cornershift}{\neo@topyshift}{\neo@header@type}
+ \neo@cornernode{east}{-\neo@cornershift}{\neo@topyshift}{\neo@header@school}
+ \neo@cornernode{west}{\neo@cornershift}{\neo@bottomyshift}{\neo@header@level}
+ \neo@cornernode{east}{-\neo@cornershift}{\neo@bottomyshift}{\@date}
+ \end{tikzpicture}%
+ \if@twocolumn\vspace{0.95\neo@headerheight}\else\vspace{0.85\neo@headerheight}\fi%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@evaltitlecontent]%
+ \else
+ \neo@evaltitlecontent
+ \fi
+ \thispagestyle{pagenum}%
+ }%
+ }
+\fi
+
+
+%% Header with Icons
+\ifneo@evalicons
+ \newcommand{\neo@evaliconscontent}{%
+ \neo@setupevalcolors
+ \begin{tikzpicture}[remember picture,overlay]
+ \draw[\neo@evalrulecolor,line width=0.4pt]
+ ([yshift=-1.125\neo@headerheight]current page.north west) --
+ ([yshift=-1.125\neo@headerheight]current page.north east);
+ \neo@completetitle
+ \neo@iconnode{typeicon}
+ {([xshift=30mm,yshift=-0.575\neo@headerheight]current page.north west)}
+ {\neo@header@leftcontent}
+ {\neo@header@type}
+ {\neo@header@level}
+ \neo@iconnode{schoolicon}
+ {([xshift=-30mm,yshift=-0.575\neo@headerheight]current page.north east)}
+ {\neo@header@rightcontent}
+ {\neo@header@school}
+ {\@date}
+ \end{tikzpicture}%
+ \if@twocolumn\vspace{0.85\neo@headerheight}\else\vspace{0.75\neo@headerheight}\fi%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@evaliconscontent]%
+ \else
+ \neo@evaliconscontent
+ \fi
+ \thispagestyle{pagenum}%
+ }%
+ }
+\fi
+
+%% Header with grading stip without Icons
+\ifneo@evalgrade
+ \newcommand{\neo@evalgradecontent}{%
+ \neo@setupevalcolors
+ \neo@setupheaderconfig
+ \begin{tikzpicture}[remember picture,overlay]
+ \neo@completegradetitle
+ % Top elements
+ \neo@cornernode{west}{\neo@cornershift}{\neo@topyshiftgrade}{\neo@header@type}
+ \neo@cornernode{east}{-\neo@cornershift}{\neo@topyshiftgrade}{\neo@header@level}
+
+ % Bottom elements
+ \node[
+ anchor=west,
+ font={\small\sffamily}
+ ] at ([xshift=5mm,yshift=9mm]current page.south west) {%
+ \color{\neoschool@headfootcolor}\@date%
+ };
+
+ \node[
+ anchor=east,
+ font={\small\sffamily}
+ ] at ([xshift=-5mm,yshift=9mm]current page.south east) {%
+ \color{\neoschool@headfootcolor}\neo@header@school%
+ };
+
+ % Page number in the center bottom
+ \node[
+ font=\small\sffamily,
+ inner sep=3mm
+ ] at ([yshift=9mm]current page.south) {%
+ \color{\neoschool@headfootcolor}\thepage
+ };
+ \end{tikzpicture}%
+
+ \if@twocolumn\vspace{\neo@headerheight}\else\vspace{0.95\neo@headerheight}\fi%
+
+ \ifx\neoschool@totalpoints\@empty\gradingstrip\else\gradingstrip[\neoschool@totalpoints]\fi
+ \vspace{1.5em}%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@evalgradecontent]%
+ \else
+ \neo@evalgradecontent
+ \fi
+ \thispagestyle{empty}%
+ }%
+ }
+\fi
+
+%% Header with grading strip with Icons
+\ifneo@evaliconsgrade
+ \newcommand{\neo@maketitlecontent}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \neo@completegradetitle
+ \neo@iconnode{typeicon}
+ {([xshift=30mm,yshift=-0.575\neo@headerheight]current page.north west)}
+ {\neo@header@leftcontent}
+ {\neo@header@type}
+ {\neo@header@level}
+ \neo@iconnode{schoolicon}
+ {([xshift=-30mm,yshift=-0.575\neo@headerheight]current page.north east)}
+ {\neo@header@rightcontent}
+ {\neo@header@school}
+ {\@date}
+ \end{tikzpicture}%
+
+ \if@twocolumn\vspace{\neo@headerheight}\else\vspace{0.95\neo@headerheight}\fi%
+
+ \ifx\neoschool@totalpoints\@empty\gradingstrip\else\gradingstrip[\neoschool@totalpoints]\fi
+ \vspace{1.5em}%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@maketitlecontent]%
+ \else
+ \neo@maketitlecontent
+ \fi
+ \thispagestyle{pagenum}%
+ }%
+ }
+\fi
+
+%% Calculator Notice
+%% ----------------------------------
+\newcommand{\neo@calculator}{%
+ \small L'usage de la calculatrice%
+ \ifnum\pdf@strcmp{\neo@header@calculator}{true}=0
+ \ est autorisé.%
+ \else\ifnum\pdf@strcmp{\neo@header@calculator}{exam}=0
+ \ est autorisé uniquement en mode examen.%
+ \else
+ \ n'est pas autorisé.%
+ \fi\fi
+ \par
+}
+
+%% Exam Header
+%% ----------------------------------
+%% Exam style helper commands and setup
+\newcommand{\neo@gettext}[1]{%
+ \ifneo@french
+ \ifcase#1\or Établissement\or Nom\or Classe\or Durée\or Date\or Note\or Appréciation\fi
+ \else\ifneo@german
+ \ifcase#1\or Einrichtung\or Name\or Klasse\or Dauer\or Datum\or Note\or Bewertung\fi
+ \else
+ \ifcase#1\or Institution\or Name\or Class\or Duration\or Date\or Mark\or Appreciation\fi
+ \fi\fi
+}
+
+\newcommand{\examfield}[2]{%
+ \textbf{#1}\hspace{0.5em}#2%
+}
+
+%% Exam title style
+\ifneo@exam
+ \newcommand{\neo@examcontent}{%
+ \vspace*{-2cm}%
+ \begin{tcolorbox}[%
+ enhanced,
+ frame hidden,
+ colback=white,
+ top=\baselineskip,
+ bottom=\baselineskip,
+ left=0pt,
+ right=0pt,
+ width=\textwidth,
+ after skip=0pt,
+ ]
+ {\renewcommand\arraystretch{1.25}
+ \begin{tblr}{X[4,l]X[2,c]X[3,r]}
+ \examfield{\neo@gettext{1} :}{\neo@header@school} & &
+ \examfield{\neo@gettext{5} :}{\@date} \\
+ \examfield{\neo@gettext{2} :}{\vardots[4cm]} & &
+ \examfield{\neo@gettext{3} :}{\neo@header@level}
+ \end{tblr}
+ }
+
+ \vspace{\baselineskip}
+ \centering
+
+ \begin{minipage}[c]{\linewidth}
+ \centering
+ \neo@header@type
+ \end{minipage}\vspace{.85\baselineskip}
+
+ \LARGE\csname\neoschool@titlestyle\endcsname
+ \csname\neoschool@titleweight\endcsname
+ \csname\neoschool@titleshape\endcsname
+ \color{\neoschool@titlecolor}
+ \@title\vspace{.75\baselineskip}
+
+ \normalsize\normalfont\color{black}
+ \begin{minipage}[c]{\linewidth}
+ \centering
+ \examfield{\neo@gettext{4} :}{\neo@header@duration}\vspace{\baselineskip}
+
+ \neo@calculator
+ \end{minipage}
+ \end{tcolorbox}
+
+ \ifx\neoschool@totalpoints\@empty\gradingstrip\else\gradingstrip[\neoschool@totalpoints]\fi
+ \vspace{2em}
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@examcontent]%
+ \else
+ \neo@examcontent
+ \fi
+ \thispagestyle{pagenum}%
+ }%
+ }
+\fi
+
+%% French Exam Headers
+%% ----------------------------------
+% Common exam title commands
+\NewDocumentCommand{\neo@examtitle}{m}{%
+ {\color{\neoschool@titlecolor}
+ \csname\neoschool@titlestyle\endcsname
+ \csname\neoschool@titleweight\endcsname
+ \csname\neoschool@titleshape\endcsname
+ \LARGE\MakeUppercase{#1}\par}
+}
+
+\NewDocumentCommand{\neo@examsubtitle}{m}{%
+ {\color{\neoschool@titlecolor!85!black}
+ \csname\neoschool@titlestyle\endcsname
+ \Large #1\par}
+}
+
+\NewDocumentCommand{\neo@examinfo}{m}{%
+ {\color{\neoschool@titlecolor!75!black}
+ \csname\neoschool@titlestyle\endcsname
+ \large #1\par}
+}
+
+%% Mock exam style
+\ifneo@mockexam
+ \newcounter{mockexampages}
+ \AtEndDocument{%
+ \immediate\write\@auxout{%
+ \string\setcounter{mockexampages}{\thepage}%
+ }%
+ }
+ \newcommand{\neo@mockexamcontent}{%
+ \vspace*{1cm}%
+ \begin{center}
+ % Institution info
+ {\textsc{\neo@examinfo{\neo@header@school}}}
+ \vspace*{1cm}%
+ {\textsc{\neo@examinfo{Académie de \neo@header@academy}}}
+ \vspace*{\stretch{2.5}}%
+
+ % Title and session
+ {\LARGE\bfseries\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \neo@examtitle{\neo@header@type}}
+ \vspace*{0.8cm}%
+ {\color{\neoschool@titlecolor!75!black}\itshape Session \@date}
+ \vspace*{1.5cm}%
+
+ % Subject and level
+ {\Large\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \neo@examsubtitle{ÉPREUVE DE \MakeUppercase{\@subject}}}
+ \vspace*{1cm}%
+ {\neo@examinfo{\neo@header@level}}
+ \vspace*{\stretch{2}}%
+
+ % Duration
+ {\textit{Durée : \neo@header@duration}}
+ \vspace*{1.2cm}%
+
+ % Instructions
+ \begin{minipage}{0.8\textwidth}
+ \begin{center}
+ \setlength{\baselineskip}{1.6\baselineskip}%
+ \neo@calculator
+ \vspace*{0.8cm}%
+ La qualité de la rédaction et la rigueur des raisonnements
+ seront prises en compte dans l'évaluation des copies.
+ \vspace*{0.8cm}
+
+ Toute tentative, même partielle ou inachevée, sera valorisée.
+ \end{center}
+ \end{minipage}
+ \vspace*{\stretch{1.5}}%
+
+ % Page count
+ {\color{\neoschool@titlecolor!65!black}%
+ Ce document comporte \arabic{mockexampages}~pages numérotées de 1/\arabic{mockexampages} à \arabic{mockexampages}/\arabic{mockexampages}.}
+ \vspace*{1.5cm}%
+ \end{center}
+ \thispagestyle{pagenum}%
+ \clearpage\newpage
+ }
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \onecolumn
+ \neo@mockexamcontent
+ \twocolumn
+ \else
+ \neo@mockexamcontent
+ \fi
+ }%
+ }
+\fi
+
+\ifneo@shortexam
+ \newcommand{\neo@shortexamcontent}{%
+ \vspace*{-0.5cm}
+ \begin{center}
+ {\Large \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \neo@examtitle{\neo@header@type}}
+
+ \vspace{3mm}
+ {\small \textit{Session \@date}}
+
+ \vspace{5mm}
+ {\large \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \neo@examsubtitle{ÉPREUVE DE \MakeUppercase{\@subject}}}
+
+ \vspace{3mm}
+ {\small \neo@examinfo{\neo@header@level}}
+
+ \vspace{5mm}
+ {\small \textit{Durée : \neo@header@duration}}
+
+ \vspace{5mm}
+ \neo@calculator
+
+ \vspace{15mm}
+ {\color{\neoschool@headfootcolor}%
+ \rule{\linewidth}{0.5pt}}
+ \end{center}
+ \vspace{10mm}%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@shortexamcontent]%
+ \else
+ \neo@shortexamcontent
+ \fi
+ \thispagestyle{pagenum}%
+ }%
+ }
+\fi
+
+%% Short Eval Header Style
+%% ----------------------------------
+\newlength{\sideWidth}
+\setlength{\sideWidth}{4.5cm}
+
+\ifneo@shorteval
+ \newcommand{\neo@shortevalcontent}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \draw[line width=0.4pt, \neoschool@headfootcolor!50!white]
+ ([yshift=-21mm]current page.north west) --
+ ([yshift=-21mm]current page.north east);
+ \path let \p1=(current page.east) in node[
+ anchor=west,
+ align=left,
+ text width=\sideWidth,
+ font=\small\sffamily,
+ text=\neoschool@headfootcolor
+ ] at ([xshift=0.75cm,yshift=-11mm]current page.north west)
+ {Nom :\\[1mm]
+ \neo@header@type};
+ \path let \p1=(current page.east) in node[
+ anchor=center,
+ align=center,
+ text width={\dimexpr\paperwidth-2\sideWidth-2cm},
+ font=\Large
+ ] at ([yshift=-11mm]current page.north)
+ {\color{\neoschool@titlecolor}%
+ \csname\neoschool@titlestyle\endcsname%
+ \csname\neoschool@titleweight\endcsname%
+ \csname\neoschool@titleshape\endcsname%
+ \@title};
+ \path let \p1=(current page.east) in node[
+ anchor=east,
+ align=right,
+ text width=\sideWidth,
+ font=\small\sffamily,
+ text=\neoschool@headfootcolor
+ ] at ([xshift=-0.75cm,yshift=-11mm]current page.north east)
+ {\neo@header@school\\[1mm]
+ \neo@header@level};
+ \end{tikzpicture}%
+ \vspace{2em}%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@shortevalcontent]%
+ \else
+ \neo@shortevalcontent
+ \fi
+ \thispagestyle{pagenum}%
+ }%
+ }
+\fi
+
+
+%% Short Title Header Style
+%% ----------------------------------
+\ifneo@shorttitle
+ \newcommand{\neo@shorttitlecontent}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \draw[line width=0.4pt, \neoschool@headfootcolor!50!white]
+ ([yshift=-21mm]current page.north west) --
+ ([yshift=-21mm]current page.north east);
+ \path let \p1=(current page.east) in node[
+ anchor=center,
+ align=center,
+ text width={\dimexpr\paperwidth-2cm},
+ font=\LARGE
+ ] at ([yshift=-11mm]current page.north)
+ {\color{\neoschool@titlecolor}%
+ \csname\neoschool@titlestyle\endcsname%
+ \csname\neoschool@titleweight\endcsname%
+ \csname\neoschool@titleshape\endcsname%
+ \@title};
+ \end{tikzpicture}%
+ \if@twocolumn\vspace{2em}\else\vspace{1em}\fi%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@shorttitlecontent]%
+ \else
+ \neo@shorttitlecontent
+ \fi
+ \thispagestyle{firstpage}%
+ }%
+ }
+\fi
+
+%% Short Lesson Header Style
+%% ----------------------------------
+\ifneo@shortlesson
+ \newcommand{\neo@shortlessoncontent}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ % Line under the header
+ \draw[line width=0.4pt, \neoschool@headfootcolor!50!white]
+ ([yshift=-21mm]current page.north west) --
+ ([yshift=-21mm]current page.north east);
+
+ % Left side - Type
+ \path let \p1=(current page.east) in node[
+ anchor=west,
+ align=left,
+ text width=\sideWidth,
+ font=\small\sffamily,
+ text=\neoschool@headfootcolor
+ ] at ([xshift=0.75cm,yshift=-11mm]current page.north west)
+ {\neo@header@type};
+
+ % Center - Title with dynamic width
+ \path let \p1=(current page.east) in node[
+ anchor=center,
+ align=center,
+ text width={\dimexpr\paperwidth-2\sideWidth-2cm},
+ font=\Large
+ ] at ([yshift=-11mm]current page.north)
+ {\color{\neoschool@titlecolor}%
+ \csname\neoschool@titlestyle\endcsname%
+ \csname\neoschool@titleweight\endcsname%
+ \csname\neoschool@titleshape\endcsname%
+ \@title};
+
+ % Right side - Level
+ \path let \p1=(current page.east) in node[
+ anchor=east,
+ align=right,
+ text width=\sideWidth,
+ font=\small\sffamily,
+ text=\neoschool@headfootcolor
+ ] at ([xshift=-0.75cm,yshift=-11mm]current page.north east)
+ {\neo@header@level};
+ \end{tikzpicture}%
+ \if@twocolumn\vspace{3em}\else\vspace{1.5em}\fi%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@shortlessoncontent]%
+ \else
+ \neo@shortlessoncontent
+ \fi
+ \thispagestyle{firstpage}%
+ }%
+ }
+\fi
+
+%% Bubbles Header
+%% ----------------------------------
+\ifneo@bubbles
+ \def\neo@bubbles@colbubbles{\neoschool@titlecolor}
+ \define@key[neo]{bubbles}{colbubbles}{\def\neo@bubbles@colbubbles{#1}}
+ \newcommand{\neo@bubbles@setkeys}{\setkeys[neo]{bubbles}}
+
+ \neo@bubbles@setkeys{%
+ colbubbles=\neoschool@titlecolor,
+ }
+
+ \newcommand{\neo@drawbubble}[5]{%
+ \pgfmathsetmacro{\opacityValue}{#1}
+ \ifneo@unicolor
+ \colorlet{currentcolor}{\neo@bubbles@colbubbles}
+ \else
+ \ifcase#2
+ \colorlet{currentcolor}{\neoschool@titlecolor}
+ \or
+ \colorlet{currentcolor}{\neoschool@headcolor}
+ \or
+ \colorlet{currentcolor}{theoremColor}
+ \or
+ \colorlet{currentcolor}{definitionColor}
+ \or
+ \colorlet{currentcolor}{methodColor}
+ \or
+ \colorlet{currentcolor}{applicationColor}
+ \fi
+ \fi
+ \colorlet{drawcolor}{currentcolor!75}
+ \fill[
+ color=currentcolor!#3!white,
+ draw=drawcolor,
+ line width=0.7pt,
+ opacity=#4
+ ] #5;
+ }
+
+ \newcommand{\neo@bubblescontent}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \def\ellipseWidth{20cm}
+ \def\ellipseHeight{5cm}
+ \def\numBubbles{500}
+ \coordinate (ellipseCenter) at ([yshift=-4cm]current page.north);
+
+ \foreach \i in {1,...,\numBubbles} {%
+ \pgfmathsetmacro{\angle}{random()*360}
+ \pgfmathsetmacro{\rawradius}{rand}
+ \pgfmathsetmacro{\radius}{pow(\rawradius, 2)}
+ \pgfmathsetmacro{\x}{\radius*\ellipseWidth/2.25*cos(\angle)}
+ \pgfmathsetmacro{\y}{\radius*\ellipseHeight/2.25*sin(\angle)}
+
+ \pgfmathrandominteger{\sizeGroup}{1}{3}
+ \ifnum\sizeGroup=1
+ \pgfmathsetmacro{\bubbleRadius}{rand*12 + 5}
+ \else\ifnum\sizeGroup=2
+ \pgfmathsetmacro{\bubbleRadius}{rand*8 + 3}
+ \else
+ \pgfmathsetmacro{\bubbleRadius}{rand*4 + 1}
+ \fi\fi
+
+ \pgfmathsetmacro{\op}{0.4 + 0.2*rand}
+
+ \pgfmathrandominteger{\col}{0}{4}
+ \pgfmathrandominteger{\p}{50}{90}
+ \neo@drawbubble{\op}{\col}{\p}{\op}
+ {([xshift=\x, yshift=\y]ellipseCenter) circle (\bubbleRadius pt)}
+ }
+
+ \node[%
+ anchor=north,
+ align=center,
+ inner sep=3mm,
+ minimum width=0.5\linewidth,
+ text opacity=1,
+ draw opacity=0.85,
+ fill=white,
+ rounded corners=2pt,
+ draw=\neoschool@headfootcolor,
+ line width=0.4pt
+ ] at ([yshift=0.5cm]ellipseCenter)
+ {\csname\neoschool@titlestyle\endcsname\csname\neoschool@titleweight\endcsname\csname\neoschool@titleshape\endcsname
+ \color{\neo@bubbles@colbubbles}\LARGE \@title};
+ \end{tikzpicture}%
+ \if@twocolumn\vspace{6cm}\else\vspace{11em}\fi%
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@bubblescontent]%
+ \else
+ \neo@bubblescontent
+ \fi
+ \thispagestyle{firstpage}%
+ }%
+ }
+\fi
+
+%% Short Bubbles Header
+\ifneo@shortbubbles
+ \def\neo@bubbles@colbubbles{\neoschool@titlecolor}
+ \define@key[neo]{bubbles}{colbubbles}{\def\neo@bubbles@colbubbles{#1}}
+ \newcommand{\neo@bubbles@setkeys}{\setkeys[neo]{bubbles}}
+
+ \neo@bubbles@setkeys{%
+ colbubbles=\neoschool@titlecolor,
+ }
+
+ \newcommand{\neo@drawbubble}[5]{%
+ \pgfmathsetmacro{\opacityValue}{#1}
+ \ifneo@unicolor
+ \colorlet{currentcolor}{\neo@bubbles@colbubbles}
+ \else
+ \ifcase#2
+ \colorlet{currentcolor}{\neoschool@titlecolor}
+ \or
+ \colorlet{currentcolor}{\neoschool@headcolor}
+ \or
+ \colorlet{currentcolor}{theoremColor}
+ \or
+ \colorlet{currentcolor}{definitionColor}
+ \or
+ \colorlet{currentcolor}{methodColor}
+ \or
+ \colorlet{currentcolor}{applicationColor}
+ \fi
+ \fi
+ \colorlet{drawcolor}{currentcolor!75}
+ \fill[
+ color=currentcolor!#3!white,
+ draw=drawcolor,
+ line width=0.7pt,
+ opacity=#4
+ ] #5;
+}
+
+ \newcommand{\neo@shortbubblescontent}{%
+ \ifx\@subtitle\empty
+ \setlength{\neo@headerheight}{7em}
+ \else
+ \setlength{\neo@headerheight}{8em}
+ \fi
+
+ \begin{tikzpicture}[remember picture,overlay]
+ \def\myheight{4em}
+ % Set dimensions of the ellipse
+ \def\ellipseWidth{12cm}
+ \def\ellipseHeight{3cm}
+ \def\numBubbles{300}
+ \coordinate (ellipseCenter) at ([yshift=-.9\neo@headerheight]current page text area.north);
+
+ \foreach \i in {1,...,\numBubbles} {%
+ \pgfmathsetmacro{\angle}{random()*360}
+ \pgfmathsetmacro{\rawradius}{rand}
+ \pgfmathsetmacro{\radius}{pow(\rawradius, 2)} % Non-linear distribution
+ \pgfmathsetmacro{\x}{\radius * \ellipseWidth/2 * cos(\angle)}
+ \pgfmathsetmacro{\y}{\radius * \ellipseHeight/2 * sin(\angle)}
+
+ \pgfmathrandominteger{\sizeGroup}{1}{3}
+ \ifnum\sizeGroup=1
+ \pgfmathsetmacro{\bubbleRadius}{rand*8 + 3}
+ \else\ifnum\sizeGroup=2
+ \pgfmathsetmacro{\bubbleRadius}{rand*5 + 2}
+ \else
+ \pgfmathsetmacro{\bubbleRadius}{rand*3 + 1}
+ \fi\fi
+
+ \pgfmathsetmacro{\op}{0.3 + 0.4*rand}
+
+ \pgfmathrandominteger{\col}{0}{4}
+ \pgfmathrandominteger{\p}{50}{90}
+ \neo@drawbubble{\op}{\col}{\p}{\op}
+ {([xshift=\x, yshift=\y]ellipseCenter) circle (\bubbleRadius pt)}
+ }
+
+ \node[\neoschool@titlecolor] at
+ ([yshift=0.5\myheight]current page text area.north) (title) {%
+ \LARGE\csname\neoschool@titlestyle\endcsname
+ \csname\neoschool@titleweight\endcsname
+ \csname\neoschool@titleshape\endcsname
+ \@title
+ };
+
+ \ifx\@subtitle\empty\else
+ \node[subtitleColor, below=0.3em of title] {%
+ \large\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\@subtitle
+ };
+ \fi
+ \end{tikzpicture}%
+ \if@twocolumn
+ \vspace{1.75\neo@headerheight}%
+ \else
+ \vspace{1.5\neo@headerheight}%
+ \fi
+ }
+
+ \AtBeginDocument{%
+ \let\neo@oldmaketitle\maketitle
+ \renewcommand{\maketitle}{%
+ \if@twocolumn
+ \twocolumn[\neo@shortbubblescontent]%
+ \else
+ \neo@shortbubblescontent
+ \fi
+ \thispagestyle{firstpage}%
+ }%
+ }
+\fi
+
+
+%% ==============================================================================
+%% Box Styles and Environment
+%% ==============================================================================
+
+%% Common Style Parameters
+%% ----------------------------------
+
+%% Mathematical Boxes
+%% ----------------------------------
+% Standard math box with configurable colors%
+\NewDocumentCommand\mathbox{D<>{white}O{definitionColor}}{%
+\tcboxmath[%
+ colback=#1,
+ colframe=#2,
+ size=fbox,
+ arc=3pt,
+ boxrule=0.8pt
+]
+}
+
+% Math highlighting with size adaptation
+\newcommand{\mhl}[2][yellow]{%
+ \mathchoice
+ {\colorbox{#1}{$\displaystyle#2$}}
+ {\colorbox{#1}{$\textstyle#2$}}
+ {\colorbox{#1}{$\scriptstyle#2$}}
+ {\colorbox{#1}{$\scriptscriptstyle#2$}}
+}
+
+%% Answer Fields
+%% ----------------------------------
+% Empty box for answers
+\newcommand{\emptybox}[2]{%
+ \begin{tcolorbox}[%
+ enhanced,
+ boxrule=1pt,
+ arc=5pt,
+ boxsep=0pt,
+ width=#1,
+ height=#2,
+ colback=exerciseColor!5!white,
+ frame hidden,
+ before skip=.5\baselineskip,
+ after skip=.5\baselineskip
+ ]
+ \null
+ \end{tcolorbox}
+}
+
+% Answer field with line spacing
+\newlength{\neo@answerbaselineskip}
+\setlength{\neo@answerbaselineskip}{1.35\baselineskip}
+
+\newcommand{\answerfield}[2][.975\linewidth]{%
+ \vspace{0.25\baselineskip}%
+ \noindent
+ \colorbox{exerciseColor!5!white}{%
+ \parbox{#1}{%
+ \phantom{\rule{1pt}{#2\neo@answerbaselineskip}}
+ }
+ }
+ \vspace{0.1cm}
+}
+
+% Answer field with frame and white background
+\newcommand{\answerframe}[2][\linewidth]{%
+ \noindent\par
+ \begin{tcolorbox}[%
+ enhanced,
+ boxrule=0.8pt,
+ colframe=exerciseColor!50,
+ colback=white,
+ width=#1,
+ height=#2\neo@answerbaselineskip,
+ nobeforeafter,
+ arc=2pt,
+ boxsep=0pt,
+ left=2pt,
+ right=2pt,
+ top=2pt,
+ bottom=2pt,
+ before skip=.5\baselineskip,
+ after skip=.5\baselineskip,
+ ]
+ \phantom{\rule{1pt}{#2\neo@answerbaselineskip}}
+ \end{tcolorbox}
+}
+
+%% Solution and Application Boxes
+%% ----------------------------------
+% Solution box with fixed dimensions
+\newcommand{\solutionbox}[3][\linewidth]{%
+ \begin{tcolorbox}[%
+ enhanced,
+ boxrule=1pt,
+ fontupper=\color{\neoschool@globalcolor},
+ arc=5pt,
+ boxsep=0mm,
+ width=#1,
+ height=#2,
+ colback=solutionColor!5!white,
+ frame hidden,
+ before skip=0.5\baselineskip,
+ after skip=\baselineskip
+ ]
+ #3
+ \end{tcolorbox}
+ \par%
+}
+
+% Colored box for applications
+\newcommand{\neocolorbox}[2][applicationColor]{%
+ \begin{tcolorbox}[%
+ enhanced,
+ fontupper=\color{\neoschool@globalcolor},
+ boxrule=1pt,
+ sharpish corners,
+ width=\linewidth,
+ colback=#1!5!white,
+ frame hidden,
+ before skip=12pt plus 2pt,
+ after skip=18pt plus 2pt
+ ]
+ #2
+ \end{tcolorbox}
+}
+
+%% Inline Boxes
+%% ----------------------------------
+\NewDocumentCommand{\inlinebox}{ O{definitionColor} O{white} O{definitionColor} m }{%
+ \tcbox[%
+ enhanced,
+ nobeforeafter,
+ tcbox raise base,
+ boxrule=0.4pt,
+ top=0mm,
+ bottom=0mm,
+ right=0mm,
+ left=0mm,
+ arc=1pt,
+ boxsep=2pt,
+ colback=#1,
+ colupper=#2,
+ colframe=#3
+ ]{#4}%
+}
+
+%% General Purpose Box Environment
+%% ----------------------------------
+\NewDocumentEnvironment{neobox}{ s O{} }{%
+ \begin{tcolorbox}[%
+ \IfBooleanTF{#1}{frame hidden}{},
+ colframe=\neoschool@headcolor,
+ colback=\neo@tcbcolback,
+ enhanced,
+ breakable,
+ boxrule=1pt,
+ arc=4pt,
+ sharp corners,
+ left=0.65em,
+ right=0.65em,
+ #2
+ ]
+ }{%
+ \end{tcolorbox}
+}
+
+% Define starred version
+\ExplSyntaxOn
+\cs_new:cpn {neobox*} {\neobox*}
+\cs_new_eq:cN {endneobox*} \endneobox
+\ExplSyntaxOff
+
+%% Side-by-Side Box Environment
+%% ----------------------------------
+% Base colors for example boxes
+\colorlet{neo@examplecomp}{-exampleColor}
+\colorlet{neo@exampledark}{neo@examplecomp!50!black}
+
+% Environment definition
+\newtcolorbox{sidebyside}[1][]{%
+ sidebyside,
+ enhanced,
+ bicolor,
+ sharp corners,
+ arc=1pt,
+ colback=exampleColor!5,
+ colbacklower=exampleColor!10,
+ colframe=exampleColor!85!black,
+ left=0pt,
+ right=0pt,
+ boxrule=1pt,
+ fonttitle=\sffamily\bfseries,
+ lefttitle=1.7mm,
+ before skip=\baselineskip,
+ after skip=\baselineskip,
+ #1
+}
+
+%% ==============================================================================
+%% Listings Styles and Setting
+%% ==============================================================================
+
+%% TColorBox Styles
+%% ----------------------------------
+
+%% Base Box Parameters
+%% ----------------------------------
+\tcbset{%
+ neo@commonbox/.style={%
+ enhanced,
+ boxrule=\neo@thmborder,
+ top=0pt,
+ bottom=0pt,
+ left=2mm,
+ right=2mm,
+ fonttitle=\small\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname,
+ coltitle=\neo@tcbcolback,
+ before skip=\baselineskip,
+ after skip=\baselineskip
+ }
+}
+
+%% Box Styles
+%% ----------------------------------
+\def\neo@notitle{notitle}
+
+\tcbset{%
+ box-classic/.style={%
+ neo@commonbox,
+ colback=white,
+ colframe=codeColor,
+ frame style={opacity=0.5},
+ boxrule=0.5pt,
+ arc=0pt,
+ toptitle=2pt,
+ bottomtitle=2pt,
+ colbacktitle=white,
+ coltitle=black,
+ fonttitle=\sffamily
+ },
+ box-bottomtitle/.style={%
+ neo@commonbox,
+ enhanced,
+ frame hidden,
+ colback=white,
+ colbacktitle=white,
+ coltitle=black,
+ fonttitle=\small\sffamily,
+ attach boxed title to bottom center,
+ bottom=0pt,
+ boxed title style={%
+ frame hidden,
+ colframe=white,
+ top=0pt,
+ }
+ },
+ box-bottomtitlef/.style={
+ neo@commonbox,
+ enhanced,
+ colframe=codeColor,
+ frame style={opacity=0.5},
+ boxrule=0.5pt,
+ colback=white,
+ colbacktitle=white,
+ coltitle=black,
+ fonttitle=\small\sffamily,
+ sharp corners,
+ attach boxed title to bottom center,
+ top=0pt,
+ bottom=0pt,
+ boxed title style={%
+ frame hidden,
+ colframe=white,
+ top=5pt
+ }
+ },
+ box-fancy/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ arc=\neoschool@boxarc,
+ toptitle=1pt,
+ bottomtitle=2pt,
+ colbacktitle=codeColor,
+ drop fuzzy shadow
+ },
+ box-minimal/.style={%
+ neo@commonbox,
+ colback=white,
+ colframe=codeColor,
+ frame style={opacity=0.5},
+ toptitle=2pt,
+ bottomtitle=2pt,
+ boxrule=0.3pt,
+ arc=0pt,
+ colbacktitle=white,
+ coltitle=codeColor
+ },
+ box-elegant/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ toptitle=1pt,
+ bottomtitle=2pt,
+ sharp corners=all,
+ drop fuzzy shadow
+ },
+ box-diagonal/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ toptitle=1pt,
+ bottomtitle=2pt,
+ arc=\neoschool@boxarc,
+ sharp corners=southwest,
+ sharp corners=northeast
+ },
+ box-bevel/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ toptitle=1pt,
+ bottomtitle=2pt,
+ arc=\neoschool@boxarc,
+ sharp corners=southeast,
+ sharp corners=northwest
+ },
+ box-corner/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ toptitle=1pt,
+ bottomtitle=2pt,
+ sharp corners=downhill,
+ rounded corners=northeast,
+ rounded corners=northwest,
+ arc=\neoschool@boxarc
+ },
+ box-rounded/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ rounded corners,
+ toptitle=1pt,
+ bottomtitle=2pt,
+ arc=\neoschool@boxarc,
+ },
+ box-downhill/.style={%
+ neo@commonbox,
+ colback=codebackColor,
+ colframe=codeColor,
+ sharp corners=downhill,
+ arc=\neoschool@boxarc,
+ top=0mm,
+ bottom=0mm,
+ fontupper=\color{\neoschool@globalcolor},
+ attach boxed title to top right={yshift=-\tcboxedtitleheight},
+ boxed title style={%
+ colback=codeColor,
+ colframe=codeColor,
+ sharp corners=downhill,
+ arc=.2cm,
+ top=1pt,
+ bottom=1pt,
+ left=2pt,
+ right=2pt
+ },
+ }
+}
+
+\ifneo@unicolor
+ \def\neo@keywordstyle{\color{\neoschool@headcolor}\bfseries}
+ \def\neo@commentstyle{\color{alternateColor}}
+ \def\neo@stringstyle{\color{\neoschool@headcolor!85}}
+ \def\neo@emphstyle{\color{\neoschool@headcolor}\bfseries}
+\else
+ \def\neo@keywordstyle{\color{codeKeyword}\bfseries}
+ \def\neo@commentstyle{\color{codeComment}}
+ \def\neo@stringstyle{\color{codeString}}
+ \def\neo@emphstyle{\color{codeEmph}\bfseries}
+\fi
+
+\ifneo@listings
+
+ %% Base Listing Style
+ %% ----------------------------------
+ \lstdefinestyle{neo@lst@base}{%
+ basicstyle=\ttfamily\small,
+ columns=fullflexible,
+ breaklines=true,
+ keepspaces=true,
+ showstringspaces=false,
+ tabsize=4,
+ inputencoding=utf8,
+ extendedchars=true,
+ escapeinside={(*@}{@*)},
+ aboveskip=.25\baselineskip,
+ belowskip=.25\baselineskip,
+ literate={%
+ á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1
+ {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1
+ {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1
+ {À}{{\`A}}1 {È}{{\`E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1
+ {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1
+ {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1
+ {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1
+ {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1
+ {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1
+ {ẞ}{{\SS}}1 {ç}{{\c{c}}}1 {Ç}{{\c{C}}}1 {ø}{{\o}}1 {Ø}{{\O}}1
+ {å}{{\aa}}1 {Å}{{\AA}}1 {ã}{{\~a}}1 {õ}{{\~o}}1 {Ã}{{\~A}}1
+ {Õ}{{\~O}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 {¡}{{!`}}1
+ {°}{{\textdegree}}1 {º}{{\textordmasculine}}1 {ª}{{\textordfeminine}}1
+ {€}{{\euro}}1 {£}{{\pounds}}1 {©}{{\copyright}}1 {®}{{\textregistered}}1
+ {«}{{\guillemotleft}}1 {»}{{\guillemotright}}1 {Ð}{{\DH}}1 {ð}{{\dh}}1
+ {Ý}{{\'Y}}1 {ý}{{\'y}}1 {Þ}{{\TH}}1 {þ}{{\th}}1 {Ă}{{\u{A}}}1
+ {ă}{{\u{a}}}1 {Ą}{{\k{A}}}1 {ą}{{\k{a}}}1 {Ć}{{\'C}}1 {ć}{{\'c}}1
+ {Č}{{\v{C}}}1 {č}{{\v{c}}}1 {Ď}{{\v{D}}}1 {ď}{{\v{d}}}1 {Đ}{{\DJ}}1
+ {đ}{{\dj}}1 {Ė}{{\.{E}}}1 {ė}{{\.{e}}}1 {Ę}{{\k{E}}}1 {ę}{{\k{e}}}1
+ {Ě}{{\v{E}}}1 {ě}{{\v{e}}}1 {Ğ}{{\u{G}}}1 {ğ}{{\u{g}}}1 {Ĩ}{{\~I}}1
+ {ĩ}{{\~\i}}1 {Į}{{\k{I}}}1 {į}{{\k{i}}}1 {İ}{{\.{I}}}1 {ı}{{\i}}1
+ {Ĺ}{{\'L}}1 {ĺ}{{\'l}}1 {Ľ}{{\v{L}}}1 {ľ}{{\v{l}}}1 {Ł}{{\L{}}}1
+ {ł}{{\l{}}}1 {Ń}{{\'N}}1 {ń}{{\'n}}1 {Ň}{{\v{N}}}1 {ň}{{\v{n}}}1
+ {Ő}{{\H{O}}}1 {ő}{{\H{o}}}1 {Ŕ}{{\'{R}}}1 {ŕ}{{\'{r}}}1 {Ř}{{\v{R}}}1
+ {ř}{{\v{r}}}1 {Ś}{{\'S}}1 {ś}{{\'s}}1 {Ş}{{\c{S}}}1 {ş}{{\c{s}}}1
+ {Š}{{\v{S}}}1 {š}{{\v{s}}}1 {Ť}{{\v{T}}}1 {ť}{{\v{t}}}1 {Ũ}{{\~U}}1
+ }
+
+ \renewcommand*{\lstlistingname}{\neo@codename}
+
+ %% Common Style Elements
+ %% ----------------------------------
+
+ %% ==============================================================================
+ %% Listings Styles and Settings - Part 2
+ %% Defines specific listing styles and environments
+ %% ==============================================================================
+
+ %% Specific Listing Styles
+ %% ----------------------------------
+ % Style Colorful and variants
+ \lstdefinestyle{neo@lst@colorful}{%
+ style=neo@lst@base,
+ keywordstyle=\neo@keywordstyle,
+ commentstyle=\neo@commentstyle,
+ stringstyle=\neo@stringstyle,
+ emphstyle=\neo@emphstyle,
+ numbers=none,
+ numberstyle=\tiny\color{codeBackground},
+ frame=none
+ }
+
+ % Variants with background color
+ \lstdefinestyle{neo@lst@colorfulb}{%
+ style=neo@lst@colorful,
+ backgroundcolor=\color{codebackColor}
+ }
+
+ % Variants with line numbers
+ \lstdefinestyle{neo@lst@colorfuln}{%
+ style=neo@lst@colorful,
+ numbers=left,
+ numbersep=10pt
+ }
+
+ % Variants with line numbers and background
+ \lstdefinestyle{neo@lst@colorfulbn}{%
+ style=neo@lst@colorfulb,
+ numbers=left,
+ numbersep=10pt
+ }
+
+ % Variants with frame
+ \lstdefinestyle{neo@lst@colorfulf}{%
+ style=neo@lst@colorful,
+ frame=single
+ }
+
+ % Variants with frame and background
+ \lstdefinestyle{neo@lst@colorfulbf}{%
+ style=neo@lst@colorfulb,
+ frame=single
+ }
+
+ % Variants with frame and numbers
+ \lstdefinestyle{neo@lst@colorfulfn}{%
+ style=neo@lst@colorfuln,
+ frame=single
+ }
+
+ % Variants with all options
+ \lstdefinestyle{neo@lst@colorfulbfn}{%
+ style=neo@lst@colorfulbn,
+ frame=single
+ }
+
+ %% Minimal Style and Variants
+ %% ----------------------------------
+ \lstdefinestyle{neo@lst@minimal}{%
+ style=neo@lst@base,
+ keywordstyle=\ifneo@unicolor\color{\neoschool@headcolor}\fi\bfseries,
+ commentstyle=\ifneo@unicolor\color{\neoschool@headcolor}\fi,
+ stringstyle=\ifneo@unicolor\color{\neoschool@headcolor}\else\ttfamily\fi,
+ emphstyle=\ifneo@unicolor\color{\neoschool@headcolor}\else\bfseries\fi,
+ numbers=none,
+ frame=none,
+ }
+
+ % Define all variants using the same pattern as colorful styles
+ \lstdefinestyle{neo@lst@minimalb}{style=neo@lst@minimal,backgroundcolor=\color{codebackColor}}
+ \lstdefinestyle{neo@lst@minimaln}{style=neo@lst@minimal,numbers=left,numbersep=10pt}
+ \lstdefinestyle{neo@lst@minimalbn}{style=neo@lst@minimalb,numbers=left,numbersep=10pt}
+ \lstdefinestyle{neo@lst@minimalf}{style=neo@lst@minimal,frame=single}
+ \lstdefinestyle{neo@lst@minimalbf}{style=neo@lst@minimalb,frame=single}
+ \lstdefinestyle{neo@lst@minimalfn}{style=neo@lst@minimaln,frame=single}
+ \lstdefinestyle{neo@lst@minimalbfn}{style=neo@lst@minimalbn,frame=single}
+
+ %% Academic and Modern Styles
+ %% ----------------------------------
+ \lstdefinestyle{neo@lst@academic}{%
+ style=neo@lst@base,
+ keywordstyle=\ifneo@unicolor\color{\neoschool@headcolor}\fi\bfseries,
+ commentstyle=\ifneo@unicolor\color{\neoschool@headcolor}\fi,
+ stringstyle=\ifneo@unicolor\color{\neoschool@headcolor}\else\ttfamily\fi,
+ numbers=left,
+ numberstyle=\tiny,
+ numbersep=12pt,
+ frame=leftline,
+ framesep=3pt,
+ framexleftmargin=3pt,
+ xleftmargin=15pt
+ }
+
+ \lstdefinestyle{neo@lst@modern}{%
+ style=neo@lst@base,
+ keywordstyle=\ifneo@unicolor\color{\neoschool@headcolor}\else\color{codeKeyword}\fi\bfseries,
+ commentstyle=\ifneo@unicolor\color{\neoschool@headcolor}\else\color{codeComment}\fi,
+ stringstyle=\ifneo@unicolor\color{\neoschool@headcolor}\else\color{codeString}\fi,
+ numbers=none,
+ frame=single,
+ framerule=1pt,
+ framesep=3pt,
+ rulecolor=\ifneo@unicolor\color{\neoschool@headcolor}\else\color{codeKeyword}\fi,
+ backgroundcolor=\ifneo@unicolor\color{codebackColor}\else\color{codeKeyword!5}\fi,
+ framesep=7pt,
+ xleftmargin=1em,
+ linewidth={\dimexpr \linewidth-10pt},
+ }
+
+ %% Language-Specific Definitions
+ %% ----------------------------------
+ % JSON
+ \lstdefinelanguage{json}{%
+ keywords={true,false,null},
+ sensitive=false,
+ morestring=[b]",
+ morecomment=[l]{//},
+ morecomment=[s]{/*}{*/},
+ literate=
+ *{0}{{{\color{codeComment}0}}}{1}
+ {1}{{{\color{codeComment}1}}}{1}
+ {2}{{{\color{codeComment}2}}}{1}
+ {3}{{{\color{codeComment}3}}}{1}
+ {4}{{{\color{codeComment}4}}}{1}
+ {5}{{{\color{codeComment}5}}}{1}
+ {6}{{{\color{codeComment}6}}}{1}
+ {7}{{{\color{codeComment}7}}}{1}
+ {8}{{{\color{codeComment}8}}}{1}
+ {9}{{{\color{codeComment}9}}}{1}
+ {:}{{{\color{codeKeyword}{:}}}}{1}
+ {,}{{{\color{codeKeyword}{,}}}}{1}
+ {\{}{{{\color{codeKeyword}{\{}}}}{1}
+ {\}}{{{\color{codeKeyword}{\}}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1},
+ }
+
+ % YAML
+ \lstdefinelanguage{yaml}{%
+ keywords={true,false,null,yes,no,on,off},
+ sensitive=false,
+ morestring=[b]",
+ morestring=[b]',
+ morecomment=[l]{\#},
+ literate=
+ *{:}{{{\color{codeKeyword}{:}}}}{1}
+ {-}{{{\color{codeKeyword}{-}}}}{1}
+ {>}{{{\color{codeKeyword}{>}}}}{1}
+ {|}{{{\color{codeKeyword}{|}}}}{1},
+ }
+
+ % TOML
+ \lstdefinelanguage{toml}{%
+ keywords={true,false},
+ sensitive=false,
+ morestring=[b]",
+ morestring=[b]',
+ morecomment=[l]{\#},
+ literate=
+ *{=}{{{\color{codeKeyword}{=}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1}
+ {.}{{{\color{codeKeyword}{.}}}}{1},
+ }
+
+ % CSV
+ \lstdefinelanguage{csv}{%
+ sensitive=false,
+ morestring=[b]",
+ morecomment=[l]{\#},
+ literate=
+ *{,}{{{\color{codeKeyword}{,}}}}{1}
+ {;}{{{\color{codeKeyword}{;}}}}{1},
+ }
+
+ % Markdown
+ \lstdefinelanguage{markdown}{%
+ sensitive=false,
+ morecomment=[l]{\%},
+ literate=
+ *{\#}{{{\color{codeKeyword}{\#}}}}{1}
+ {-}{{{\color{codeKeyword}{-}}}}{1}
+ {*}{{{\color{codeKeyword}{*}}}}{1}
+ {>}{{{\color{codeKeyword}{>}}}}{1}
+ {`}{{{\color{codeKeyword}{`}}}}{1}
+ {|}{{{\color{codeKeyword}{|}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1}
+ {(}{{{\color{codeKeyword}{(}}}}{1}
+ {)}{{{\color{codeKeyword}{)}}}}{1},
+ }
+
+ %% Language-Specific Styles
+ %% ----------------------------------
+ \lstdefinestyle{python}{%
+ language=Python,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ @property,@classmethod,@staticmethod,
+ },
+ emph={%
+ range,int,str,list,dict,set,bool,float,
+ tuple,super,type,print,len,sum,min,max,
+ enumerate,zip,map,filter,any,all,as,assert,
+ nonlocal,with,yield,self,True,False,None,
+ lambda,raise,await,async,
+ },
+ morestring=[b]""",
+ }
+
+ \lstdefinestyle{java}{%
+ language=Java,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ @Override,@Deprecated,@SuppressWarnings,
+ @FunctionalInterface,@SafeVarargs,
+ var,record,sealed,permits,
+ public,private,protected,static,final,
+ abstract,interface,extends,implements
+ },
+ morecomment=[s]{/*}{*/},
+ morecomment=[l]//,
+ morestring=[b]",
+ }
+
+ \lstdefinestyle{cpp}{%
+ language=C++,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ nullptr,constexpr,override,final,
+ template,typename,concept,requires,
+ auto,decltype,noexcept,static_assert,
+ thread_local,alignas,alignof
+ },
+ morecomment=[s]{/*}{*/},
+ morecomment=[l]//,
+ morestring=[b]",
+ }
+
+ \lstdefinestyle{javascript}{%
+ language=JavaScript,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ let,const,var,function,class,extends,
+ static,get,set,new,this,super,
+ import,export,default,from,as,
+ async,await,yield,return,
+ undefined,null,true,false
+ },
+ morecomment=[s]{/*}{*/},
+ morecomment=[l]//,
+ morestring=[b]",
+ morestring=[b]',
+ morestring=[b]`,
+ }
+
+ \lstdefinestyle{sql}{%
+ language=SQL,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ CREATE,TABLE,INSERT,INTO,VALUES,
+ SELECT,FROM,WHERE,GROUP,BY,HAVING,
+ ORDER,LIMIT,JOIN,LEFT,RIGHT,INNER,
+ UPDATE,SET,DELETE,ALTER,DROP,
+ CONSTRAINT,PRIMARY,KEY,FOREIGN,
+ REFERENCES,CASCADE,INDEX
+ },
+ sensitive=false,
+ }
+
+ \lstdefinestyle{latex}{%
+ language=[latex]TeX,
+ style=neo@lst@\neoschool@lststyle,
+ texcsstyle=*\bfseries\color{codeKeyword},
+ moretexcs = {tableofcontents,index,footnote,sout,part,chapter,subsection,subsubsection,paragraph,maketitle,leqslant,geqslant,varnothing,includegraphics,draw,node,theoremstyle,newtcolorbox,tcbuselibrary,newtcbtheorem,SI,ang,ce,chemfig,norm,abs,deriv,R,N,Z,ProvidesPackage,color,ps,montitre,lstset,lstinline,lstinputlisting,definecolor,textcolor,colorlet,setlength,colorbox,fcolorbox,addplot,pgfplotsset,opadd,opsub,opmul,opdiv,opgcd,metre,second,squared,kelvin,coulomb,volt,per,opprint,legend,tkzDefPoint,tkzInterLL,tkzGetPoint,tkzDrawPolygon,tkzDrawSegments,tkzMarkRightAngles,tkzMarkSegments,tkzLabelPoints,boxed,boldsymbol,boldmath,multirow,addbibresource,printbibliography,bm,dfrac,meter,thead,makecell,euro,cellcolor,rowcolor,columncolor,base,repere,rog,ron,rond,derpart,drv,integrer,nuplet,anuplet,ensemble,E,V,suite,suitar,suitgeo,vect,norme,tr,rank,adj,sgn,im,di,intabfx,integrale,e,moinsinf,plusinf,sisetup,restoregeometry,newgeometry,lefttitle,righttitle,colbacklower,neoheader,neograph,textwithimage,withqrcode,positionobject,splitcontent,grid,customgrid,frenchgrid,notebook,nbminorgrid,nbmajorgrid},
+ emph={width,axis~lines,xlabel,ylabel,xmin,ymin,grid,domain,samples,displayshiftintermediary,colback,colframe,colbacktitle,coltitle,enhanced,,fonttitle,margin,leftmargin,publisher,year,carrysub,lastcarry,locale,xmax,ymax,coordinates,mark,style,hmargin,vmargin,top,bottom,left,right,showframe,includeheadfoot,opacity,fill,above,},
+ morecomment=[l]{\%},
+ morestring=[b]",
+ sensitive=true
+ }
+
+ \lstdefinestyle{bash}{%
+ language=bash,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ source, alias, bg, bind, break, builtin, cd, command, compgen,
+ complete, continue, declare, dirs, disown, echo, enable, eval,
+ exec, exit, export, fc, fg, getopts, hash, help, history, jobs,
+ kill, let, local, logout, mapfile, popd, printf, pushd, pwd,
+ read, readarray, readonly, return, set, shift, shopt, suspend,
+ test, times, trap, type, typeset, ulimit, umask, unalias,
+ unset, wait
+ },
+ morestring=[b]",
+ morestring=[b]',
+ morestring=[b]\`,
+ morecomment=[l]{\#},
+ literate=
+ *{\$}{{{\color{codeKeyword}{\$}}}}{1}
+ {|}{{{\color{codeKeyword}{|}}}}{1}
+ {>}{{{\color{codeKeyword}{>}}}}{1}
+ {<}{{{\color{codeKeyword}{<}}}}{1}
+ {&}{{{\color{codeKeyword}{\&}}}}{1},
+ }
+
+ \lstdefinestyle{assembly}{%
+ language=[x86]Assembler,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ section, global, extern
+ },
+ morecomment=[l]{;},
+ morecomment=[l]{\#},
+ literate=
+ *{,}{{{\color{codeKeyword}{,}}}}{1}
+ {:}{{{\color{codeKeyword}{:}}}}{1}
+ {[}{{{\color{codeKeyword}{[}}}}{1}
+ {]}{{{\color{codeKeyword}{]}}}}{1}
+ {\$}{{{\color{codeKeyword}{\$}}}}{1}
+ {\%}{{{\color{codeKeyword}{\%}}}}{1},
+ }
+
+ \lstdefinestyle{lisp}{%
+ language=Lisp,
+ style=neo@lst@\neoschool@lststyle,
+ morekeywords={%
+ setq, setf, loop, do, progn, when, unless
+ },
+ literate=
+ *{(}{{{\color{codeKeyword}{(}}}}{1}
+ {)}{{{\color{codeKeyword}{)}}}}{1}
+ {'}{{{\color{codeKeyword}{'}}}}{1}
+ {`}{{{\color{codeKeyword}{`}}}}{1}
+ {,}{{{\color{codeKeyword}{,}}}}{1},
+ }
+
+ \lstdefinestyle{json}{%
+ style=neo@lst@\neoschool@lststyle,
+ language=json,
+ }
+
+ \lstdefinestyle{yaml}{%
+ style=neo@lst@\neoschool@lststyle,
+ language=yaml,
+ }
+
+ \lstdefinestyle{toml}{%
+ style=neo@lst@\neoschool@lststyle,
+ language=toml,
+ }
+
+ \lstdefinestyle{csv}{%
+ style=neo@lst@\neoschool@lststyle,
+ language=csv,
+ }
+
+ \lstdefinestyle{markdown}{%
+ style=neo@lst@\neoschool@lststyle,
+ language=markdown,
+ }
+
+ %% Environment Definitions
+ %% ----------------------------------
+ % Counter for code listings
+ \newcounter{lstcode}
+
+ % Code listing environment
+ \NewTCBListing[use counter=lstcode]{code}{ O{} m !O{} !O{} }{%
+ listing only,
+ enhanced,
+ breakable,
+ listing options={%
+ style=#2,
+ #1
+ },
+ code={%
+ \IfEqCase{#4}{%
+ {}{\tcbset{%
+ standard jigsaw,
+ opacityback=0,
+ opacityframe=0,
+ frame hidden,
+ boxrule=0pt,
+ left=0pt,
+ right=0pt,
+ top=0pt,
+ bottom=0pt,
+ title={},
+ notitle
+ }}
+ {box-minimal}{\tcbset{box-minimal}}
+ {box-fancy}{\tcbset{box-fancy}}
+ {box-classic}{\tcbset{box-classic}}
+ {box-elegant}{\tcbset{box-elegant}}
+ {box-diagonal}{\tcbset{box-diagonal}}
+ {box-bevel}{\tcbset{box-bevel}}
+ {box-corner}{\tcbset{box-corner}}
+ {box-rounded}{\tcbset{box-rounded}}
+ {box-downhill}{\tcbset{box-downhill}}
+ {box-bottomtitle}{\tcbset{box-bottomtitle}}
+ {box-bottomtitlef}{\tcbset{box-bottomtitlef}}
+ }[\PackageError{code}{Style not found: #4}{}]
+ \ifx\relax#3\relax\else
+ \tcbset{title={\lstlistingname~\thelstcode~~\textemdash{}~~#3},\neoschool@boxtitle}
+ \fi
+ }
+ }
+
+ % Style selector command
+ \newcommand{\setcodestyle}[1]{%
+ \renewcommand{\neoschool@lststyle}{#1}
+ }
+
+ % Default style
+ \AtBeginDocument{%
+ \ifneo@listings
+ \lstset{style=neo@lst@\neoschool@lststyle}
+ \else
+ \PackageWarning{neoschool}{The 'listings' package is not enabled, lststyle option will be ignored.}
+ \fi
+ }
+
+ % Inline code
+ \newcommand{\codeinline}[2][]{%
+ \lstinline[style=#1]{#2}
+ }
+
+ % Language detection
+ \newcommand{\DetectLanguage}[1]{%
+ \filename@parse{#1}
+ \ifthenelse{\equal{\filename@ext}{py}}{python}{%
+ \ifthenelse{\equal{\filename@ext}{java}}{java}{%
+ \ifthenelse{\equal{\filename@ext}{tex}}{latex}{text}
+ }
+ }
+ }
+
+ % Code input
+ \NewTCBInputListing{\codeinput}{ O{} m m !O{} !O{} }{%
+ listing file={#3},
+ listing only,
+ boxrule=0pt,
+ enhanced,
+ breakable,
+ listing file={#3},
+ listing options={%
+ style={#2},
+ #1
+ },
+ frame hidden,
+ colback=codebackColor,
+ boxrule=0pt,
+ left=0pt,
+ right=0pt,
+ top=0pt,
+ bottom=0pt,
+ code={%
+ \IfEqCase{#5}{%
+ {}{\tcbset{%
+ standard jigsaw,
+ opacityback=0,
+ opacityframe=0,
+ frame hidden,
+ boxrule=0pt,
+ left=0pt,
+ right=0pt,
+ top=0pt,
+ bottom=0pt,
+ title={},
+ notitle
+ }}
+ {box-minimal}{\tcbset{box-minimal}}
+ {box-fancy}{\tcbset{box-fancy}}
+ {box-classic}{\tcbset{box-classic}}
+ {box-elegant}{\tcbset{box-elegant}}
+ {box-diagonal}{\tcbset{box-diagonal}}
+ {box-bevel}{\tcbset{box-bevel}}
+ {box-corner}{\tcbset{box-corner}}
+ {box-rounded}{\tcbset{box-rounded}}
+ {box-downhill}{\tcbset{box-downhill}}
+ {box-bottomtitle}{\tcbset{box-bottomtitle}}
+ {box-bottomtitlef}{\tcbset{box-bottomtitlef}}
+ }[\PackageError{code}{Style not found: #5}{}]
+ \ifx\relax#4\relax\else
+ \tcbset{title={\neo@codename~\thelstcode~~\textemdash{}~~#4},\neoschool@boxtitle}
+ \fi
+ }
+ }
+
+ %% Side-by-Side Code Environment
+ %% ----------------------------------
+ \newtcblisting{codeside}[2][]{%
+ standard jigsaw,
+ enhanced,
+ breakable,
+ opacityback=0,
+ opacityframe=0,
+ fonttitle=\sffamily\bfseries,
+ listing only,
+ arc=1pt,
+ colback=codebackColor,
+ colframe=codeColor,
+ left=0pt,
+ right=0pt,
+ lefttitle=1.7mm,
+ width=\linewidth,
+ listing options={%
+ style=#2,
+ #1
+ }
+ }
+
+\else\ifneo@minted
+
+ %% Environment Definitions
+ %% ----------------------------------
+ \newcounter{mintcode}
+
+ % Define the minted style
+ \setminted{
+ style=vs,
+ fontsize=\small,
+ breaklines=true,
+ autogobble,
+ frame=none,
+ linenos=false,
+ tabsize=4,
+ }
+
+ % Code listing environment
+ \NewTCBListing[use counter=mintcode]{code}{ O{} m !O{} !O{} }{%
+ listing engine=minted,
+ minted language=#2,
+ listing only,
+ enhanced,
+ breakable,
+ minted options={#1},
+ code={%
+ \IfEqCase{#4}{%
+ {}{\tcbset{%
+ standard jigsaw,
+ opacityback=0,
+ opacityframe=0,
+ frame hidden,
+ boxrule=0pt,
+ left=0pt,
+ right=0pt,
+ top=0pt,
+ bottom=0pt,
+ title={},
+ notitle
+ }}
+ {box-minimal}{\tcbset{box-minimal}}
+ {box-fancy}{\tcbset{box-fancy}}
+ {box-classic}{\tcbset{box-classic}}
+ {box-elegant}{\tcbset{box-elegant}}
+ {box-diagonal}{\tcbset{box-diagonal}}
+ {box-bevel}{\tcbset{box-bevel}}
+ {box-corner}{\tcbset{box-corner}}
+ {box-rounded}{\tcbset{box-rounded}}
+ {box-downhill}{\tcbset{box-downhill}}
+ {box-bottomtitle}{\tcbset{box-bottomtitle}}
+ {box-bottomtitlef}{\tcbset{box-bottomtitlef}}
+ }[\PackageError{code}{Style not found: #4}{}]
+ \ifx\relax#3\relax\else
+ \tcbset{title={\neo@codename~\themintcode~~\textemdash{}~~#3},\neoschool@boxtitle}
+ \fi
+ }
+ }
+
+ % Inline code command
+ \newcommand{\codeinline}[2][text]{%
+ \mintinline[style=vs,fontsize=\small,breaklines,autogobble]{#1}{#2}
+ }
+
+ % Code input from file
+ \NewTCBInputListing{\codeinput}{ O{} m m !O{} !O{} }{%
+ listing engine=minted,
+ minted language={#2},
+ enhanced,
+ breakable,
+ listing file={#3},
+ listing only,
+ minted options={#1},
+ frame hidden,
+ colback=codebackColor,
+ boxrule=0pt,
+ code={%
+ \IfEqCase{#5}{%
+ {}{\tcbset{%
+ standard jigsaw,
+ opacityback=0,
+ opacityframe=0,
+ frame hidden,
+ boxrule=0pt,
+ left=0pt,
+ right=0pt,
+ top=0pt,
+ bottom=0pt,
+ title={},
+ notitle
+ }}
+ {box-minimal}{\tcbset{box-minimal}}
+ {box-fancy}{\tcbset{box-fancy}}
+ {box-classic}{\tcbset{box-classic}}
+ {box-elegant}{\tcbset{box-elegant}}
+ {box-diagonal}{\tcbset{box-diagonal}}
+ {box-bevel}{\tcbset{box-bevel}}
+ {box-corner}{\tcbset{box-corner}}
+ {box-rounded}{\tcbset{box-rounded}}
+ {box-downhill}{\tcbset{box-downhill}}
+ {box-bottomtitle}{\tcbset{box-bottomtitle}}
+ {box-bottomtitlef}{\tcbset{box-bottomtitlef}}
+ }[\PackageError{code}{Style not found: #5}{}]
+ \ifx\relax#4\relax\else
+ \tcbset{title={\neo@codename~\themintcode~~\textemdash{}~~#4},\neoschool@boxtitle}
+ \fi
+ }
+ }
+
+ % Side-by-Side Code Environment
+ \newtcblisting{codeside}[2][]{%
+ standard jigsaw,
+ listing engine=minted,
+ enhanced,
+ breakable,
+ opacityback=0,
+ opacityframe=0,
+ fonttitle=\sffamily\bfseries,
+ minted language=#2,
+ arc=1pt,
+ colback=codebackColor,
+ colframe=codeColor,
+ left=0pt,
+ right=0pt,
+ lefttitle=1.7mm,
+ width=\linewidth,
+ minted options={#1}
+ }
+
+ \fi
+\fi
+
+%% ==============================================================================
+%% Algorithm and Pseudocode Environments
+%% ==============================================================================
+
+%% Algorithm Keywords Translation
+%% ----------------------------------
+\algrenewcommand\algorithmicwhile{\textbf{tant que}}
+\algrenewcommand\algorithmicdo{\textbf{faire}}
+\algrenewcommand\algorithmicfor{\textbf{pour}}
+\algrenewcommand\algorithmicif{\textbf{si}}
+\algrenewcommand\algorithmicthen{\textbf{alors}}
+\algrenewcommand\algorithmicelse{\textbf{sinon}}
+\algrenewcommand\algorithmicend{\textbf{fin}}
+\algrenewcommand\algorithmicreturn{\textbf{retourner}}
+\algrenewcommand\algorithmicfunction{\textbf{fonction}}
+\algrenewcommand\algorithmicrequire{\textbf{entrée}}
+\algrenewcommand\algorithmicensure{\textbf{sortie}}
+\algrenewcommand\algorithmicprocedure{\textbf{procédure}}
+
+%% Additional Algorithm Commands
+%% ----------------------------------
+\newcommand{\To}{\textbf{ à }}
+\newcommand{\Gets}{\ensuremath{\leftarrow}}
+
+%% Pseudocode Box Style
+%% ----------------------------------
+\tcbset{%
+ pseudocode/.style={%
+ enhanced,
+ breakable,
+ colback=white,
+ colframe=\ifneo@unicolor\neoschool@headcolor\else\neoschool@headcolor!50\fi,
+ boxrule=0.5pt,
+ arc=0pt,
+ top=3mm,
+ bottom=3mm,
+ left=3mm,
+ right=3mm,
+ colbacktitle=white,
+ coltitle=black,
+ fonttitle=\sffamily\bfseries,
+ before upper={\begin{algorithmic}},
+ after upper={\end{algorithmic}},
+ breakable
+ }
+}
+
+%% Pseudocode Environment
+%% ----------------------------------
+\newtcolorbox[use counter=lstcode]{pseudocode}[2][]{%
+ pseudocode,
+ title={\csname neo@algorithmname\endcsname~\thelstcode~~\textemdash{}~~#2},
+ #1
+}
+
+%% ==============================================================================
+%% Base Definitions and Styles for Theorems and Exercises
+%% ==============================================================================
+
+% Common Styles
+\tcbset{
+ common@base/.style={
+ enhanced,
+ breakable,
+ separator sign={},
+ before skip=\baselineskip,
+ after skip=\baselineskip,
+ colupper=\neo@tcbcolupper,
+ colframe=\neoschool@headcolor,
+ colbacklower=\neo@tcbcolbacklower
+ },
+ common@title@base/.style={
+ fonttitle={\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname},
+ },
+}
+
+%% ==============================================================================
+%% Shared Box Styles for Theorems and Exercises
+%% ==============================================================================
+\ExplSyntaxOn
+\tl_new:N \l__custom_tcb_title_tl
+\tl_new:N \l__custom_tcb_label_tl
+\tl_new:N \l__custom_tcb_options_tl
+
+\newcommand{\getCustomSlantedTitle}{%
+ \tl_if_empty:NTF \l__custom_tcb_title_tl
+ {\,}
+ {\tl_use:N \enskip(\l__custom_tcb_title_tl)\;}
+}
+
+\newcommand{\getCustomBoxedTitle}{%
+ \tl_if_empty:NTF \l__custom_tcb_title_tl
+ {}
+ {\tl_use:N \,(\l__custom_tcb_title_tl)\,}
+}
+\ExplSyntaxOff
+
+\def\neo@getbackcolor{%
+ \ifneo@noback
+ white%
+ \else
+ \neo@tcbcolback%
+ \fi
+}
+
+\def\neo@getframestyle{%
+ \ifneo@noframe
+ frame hidden%
+ \else\fi
+}
+
+\tcbset{
+ neo@shared@base/.style args={#1}{%
+ common@base,
+ colframe=#1,
+ colback=\neo@getbackcolor,
+ boxrule=\neo@thmborder,
+ \neo@getframestyle
+ },
+ neo@shared@elegant/.style args={#1}{%
+ neo@shared@base={#1},
+ common@title@base,
+ skin=bicolor,
+ sharp corners,
+ detach title,
+ left=1em,
+ right=1em,
+ top=\neo@toppadding,
+ bottom=\neo@bottompadding,
+ borderline west={4pt}{0pt}{#1},
+ before upper={\tcbtitle\enskip}
+ },
+ neo@shared@shaded/.style 2 args={%
+ neo@shared@base={#1},
+ common@title@base,
+ left=\neo@leftpadding,
+ right=\neo@rightpadding,
+ after skip=\neo@afterskip,
+ before skip=\neo@beforeskip,
+ attach boxed title to top left,
+ boxed title style={
+ empty,
+ top=\neo@titletoppadding,
+ left=\neo@titleleftpadding,
+ right=\neo@titlerightpadding,
+ bottom=\neo@titlebottompadding,
+ },
+ detach title,
+ underlay boxed title={%
+ \path[draw=\csname neo@titledrawcolor@#2\endcsname,line width=1pt,
+ rounded corners, fill=\neo@tcbcolback]
+ ([xshift=.17mm]frame.west) |- ([xshift=-2.5mm]title.north east)
+ to[out=0, in=180] ([xshift=7.5mm, yshift=-.18mm]title.south east);
+ }
+ },
+ neo@shared@slanted/.style args={#1}{%
+ neo@shared@base={#1},
+ common@title@base,
+ skin=bicolor,
+ separator sign={},
+ coltitle=white,
+ left=\neo@leftpadding,
+ right=\neo@rightpadding,
+ after skip=\neo@afterskip,
+ before skip=\neo@beforeskip,
+ detach title
+ },
+ neo@shared@sober/.style args={#1}{%
+ neo@shared@base={#1},
+ common@title@base,
+ skin=bicolor,
+ detach title,
+ left=1ex,
+ right=1ex,
+ separator sign={},
+ terminator sign=,
+ },
+ neo@shared@classic/.style args={#1}{%
+ neo@shared@base={#1},
+ common@title@base,
+ skin=bicolor,
+ coltitle=white,
+ colbacktitle=tcbcolframe,
+ boxrule=1pt,
+ toptitle=1mm,
+ bottomtitle=1mm,
+ left=1ex,
+ right=1ex,
+ },
+ neo@shared@classy/.style args={#1}{%
+ neo@shared@base={#1},
+ common@title@base,
+ skin=bicolor,
+ left=1ex,
+ right=1ex,
+ attach boxed title to top left={
+ yshift*=-\tcboxedtitleheight
+ },
+ boxed title style={
+ sharp corners,
+ rounded corners=northwest,
+ colback=tcbcolframe,
+ boxrule=0pt
+ },
+ underlay boxed title={
+ \path[fill=tcbcolframe]
+ (title.south west)--(title.south east)
+ to[out=0, in=180] ([xshift=5mm]title.east)--
+ (title.center-|frame.east)
+ [rounded corners=\kvtcb@arc] |-
+ (frame.north) -| cycle;
+ }
+ },
+ neo@shared@boxed/.style 2 args={%
+ neo@box@base,
+ sharp corners,
+ \neo@framehidden,
+ coltitle=white,
+ colframe=#1,
+ colback=\neo@tcbcolback,
+ left=\neo@leftpadding,
+ right=\neo@rightpadding,
+ after skip=\neo@afterskip,
+ before skip=\neo@beforeskip,
+ detach title,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=white,
+ colback=#1, fontupper=\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname,
+ size=small,
+ baseline=3pt,
+ top=0pt,
+ bottom=0pt,
+ left=0pt,
+ right=0pt,
+ nobeforeafter,
+ frame code={%
+ \path[fill=tcbcolback]
+ (frame.north west) --
+ (frame.north east) {[rounded corners=5pt]--
+ (frame.south east)} --
+ (frame.south west) --
+ cycle;
+ }]%
+ {#2~\thetcbcounter}%
+ }
+ {\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{#1}\getCustomBoxedTitle}
+ }
+}
+
+%% ==============================================================================
+%% Custom Newtcbtheorem Implementation
+%% ==============================================================================
+
+\ExplSyntaxOn
+\NewDocumentCommand{\mynewtcbtheorem}{O{}mmmm}{%
+ \newtcbtheorem[#1]{#2inner}{#3}{#4}{#5}
+ \NewDocumentEnvironment{#2}{O{}}{%
+ \keys_set:nn { custom/tcb } { ##1 }
+ \tl_if_empty:NTF \l__custom_tcb_options_tl {%
+ \use:x {
+ \exp_not:N \begin{#2inner}
+ {\tl_if_empty:NTF \l__custom_tcb_title_tl
+ { }
+ { (\exp_not:V \l__custom_tcb_title_tl) }
+ }
+ {\exp_not:V \l__custom_tcb_label_tl}
+ }
+ }{%
+ \use:x {
+ \exp_not:N \begin{#2inner}
+ [\exp_not:V \l__custom_tcb_options_tl]
+ {\tl_if_empty:NTF \l__custom_tcb_title_tl
+ { }
+ { (\exp_not:V \l__custom_tcb_title_tl) }
+ }
+ {\exp_not:V \l__custom_tcb_label_tl}
+ }
+ }
+ }{%
+ \end{#2inner}
+ }
+
+ \NewDocumentEnvironment{#2*}{O{}}{%
+ \keys_set:nn { custom/tcb } { ##1 }
+ \tl_if_empty:NTF \l__custom_tcb_options_tl {%
+ \use:x {
+ \exp_not:N \begin{#2inner*}
+ {\tl_if_empty:NTF \l__custom_tcb_title_tl
+ { }
+ { (\exp_not:V \l__custom_tcb_title_tl) }
+ }
+ {}
+ }
+ }{%
+ \use:x {
+ \exp_not:N \begin{#2inner*}
+ [\exp_not:V \l__custom_tcb_options_tl]
+ {\tl_if_empty:NTF \l__custom_tcb_title_tl
+ { }
+ { (\exp_not:V \l__custom_tcb_title_tl) }
+ }
+ {}
+ }
+ }
+ }{%
+ \end{#2inner*}
+ }
+ \cs_if_exist:cF { c@#5} { \newcounter{#5} }
+}
+
+\keys_define:nn { custom/tcb } {
+ title .tl_set:N = \l__custom_tcb_title_tl,
+ label .tl_set:N = \l__custom_tcb_label_tl,
+ colback .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { colback=#1, },
+ colframe .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { colframe=#1, },
+ coltitle .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { coltitle=#1, },
+ fonttitle .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { fonttitle=#1, },
+ line~width .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { line~width=#1, },
+ frame~style .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { frame~style=#1, },
+ arc .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { arc=#1, },
+ frame~hidden .code:n = \tl_put_right:Nn \l__custom_tcb_options_tl { frame~hidden, },
+ sharp~corners .code:n = \tl_put_right:Nn \l__custom_tcb_options_tl { sharp~corners, },
+ rounded~corners .code:n = \tl_put_right:Nn \l__custom_tcb_options_tl { rounded~corners, },
+ unknown .code:n = \tl_put_right:Nx \l__custom_tcb_options_tl { #1, },
+}
+\ExplSyntaxOff
+
+% Title Content Formatters
+\NewDocumentCommand{\neo@theorem@title}{mm}{%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{#1}#2~\thetcbcounter
+}
+
+\NewDocumentCommand{\neo@exercise@title}{}{%
+ \sffamily\GetExerciseName~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{\enskip\GetExerciseProperty{subtitle}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\XSIMtranslate{point}}{\XSIMtranslate{points}})%
+ }%
+}
+
+\AtBeginDocument{%
+ \ifneo@french
+ \DeclareExerciseTranslation{french}{point}{point}
+ \DeclareExerciseTranslation{french}{points}{points}
+ \DeclareExerciseTranslation{french}{point-short}{pt}
+ \DeclareExerciseTranslation{french}{points-short}{pts}
+ \else\ifneo@german
+ \DeclareExerciseTranslation{german}{point}{Punkt}
+ \DeclareExerciseTranslation{german}{points}{Punkte}
+ \DeclareExerciseTranslation{german}{point-short}{Pkt}
+ \DeclareExerciseTranslation{german}{points-short}{Pkt}
+ \else
+ \DeclareExerciseTranslation{english}{point}{point}
+ \DeclareExerciseTranslation{english}{points}{points}
+ \DeclareExerciseTranslation{english}{point-short}{pt}
+ \DeclareExerciseTranslation{english}{points-short}{pts}
+ \fi\fi
+}
+
+%% ==============================================================================
+%% Theorem Types Implementation
+%% ==============================================================================
+
+\NewDocumentCommand{\neweleganttheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ neo@shared@elegant={#4},
+ coltitle=#4,
+ fontupper={#7},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newslantedtheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ neo@shared@slanted={#4},
+ before upper*={%
+ \hspace*{-1.5mm}
+ \tcbox[enhanced,
+ colupper=white,
+ colback=#4,
+ fontupper=\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname,
+ size=small,
+ baseline=3pt,
+ left=0pt,
+ right=0pt,
+ bottom=0pt,
+ nobeforeafter,
+ frame code={%
+ \path[fill=tcbcolback] (frame.north west)
+ -- ([xshift=2mm]frame.north east)
+ -- (frame.south east)
+ -- (frame.south west)
+ -- (frame.north west)
+ [sharp corners]-- cycle;
+ }]
+ {#3~\thetcbcounter}
+ {\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{#4}\getCustomSlantedTitle}
+ },
+ fontupper={#7},
+ before lower={#6},
+ #8,
+}{#5}
+}
+
+\NewDocumentCommand{\newshadedtheorem}{O{}mmmmmmO{}}{%
+\expandafter\def\csname neo@titledrawcolor@#2\endcsname{#4}
+\ifneo@noframe\expandafter\def\csname neo@titledrawcolor@#2\endcsname{white}\fi
+\mynewtcbtheorem[#1]{#2}{\vspace*{0.35em}#3}{%
+ neo@shared@shaded={#4}{#2},
+ coltitle=#4,
+ fontupper={#7},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newsobertheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ neo@shared@sober={#4},
+ before upper={\tcbtitle\enskip},
+ coltitle=#4,
+ fontupper={#7},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newclassictheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ neo@shared@classic={#4},
+ title={#3},
+ fontupper={#7},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newclassytheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ neo@shared@classy={#4},
+ title={#3},
+ fontupper={#7},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newboxedtheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ neo@shared@boxed={#4}{#3},
+ fontupper={#7},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newamstheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ enhanced,
+ breakable,
+ frame hidden,
+ colback=white,
+ coltitle={#4},
+ left=0pt, right=0pt,
+ top=0pt, bottom=0pt,
+ boxsep=0pt,
+ detach title,
+ separator sign={},
+ before upper={\tcbtitle\enskip},
+ before skip=\baselineskip,
+ after skip=\baselineskip,
+ fontupper={#7},
+ fonttitle={\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newamsremarktheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ enhanced,
+ breakable,
+ frame hidden,
+ colback=white,
+ coltitle={#4},
+ left=0pt, right=0pt,
+ top=0pt, bottom=0pt,
+ boxsep=0pt,
+ detach title,
+ before upper={{\color{remarkColor}\csname\neoschool@headweight\endcsname\itshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headshape\endcsname #3\enskip\textemdash}\enskip},
+ before skip=.5\baselineskip,
+ after skip=.5\baselineskip,
+ fontupper={#7},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newamsremarkstheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ enhanced,
+ breakable,
+ frame hidden,
+ colback=white,
+ coltitle={#4},
+ left=0pt, right=0pt,
+ top=0pt, bottom=0pt,
+ boxsep=0pt,
+ detach title,
+ before upper={{\color{remarkColor}\csname\neoschool@headweight\endcsname\itshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headshape\endcsname #3}\enskip},
+ before skip=.5\baselineskip,
+ after skip=.5\baselineskip,
+ fontupper={#7},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newamsexampletheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ enhanced,
+ breakable,
+ frame hidden,
+ colback=white,
+ coltitle={#4},
+ left=0pt, right=0pt,
+ top=0pt, bottom=0pt,
+ boxsep=0pt,
+ detach title,
+ separator sign={},
+ before upper={\tcbtitle\enskip},
+ before skip=.5\baselineskip,
+ after skip=.5\baselineskip,
+ fontupper={#7},
+ fonttitle={\normalshape\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname},
+ before lower={#6},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\newamsexamplestheorem}{O{}mmmmmmO{}}{%
+\mynewtcbtheorem[#1]{#2}{#3}{%
+ enhanced,
+ breakable,
+ frame hidden,
+ colback=white,
+ coltitle={#4},
+ left=0pt, right=0pt,
+ top=0pt, bottom=0pt,
+ boxsep=0pt,
+ detach title,
+ before upper={{\color{exampleColor}\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname #3}\enskip},
+ before skip=.5\baselineskip,
+ after skip=.5\baselineskip,
+ fontupper={#7},
+ #8
+}{#5}
+}
+
+\NewDocumentCommand{\neo@declarespecialtheorem}{m m}{%
+ \ifstrequal{#1}{remark}{%
+ \newamsremarktheorem{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ }{%
+ \ifstrequal{#1}{remarks}{%
+ \newamsremarkstheorem{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ }{%
+ \ifstrequal{#1}{examples}{%
+ \newamsexamplestheorem{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ }{%
+ \ifneoschool@sectionthmcounter
+ \ifneoschool@sharedthmcounter
+ \newamsexampletheorem[number within=section, use counter = thmcounter]{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ \else
+ \newamsexampletheorem[number within=section]{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ \fi
+ \else
+ \ifneoschool@sharedthmcounter
+ \newamsexampletheorem[use counter = thmcounter]{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ \else
+ \newamsexampletheorem{#1}{\csname neo@#1name\endcsname}{#2}{#1}{}{\normalfont}
+ \fi
+ \fi
+ }%
+ }%
+ }%
+}
+
+\neo@declarespecialtheorem{remark}{remarkColor}
+\neo@declarespecialtheorem{remarks}{remarkColor}
+\neo@declarespecialtheorem{example}{exampleColor}
+\neo@declarespecialtheorem{examples}{exampleColor}
+
+%% ==============================================================================
+%% Theorem Declaration Command
+%% ==============================================================================
+
+\NewDocumentCommand{\neo@declaretheorem}{O{}mmmmmmO{}}{%
+% #1 = additional options
+% #2 = environment name (theorem, definition, etc.)
+% #3 = title (\neo@theoremname, etc.)
+% #4 = color
+% #5 = reference name (thm, def, etc.)
+% #6 = text before proof
+% #7 = text style (\itshape or not)
+% #8 = additional options
+
+% Handle options
+\def\neo@thmoptions{#1}
+
+% Section numbering
+\ifneoschool@sectionthmcounter
+ \edef\neo@thmoptions{number within=section,\neo@thmoptions}
+\fi
+
+% Counter handling
+\ifneoschool@sharedthmcounter
+ \edef\neo@thmoptions{use counter=thmcounter,\neo@thmoptions}
+\else
+ \ifneoschool@thmgroupcounter
+ \ifboolexpr{
+ test {\ifstrequal{#2}{theorem}} or
+ test {\ifstrequal{#2}{lemma}} or
+ test {\ifstrequal{#2}{proposition}} or
+ test {\ifstrequal{#2}{corollary}} or
+ test {\ifstrequal{#2}{property}}
+ }{%
+ \edef\neo@thmoptions{use counter=thmcounter,\neo@thmoptions}
+ }{%
+ \edef\neo@thmoptions{\neo@thmoptions}
+ }
+ \else
+ \edef\neo@thmoptions{\neo@thmoptions}
+ \fi
+\fi
+
+% Style selection based on class options
+\ifneo@slantedthm
+ \expandafter\newslantedtheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+\else
+ \ifneo@soberthm
+ \expandafter\newsobertheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \else
+ \ifneo@elegantthm
+ \expandafter\neweleganttheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \else
+ \ifneo@shadedthm
+ \expandafter\newshadedtheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \else
+ \ifneo@classicthm
+ \expandafter\newclassictheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \else
+ \ifneo@classythm
+ \expandafter\newclassytheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \else
+ \ifneo@boxedthm
+ \expandafter\newboxedtheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \else
+ \ifneo@amslikethm
+ \expandafter\newamstheorem\expandafter[\neo@thmoptions]{#2}{#3}{#4}{#5}{#6}{#7}[#8]%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+\fi
+}
+
+%% ==============================================================================
+%% Theorem Environment Declarations
+%% ==============================================================================
+
+\newcounter{thmcounter}
+
+% Standard theorems
+\neo@declaretheorem{theorem}{\neo@theoremname}{theoremColor}{thm}{}{\itshape\color{\neoschool@globalcolor}}
+\neo@declaretheorem{definition}{\neo@definitionname}{definitionColor}{def}{}{\color{\neoschool@globalcolor}}
+\neo@declaretheorem{lemma}{\neo@lemmaname}{lemmaColor}{lem}{}{\itshape\color{\neoschool@globalcolor}}
+\neo@declaretheorem{proposition}{\neo@propositionname}{propositionColor}{propo}{}{\itshape\color{\neoschool@globalcolor}}
+\neo@declaretheorem{corollary}{\neo@corollaryname}{corollaryColor}{cor}{}{\itshape\color{\neoschool@globalcolor}}
+\neo@declaretheorem{conjecture}{\neo@conjecturename}{\neo@conjecturecolor}{conj}{}{\itshape\color{\neoschool@globalcolor}}
+\neo@declaretheorem{property}{\neo@propertyname}{propertyColor}{prop}{}{\itshape\color{\neoschool@globalcolor}}
+
+% Activity-related theorems
+\neo@declaretheorem{activity}{\neo@activityname}{activityColor}{act}{}{\color{\neoschool@globalcolor}}
+\neo@declaretheorem{method}{\neo@methodname}{methodColor}{meth}{}{\color{\neoschool@globalcolor}}
+\neo@declaretheorem{application}{\neo@applicationname}{applicationColor}{appl}{}{\color{\neoschool@globalcolor}}
+
+%% ==============================================================================
+%% Exercise Common Elements
+%% ==============================================================================
+
+% QCM Environment Setup
+\DeclareExerciseEnvironmentTemplate{item}
+{\description\item[\GetExerciseProperty{counter}]}
+{\enddescription}
+
+% Multiple Choice Elements
+\DeclareRobustCommand{\neocolorcirc}[2]{%
+ \begin{tikzpicture}[baseline=-1.25mm]
+ \draw[#1,fill=#2] (0.5,0) circle (.75ex);
+ \end{tikzpicture}
+}
+
+\newcommand{\neocheckbox}{$\square$}
+\newcommand{\neochecksol}{$\blacksquare$}
+\newcommand{\neocheckcirc}{\neocolorcirc{black}{white}}
+
+% Task Environments
+\NewTasksEnvironment[%
+ label = \neocheckcirc,
+ label-width = 12pt,
+ item-indent = 3.5em,
+]{choices}[\choice]
+
+\NewTasksEnvironment[%
+ label = \neocheckbox,
+ label-width = 12pt,
+ item-indent = 3.5em,
+]{checkboxes}[\checkbox]
+
+% Shuffle Implementation for Tasks
+\ifneo@shuffle
+ \ExplSyntaxOn
+ \cs_set_protected:Npn \tasks_environment:nnnn #1#2#3#4
+ {
+ \bool_if:NT \l__tasks_debug_bool { \dim_set:Nn \fboxsep {0pt} }
+ \seq_set_split:Nnn \l__tasks_seq {#3} {#4}
+ \seq_pop_left:NN \l__tasks_seq \l__tasks_tmpa_tl
+ \seq_shuffle:N \l__tasks_seq
+ \tl_if_blank:VF \l__tasks_tmpa_tl
+ { \msg_warning:nnVn {tasks}{no-item} \l__tasks_tmpa_tl {#3} }
+ \int_gset:Nn \g__tasks_total_items_int
+ { \seq_count:N \l__tasks_seq }
+ \UseInstance {tasks} {#1}
+ { \g__tasks_total_items_int }
+ {#2}
+ { }
+ \seq_clear:N \l__tasks_seq
+ }
+ \ExplSyntaxOff
+\fi
+
+% Correct Answer Command
+\NewDocumentCommand{\correct}{s}{%
+ \IfBooleanTF#1
+ {\ifneoschool@answers\neochecksol\else\neocheckbox\fi}
+ {\ifneoschool@answers\neocolorcirc{black}{black}\else\neocheckcirc\fi}%
+}
+
+%% ==============================================================================
+%% Exercise Base Box Styles
+%% ==============================================================================
+
+% Base box style
+\tcbset{%
+ neo@base/.style={%
+ enhanced,
+ breakable,
+ fontupper=\color{\neoschool@globalcolor},
+ before skip=\baselineskip,
+ after skip=\baselineskip,
+ colupper=\neo@tcbcolupper,
+ colframe=\neoschool@headcolor,
+ colbacklower=\neo@tcbcolbacklower
+ },
+ % Title base style
+ neo@title@base/.style={%
+ title={\sffamily\GetExerciseName~\GetExerciseProperty{counter}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}
+ \IfExercisePropertySetT{subtitle}{ \GetExerciseProperty{subtitle}}
+ \IfExercisePropertySetT{points}{%
+ \enskip(%
+ \GetExerciseProperty{points}
+ \IfExerciseGoalSingularTF{points}
+ {~\XSIMtranslate{point}}
+ {~\XSIMtranslate{points}}
+ )
+ }
+ }
+ }
+}
+
+%% Box Appearance Styles
+\tcbset{%
+ % Basic box style
+ neo@box@base/.style={%
+ enhanced,
+ breakable,
+ fontupper=\color{\neoschool@globalcolor},
+ colupper=\neo@tcbcolupper,
+ colframe=\neoschool@headcolor,
+ colbacklower=\neo@tcbcolbacklower,
+ before skip=\baselineskip,
+ after skip=\baselineskip,
+ left=1mm,
+ right=1mm
+ },
+ % Basic title style
+ neo@title@basic/.style={%
+ title={\neo@boxtitle@content},
+ fonttitle=\bfseries\sffamily
+ },
+ % Colored title style
+ neo@title@colored/.style={%
+ neo@title@basic,
+ coltitle=white,
+ colbacktitle=tcbcolframe
+ },
+ % Basic frame style
+ neo@frame@basic/.style={%
+ colframe=exerciseColor,
+ colback=\neo@tcbcolback
+ },
+ % Hidden frame style
+ neo@frame@hidden/.style={%
+ frame hidden,
+ colframe=exerciseColor!12,
+ colback=white
+ }
+}
+
+%% Corner Styles
+\tcbset{%
+ % Sharp corners
+ neo@corners@sharp/.style={%
+ sharp corners
+ },
+ % Rounded corners
+ neo@corners@rounded/.style={%
+ rounded corners,
+ arc=\neoschool@boxarc
+ }
+}
+
+%% Background Styles
+\tcbset{%
+ % Light background
+ neo@bg@light/.style={%
+ colback=white,
+ colbacktitle=exerciseColor!12
+ },
+ % Shaded background
+ neo@bg@shaded/.style={%
+ colback=exerciseColor!5!white,
+ colbacktitle=exerciseColor!12
+ },
+ % Gradient background
+ neo@bg@gradient/.style={%
+ interior style={%
+ top color=white,
+ bottom color=exerciseColor!5!white
+ }
+ }
+}
+
+%% Title Position Styles
+\tcbset{%
+ % Attached title
+ neo@title@attached/.style={%
+ attach boxed title to top left={
+ yshift*=-\tcboxedtitleheight
+ },
+ boxed title style={%
+ sharp corners,
+ rounded corners=northwest,
+ colback=tcbcolframe,
+ boxrule=0pt
+ }
+ },
+ % Detached title
+ neo@title@detached/.style={%
+ detach title,
+ before upper={\tcbtitle\enskip}
+ }
+}
+
+%% Special Elements
+\tcbset{%
+ % Left rule
+ neo@rule@left/.style={%
+ leftrule=3mm
+ },
+ % Basic border
+ neo@border@basic/.style={%
+ boxrule=0.5pt
+ },
+ % Colored border
+ neo@border@colored/.style 2 args={%
+ borderline west={#1}{#2}{tcbcolframe}
+ },
+ % Shadow effect
+ neo@effect@shadow/.style={%
+ drop fuzzy shadow
+ }
+}
+
+%% Color Schemes
+\tcbset{%
+ % Standard color scheme
+ neo@colors@standard/.style={%
+ colframe=exerciseColor,
+ colback=white,
+ colbacktitle=exerciseColor
+ }
+}
+
+%% Solution Style Setup
+\NewDocumentCommand\neo@box@solution{}{%
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{tcbcolframe}\neo@solutionname~\neo@solutiongaptext}\enskip
+}
+
+\tcbset{%
+ neo@solution@basic/.style={%
+ before lower={\neo@box@solution}
+ }
+}
+
+%% Box Title Content
+\newcommand{\neo@boxtitle@content}{%
+ \sffamily\GetExerciseName~\GetExerciseProperty{counter}
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }
+ \IfExercisePropertySetT{subtitle}{ \GetExerciseProperty{subtitle}}\enskip
+ \IfExercisePropertySetT{points}{%
+ (\GetExerciseProperty{points}
+ \IfExerciseGoalSingularTF{points}
+ {~\XSIMtranslate{point}}
+ {~\XSIMtranslate{points}})
+ }
+}
+
+%% Exercise Properties and Tagging
+\ExplSyntaxOn
+\newcommand*\neo@replicate{\prg_replicate:nn}
+\ExplSyntaxOff
+
+\DeclareExerciseTagging{level}
+\DeclareExerciseTagging{grade}
+\DeclareExerciseTagging{topic}
+\DeclareExerciseTagging{subject}
+
+%% ==============================================================================
+%% Basic Exercise Box Templates
+%% ==============================================================================
+
+\DeclareExerciseProperty{icon}
+
+\newcommand{\neo@exerciseicon}{%
+ \ifneo@exerciseicons
+ \IfExercisePropertySetTF{icon}{%
+ \faIcon{\GetExerciseProperty{icon}}\hspace{5pt}%
+ }{%
+ \faIcon{book}\hspace{5pt}%
+ }%
+ \fi
+}
+
+% Standard Box Template
+\DeclareExerciseEnvironmentTemplate{box}{%
+ \begin{tcolorbox}[%
+ neo@box@base,
+ skin=bicolor,
+ neo@frame@basic,
+ neo@corners@sharp,
+ neo@rule@left,
+ neo@title@basic
+ ]
+ {%
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{exerciseColor}
+ {\small\neo@exerciseicon}\enskip
+ \MakeUppercase{%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }
+ }
+ \GetExercisePropertyT{subtitle}{\;(\textit{#1})}
+ {\color{exerciseColor}
+ \IfExercisePropertySetT{points}{\enskip%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}
+ \IfExerciseGoalSingularTF{points}
+ {~\XSIMtranslate{point}}
+ {~\XSIMtranslate{points}}
+ \enskip\enskip\textemdash{}
+ }
+ }
+ }
+ \enskip
+ }{\end{tcolorbox}}
+
+% No Frame Box Template
+\DeclareExerciseEnvironmentTemplate{noframe-box}{%
+ \begin{tcolorbox}[%
+ neo@box@base,
+ neo@frame@hidden,
+ neo@title@basic
+ ]
+ }{\end{tcolorbox}}
+
+%% ==============================================================================
+%% Advanced Box Templates
+%% ==============================================================================
+
+% Elegant Box Template
+\DeclareExerciseEnvironmentTemplate{elegant-box}{%
+ \begin{tcolorbox}[
+ neo@shared@elegant={exerciseColor},
+ title={%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{exerciseColor}
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~\XSIMtranslate{point}}{~\XSIMtranslate{points}})%
+ }%
+ }
+ ]
+ }{\end{tcolorbox}}
+
+% Shaded Box Template
+\DeclareExerciseEnvironmentTemplate{shaded-box}{%
+ \expandafter\def\csname neo@titledrawcolor@exercise\endcsname{exerciseColor}
+ \ifneo@noframe
+ \expandafter\def\csname neo@titledrawcolor@exercise\endcsname{white}
+ \fi
+ \begin{tcolorbox}[
+ neo@shared@shaded={exerciseColor}{exercise},
+ left=0.65em,
+ right=0.65em,
+ coltitle=exerciseColor,
+ title={%
+ \vspace*{0.35em}%
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{exerciseColor}%
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~\XSIMtranslate{point}}{~\XSIMtranslate{points}})%
+ }%
+ }
+ ]
+ }{\end{tcolorbox}}
+
+% Slanted Box Template
+\DeclareExerciseEnvironmentTemplate{slanted-box}{%
+ \begin{tcolorbox}[
+ neo@shared@slanted={exerciseColor},
+ before upper*={%
+ \hspace*{-1.5mm}
+ \tcbox[enhanced,
+ colupper=white,
+ colback=exerciseColor,
+ fontupper=\upshape\bfseries,
+ size=small,
+ baseline=3pt,
+ after skip=1em,
+ top=0pt,
+ left=0pt,
+ right=0pt,
+ bottom=0pt,
+ nobeforeafter,
+ frame code={%
+ \path[fill=tcbcolback] (frame.north west)
+ -- ([xshift=2mm]frame.north east)
+ -- (frame.south east)
+ -- (frame.south west)
+ -- (frame.north west)
+ [sharp corners]-- cycle;
+ }
+ ]{\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ }
+ }
+ ]
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}{%
+ \;[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{{\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~\XSIMtranslate{point}}{~\XSIMtranslate{points}})%
+ }%
+ }\;%
+ }{\end{tcolorbox}}
+
+% Sober Box Template
+\DeclareExerciseEnvironmentTemplate{sober-box}{%
+ \begin{tcolorbox}[
+ neo@shared@sober={exerciseColor},
+ before upper={\tcbtitle\enskip},
+ coltitle=exerciseColor,
+ title={%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~\XSIMtranslate{point}}{~\XSIMtranslate{points}})%
+ }%
+ }
+ ]
+ }{\end{tcolorbox}}
+
+% Classic Box Template
+\DeclareExerciseEnvironmentTemplate{classic-box}{%
+ \begin{tcolorbox}[
+ neo@shared@classic={exerciseColor},
+ title={%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{white}
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~\XSIMtranslate{point}}{~\XSIMtranslate{points}})%
+ }%
+ }
+ ]
+ }{\end{tcolorbox}}
+
+% Classy Box Template
+\DeclareExerciseEnvironmentTemplate{classy-box}{%
+ \begin{tcolorbox}[
+ neo@shared@classy={exerciseColor},
+ title={%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{white}
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~\XSIMtranslate{point}}{~\XSIMtranslate{points}})%
+ }%
+ }
+ ]
+ }{\end{tcolorbox}}
+
+% Rect and Num box Templates
+\DeclareExerciseEnvironmentTemplate{rect-box}{%
+ \begin{tcolorbox}[
+ enhanced,
+ skin=bicolor,
+ sharp corners,
+ \neo@framehidden,
+ coltitle=white,
+ colframe=exerciseColor,
+ colback=\neo@tcbcolback,
+ colupper=\neoschool@globalcolor,
+ fonttitle=\csname\neoschool@headweight\endcsname,
+ fontupper=\color{\neoschool@globalcolor},
+ left=\neo@leftpadding,
+ right=\neo@rightpadding,
+ after skip=\neo@afterskip,
+ before skip=\neo@beforeskip,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=white,
+ colback=exerciseColor,
+ fontupper=\csname\neoschool@headweight\endcsname,
+ size=small,
+ baseline=3pt,
+ top=0pt,
+ bottom=0pt,
+ left=0pt,
+ right=0pt,
+ nobeforeafter,
+ frame code={%
+ \path[fill=tcbcolback]
+ (frame.north west) --
+ (frame.north east) {[rounded corners=5pt]--
+ (frame.south east)} --
+ (frame.south west) --
+ cycle;
+ }]%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ }%
+ }
+ ]%
+ {
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\;[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point}{\,points})\;%
+ }%
+ }
+ \!%
+ }{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{rect-box-outlined}{%
+ \begin{tcolorbox}[
+ enhanced,
+ skin=bicolor,
+ sharp corners,
+ \neo@framehidden,
+ coltitle=exerciseColor,
+ colframe=exerciseColor,
+ colback=white,
+ colupper=\neoschool@globalcolor,
+ fonttitle=\csname\neoschool@headweight\endcsname,
+ fontupper=\color{\neoschool@globalcolor},
+ left=\neo@leftpadding,
+ right=\neo@rightpadding,
+ after skip=\neo@afterskip,
+ before skip=\neo@beforeskip,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=exerciseColor,
+ colback=white,
+ colframe=exerciseColor,
+ fontupper=\csname\neoschool@headweight\endcsname,
+ size=small,
+ baseline=3pt,
+ top=0pt,
+ bottom=0pt,
+ left=1pt,
+ right=1pt,
+ nobeforeafter,
+ ]%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ }%
+ }
+ ]%
+ { \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point-short}{\,points-short})%
+ }%
+ }\enskip
+ }{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{num-box}{%
+ \begin{tcolorbox}[
+ enhanced,
+ skin=bicolor,
+ sharp corners,
+ before skip=-.25\baselineskip,
+ after skip=-.25\baselineskip,
+ frame hidden,
+ colframe=\neoschool@headcolor,
+ colback=white,
+ colupper=\neoschool@globalcolor,
+ fontupper=\color{\neoschool@globalcolor},
+ enlarge left by=-.5\leftmargin,
+ enlarge right by=-.5\rightmargin,
+ width=\textwidth+\leftmargin+\rightmargin,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=white,
+ colback=\neoschool@headcolor,
+ fontupper=\csname\neoschool@headweight\endcsname,
+ size=small,
+ baseline=4pt,
+ top=1pt,
+ bottom=1pt,
+ left=1pt,
+ right=1pt,
+ nobeforeafter,
+ frame code={%
+ \path[fill=tcbcolback] (frame.north west) -- (frame.north east)
+ -- (frame.south east) -- (frame.south west) -- cycle;
+ }]%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ {\small\neo@exerciseicon}%
+ \GetExerciseProperty{counter}%
+ }%
+ }
+ ]%
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \;(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point-short}{\,points-short})%
+ }%
+ }%
+ \enskip
+ }{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{num-box-outlined}{%
+ \begin{tcolorbox}[
+ enhanced,
+ skin=bicolor,
+ sharp corners,
+ before skip=-.25\baselineskip,
+ after skip=-.25\baselineskip,
+ colframe=exerciseColor,
+ colback=white,
+ colupper=\neoschool@globalcolor,
+ fontupper=\color{\neoschool@globalcolor},
+ enlarge left by=-.5\leftmargin,
+ enlarge right by=-.5\rightmargin,
+ width=\textwidth+\leftmargin+\rightmargin,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=exerciseColor,
+ colback=white,
+ colframe=exerciseColor,
+ fontupper=\csname\neoschool@headweight\endcsname,
+ size=small,
+ baseline=4pt,
+ top=1pt,
+ bottom=1pt,
+ left=1pt,
+ right=1pt,
+ nobeforeafter,
+ ]%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ {\small\neo@exerciseicon}%
+ \GetExerciseProperty{counter}%
+ }%
+ }
+ ]%
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \;(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point-short}{\,points-short})%
+ }%
+ }%
+ \enskip
+ }{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{ex-num-box}{%
+ \begin{tcolorbox}[
+ enhanced,
+ skin=bicolor,
+ sharp corners,
+ before skip=-.25\baselineskip,
+ after skip=-.25\baselineskip,
+ frame hidden,
+ colframe=\neoschool@headcolor,
+ colback=white,
+ colupper=\neoschool@globalcolor,
+ fontupper=\color{\neoschool@globalcolor},
+ enlarge left by=-.5\leftmargin,
+ enlarge right by=-.5\rightmargin,
+ width=\textwidth+\leftmargin+\rightmargin,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=white,
+ colback=\neoschool@headcolor,
+ fontupper=\csname\neoschool@headweight\endcsname,
+ size=small,
+ baseline=4pt,
+ top=1pt,
+ bottom=1pt,
+ left=1pt,
+ right=1pt,
+ nobeforeafter,
+ frame code={%
+ \path[fill=tcbcolback] (frame.north west) -- (frame.north east)
+ -- (frame.south east) -- (frame.south west) -- cycle;
+ }]%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ {\small\neo@exerciseicon}%
+ Ex.~\GetExerciseProperty{counter}%
+ }%
+ }
+ ]%
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \;(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point-short}{\,points-short})%
+ }%
+ }%
+ \enskip
+ }{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{ex-num-box-outlined}{%
+ \begin{tcolorbox}[
+ enhanced,
+ skin=bicolor,
+ sharp corners,
+ before skip=-.25\baselineskip,
+ after skip=-.25\baselineskip,
+ colframe=exerciseColor,
+ colback=white,
+ colupper=\neoschool@globalcolor,
+ fontupper=\color{\neoschool@globalcolor},
+ enlarge left by=-.5\leftmargin,
+ enlarge right by=-.5\rightmargin,
+ width=\textwidth+\leftmargin+\rightmargin,
+ before upper*={%
+ \tcbox[enhanced,
+ colupper=exerciseColor,
+ colback=white,
+ colframe=exerciseColor,
+ fontupper=\csname\neoschool@headweight\endcsname,
+ size=small,
+ baseline=4pt,
+ top=1pt,
+ bottom=1pt,
+ left=1pt,
+ right=1pt,
+ nobeforeafter,
+ ]%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ {\small\neo@exerciseicon}%
+ Ex.~\GetExerciseProperty{counter}%
+ }%
+ }
+ ]%
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\itshape\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \;(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point-short}{\,points-short})%
+ }%
+ }%
+ \enskip
+ }{\end{tcolorbox}}
+
+%%% Chevrons for Rules
+
+\newcommand{\lchevrons}{%
+ \begin{tikzpicture}[scale=0.1, baseline=0.2mm, line width=1.2pt]
+ \draw (0,0) -- (-1,1.25) -- (0,2.5);
+ \draw (2,0) -- (1,1.25) -- (2,2.5);
+ \draw (4,0) -- (3,1.25) -- (4,2.5);
+ \end{tikzpicture}%
+}
+
+\newcommand{\lcircle}{%
+ \begin{tikzpicture}[scale=1, baseline=-1mm, line width=1.2pt]
+ \draw (0,0) circle (3pt);
+ \end{tikzpicture}%
+}
+
+%%% Horizontal Rule with Boxed Title
+
+\DeclareExerciseEnvironmentTemplate{box-hrule}{%
+ \par\vspace{3.25ex plus 1ex minus .2ex}
+ \Needspace*{3\baselineskip}%
+ \noindent
+ {\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ \tcbox[on line,boxsep=-2pt,boxrule=0.4pt,left=7pt,right=7pt,colframe=exerciseColor,colback=exerciseColor,sharp corners, rounded corners = southeast]{\color{white}{\small\neo@exerciseicon}\XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}}%
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}{{\itshape\enskip{\PropertyValue}\enskip}}%
+ }%
+ \hspace{-1pt}\xrfill[.085cm]{1.2pt}[exerciseColor]\hspace{-1pt}%
+ {\color{exerciseColor}\footnotesize\lchevrons}%
+ {%
+ \IfExercisePropertySetT{points}{\bfseries\color{exerciseColor}\enskip%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}%
+ \IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ \par\vspace{1.5ex plus .2ex}
+ \@afterindentfalse\@afterheading
+}{}
+
+%%% Horizontal Rule with Boxed Title - Outlined
+
+\DeclareExerciseEnvironmentTemplate{box-hrule-out}{%
+ \par\vspace{3.25ex plus 1ex minus .2ex}
+ \Needspace*{3\baselineskip}%
+ {\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\tcbox[on line,boxsep=-2pt,boxrule=1.2pt,left=7pt,right=7pt,colframe=exerciseColor,colback=white,sharp corners,
+ rounded corners = east,arc=5pt
+ ]{\color{exerciseColor}{\small\neo@exerciseicon}\XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}}%
+ \color{exerciseColor}%
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}{{\itshape\enskip{\PropertyValue}}}%
+ }%
+ \hspace{-1pt}\xrfill[.085cm]{1.2pt}[exerciseColor]\hspace{-1pt}%
+ % \!\!{\color{exerciseColor}\small\lcircle}%
+ {\color{exerciseColor}\footnotesize\lchevrons}%
+ {\bfseries\color{exerciseColor}%
+ \IfExercisePropertySetT{points}{\enskip%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}%
+ \IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }%
+ }%
+ }%
+ \par\vspace{1.5ex plus .2ex}
+ \@afterindentfalse\@afterheading
+}{}
+
+\DeclareExerciseEnvironmentTemplate{box-hrule-in}{%
+ \par\vspace{3.25ex plus 1ex minus .2ex}
+ \Needspace*{3\baselineskip}%
+ \noindent
+ {\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{exerciseColor}%
+ \tcbox[on line,boxsep=-2pt,boxrule=1.2pt,left=7pt,right=7pt,colframe=exerciseColor,colback=white,sharp corners,
+ rounded corners = west,arc=5pt
+ ]{\color{exerciseColor}{\small\neo@exerciseicon}\XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}}%
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}{{\itshape\enskip{\PropertyValue}}}%
+ }%
+ \hspace{-1pt}\xrfill[.085cm]{1.2pt}[exerciseColor]\hspace{-1pt}%
+ {\color{exerciseColor}\small\lcircle}%
+ {\bfseries\color{exerciseColor}%
+ \IfExercisePropertySetT{points}{\enskip%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}%
+ \IfExerciseGoalSingularTF{points}
+ {\XSIMtranslate{point}}
+ {\XSIMtranslate{points}}%
+ }}}%
+ \par\vspace{1.5ex plus .2ex}
+ \@afterindentfalse\@afterheading
+}{}
+
+%%% Boxed Title
+
+\DeclareExerciseEnvironmentTemplate{boxed}{%
+ \par\vspace{2ex plus .5ex minus .1ex}%
+ \noindent
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \tcbox[
+ on line,
+ boxsep=-3pt,
+ left=7pt,
+ right=7pt,
+ colframe=exerciseColor,
+ colback=exerciseColor,
+ sharp corners,
+ rounded corners = southeast,
+ ]{%
+ \color{white}{\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ }%
+ }%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\hspace{5pt}[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point}{\,points})%
+ }%
+ }%
+ \hspace{2pt}
+}{}
+
+%%% Boxed Title - Outlined
+
+\DeclareExerciseEnvironmentTemplate{boxed-out}{%
+ \par\vspace{2ex plus .5ex minus .1ex}%
+ \noindent
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \tcbox[
+ on line,
+ boxrule=0.8pt,
+ boxsep=-3pt,
+ left=7pt,
+ right=7pt,
+ colframe=exerciseColor,
+ colback=white,
+ sharp corners,
+ rounded corners = southeast,
+ ]{%
+ \color{exerciseColor}{\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ }%
+ }%
+ {%
+ \csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \csname\neoschool@headshape\endcsname
+ \color{exerciseColor}
+ \IfExercisePropertySetT{level}
+ {\hspace{5pt}[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]}%
+ \IfExercisePropertySetT{subtitle}{{\enskip\GetExerciseProperty{subtitle}}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{\,point}{\,points})%
+ }%
+ }%
+ \hspace{2pt}
+}{}
+
+
+%% ==============================================================================
+%% Simple Style Templates
+%% ==============================================================================
+
+%% Common Style Settings
+\newcommand{\neo@startsection}[1]{%
+ \@startsection{paragraph}{4}{\z@}{0.25\baselineskip}{-1em}
+ {\csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname\color{#1}}
+}
+
+%% Inline Style
+%% ----------------------------------
+\DeclareExerciseEnvironmentTemplate{inline}{%
+ \neo@startsection{exerciseColor}
+ {%
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{\enskip%
+ [\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }%
+ \GetExercisePropertyT{subtitle}{{\enskip\normalfont\rmfamily\itshape\csname\neoschool@headweight\endcsname\PropertyValue}}%
+ \IfExercisePropertySetT{points}{\enskip(%
+ \GetExerciseProperty{points}%
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]}%
+ \IfExerciseGoalSingularTF{points}
+ {\;\XSIMtranslate{point})\!}
+ {\;\XSIMtranslate{points})\!}
+ }
+}
+\color{\neoschool@globalcolor}\hspace{-1em}
+}{\par\vspace{0.5\baselineskip}}
+
+
+%% Section Style
+%% ----------------------------------
+\DeclareExerciseEnvironmentTemplate{section}{%
+ \section*{%
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{\enskip%
+ [\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }%
+ \GetExercisePropertyT{subtitle}{{\:\itshape\PropertyValue}}%
+ \IfExercisePropertySetT{points}{\enskip(%
+ \GetExerciseProperty{points}%
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]}%
+ \IfExerciseGoalSingularTF{points}
+ {\;\XSIMtranslate{point})\!}
+ {\;\XSIMtranslate{points})\!}
+ }%
+ }%
+ \color{\neoschool@globalcolor}%
+}{\par\vspace{0.5\baselineskip}}
+
+% %% Terminal Style
+\DeclareExerciseEnvironmentTemplate{terminal}{%
+ \neo@startsection{exerciseColor}
+ {%
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}
+ \enskip{\small\faTerminal}
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }
+ \GetExercisePropertyT{subtitle}{{\enskip\PropertyValue}}
+ \IfExercisePropertySetT{points}{\enskip(%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}
+ \IfExerciseGoalSingularTF{points}
+ {~\XSIMtranslate{point})\!}
+ {~\XSIMtranslate{points})\!}
+ }
+}
+\color{\neoschool@globalcolor}\hspace{-2em}
+}{\par}
+
+%% Subsection Style
+\DeclareExerciseEnvironmentTemplate{subsection}{%
+ \subsection*{%
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}
+ \IfExercisePropertySetT{level}{%
+ ~[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}
+ {{~\normalfont\csname\neoschool@headweight\endcsname\itshape\PropertyValue}}
+ }{%
+ \IfExercisePropertySetT{points}{%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}
+ \IfExerciseGoalSingularTF{points}
+ {\hfill\XSIMtranslate{point}}
+ {\hfill\XSIMtranslate{points}}
+ }
+ }
+ }%
+}{\par}
+
+%% Block Style
+\DeclareExerciseEnvironmentTemplate{block}{%
+ \subsection*{%
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace
+ \GetExerciseProperty{counter}
+ \IfExercisePropertySetT{level}{%
+ ~[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]
+ }
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}
+ {{~\normalfont\csname\neoschool@headweight\endcsname\itshape\PropertyValue}}
+ }{%
+ \IfExercisePropertySetT{points}{%
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}
+ \IfExerciseGoalSingularTF{points}
+ {\hfill\XSIMtranslate{point}}
+ {\hfill\XSIMtranslate{points}}
+ }
+ }
+ }%
+ \vspace{-0.5em}
+}{%
+ \vspace{-1em}
+}
+
+%% ==============================================================================
+%% Horizontal Rule Style
+%% ==============================================================================
+
+\ifneo@amslikethm
+ \DeclareExerciseEnvironmentTemplate{hrule}{%
+ \par\vspace{2ex plus 0.5ex minus .1ex}
+ \Needspace*{3\baselineskip}
+ \noindent
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}\enskip
+ \IfExercisePropertySetT{level}{%
+ [\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]\enskip
+ }
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}{{{\normalfont\PropertyValue}\enskip}}
+ }
+ \xrfill[.075cm]{0.4pt}[exerciseColor]
+ {\color{exerciseColor}
+ \IfExercisePropertySetT{points}{\enskip
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}
+ \IfExerciseGoalSingularTF{points}
+ {~\XSIMtranslate{point}}
+ {~\XSIMtranslate{points}}
+ }
+ }
+ \par\vspace{1ex plus .1ex}
+ \@afterindentfalse\@afterheading
+ }{\par}
+\else
+ \DeclareExerciseEnvironmentTemplate{hrule}{%
+ \par\vspace{2ex plus 0.5ex minus .1ex}
+ \Needspace*{3\baselineskip}
+ \noindent
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ {\small\neo@exerciseicon}%
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}\enskip
+ \IfExercisePropertySetT{level}{%
+ [\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]\enskip
+ }
+ \IfInsideSolutionF{%
+ \GetExercisePropertyT{subtitle}{{({\PropertyValue})\enskip}}
+ }
+ \xrfill[.075cm]{1.2pt}[exerciseColor]
+ {\color{exerciseColor}
+ \IfExercisePropertySetT{points}{\enskip
+ \GetExerciseProperty{points}
+ \GetExercisePropertyT{bonus-points}{[+\printgoal{\PropertyValue}]\;}
+ \IfExerciseGoalSingularTF{points}
+ {~\XSIMtranslate{point}}
+ {~\XSIMtranslate{points}}
+ }
+ }
+ \par\vspace{1ex plus .1ex}
+ \@afterindentfalse\@afterheading
+ }{\par}
+\fi
+
+%% ==============================================================================
+%% Solution Box Configuration
+%% ==============================================================================
+
+% Solution box template
+\DeclareExerciseEnvironmentTemplate{sol-box}{%
+ \begin{tcolorbox}[%
+ enhanced,
+ breakable,
+ frame hidden,
+ before skip=0.5\baselineskip,
+ after skip=0.5\baselineskip,
+ left=0.75em,
+ right=0.5em,
+ boxsep=1ex,
+ colframe=solutionColor,
+ colback=solutionColor!5,
+ ]
+ {\color{solutionColor}
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ \XSIMmixedcase{\GetExerciseName}
+ \csname neo@solutiongaptext\endcsname
+ \GetExerciseProperty{counter}
+ }
+ }{\end{tcolorbox}}
+
+%% ==============================================================================
+%% Smart Boxes
+%% ==============================================================================
+\DeclareExerciseProperty{answer-type}
+
+\DeclareExerciseEnvironmentTemplate{smart-box}{%
+ \begin{tcolorbox}[%
+ neo@box@base,
+ neo@frame@basic,
+ neo@title@colored,
+ title={%
+ \raisebox{0pt}{\textcolor{white}{\small\neo@exerciseicon}}%
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ \XSIMmixedcase{\GetExerciseName}~\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{\enskip\GetExerciseProperty{subtitle}}%
+ \IfExercisePropertySetT{points}{%
+ \enskip(\GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}{~point}{~points})%
+ }%
+ }%
+ ]%
+ }{\end{tcolorbox}}
+
+\DeclareExerciseEnvironmentTemplate{minimal-ams}{%
+ \par\vspace{2ex plus 0.5ex minus .1ex}
+ \Needspace*{3\baselineskip}
+ \noindent
+ {%
+ {\small\neo@exerciseicon}
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{%
+ \enskip{\itshape\GetExerciseProperty{subtitle}}%
+ }%
+ \IfExercisePropertySetT{points}{%
+ \enskip(%
+ \GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}%
+ {~point}%
+ {~points}%
+ )%
+ }%
+ \enskip
+ }%
+}{\par\vspace{1ex plus .5ex}}
+
+\DeclareExerciseEnvironmentTemplate{rule-ams}{%
+ \par\vspace{2ex plus 0.5ex minus .1ex}
+ \Needspace*{3\baselineskip}
+ \noindent
+ {%
+ {\small\neo@exerciseicon}
+ \csname\neoschool@headstyle\endcsname\csname\neoschool@headweight\endcsname\csname\neoschool@headshape\endcsname
+ \XSIMmixedcase{\GetExerciseName}\nobreakspace\GetExerciseProperty{counter}%
+ \IfExercisePropertySetT{level}{%
+ \enskip[\raisebox{0.5pt}{$\neo@replicate{\GetExerciseProperty{level}}{{\star}}$}]%
+ }%
+ \IfExercisePropertySetT{subtitle}{%
+ \enskip{\itshape\GetExerciseProperty{subtitle}}%
+ }%
+ \IfExercisePropertySetT{points}{%
+ \enskip(%
+ \GetExerciseProperty{points}%
+ \IfExerciseGoalSingularTF{points}%
+ {~point}%
+ {~points}%
+ )%
+ }%
+ \enskip
+ }%
+ \par\nobreak\vspace{.4ex}%
+ \noindent\hspace*{2em}%
+ \tikz[baseline]{\draw[line width=0.4pt, exerciseColor!20] (0,0) -- (\linewidth-4em,0);}%
+ \par\vspace{.8ex}%
+ \@afterindentfalse\@afterheading
+}{\par\vspace{1ex plus .5ex}}
+
+%% ==============================================================================
+%% Exercise Configuration
+%% ==============================================================================
+
+% Enable solutions if answers option is active
+\ifneoschool@answers
+ \xsimsetup{%
+ solution/print=true
+ }
+\fi
+
+% Base exercise setup
+\ifneoschool@sectionthmcounter
+ \ifneoschool@sharedexcounter
+ \xsimsetup{%
+ exercise/within = section,
+ exercise/name = {\neo@exercisename},
+ solution/name = {\neo@solutionname},
+ solution/template = sol-box
+ }
+ \renewcommand*{\theexercise}{\thesection.\arabic{thmcounter}}
+ \AtBeginEnvironment{exercise}{\stepcounter{thmcounter}\addtocounter{exercise}{-1}}
+ \else
+ \xsimsetup{%
+ exercise/within = section,
+ exercise/name = {\neo@exercisename},
+ solution/name = {\neo@solutionname},
+ solution/template = sol-box
+ }
+ \fi
+\else
+ \ifneoschool@sharedexcounter
+ \xsimsetup{%
+ exercise/name = {\neo@exercisename},
+ solution/name = {\neo@solutionname},
+ solution/template = sol-box
+ }
+ \renewcommand*{\theexercise}{\arabic{thmcounter}}
+ \AtBeginEnvironment{exercise}{\stepcounter{thmcounter}\addtocounter{exercise}{-1}}
+ \else
+ \xsimsetup{%
+ exercise/name = {\neo@exercisename},
+ solution/name = {\neo@solutionname},
+ solution/template = sol-box
+ }
+ \fi
+\fi
+
+%% Style selection based on class options
+\ifneo@amslikethm
+ \xsimsetup{exercise/template=inline}
+\fi
+
+\ifneo@classythm
+ \xsimsetup{exercise/template=classy-box}
+\fi
+
+\ifneo@classicthm
+ \xsimsetup{exercise/template=classic-box}
+\fi
+
+\ifneo@soberthm
+ \xsimsetup{exercise/template=sober-box}
+\fi
+
+\ifneo@elegantthm
+ \xsimsetup{exercise/template=elegant-box}
+\fi
+
+\ifneo@shadedthm
+ \xsimsetup{exercise/template=shaded-box}
+\fi
+
+\ifneo@slantedthm
+ \xsimsetup{exercise/template=slanted-box}
+\fi
+
+\ifneo@boxedthm
+ \xsimsetup{exercise/template=rect-box}
+\fi
+
+%% ==============================================================================
+%% Referencing an exercise
+%% ==============================================================================
+
+\ExplSyntaxOn
+\NewDocumentCommand \exercisenumber {m}
+ {
+ \xsim_get_property:nxn
+ {exercise}
+ { \xsim_get_id_for_property:nn {ID} {#1} }
+ {counter}
+ }
+\cs_generate_variant:Nn \xsim_get_property:nnn {nx}
+\ExplSyntaxOff
+
+%% ==============================================================================
+%% Utility Commands for Exercises
+%% ==============================================================================
+
+% Print exercises by level
+\NewDocumentCommand\printlevelexid{m}{%
+ \noindent {\bfseries \csname neo@pathname\endcsname\space#1 :}
+ \ForEachUsedExerciseByType{%
+ \def\ExerciseType{##1}
+ \def\ExerciseID{##2}
+ \IfExercisePropertySetT{level}{%
+ \ifnum\GetExerciseProperty{level}=#1
+ \fbox{\GetExerciseProperty{id}}\hspace*{2mm}
+ \else
+ \hspace*{5mm}
+ \fi
+ }
+ }
+}
+
+%% ==============================================================================
+%% Final Configuration Commands
+%% ==============================================================================
+
+% Dynamic grid fill command
+\newlength{\neo@gridwidth}
+\NewDocumentCommand\gridfill{ s O{\neoschool@titlecolor} O{5mm} O{5mm} }{%
+ \pgfmathsetmacro{\neo@gridwidth}{floor(\linewidth/1cm)}
+ \edef\neo@gridwidth{\neo@gridwidth cm}
+ \vspace*{\fill}
+ \IfBooleanTF#1
+ {{\noindent\centering
+ \frenchgrid[#2]{\neo@gridwidth}{\dimexpr\textheight-\pagetotal-2\baselineskip\relax}}
+ }
+ {{\noindent\centering
+ \customgrid[#2][#3][#4]{\neo@gridwidth}{\dimexpr\textheight-\pagetotal-2\baselineskip\relax}}
+ }
+}
+
+% Solution text formatting
+\NewDocumentCommand\neo@solution@text{}{%
+ {\csname\neoschool@headstyle\endcsname
+ \csname\neoschool@headweight\endcsname
+ \color{tcbcolframe}
+ \ifx\neo@solutiongaptext\empty
+ \neo@solutionname
+ \else
+ \neo@solutionname~\neo@solutiongaptext
+ \fi
+ }
+}
+
+%% ==============================================================================
+%% Utilities
+%% ==============================================================================
+
+%% Core Document Settings
+%% ----------------------------------
+% Table styling
+\setlength{\arrayrulewidth}{0.5pt}
+% \arrayrulecolor{\neoschool@titlecolor}
+\renewcommand{\arraystretch}{1.15}
+
+% Document color management
+\newcommand{\documentcolor}[1]{%
+ \color{#1}\global\let\default@color\current@color
+}
+
+% Initialize document settings
+\AtBeginDocument{%
+ \documentcolor{\neoschool@globalcolor}
+ \DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}
+}
+
+%% Font Settings
+%% ----------------------------------
+\ifneo@sfall
+ \renewcommand{\neoschool@headstyle}{sffamily}
+ \renewcommand{\neoschool@titlestyle}{sffamily}
+ \renewcommand{\familydefault}{\sfdefault}
+\fi
+
+\ifneo@sfbody
+ \renewcommand{\familydefault}{\sfdefault}
+\fi
+
+%% Graphics Rules
+%% ----------------------------------
+\ifpdf
+ \DeclareGraphicsRule{*}{mps}{*}{}
+\fi
+
+%% Layout and Drawing Tools
+%% ----------------------------------
+% Absolute positioning on page
+\newcommand{\positionobject}[4]{%
+ \begin{tikzpicture}[remember picture, overlay]
+ \node[inner sep=0pt, outer sep=0pt] at ($([xshift=#1,yshift=-#2]current page.north west)$) {%
+ \adjustbox{scale=#3}{#4}
+ };
+ \end{tikzpicture}
+}
+
+% Advanced customizable grid
+\NewDocumentCommand{\customgrid}{ O{\neoschool@titlecolor} O{5mm} O{5mm} m m }{%
+ \tikzset{%
+ gridlines/.style={%
+ draw=#1,
+ opacity=0.5
+ },
+ majorgrid/.style={%
+ gridlines,
+ line width=0.35pt
+ },
+ minorgrid/.style={%
+ gridlines,
+ line width=0.35pt
+ }
+ }
+ \medskip\noindent\begin{tikzpicture}[inner sep=0, outer sep=0]
+ % Calculate dimensions
+ \pgfmathsetmacro\mywidth{#4}
+ \pgfmathsetmacro\myheight{#5}
+ \pgfmathsetmacro\incx{#2}
+ \pgfmathsetmacro\incy{#3}
+
+ % Vertical grid lines
+ \pgfmathsetmacro\numx{int(\mywidth/\incx)}
+ \foreach \x in {0,...,\numx}{%
+ \pgfmathparse{mod(\x,5)==0 ? "majorgrid" : "minorgrid"}
+ \edef\gridstyle{\pgfmathresult}
+ \draw[\gridstyle]
+ (\x * \incx pt, 0) -- (\x * \incx pt, \myheight pt);
+ }
+
+ % Horizontal grid lines
+ \pgfmathsetmacro\numy{int(\myheight/\incy)}
+ \foreach \y in {0,...,\numy}{%
+ \pgfmathparse{mod(\y,5)==0 ? "majorgrid" : "minorgrid"}
+ \edef\gridstyle{\pgfmathresult}
+ \draw[\gridstyle]
+ (0, \y * \incy pt) -- (\mywidth pt, \y * \incy pt);
+ }
+ \end{tikzpicture}
+ \ignorespaces
+ \par\vspace{7pt}
+}
+
+% Legacy grid command for backwards compatibility
+\NewDocumentCommand{\grid}{ O{\neoschool@titlecolor} m m }{%
+ \customgrid[#1][5mm][5mm]{#2}{#3}
+}
+
+\NewDocumentCommand{\frenchgrid}{ s O{\neoschool@titlecolor!75} O{\neoschool@titlecolor!50} m m }{%
+ \tikzset{%
+ fine lines/.style={draw={#3},very thin},
+ thick lines/.style={draw={#2}},
+ }
+ \IfBooleanTF{#1}{%
+ {\noindent\centering}
+ }{%
+ \noindent
+ }
+ \begin{tikzpicture}[inner sep=0,outer sep=0]
+ \pgfmathsetmacro\mywidth{#4}
+ \pgfmathsetmacro\myheight{#5}
+ \pgfmathsetmacro\incx{8mm}
+ \pgfmathsetmacro\incypetits{2mm}
+ \pgfmathsetmacro\incygrands{8mm}
+
+ % Adjust the width to be an exact multiple of incx
+ \pgfmathsetmacro\numx{floor(\mywidth/\incx)} % Number of full columns
+ \pgfmathsetmacro\adjwidth{\numx * \incx} % Adjusted width
+
+ % Adjust the height to be an exact multiple of incypetits
+ \pgfmathsetmacro\numypetits{floor(\myheight/\incypetits)} % Number of fine lines
+ \pgfmathsetmacro\numygrands{floor(\myheight/\incygrands)} % Number of thick lines
+ \pgfmathsetmacro\adjheight{\numypetits * \incypetits} % Adjusted height
+
+ % Draw vertical lines
+ \foreach \x in {0,...,\numx}{%
+ \draw[fine lines]
+ (\x * \incx pt,0) -- (\x * \incx pt,\adjheight pt);
+ }
+ % Draw thin horizontal lines
+ \foreach \y in {0,...,\numypetits}{%
+ \draw[fine lines]
+ (0,\y * \incypetits pt) -- (\adjwidth pt,\y * \incypetits pt);
+ }
+ % Draw thick horizontal lines
+ \foreach \y in {0,...,\numygrands}{%
+ \draw[thick lines]
+ (0,\y * \incygrands pt) -- (\adjwidth pt,\y * \incygrands pt);
+ }
+ \end{tikzpicture}
+}
+
+%% Notebook-Style Pages
+%% ----------------------------------
+% Simple lined notebook page
+\newcommand{\notebook}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \foreach \i in {3,...,27}{%
+ \draw[teal] ($(current page.north west)+(0,-\i)$) --
+ ($(current page.north east)+(0,-\i)$);
+ }
+ \draw [thick,red] ($(current page.north west)+(4,0)$) --
+ ($(current page.south west)+(4,0)$);
+ \end{tikzpicture}
+}
+
+% Minor grid notebook page
+\newcommand{\nbminorgrid}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \foreach \i in {0.5,1,...,30}{%
+ \draw[teal!50] ($(current page.north west)+(0,-\i)$) --
+ ($(current page.north east)+(0,-\i)$);
+ }
+ \foreach \i in {0.5,1,...,21}{%
+ \draw [thick,teal!50] ($(current page.north west)+(\i,0)$) --
+ ($(current page.south west)+(\i,0)$);
+ }
+ \end{tikzpicture}
+}
+
+% Major grid notebook page
+\newcommand{\nbmajorgrid}{%
+ \begin{tikzpicture}[remember picture,overlay]
+ \foreach \i in {2,2.8,...,30}{%
+ \draw[teal!50] ($(current page.north west)+(0,-\i)$) --
+ ($(current page.north east)+(0,-\i)$);
+ }
+ \foreach \i in {2,2.2,...,30}{%
+ \draw[teal!25] ($(current page.north west)+(0,-\i)$) --
+ ($(current page.north east)+(0,-\i)$);
+ }
+ \foreach \i in {4.0,4.8,...,21}{%
+ \draw [thick,teal!50] ($(current page.north west)+(\i,0)$) --
+ ($(current page.south west)+(\i,0)$);
+ }
+ \draw [thick,red] ($(current page.north west)+(4,0)$) --
+ ($(current page.south west)+(4,0)$);
+ \end{tikzpicture}
+}
+
+%% Horizontally Split Content
+%% ----------------------------------
+\NewDocumentCommand{\splitcontent}{ O{0.5} O{0.02} m m }{%
+ % #1 : Width of the first section (default: 50%)
+ % #2 : Horizontal gap between sections (default: 2%)
+ % #3 : Content of the first section
+ % #4 : Content of the second section
+ \noindent
+ \begin{minipage}{#1\linewidth}
+ #3
+ \end{minipage}%
+ \hspace*{#2\linewidth}
+ \begin{minipage}{\dimexpr\linewidth-#1\linewidth-#2\linewidth\relax}
+ #4
+ \end{minipage}%
+}
+
+%% Text With Image Layout
+%% ----------------------------------
+\NewDocumentCommand{\textwithimage}{s m m m m}{%
+ \noindent
+ \IfBooleanTF{#1}{%
+ \par\begin{minipage}{#2\linewidth}
+ \centering\includegraphics[width=#3\linewidth]{#5}
+ \end{minipage}
+ \hfill
+ \begin{minipage}{\dimexpr\linewidth-#2\linewidth-1em\relax}
+ #4
+ \end{minipage}
+ }{%
+ \par\begin{minipage}{\dimexpr\linewidth-#2\linewidth-1em\relax}
+ #4
+ \end{minipage}%
+ \hfill%
+ \begin{minipage}{#2\linewidth}
+ \begin{center}
+ \centering\includegraphics[width=#3\linewidth]{#5}
+ \end{center}
+ \end{minipage}
+ }
+}
+
+%% QR Code Integration
+%% ----------------------------------
+\NewDocumentCommand{\withqrcode}{ s O{2cm} m m }{%
+ \qrset{hyperlink,height=#2}%
+ \noindent%
+ \IfBooleanTF{#1}{%
+ \par\begin{tblr}{%
+ width={.975\linewidth},
+ colspec={X[j,m]Q[c,m]Q[c,m]}
+ }
+ {{{#4}}} & & \centering\qrcode{#3}
+ \end{tblr}%
+ }{%
+ \par\begin{tblr}{%
+ width={.975\linewidth},
+ colspec={Q[c,m]Q[c,m]X[j,m]}
+ }
+ \centering\qrcode{#3} & & {{{#4}}}
+ \end{tblr}%
+ }%
+}
+
+%% Assessment Tools
+%% ----------------------------------
+% Point markers
+\NewDocumentCommand{\mrks}{s O{} m}{%
+ \IfBooleanTF{#1}
+ {\reversemarginpar}
+ {\normalmarginpar}%
+ \marginnote{\small (#3 pts)\ifx\empty#2\empty\else\\\small#2\fi}[0em]\ignorespaces}
+
+\NewDocumentCommand{\mrk}{s O{} m}{%
+ \IfBooleanTF{#1}
+ {\reversemarginpar}
+ {\normalmarginpar}%
+ \marginnote{\small (#3 pt)\ifx\empty#2\empty\else\\\small#2\fi}[0em]\ignorespaces}
+
+% Answer lines
+\NewDocumentCommand{\lines}{ O{.} O{1.65em} m }{%
+ \par
+ \foreach \n in {1,...,#3}{%
+ \noindent\parbox[t][#2][t]{\linewidth}{%
+ \ifstrequal{#1}{.}{%
+ \dotfill
+ }{%
+ \ifstrequal{#1}{-}{%
+ \hrulefill
+ }{%
+ \leaders\hbox{#1}\hfill\kern0pt
+ }
+ }
+ }
+ \par
+ }
+}
+
+% Dotted line with variable length
+\newcommand\vardots[1][\linewidth]{%
+ \noindent\begin{tikzpicture}
+ \draw[densely dotted, semithick, line cap=round] (0,0) -- ({#1},0);
+ \end{tikzpicture}
+}
+
+%% Task Lists
+%% ----------------------------------
+\newcommand{\cmark}{%
+ \ifneo@unicolor
+ {\color{\neoschool@headcolor}\ding{51}}%
+ \else
+ \ifneo@print
+ \ding{51}%
+ \else
+ {\color{definitionColor}\ding{51}}%
+ \fi
+ \fi
+}
+
+\newcommand{\xmark}{%
+ \ifneo@unicolor
+ {\color{\neoschool@headcolor}\ding{55}}%
+ \else
+ \ifneo@print
+ \ding{55}%
+ \else
+ {\color{theoremColor}\ding{55}}%
+ \fi
+ \fi
+}
+
+\newcommand{\unchecked}{%
+ \item[\rlap{$\square$}\hspace{.7em}]%
+}
+
+\newcommand{\done}{%
+ \item[\rlap{$\square$}{%
+ \raisebox{1pt}{\large\hspace{1pt}\cmark}\hspace{-2.5pt}}]%
+}
+
+\newcommand{\wontfix}{%
+ \item[\rlap{$\square$}{\large\hspace{1pt}\xmark}]%
+}
+
+%% Margin
+%% ----------------------------------
+
+\ifx\neoschool@margin\@empty\else
+ \AtEndPreamble{%
+ \newlength{\neo@originalwidth}%
+ \setlength{\neo@originalwidth}{18cm}%
+ \addtolength{\evensidemargin}{\neoschool@margin}%
+ \addtolength{\oddsidemargin}{\neoschool@margin}%
+ \setlength{\marginparwidth}{\dimexpr\neoschool@margin-0.5cm\relax}%
+ \setlength{\marginparsep}{0.5cm}%
+ \areaset{\dimexpr\neo@originalwidth-\neoschool@margin\relax}{\dimexpr29cm-\neoschool@margin}%
+ % \recalctypearea
+ }
+\fi
+
+%% Margin Notes
+%% ----------------------------------
+
+\newtoggle{lmargin}
+
+\newcommand{\alternatingtodo}[2][]{%
+ \iftoggle{lmargin}
+ {\normalmarginpar \todo[#1]{#2} \togglefalse{lmargin}}
+ {\reversemarginpar \todo[#1]{#2} \toggletrue{lmargin}}
+ \ignorespaces
+}
+
+\newif\ifmarginnotesactive
+\ifx\neoschool@notes\@empty
+ \marginnotesactivefalse
+\else
+ \marginnotesactivetrue
+ \AtEndPreamble{%
+ \newlength{\neo@originalwidth}
+ \setlength{\neo@originalwidth}{18cm}
+ \addtolength{\evensidemargin}{\neoschool@notes}
+ \addtolength{\oddsidemargin}{\neoschool@notes}
+ \setlength{\marginparwidth}{\dimexpr\neoschool@notes-0.5cm\relax}
+ \setlength{\marginparsep}{0.5cm} \areaset{\dimexpr\neo@originalwidth-\neoschool@notes\relax}{\dimexpr29cm-\neoschool@notes}
+ }
+ % \recalctypearea
+\fi
+
+\newcommand{\tdnote}[2][]{%
+ \ifmarginnotesactive
+ \alternatingtodo[%
+ bordercolor=\ifneo@unicolor\neoschool@headcolor\else ForestGreen\fi,
+ linecolor=\ifneo@unicolor\neoschool@headcolor\else ForestGreen\fi,
+ backgroundcolor=\ifneo@unicolor\neoschool@headcolor!10\else Gold\fi,
+ #1%
+ ]{#2}%
+ \fi
+}
+
+\newsavebox{\todobox}
+\newcounter{tdnotecounter}
+
+\newcommand{\boxnote}[2][inNote]{%
+ \stepcounter{tdnotecounter}
+ \iftoggle{lmargin}%
+ {%
+ \normalmarginpar
+ \marginpar{%
+ \savebox\todobox{\tdnote[inline]{#2}}%
+ \begin{tikzpicture}[remember picture, overlay]
+ \coordinate (#1-\thetdnotecounter) at (0pt,0.5\ht\todobox);
+ \end{tikzpicture}%
+ \usebox\todobox%
+ }%
+ \togglefalse{lmargin}
+ }%
+ {%
+ \reversemarginpar
+ \marginpar{%
+ \savebox\todobox{\tdnote[inline]{#2}}%
+ \begin{tikzpicture}[remember picture, overlay]
+ \coordinate (#1-\thetdnotecounter) at (\marginparwidth,0.5\ht\todobox);
+ \end{tikzpicture}%
+ \usebox\todobox%
+ }%
+ \toggletrue{lmargin}
+ }%
+}
+
+\newcommand{\tdmark}[1][inNote]{%
+ \ifmarginnotesactive
+ \tikz[remember picture, overlay]{%
+ \iftoggle{lmargin}{%
+ \draw[thick,color=\ifneo@unicolor\neoschool@headcolor\else ForestGreen\fi]
+ (#1-\thetdnotecounter) -- ++(0.25cm,0) |- (0pt,\lineskip-\dp\strutbox)%
+ }{%
+ \draw[thick,color=\ifneo@unicolor\neoschool@headcolor\else ForestGreen\fi]
+ (#1-\thetdnotecounter) -- ++(-0.25cm,0) |- (0pt,\lineskip-\dp\strutbox)%
+ }
+ }%
+ \fi
+}
+
+%% Exam-style grading strip
+%% ----------------------------------
+\newcommand{\neo@mark@text}{%
+ \ifneo@french
+ Note%
+ \else\ifneo@german
+ Note%
+ \else
+ Mark%
+ \fi\fi
+}
+
+\newcommand{\neo@appreciation@text}{%
+ \ifneo@french
+ Appréciation%
+ \else\ifneo@german
+ Bewertung%
+ \else
+ Comments%
+ \fi\fi
+}
+
+\newcommand{\smallstrut}{\rule[-0.5ex]{0pt}{1.8ex}}
+
+\NewDocumentCommand{\gradingstrip}{ O{} }{%
+ \vspace*{1em}
+ \noindent
+ \begin{minipage}[t]{0.2\textwidth}
+ \begin{tcolorbox}[%
+ enhanced,
+ colback=white,
+ colbacktitle=white,
+ colframe=\neoschool@globalcolor,
+ sharp corners,
+ boxrule=0.5pt,
+ height=2.5cm,
+ title={\smallstrut\textmd{\color{\neoschool@globalcolor}\neo@mark@text}},
+ center title,
+ overlay={%
+ \ifblank{#1}{}{%
+ \coordinate (start) at ([xshift=-0.1mm,yshift=-0.575cm]frame.north east);
+ \coordinate (end) at ([xshift=0.1mm,yshift=0.1mm]frame.south west);
+ \draw[line width=0.4pt] (start) -- (end);
+ \node[anchor=south east]
+ at ([xshift=-0.4cm,yshift=0.4cm]end -| start) {#1};
+ }%
+ }
+ ]
+ \ifblank{#1}{%
+ \vspace{2\baselineskip}
+ }{}
+ \end{tcolorbox}
+ \end{minipage}%
+ \hspace{.1cm}%
+ \begin{minipage}[t]{0.79\textwidth}
+ \begin{tcolorbox}[%
+ enhanced,
+ colback=white,
+ colbacktitle=white,
+ colframe=\neoschool@globalcolor,
+ sharp corners,
+ boxrule=0.5pt,
+ height=2.5cm,
+ title={\smallstrut\textmd{\color{\neoschool@globalcolor}\neo@appreciation@text}},
+ center title
+ ]
+ \vspace{2\baselineskip}
+ \end{tcolorbox}
+ \end{minipage}
+ \vspace*{1em}
+}
+
+%% Skill Assessment Table
+%% ----------------------------------
+\newcommand{\competencies}[1]{%
+ \bigskip
+ % \colorlet{tempcolor}{\neoschool@titlecolor}
+ \colorlet{tempcolor}{\neoschool@globalcolor}
+ \ifneo@unicolor
+ \def\iconcolorA{\neoschool@titlecolor!5}%
+ \def\iconcolorB{\neoschool@titlecolor!5}%
+ \def\iconcolorC{\neoschool@titlecolor!5}%
+ \def\iconcolorD{\neoschool@titlecolor!5}%
+ \else
+ \def\iconcolorA{Tomato}%
+ \def\iconcolorB{orange}%
+ \def\iconcolorC{yellow}%
+ \def\iconcolorD{green}%
+ \fi
+ \begin{center}
+ \begin{tblr}{%
+ colspec={|[0.5pt,tempcolor]t{.5\linewidth}|[0.5pt,tempcolor]
+ Q[c,b]|[0.5pt,tempcolor]Q[c,b]|[0.5pt,tempcolor]
+ Q[c,b]|[0.5pt,tempcolor]Q[c,b]|[0.5pt,tempcolor]},
+ hlines = {0.5pt, tempcolor},
+ row{1} = {abovesep=5pt},
+ }
+ \SetCell{cmd=\bfseries} \raisebox{0.25em}{\neo@competencies} &
+ \dSadey[1.5][\iconcolorA] & \dNeutrey[1.5][\iconcolorB] &
+ \dSmiley[1.5][\iconcolorC] & \dChangey[1.5][\iconcolorD]{2} \\
+ #1 \\
+ \end{tblr}
+ \end{center}
+ \medskip
+}
+
+%% Tree and Graph Structure Support
+%% ----------------------------------
+% Forest settings for trees
+\forestset{
+ w/.style = {
+ edge label={
+ node[midway, fill=white, text=black] {$#1$}
+ }
+ }
+}
+
+\environbodyname\neotreebody
+\bracketset{action character=@}
+\NewEnviron{neotree}[1][]{%
+\forest
+for tree={%
+grow'=0,
+l=2.5cm,
+s sep=1.5cm,
+anchor=parent,
+math content,
+#1
+},
+[@\neotreebody]
+\endforest
+}
+
+% Graph settings (LuaTeX only)
+\ifluatex
+ \tikzset{%
+ graphs/simpleer/.style={%
+ nodes={%
+ draw,
+ circle,
+ fill=white,
+ text=black,
+ inner sep=1pt,
+ minimum size=2em
+ },
+ node distance=2.5cm
+ }
+ }
+
+ \newcommand{\neograph}[2][]{%
+ \tikz \graph[%
+ simpleer,
+ simple necklace layout,
+ edge quotes mid,
+ edges={%
+ rounded corners,
+ nodes={%
+ font=\scriptsize,
+ fill=white,
+ #1,
+ inner sep=1pt,
+ align=center
+ }
+ },
+ nodes={circle,draw}
+ ]{#2};
+ }
+\fi
+
+% Math Grid Environment
+\newcounter{neomathline}
+\newcounter{neomathcol}[neomathline]
+
+\newenvironment{mathgrid}[1]
+{%
+ \def\mcols{#1}%
+ \setcounter{neomathline}{0}%
+ \par\noindent%
+}
+{\bigskip}
+
+\newcommand{\neoline}{%
+ \ifnum\value{neomathcol}>0\\\fi%
+ \stepcounter{neomathline}%
+ \setcounter{neomathcol}{0}%
+}
+
+\newcommand{\neocol}[2][1]{%
+ \stepcounter{neomathcol}%
+ \ifnum\value{neomathcol}>1\quad\fi%
+ \begin{minipage}[t]{\dimexpr\linewidth * #1 / \mcols - 2\columnsep}
+ \setlength{\abovedisplayskip}{5pt}%
+ \setlength{\belowdisplayskip}{5pt}%
+ \begin{align*}
+ #2
+ \end{align*}
+ \end{minipage}%
+ \ignorespaces%
+}
+
+% Math color
+
+\ifneo@unicolor
+ \colorlet{mathColor}{\neoschool@headcolor}
+\else
+ \colorlet{mathColor}{Maroon}
+\fi
+
+\newcommand*{\mc}[2][mathColor]{{\color{#1}#2}}
+
+%% ==============================================================================
+%% Admonition Boxes - Multilingual Version
+%% ==============================================================================
+
+%% Color Definitions for Admonition Boxes
+\ifneo@unicolor
+ \colorlet{noteColor}{\neoschool@headcolor}
+ \colorlet{infoColor}{\neoschool@headcolor}
+ \colorlet{warningColor}{\neoschool@headcolor}
+ \colorlet{importantColor}{\neoschool@headcolor}
+ \colorlet{tipColor}{\neoschool@headcolor}
+ \colorlet{reminderColor}{\neoschool@headcolor}
+ \colorlet{summaryColor}{\neoschool@headcolor}
+ \colorlet{toolboxColor}{\neoschool@headcolor}
+\else\ifx\neoschool@theme\neo@cyprus
+ \colorlet{noteColor}{methodColor}
+ \colorlet{infoColor}{theoremColor}
+ \colorlet{warningColor}{titleColor}
+ \colorlet{importantColor}{definitionColor}
+ \colorlet{tipColor}{codeColor}
+ \colorlet{reminderColor}{applicationColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@kassio
+ \colorlet{noteColor}{definitionColor}
+ \colorlet{infoColor}{applicationColor}
+ \colorlet{warningColor}{methodColor}
+ \colorlet{importantColor}{theoremColor}
+ \colorlet{tipColor}{codeColor}
+ \colorlet{reminderColor}{titleColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@frost
+ \colorlet{noteColor}{methodColor}
+ \colorlet{infoColor}{definitionColor}
+ \colorlet{warningColor}{titleColor}
+ \colorlet{importantColor}{theoremColor}
+ \colorlet{tipColor}{applicationColor}
+ \colorlet{reminderColor}{codeColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@spring
+ \colorlet{noteColor}{methodColor}
+ \colorlet{infoColor}{theoremColor}
+ \colorlet{warningColor}{applicationColor}
+ \colorlet{importantColor}{titleColor}
+ \colorlet{tipColor}{definitionColor}
+ \colorlet{reminderColor}{codeColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@arbutus
+ \colorlet{noteColor}{codeColor}
+ \colorlet{infoColor}{titleColor}
+ \colorlet{warningColor}{methodColor}
+ \colorlet{importantColor}{theoremColor}
+ \colorlet{tipColor}{applicationColor}
+ \colorlet{reminderColor}{definitionColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@duo
+ \colorlet{noteColor}{titleColor}
+ \colorlet{infoColor}{applicationColor}
+ \colorlet{warningColor}{theoremColor}
+ \colorlet{importantColor}{methodColor}
+ \colorlet{tipColor}{definitionColor}
+ \colorlet{reminderColor}{codeColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@navy
+ \colorlet{noteColor}{titleColor}
+ \colorlet{infoColor}{definitionColor}
+ \colorlet{warningColor}{methodColor}
+ \colorlet{importantColor}{theoremColor}
+ \colorlet{tipColor}{applicationColor}
+ \colorlet{reminderColor}{codeColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \else\ifx\neoschool@theme\neo@royal
+ \colorlet{noteColor}{titleColor}
+ \colorlet{infoColor}{definitionColor}
+ \colorlet{warningColor}{methodColor}
+ \colorlet{importantColor}{theoremColor}
+ \colorlet{tipColor}{applicationColor}
+ \colorlet{reminderColor}{codeColor}
+ \colorlet{summaryColor}{remarkColor}
+ \colorlet{toolboxColor}{alternateColor}
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi
+
+%% Multilingual Support
+\newcommand{\neo@admonition@note}{%
+ \ifneo@french
+ Note%
+ \else\ifneo@german
+ Notiz%
+ \else
+ Note%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@info}{%
+ \ifneo@french
+ Information%
+ \else\ifneo@german
+ Information%
+ \else
+ Information%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@warning}{%
+ \ifneo@french
+ Attention%
+ \else\ifneo@german
+ Achtung%
+ \else
+ Warning%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@important}{%
+ \ifneo@french
+ Important%
+ \else\ifneo@german
+ Wichtig%
+ \else
+ Important%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@tip}{%
+ \ifneo@french
+ Conseil%
+ \else\ifneo@german
+ Tipp%
+ \else
+ Tip%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@reminder}{%
+ \ifneo@french
+ À retenir%
+ \else\ifneo@german
+ Merken%
+ \else
+ Remember%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@summary}{%
+ \ifneo@french
+ Résumé%
+ \else\ifneo@german
+ Zusammenfassung%
+ \else
+ Summary%
+ \fi\fi
+}
+
+\newcommand{\neo@admonition@toolbox}{%
+ \ifneo@french
+ Boîte à outils%
+ \else\ifneo@german
+ Werkzeugkasten%
+ \else
+ Toolbox%
+ \fi\fi
+}
+
+%% Base Style Configuration
+\newtcolorbox{admonitionbase}[4][]{%
+ enhanced,
+ before skip=0.5\baselineskip,
+ after skip=.5\baselineskip,
+ colback=#2!5,
+ colframe=#2,
+ boxrule=1pt,
+ frame style={opacity=0.5},
+ \neo@framehidden,
+ arc=2pt,
+ left=10pt,
+ right=5pt,
+ top=3pt,
+ bottom=3pt,
+ breakable,
+ fonttitle=\sffamily\bfseries,
+ title={%
+ \hspace*{-2mm}%
+ \raisebox{-2pt}{\textcolor{#2}{\Large#3}}%
+ \hspace{5pt}%
+ \textcolor{#2}{\textbf{#4}}%
+ },
+ attach title to upper,
+ after title={\par\vspace{0.5em}},
+ #1
+}
+
+% Note Box
+\NewDocumentEnvironment{note}{O{\neo@admonition@note} O{\faEdit} +b}{%
+ \begin{admonitionbase}{noteColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+% Info Box
+\NewDocumentEnvironment{info}{O{\neo@admonition@info} O{\faInfoCircle} +b}{%
+ \begin{admonitionbase}{infoColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+% Warning Box
+\@ifundefined{warning}{%
+ \NewDocumentEnvironment{warning}{O{\neo@admonition@warning} O{\faExclamationTriangle} +b}{%
+ \begin{admonitionbase}{warningColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+ }{}
+}{}
+
+% Important Box
+\NewDocumentEnvironment{important}{O{\neo@admonition@important} O{\faExclamationCircle} +b}{%
+ \begin{admonitionbase}{importantColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+% Tip Box
+\NewDocumentEnvironment{tip}{O{\neo@admonition@tip} O{\faLightbulb} +b}{%
+ \begin{admonitionbase}{tipColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+% Reminder Box
+\NewDocumentEnvironment{reminder}{O{\neo@admonition@reminder} O{\faBookmark} +b}{%
+ \begin{admonitionbase}{reminderColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+% Summary Box
+\NewDocumentEnvironment{summary}{O{\neo@admonition@summary} O{\faClipboardList} +b}{%
+ \begin{admonitionbase}{summaryColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+% Toolbox Box
+\NewDocumentEnvironment{toolbox}{O{\neo@admonition@toolbox} O{\faTools} +b}{%
+ \begin{admonitionbase}{toolboxColor}{#2}{#1}%
+ #3%
+ \end{admonitionbase}%
+}{}
+
+%% ==============================================================================
+%% Compact Mode Adjustments
+%% ==============================================================================
+
+\ifneo@compact
+
+ \neo@fullheaderfalse
+
+ \PassOptionsToPackage{singlespacing}{setspace}
+
+ \renewcommand{\arraystretch}{1.05}
+
+ \settasks{%
+ item-indent=2em,
+ column-sep=0.5em,
+ label-width=12pt,
+ label-offset=0.3em,
+ before-skip=0pt,
+ after-skip=0pt,
+ after-item-skip=0pt
+ }
+
+ \AtBeginDocument{
+ \setlength{\abovedisplayskip}{3pt}
+ \setlength{\belowdisplayskip}{3pt}
+ \setlength{\abovedisplayshortskip}{0pt}
+ \setlength{\belowdisplayshortskip}{0pt}
+ }
+
+ \setlength{\parindent}{1em}
+ \setlength{\parskip}{0pt plus 0.1pt}
+
+ \tcbset{
+ before skip=0.5\baselineskip,
+ after skip=0.5\baselineskip,
+ }
+
+ \RedeclareSectionCommand[
+ % beforeskip=-0.25\baselineskip,
+ afterskip=0.5\baselineskip
+ ]{section}
+
+ \RedeclareSectionCommand[
+ % beforeskip=-0.25\baselineskip,
+ afterskip=0.5\baselineskip
+ ]{subsection}
+
+ \setlength{\floatsep}{5pt plus 2pt minus 2pt}
+ \setlength{\textfloatsep}{5pt plus 2pt minus 2pt}
+ \setlength{\intextsep}{5pt plus 2pt minus 2pt}
+
+ \tcbset{
+ neo@shared@base/.style args={#1}{
+ common@base,
+ colframe=#1,
+ colback=\neo@getbackcolor,
+ boxrule=\neo@thmborder,
+ \neo@getframestyle,
+ before skip=0.5\baselineskip,
+ after skip=0.5\baselineskip,
+ top=3pt,
+ bottom=3pt,
+ left=5pt,
+ right=5pt
+ }
+ }
+
+ \tcbset{
+ neo@commonbox/.style={
+ enhanced,
+ top=3pt,
+ bottom=3pt,
+ left=2mm,
+ right=2mm,
+ coltitle=white,
+ fonttitle=\small\sffamily,
+ before skip=0.5\baselineskip,
+ after skip=0.5\baselineskip
+ }
+ }
+
+ \setlength{\titlespacing}{0.8\baselineskip}
+
+ \renewcommand{\createfulltitle}{%
+ \ifx\@subject\@empty\else
+ {\usekomafont{subject}{\@subject\par}}
+ \vspace{0.5\titlespacing}
+ \fi
+
+ {\noindent\usekomafont{title}{\@title\par}}
+
+ \ifx\@subtitle\@empty\else
+ \vspace{0.5\titlespacing}
+ {\noindent\usekomafont{subtitle}{\@subtitle\par}}
+ \fi
+
+ \ifx\@author\@empty\else
+ \vspace{0.5\titlespacing}
+ {\noindent\usekomafont{author}{\@author\par}}
+ \fi
+
+ \neo@titledecoration
+ \if@twocolumn\vspace{\titlespacing}\else\vspace{0.5\titlespacing}\fi
+ }
+
+ \renewcommand{\neo@titledecoration}{%
+ \ifneo@titlerule
+ \vspace{0.75\titlespacing}%
+ {\color{\neoschool@titlecolor}\rule{4em}{0.4pt}}
+ \else
+ \ifneo@titlemidrule
+ \vspace{0.75\titlespacing}%
+ {\color{\neoschool@titlecolor}\rule{0.4\linewidth}{0.4pt}}
+ \else
+ \ifneo@titlefullrule
+ \vspace{0.75\titlespacing}%
+ {\color{\neoschool@titlecolor}\rule{\linewidth}{0.4pt}}%
+ \vspace{-0.5\titlespacing}%
+ \else
+ \ifneo@titleornament
+ \vspace{0.75\titlespacing}%
+ {\color{\neoschool@titlecolor}\scalebox{1.5}[1.2]{\adforn{21}\,\adforn{11}\,\adforn{49}}}
+ \fi
+ \fi
+ \fi
+ \fi
+ \vspace*{.1\baselineskip}
+ }
+
+\fi
+
+%% ==============================================================================
+%% End of Class
+%% ==============================================================================
diff --git a/macros/latex/contrib/scrlayer-fancyhdr/LICENSE.md b/macros/latex/contrib/scrlayer-fancyhdr/LICENSE.md
index 99a6973749..1863f2f61a 100644
--- a/macros/latex/contrib/scrlayer-fancyhdr/LICENSE.md
+++ b/macros/latex/contrib/scrlayer-fancyhdr/LICENSE.md
@@ -13,7 +13,7 @@ Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
-oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained”
+oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained”.
Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm.
----------------------------------------------------------------------------
diff --git a/macros/latex/contrib/scrlayer-fancyhdr/README.md b/macros/latex/contrib/scrlayer-fancyhdr/README.md
index 89dd0d1b10..2586d43cbd 100644
--- a/macros/latex/contrib/scrlayer-fancyhdr/README.md
+++ b/macros/latex/contrib/scrlayer-fancyhdr/README.md
@@ -2,10 +2,14 @@
------------------------------------------------------------------------------
-LaTeX package `scrlayer-fancyhdr`
-Copyright (c) 2008—2022 Markus Kohm
-Release: 2025-01-07 v0.3
-License: LPPL 1.3c (see LICENSE.md)
+LaTeX package `scrlayer-fancyhdr`
+
+Copyright (c) 2008—2025 Markus Kohm
+
+Release: 2025-01-08 v0.3.1
+
+License: LPPL 1.3c (see LICENSE.md)
+
CTAN Location: https://ctan.org/pkg/scrlayer-fancyhdr
------------------------------------------------------------------------------
@@ -22,7 +26,10 @@ Before KOMA-Script v3.33 `scrlayer-fancyhdr` was part of KOMA-Script itself.
It still depends on KOMA-Script package
[`scrlayer`](https://www.ctan.org/pkg/scrlayer) at least version 3.33. It
also depends on [`fancyhdr`](https://www.ctan.org/pkg/fancyhdr). Currently
-version 3 and 4 up to 4.0.1 are supported and tested.
+version 3 and 4 up to 4.0.1 are supported and tested. Basic functionality also
+works with version 5 and has been tested up to 5.1. But several new features
+of [`fancyhdr`](https://www.ctan.org/pkg/fancyhdr) version 5 are currently not
+tested with `scrlayer-fancyhdr`.
## Status
diff --git a/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.dtx b/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.dtx
index 422a90ef7f..d196c99696 100644
--- a/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.dtx
+++ b/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.dtx
@@ -32,7 +32,7 @@
%</dtx>
%<package&identify>\ProvidesPackage{scrlayer-fancyhdr}
%<*dtx|(package&identify)>
- [2025-01-07 v0.3
+ [2025-01-08 v0.3.1
%</dtx|(package&identify)>
%<*dtx>
source of package scrlayer-scrpage]
@@ -716,7 +716,8 @@
% \texttt{fancy.head.odd} und \texttt{fancy.head.even} mit Hilfe von
% \opt{addvoffset} behoben werden. Weitere Tests sind hier erforderlich.
% \item
-% Noch nicht alle neuen Möglichkeiten von \pkg{fancyhdr} v5 sind getested.
+% Die neuen Möglichkeiten von \pkg{fancyhdr} v5 sind weitgehend weder
+% unterstützt noch gar getestet.
% \end{itemize}
% Siehe \url{https://github.com/komascript/scrlayer-fancyhdr/issues} für
% weitere bekannte Probleme.
@@ -800,6 +801,7 @@
% four layers (even side head, odd side head, even side foot, odd side foot).
% \changes{v0.3}{2025-01-07}{\cs{f@nch@head} and \cs{f@nch@foot} have 8
% arguments with \pkg{fancyhdr} v5}
+% \changes{v0.3.1}{2025-01-07}{missing backslashs added}
% \begin{macrocode}
%<*body>
\IfPackageAtLeastTF{fancyhdr}{2025/01/01}{%
@@ -815,8 +817,8 @@
background,evenpage,
head,
contents={\hb@xt@ \layerwidth{%
- f@nch@head\f@nch@Oelh\f@nch@elh\f@nch@ech\f@nch@erh\f@nch@Oerh
- \f@nch@width@elh\f@nch@width@ech\f@nch@width@erh
+ \f@nch@head\f@nch@Oelh\f@nch@elh\f@nch@ech\f@nch@erh\f@nch@Oerh
+ \f@nch@width@elh\f@nch@width@ech\f@nch@width@erh
}}
]{fancy.head.even}
\DeclareNewLayer[%
@@ -831,7 +833,7 @@
foreground,evenpage,
foot,
contents={\hb@xt@ \layerwidth{%
- f@nch@foot\f@nch@Oelf\f@nch@elf\f@nch@ecf\f@nch@erf\f@nch@Oerf
+ \f@nch@foot\f@nch@Oelf\f@nch@elf\f@nch@ecf\f@nch@erf\f@nch@Oerf
\f@nch@width@elf\f@nch@width@ecf\f@nch@width@erf
}}
]{fancy.foot.even}
@@ -940,7 +942,7 @@
%%% Local Variables:
%%% mode: doctex
-%%% mode: flyspell
-%%% ispell-local-dictionary: "en_GB"
+%%% eval: (flyspell-mode 1)
+%%% ispell-local-dictionary: "en_US"
%%% TeX-master: t
%%% End:
diff --git a/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.pdf b/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.pdf
index 3108a3eb15..cd28378687 100644
--- a/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.pdf
+++ b/macros/latex/contrib/scrlayer-fancyhdr/scrlayer-fancyhdr.pdf
Binary files differ
diff --git a/macros/latex/contrib/skdoc/README b/macros/latex/contrib/skdoc/README
index a743243ef2..d534e280af 100644
--- a/macros/latex/contrib/skdoc/README
+++ b/macros/latex/contrib/skdoc/README
@@ -1,6 +1,6 @@
%% skdoc documentation class
%%
-%% Copyright (C) 2012-2020 by Simon Sigurdhsson <sigurdhsson@gmail.com>
+%% Copyright (C) 2012-2025 by Simon Sigurdhsson <sigurdhsson@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
%% This work consists of the files skdoc.dtx
%% and the derived filebase skdoc.cls.
-This is version 1.5d of the skdoc document class. It is designed to
+This is version 1.5e of the skdoc document class. It is designed to
generate both documentation and derivative files using only LaTeX,
i.e. without using docstrip and ins/dtx files.
diff --git a/macros/latex/contrib/skdoc/skdoc.dtx b/macros/latex/contrib/skdoc/skdoc.dtx
index d780344712..739be62048 100644
--- a/macros/latex/contrib/skdoc/skdoc.dtx
+++ b/macros/latex/contrib/skdoc/skdoc.dtx
@@ -1,7 +1,7 @@
% \iffalse
%% skdoc documentation class
%%
-%% Copyright (C) 2012-2020 by Simon Sigurdhsson <sigurdhsson@gmail.com>
+%% Copyright (C) 2012-2025 by Simon Sigurdhsson <sigurdhsson@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -73,7 +73,7 @@
%</driver>
%<class>\ProvidesExplClass{skdoc}
%<*class>
- {2020/11/16}{1.5d}{skdoc documentation class}
+ {2025/01/08}{1.5e}{skdoc documentation class}
%</class>
%
%<*driver>
@@ -132,7 +132,7 @@
% {}{\small\pagemark}
% \pagestyle{skdoc-class}
%
-% \version{1.5d}
+% \version{1.5e}
% \changes{1.0}{Initial version}
% \changes{1.1}{Added support for syntax highlighting using \pkg{minted}}
% \changes{1.1a}{Deprecate the use of \pkg{bibtex} in favour of \pkg{biblatex}}
@@ -148,6 +148,7 @@
% \changes{1.5b}{Track \pkg{expl3} changes (thanks to Phelype Oleinik). Replace \pkg{opensans} option \opt{osfigures} with \opt{oldstyle} (\#40)}
% \changes{1.5c}{Replace \pkg{scrpage} package with \pkg{scrlayer-scrpage} (thanks to Daniel Wunderlich)}
% \changes{1.5d}{Use compatibiltiy levels for \pkg{scrartcl} (\#44)}
+% \changes{1.5e}{Fix incompatibilities with \pkg{glossaries} (\#47). Use \pkg{minted2} instead of \pkg{minted}}
% \iffalse
%%% Don't forget to update the version number and release date of
%%% the package declaration on line 76!
@@ -221,8 +222,8 @@
% \label{ssec:option:highlight}
% The \opt{highlight} option enables or disabled syntax highlighting
% of the implementation code. Highlighting is performed using
-% \pkg{minted}, and falls back to no highlighting if there is no
-% \cs{write18} access, if \pkg{minted} is unavailable or if the
+% \pkg{minted2}, and falls back to no highlighting if there is no
+% \cs{write18} access, if \pkg{minted2} is unavailable or if the
% \texttt{pygmentize} binary can't be found.
% \Notice{On non-unix platforms, the test for \texttt{pygmentize}
% will likely fail. Therefore, syntax highlighting is not supported
@@ -471,7 +472,7 @@
%
% Since the \env{example} environment is based on the same mechanisms
% as \env{MacroCode}, (mostly) the same typesetting properties apply.
-% In particular, the code will be highlighted if \pkg{minted} is
+% In particular, the code will be highlighted if \pkg{minted2} is
% available. \Notice{Since the backend utilizes \cs{verbatim}, the
% usual caveats apply. In particular, leaving whitespace before
% \cs{end}\marg{example} will result in an extra newline at the end
@@ -679,7 +680,7 @@
% sensitivity to whitespace, for instance). As detailed by the
% description of the \opt{highlight} option (on page
% \pageref{ssec:option:highlight}), the environment will highlight
-% the code using \pkg{minted} if possible. Multiple \meta{key}s are
+% the code using \pkg{minted2} if possible. Multiple \meta{key}s are
% allowed, and the code will be written to all corresponding files.
%
% \subsubsection{Hiding the implementation}
@@ -827,7 +828,7 @@
% Set up some booleans used throughout the code.
% \begin{macro}{\g__skdoc_use_minted_bool}
% The \texttt{use_minted} boolean keeps track of wether we're using
-% \pkg{minted} or not. The default value is \emph{false}.
+% \pkg{minted2} or not. The default value is \emph{false}.
% \begin{macrocode}
\bool_new:N\g__skdoc_use_minted_bool
\bool_gset_false:N\g__skdoc_use_minted_bool
@@ -925,10 +926,10 @@
% \end{macrocode}
%
% \subsection{Special case: syntax highlighting}
-% We support syntax highlighting through \pkg{minted}, but only if
+% We support syntax highlighting through \pkg{minted2}, but only if
% we're running with unrestricted \cs{write18} access \emph{and}
% there exists a suitable executable (\texttt{pygmentize}). Since
-% \pkg{minted} bails out without \cs{write18} access, we have to test
+% \pkg{minted2} bails out without \cs{write18} access, we have to test
% that before even loading it.
%
% \subsubsection{A simple \cs{write18} test}
@@ -1017,7 +1018,7 @@
% \end{macro*}
%
% Using the macros defined above, we can test for both \cs{write18}
-% and \texttt{pygmentize}, loading \pkg{minted} and setting a flag
+% and \texttt{pygmentize}, loading \pkg{minted2} and setting a flag
% if both exist. If the option \opt{highlight} was supplied and set
% to \texttt{false}, we do nothing.
% \begin{macrocode}
@@ -1027,17 +1028,17 @@
\__skdoc_if_pygmentize:TF{
\bool_gset_true:N\g__skdoc_use_minted_bool
% \end{macrocode}
-% Since \pkg{minted} (through \pkg{fancyvrb}) loads \pkg{lineno}, and something
+% Since \pkg{minted2} (through \pkg{fancyvrb}) loads \pkg{lineno}, and something
% above already defines \cs{c@linenumber}, we have to resort to a bit of a hack
-% before we actually load \pkg{minted}.
+% before we actually load \pkg{minted2}.
% \begin{macrocode}
\cs_undefine:N\c@linenumber
\cs_undefine:N\cl@linenumber
\cs_undefine:N\p@linenumber
\cs_undefine:N\thelinenumber
- \RequirePackage{minted}
+ \RequirePackage{minted2}
% \end{macrocode}
-% Now that we have \pkg{minted}, we redefine the style of the line
+% Now that we have \pkg{minted2}, we redefine the style of the line
% numbers to match what we have further down for the non-highlighted
% mode.
% \begin{macrocode}
@@ -1216,7 +1217,7 @@
\def\PYZlb{[}
\def\PYZrb{]}
% \end{macrocode}
-% If there's no \texttt{pygmentize}, no \cs{write18} or no \pkg{minted},
+% If there's no \texttt{pygmentize}, no \cs{write18} or no \pkg{minted2},
% we display a warning message and proceed without highlighting.
% \begin{macrocode}
}{
@@ -1321,7 +1322,7 @@
\__skdoc_if_print_code:T{
\bool_if:NTF\g__skdoc_use_minted_bool{
% \end{macrocode}
-% If we're using \pkg{minted}, we set a few options ans open the
+% If we're using \pkg{minted2}, we set a few options ans open the
% output file.
% \begin{macrocode}
\bool_if:NF\g__skdoc_in_example_bool{
@@ -1341,7 +1342,7 @@
}
\bool_if:NF\g__skdoc_in_example_bool{
% \end{macrocode}
-% In all non-example code, \pkg{minted} or not, we output a small
+% In all non-example code, \pkg{minted2} or not, we output a small
% marker showing what file we are writing to.
% \begin{macrocode}
\marginnote{
@@ -1372,7 +1373,7 @@
\bool_if:NTF\g__skdoc_use_minted_bool{
% \end{macrocode}
% ...but if we're using minted, \enquote{a lot more} consists of also
-% writing the line to the file used by \pkg{minted}.
+% writing the line to the file used by \pkg{minted2}.
% \begin{macrocode}
\iow_now:Nx\minted@code{\the\verbatim@line}%
}{
@@ -1440,15 +1441,15 @@
\__skdoc_if_print_code:T{
\bool_if:NTF\g__skdoc_use_minted_bool{
% \end{macrocode}
-% If we're using \pkg{minted}, we still have to actually print the code.
+% If we're using \pkg{minted2}, we still have to actually print the code.
% We begin with closing the output file.
% \begin{macrocode}
\iow_close:N\minted@code%
% \end{macrocode}
-% A few spacing fixes are applied. Since \pkg{minted} uses
+% A few spacing fixes are applied. Since \pkg{minted2} uses
% \pkg{fancyvrb}, these negative \cs{vspace}s are derived from the
% \pkg{fancyvrb} documentation \parencite[pp.~46--47]{Rahtz10}. What
-% we want to do is to offset the spacing produced by \pkg{minted}, so
+% we want to do is to offset the spacing produced by \pkg{minted2}, so
% that we are in control.
% \begin{macrocode}
\bool_if:NF\g__skdoc_in_example_bool{
@@ -1457,7 +1458,7 @@
\vspace*{-\parskip}
}
% \end{macrocode}
-% Now, the internal \pkg{minted} macro \cs{minted@pygmentize} is called
+% Now, the internal \pkg{minted2} macro \cs{minted@pygmentize} is called
% to highlight and typeset the code, and the temporary file is removed.
% \begin{macrocode}
\minted@pygmentize{latex}%
@@ -1469,7 +1470,7 @@
\vspace*{-\partopsep}
}{
% \end{macrocode}
-% If we aren't using \pkg{minted}, we hack spaces with \cs{@esphack}
+% If we aren't using \pkg{minted2}, we hack spaces with \cs{@esphack}
% instead.
% \begin{macrocode}
\bool_if:NF\g__skdoc_in_example_bool{\@esphack}%
@@ -1976,7 +1977,7 @@
% \end{macrocode}
% The code coffin is now filled, after clearing it. It'll get filled
% with the contents of the verbatim environment, typeset like other
-% \env{MacroCode} environments in the document (\emph{i.e.} \pkg{minted}
+% \env{MacroCode} environments in the document (\emph{i.e.} \pkg{minted2}
% if possible).
% \begin{macrocode}
\coffin_clear:N\l__skdoc_example_code_coffin
@@ -2610,7 +2611,7 @@
% our own \pkg{glossaries} style.
% \begin{macrocode}
\newglossarystyle{docindex}{
- \glossarystyle{indexgroup}
+ \setglossarystyle{indexgroup}
\renewcommand*{\glspostdescription}{\unskip\leaders\hbox to 2.9mm{\hss.}\hfill\strut}
\renewenvironment{theglossary}{
\bool_gset_true:N\g__skdoc_no_index_bool
@@ -2622,10 +2623,7 @@
\end{multicols}
\bool_gset_false:N\g__skdoc_no_index_bool
}
- \renewcommand*{\glossaryentryfield}[5]{
- \item\glsentryitem{##1}\glstarget{##1}{##2}
- \ifx\relax##4\relax\else\space(##4)\fi
- ##3\glspostdescription\space ##5}
+ \renewcommand*{\glstreenamefmt}[1]{##1}
\renewcommand*{\glsgroupheading}[1]{
\IfStrEq{##1}{default}{
\item{\descfont\glssymbolsgroupname}
@@ -2753,6 +2751,8 @@
% \changes{1.4a}{Unconditionally add version \enquote{parent} to
% circumvent strange behaviour by \pkg{glossaries}. Also, gobble
% page numbers for similar reasons}
+% \changes{1.5e}{Added an extra intermediate layer of macros
+% (\cs{@changes}) to force expansion of \cs{skdoc@macroname@stylized}}
% \begin{macrocode}
\DeclareDocumentCommand\changes{mm}{%
\@bsphack
@@ -2763,35 +2763,40 @@
nonumberlist=true
}
\ifx\skdoc@macroname@key\@empty
- \newglossaryentry{#1-general}{
- type=changes,
- description={\generalname{}:~#2},
- parent={#1},
- sort={0},
- nonumberlist=true
- }
- \glsadd[types=changes,format=@gobble]{#1-general}
+ \exp_args:Ne\@changes{\generalname}{!general}{#1}{#2}
\else
- \newglossaryentry{#1-\skdoc@macroname@key}{
- type=changes,
- description={\skdoc@macroname@stylized{}:~#2},
- parent={#1},
- sort={\skdoc@macroname@key},
- nonumberlist=true
- }
- \glsadd[types=changes,format=@gobble]{#1-\skdoc@macroname@key}
+ \exp_args:Nee\@changes{\skdoc@macroname@stylized}{\skdoc@macroname@key}{#1}{#2}
\fi
\@esphack
}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\@changes}[2]
+% {A prefix prepended to the change log message}
+% {An internal key used for sorting changes within each version}
+% {The version in which the changes were made}
+% {A short description of the changes}
+% \begin{macrocode}
+\DeclareDocumentCommand\@changes{mmmm}{%
+ \newglossaryentry{#3-#2}{
+ type=changes,
+ name={#1},
+ description={#4},
+ parent={#3},
+ sort={#2},
+ nonumberlist=true
+ }
+ \glsadd[types=changes,format=@gobble]{#3-#2}
+}
+% \end{macrocode}
+% \end{macro}
%
% \subsubsection{Displaying the changelog}
% Displaying the changelog is equally simple. We begin by defining
% our own \pkg{glossaries} style.
% \begin{macrocode}
\newglossarystyle{changelog}{
- \glossarystyle{altlist}
+ \setglossarystyle{altlist}
\renewenvironment{theglossary}{
\bool_gset_true:N\g__skdoc_no_index_bool
\begin{multicols}{2}\begin{description}
@@ -2799,15 +2804,16 @@
\end{description}\end{multicols}
\bool_gset_false:N\g__skdoc_no_index_bool
}
- \renewcommand*{\glossaryentryfield}[5]{
+ \renewcommand*{\glossentry}[2]{
\par\vspace{5\p@}\relax
- \item[\glsentryitem{##1}\glstarget{##1}{##2}]
- \mbox{}\par\nobreak\@afterheading
+ \item[\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}}]
+ \mbox{}\par\nobreak\@afterheading
}
- \renewcommand{\glossarysubentryfield}[6]{%
+ \renewcommand*{\subglossentry}[3]{
\par\hspace*{\itemindent}
- \glssubentryitem{##2}%
- \glstarget{##2}{\strut}##4\glspostdescription\space ##6
+ \glssubentryitem{##2}\glstarget{##2}{\strut}%
+ \glossentryname{##2}:~\glossentrydesc{##2}%
+ \glspostdescription\space ##3
}
}
% \end{macrocode}
@@ -2939,7 +2945,7 @@
}%
\IfNoValueTF{#1}{}{\keys_set:nn{skdoc@package}{#1}}%
\def\@package{#2}%
- \title{The~\textbf{\pkg*{\@package}}~package}%
+ \title{The~\textbf{\textsf{\@package}}~package}%
}
% \end{macrocode}
% \end{macro}
@@ -2999,6 +3005,7 @@
\DeclareDocumentCommand\thepkg{}{\thepackage}
% \end{macrocode}
% \end{macro}
+% \changes{1.5e}{Always expand \cs{@title} when setting metadata}
% Additionally we define \cs{skdocpdfsettings}, which is also used
% by \cs{maketitle}, to include PDF metadata if the documentation
% is being compiled using \hologo{pdfLaTeX}.
@@ -3007,7 +3014,7 @@
\def\skdocpdfsettings{%
\hypersetup{%
pdfauthor = {\@author\space<\@plainemail>},
- pdftitle = {\@title},
+ pdftitle = {\text_purify:n{\@title}},
pdfsubject = {Documentation~of~LaTeX~package~\@package},
pdfkeywords = {\@package,~LaTeX,~TeX}
}%
diff --git a/macros/latex/contrib/skdoc/skdoc.pdf b/macros/latex/contrib/skdoc/skdoc.pdf
index b526539c1f..f4a71609b2 100644
--- a/macros/latex/contrib/skdoc/skdoc.pdf
+++ b/macros/latex/contrib/skdoc/skdoc.pdf
Binary files differ
diff --git a/macros/latex/contrib/yb-book/DEPENDS.txt b/macros/latex/contrib/yb-book/DEPENDS.txt
index 3d880587be..a7a94e251f 100644
--- a/macros/latex/contrib/yb-book/DEPENDS.txt
+++ b/macros/latex/contrib/yb-book/DEPENDS.txt
@@ -7,11 +7,13 @@ hard collection-fontsextra
hard collection-fontsrecommended
hard csquotes
hard cyrillic
+hard doi
hard enumitem
hard fancyhdr
hard float
hard footmisc
hard geometry
+hard href-ul
hard hypdoc
hard ifmtarg
hard imakeidx
@@ -38,7 +40,6 @@ hard xifthen
hard xkeyval
hard zref
soft biblatex
-soft href-ul
soft imakeidx
soft l3build
soft pgfopts
diff --git a/macros/latex/contrib/yb-book/yb-book.dtx b/macros/latex/contrib/yb-book/yb-book.dtx
index b8fcea6bdc..02695f297a 100644
--- a/macros/latex/contrib/yb-book/yb-book.dtx
+++ b/macros/latex/contrib/yb-book/yb-book.dtx
@@ -50,7 +50,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{yb-book}
%<*class>
-[2025/01/05 0.5.1 YB Branded Book Style]
+[2025/01/08 0.6.0 YB Branded Book Style]
%</class>
%<*driver>
\documentclass{ltxdoc}
@@ -253,10 +253,12 @@ Hello, world!
% First, we parse package options:
% \changes{v0.3.0}{2023/05/22}{The \texttt{pgfopts} package is now used to parse package options.}
% \changes{v0.5.0}{2024/01/02}{The \texttt{sparse} package option added, to place every section in a new page.}
+% \changes{v0.6.0}{2025/01/08}{The \texttt{apa} package option added, to enable APA citation style.}
% \begin{macrocode}
\RequirePackage{pgfopts}
\pgfkeys{
/yb/.cd,
+ apa/.store in=\yb@apa,
authordraft/.store in=\yb@authordraft,
compact/.store in=\yb@compact,
manuscript/.store in=\yb@manuscript,
@@ -311,6 +313,11 @@ Hello, world!
% \end{macrocode}
% \end{macro}
+% Then, we load \href{https://ctan.org/pkg/href-ul}{href-ul} to underline links correctly:
+% \begin{macrocode}
+\RequirePackage{href-ul}
+% \end{macrocode}
+
% Then, we load \href{https://ctan.org/pkg/anyfontsize}{anyfontsize} to enable all sizes of fonts:
% \begin{macrocode}
\RequirePackage{anyfontsize}
@@ -407,9 +414,18 @@ Hello, world!
% \begin{macro}{biblatex}
% Then, we configure |biblatex|, for citation management:
% \begin{macrocode}
-\RequirePackage[indexing=cite,style=authoryear,
- natbib=true,maxnames=1,minnames=1,doi=false,
- url=false,isbn=false,isbn=false]{biblatex}
+\PassOptionsToPackage{indexing=cite,
+ natbib=true,maxnames=2,minnames=1,doi=true,
+ url=false,isbn=false,isbn=false}{biblatex}
+\makeatletter
+\ifdefined\yb@apa
+ \PassOptionsToPackage{style=authoryear}{biblatex}
+\else
+ \PassOptionsToPackage{style=numeric}{biblatex}
+\fi
+\makeatother
+\RequirePackage{doi}
+\RequirePackage{biblatex}
\DeclareCiteCommand{\citetitle}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
@@ -476,7 +492,7 @@ Hello, world!
\else
\RequirePackage[raggedright]{titlesec}
\titlespacing{\section}{0in}{6pt}{6pt}[1in]
- \renewcommand\section{\yb@secstart\newpage\yb@oldsection}
+ \renewcommand\section{\yb@secstart\yb@oldsection}
\fi
\ifdefined\yb@compact
\renewcommand\section{\yb@secstart\vspace{2em}\yb@oldsection}
@@ -499,9 +515,19 @@ Hello, world!
\fancyhf{}
\fancyhead[L,C,LO,CO]{}
\fancyhead[R,RO]{
+ \begin{textblock}{16}[0.5,0.5](8,8)%
+ \tikz \node[minimum width=16\TPHorizModule] {%
+ \fontsize{64}{64}\selectfont\bfseries%
+ \rotatebox{45}{
+ \tikz \node
+ [fill=gray!8, font=\ttfamily\color{white}]
+ {it is a draft};%
+ }%
+ };%
+ \end{textblock}%
\begin{textblock}{4}(11.5,1)%
\tikz \node [color=gray, rotate=270,
- font=\ttfamily\scriptsize, text width=5in] at (0,0) {%
+ font=\ttfamily\scriptsize, text width=8in] at (0,0) {%
Copyright \textcopyright{} \the\year{} by \theauthor{}.
All rights reserved. No part of the contents of
this book may be reproduced or transmitted in any
@@ -513,7 +539,7 @@ Hello, world!
};
\end{textblock}
}
- \fancyfoot[C,CO,CE]{\small\ttfamily%
+ \fancyfoot[C,CO,C]{\small\ttfamily%
page \#\thepage{} of \pageref{LastPage}}
\fi
\makeatother
diff --git a/macros/latex/contrib/yb-book/yb-book.pdf b/macros/latex/contrib/yb-book/yb-book.pdf
index b953b41621..f27123bd3e 100644
--- a/macros/latex/contrib/yb-book/yb-book.pdf
+++ b/macros/latex/contrib/yb-book/yb-book.pdf
Binary files differ
diff --git a/macros/luatex/latex/plantuml/CHANGELOG.md b/macros/luatex/latex/plantuml/CHANGELOG.md
index 6cc76d6b7c..c3c1591c1f 100644
--- a/macros/luatex/latex/plantuml/CHANGELOG.md
+++ b/macros/luatex/latex/plantuml/CHANGELOG.md
@@ -5,12 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [0.5.0] - 2025-01-08
+
+## Fixed
+
+- Fixed overleaf compilation. [#34](https://github.com/koppor/plantuml/issues/34)
+
## [0.4.0] – 2024-09-17
### Fixed
-- Updated command-line parameters for inkscape. [#33](https://github.com/koppor/plantuml/pull/33)
-- Updated command-line parameters for plantuml. [#33](https://github.com/koppor/plantuml/pull/33)
+- Updated command-line parameters for PlantUML to fit PlantUML v1.2023.0 changes. [#36](https://github.com/koppor/plantuml/issues/36)
+- Updated command-line parameters for Inkscape. [#33](https://github.com/koppor/plantuml/pull/33)
- Works if multiple diagrams are present. [#15](https://github.com/koppor/plantuml/issues/15), [#17](https://github.com/koppor/plantuml/issues/17)
## [0.3.2] – 2023-05-12
@@ -74,6 +80,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
Initial public release
+[0.5.0]: https://github.com/koppor/plantuml/compare/0.4.0...0.5.0
[0.4.0]: https://github.com/koppor/plantuml/compare/0.3.2...0.4.0
[0.3.2]: https://github.com/koppor/plantuml/compare/0.3.1...0.3.2
[0.3.1]: https://github.com/koppor/plantuml/compare/0.3.0...0.3.1
diff --git a/macros/luatex/latex/plantuml/README.md b/macros/luatex/latex/plantuml/README.md
index bbd4adb0e0..5b7f771a1b 100644
--- a/macros/luatex/latex/plantuml/README.md
+++ b/macros/luatex/latex/plantuml/README.md
@@ -104,18 +104,18 @@ Car -- Person : < owns
Your latex distribution should take care.
-For manual installation, copy `plantuml.*` to your local texmf folder in the subdirectoy `tex/latex/plantuml`.
+For manual installation, copy `plantuml.*` to your local `texmf` folder in the sub directoy `tex/latex/plantuml`.
See [the discussion at tex.sx](https://tex.stackexchange.com/q/27982/9075) for the concrete location of the folder on your system.
## Development
The release is built using [GitHub Actions](https://github.com/features/actions) ([workflow file](https://github.com/koppor/plantuml/blob/master/.github/workflows/build-and-publish.yml)) using [`release.sh`](release.sh).
-Release prepration:
+Release preparation:
-1. Adapt date and version number in `plantuml.sty`.
-1. Adapt `CHANGELOG.md`.
-1. Set a git tag and push.
+1. Adapt copyright year (line 1) as well as date and version number (line 6) in `plantuml.sty`.
+2. Adapt `CHANGELOG.md`.
+3. Set a git tag and push.
## Alternative Solutions
diff --git a/macros/luatex/latex/plantuml/plantuml.pdf b/macros/luatex/latex/plantuml/plantuml.pdf
index 114c9026ff..95700cd29d 100644
--- a/macros/luatex/latex/plantuml/plantuml.pdf
+++ b/macros/luatex/latex/plantuml/plantuml.pdf
Binary files differ
diff --git a/macros/luatex/latex/plantuml/plantuml.sty b/macros/luatex/latex/plantuml/plantuml.sty
index 91c15789e4..20cb27760a 100644
--- a/macros/luatex/latex/plantuml/plantuml.sty
+++ b/macros/luatex/latex/plantuml/plantuml.sty
@@ -1,9 +1,9 @@
-%% Copyright (C) 2018-2023 Oliver Kopp, https://github.com/koppor
+%% Copyright (C) 2018-2025 Oliver Kopp, https://github.com/koppor
%%
%% SPDX-License-Identifier: LPPL-1.3c+
\NeedsTeXFormat{LaTeX2e}\relax
\ProvidesPackage{plantuml}
- [2024/09/17 v0.4.0
+ [2024/05/17 v0.5.0
Embed PlantUML diagrams in latex documents.]
% Required by PlantUML LaTeX output
@@ -54,8 +54,14 @@
\ifluatex
\RequirePackage{luacode}
+ \directlua{
+ local lfs = require("lfs")
+ local currentdir = lfs.currentdir():gsub("\\", "/")
+ tex.sprint("\\newcommand\\CurrentDirectory{" .. currentdir .. "/}")
+ }
\else
\RequirePackage[usefamily=bash]{pythontex}
+ \newcommand{\CurrentDirectory}{}
\fi
\makeatletter
@@ -74,7 +80,7 @@
}
\fi
\NewDocumentEnvironment{plantuml}{}{%
- \VerbatimOut{\PlantUMLJobname-plantuml.txt}}
+ \VerbatimOut{\CurrentDirectory\PlantUMLJobname-plantuml.txt}}
{%
\endVerbatimOut
\ifluatex
@@ -95,7 +101,7 @@
\end{adjustbox}
}{
\includegraphics[width=\maxwidth{\textwidth}]{\PlantUMLJobname-plantuml.\PlantUmlMode}
- \UMLcountUp
+ \UMLcountUp
}
}
\or