diff options
Diffstat (limited to 'Master/texmf-dist/tex')
25 files changed, 10253 insertions, 158 deletions
diff --git a/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-ExtraLight.fontspec b/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-ExtraLight.fontspec new file mode 100644 index 00000000000..f339d284c45 --- /dev/null +++ b/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-ExtraLight.fontspec @@ -0,0 +1,8 @@ +\defaultfontfeatures[CascadiaMono-ExtraLight] + {Extension=.otf, + UprightFont=CascadiaCode-ExtraLight, + ItalicFont=CascadiaCode-ExtraLightItalic, + BoldFont=CascadiaCode-SemiLight, + BoldItalicFont=CascadiaCode-SemiLightItalic, + Contextuals=AlternateOff +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-Light.fontspec b/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-Light.fontspec index aeae5d23d94..f888cf357f9 100644 --- a/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-Light.fontspec +++ b/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-Light.fontspec @@ -1,8 +1,8 @@ \defaultfontfeatures[CascadiaMono-Light] {Extension=.otf, - UprightFont=CascadiaCode-SemiLight, - ItalicFont=CascadiaCode-SemiLightItalic, - BoldFont=CascadiaCode-SemiBold, - BoldItalicFont=CascadiaCode-SemiBoldItalic, + UprightFont=CascadiaCode-Light, + ItalicFont=CascadiaCode-LightItalic, + BoldFont=CascadiaCode-Regular, + BoldItalicFont=CascadiaCode-Italic, Contextuals=AlternateOff }
\ No newline at end of file diff --git a/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-SemiLight.fontspec b/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-SemiLight.fontspec new file mode 100644 index 00000000000..c0da85c4e93 --- /dev/null +++ b/Master/texmf-dist/tex/fonts/cascadiamono-otf/CascadiaMono-SemiLight.fontspec @@ -0,0 +1,8 @@ +\defaultfontfeatures[CascadiaMono-SemiLight] + {Extension=.otf, + UprightFont=CascadiaCode-SemiLight, + ItalicFont=CascadiaCode-SemiLightItalic, + BoldFont=CascadiaCode-SemiBold, + BoldItalicFont=CascadiaCode-SemiBoldItalic, + Contextuals=AlternateOff +}
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht b/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht index 8c9d45b9eed..be40007444f 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/amsmath.4ht @@ -1,6 +1,6 @@ -% amsmath.4ht (2024-09-24-10:22), generated from tex4ht-4ht.tex +% amsmath.4ht (2025-01-08-13:38), generated from tex4ht-4ht.tex % Copyright 1997-2009 Eitan M. Gurari -% Copyright 2009-2024 TeX Users Group +% Copyright 2009-2025 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2024-09-24-10:22} +\immediate\write-1{version 2025-01-08-13:38} \HRestore\cases \HRestore\matrix @@ -312,25 +312,32 @@ \RecallMkHalignConfig \restorecolumn@ \egroup \b:start@aligned} \HLet\endaligned\:tempc -\def\:temp{% - \let\@testopt\alignsafe@testopt - \futurelet\:temp\aligned:a} -\def\aligned:a{\ifx [\:temp \expandafter\aligned:b - \else \def\:temp{\aligned:b[c]}\expandafter\:temp \fi} -\def\aligned:b[#1]{% - \al:gned{aligned}{#1}\m@ne} -\HLet\aligned\:temp \def\reg:aligned{\reg:start@aligned} \NewConfigure{aligned}{6} -\def\:temp{\futurelet\:temp\alignedat:a} -\def\alignedat:a{\ifx [\:temp \expandafter\alignedat:b - \else \def\:temp{\alignedat:b[c]}\expandafter\:temp \fi} -\def\alignedat:b[#1]{% - \let\@testopt\alignsafe@testopt - \al:gned{alignedat}{#1}\m@ne} -\HLet\alignedat\:temp +\def\Hlcr{z} +%% \Hlcr macro stores math environment optional possitionig argument +%% and can be used for custom setup. For example: +%% \Configure{gathered} +%% {\HCode{<\a:mathml mtable\space displaystyle="true" +%% \mml:class="gathered"% +%% \if t\Hlcr\space\a:mathml align="axis 1"\fi% +%% \if b\Hlcr\space\a:mathml align="axis -1"\fi% +%% >}} +%% {}... + +\def\:temp#1{% + \def\Hlcr{#1}% + \let\@testopt\alignsafe@testopt + \expandafter\al:gned\expandafter{\@currenvir}{#1}} +\HLet\start@aligned\:temp + \def\reg:alignedat{\reg:start@aligned} \NewConfigure{alignedat}{6} +\def\gathered:a[#1]{\def\Hlcr{#1}\pic:MkHalign{gathered}[#1]} +\def\:temp{% + \kernel@ifnextchar[{\gathered:a}{\gathered:a[c]}% + } +\HLet\gathered\:temp \catcode`\#13 \catcode`\!6 \def\reg:gathered[!1]{% \RIfM@\else diff --git a/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht b/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht index 05327f9a5a4..cb3eee7e75f 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/html-mml.4ht @@ -1,5 +1,5 @@ -% html-mml.4ht (2024-12-04-13:41), generated from tex4ht-mathml.tex -% Copyright 2009-2024 TeX Users Group +% html-mml.4ht (2025-01-09-13:26), generated from tex4ht-mathml.tex +% Copyright 2009-2025 TeX Users Group % Copyright 1999-2009 Eitan M. Gurari % % This work may be distributed and/or modified under the @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2024-12-04-13:41} +\immediate\write-1{version 2025-01-09-13:26} \exit:ifnot{amsmath,% array,% @@ -233,7 +233,8 @@ tex4ht} \Css{.hline-mtd, .array-hline td{ display:none }} -\Css{.array-hline + .array-row:last-child{display:none;}} +% why was the following line here? it hides last row even if it contains content +% \Css{.array-hline + .array-row:last-child{display:none;}} \Css{.array-hline:first-child{border-bottom:1px solid black;border-top:none;}} \:CheckOption{fonts} \if:Option \Configure{texttt} @@ -615,6 +616,7 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{amsmath} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -849,8 +851,6 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{plain} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1001,9 +1001,6 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% - - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{color} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1144,6 +1141,7 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ConfigureHinput{frenchb} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1532,5 +1530,10 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% + + + + + \endinput diff --git a/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht b/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht index 09adb9c4cf3..c173d89c394 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/mathml.4ht @@ -1,4 +1,4 @@ -% mathml.4ht (2025-01-05-13:36), generated from tex4ht-mathml.tex +% mathml.4ht (2025-01-08-13:38), generated from tex4ht-mathml.tex % Copyright 2009-2025 TeX Users Group % Copyright 1999-2009 Eitan M. Gurari % @@ -17,7 +17,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2025-01-05-13:36} +\immediate\write-1{version 2025-01-08-13:38} \exit:ifnot{Preamble,% accents,% @@ -1972,7 +1972,7 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% \:tempc{xalignat*}{xalignat-star} \:tempc{flalign*}{flalign-star} \Configure{gathered} - {\HCode{<\a:mathml mtable\Hnewline \mml:class="gathered">}} + {\HCode{<\a:mathml mtable\Hnewline \mml:class="gathered" \mtable:align:attribute>}} {\HCode{</\a:mathml mtable>}} {\HCode{<\a:mathml mtr>}} {\HCode{</\a:mathml mtr>}} {\HCode{\Hnewline<\a:mathml mtd>}} {\HCode{</\a:mathml mtd>}} @@ -2161,15 +2161,21 @@ accent="true">&\#x0332;</\a:mathml mo></\a:mathml munder>}% \ifx \ilimits@\o:displaylimits: \let\ilimits@\nolimits \fi +% thanks to Linas Stonys for this code +\def\mtable:align:attribute{% + \if t\Hlcr\space\a:mathml align="axis 1"\fi + \if b\Hlcr\space\a:mathml align="axis -1"\fi + } + \Configure{aligned} - {\HCode{<\a:mathml mtable\Hnewline \mml:class="aligned">}} + {\HCode{<\a:mathml mtable\Hnewline \mml:class="aligned" \mtable:align:attribute>}} {\HCode{</\a:mathml mtable>}} {\HCode{<\a:mathml mtr\Hnewline>}} {\HCode{</\a:mathml mtr>}} {\HCode{<\a:mathml mtd \a:mathml columnalign="\ifodd\HCol right\else left\fi" >}} {\HCode{</\a:mathml mtd>}} \Configure{alignedat} - {\HCode{<\a:mathml mtable\Hnewline \mml:class="alignedat">}} + {\HCode{<\a:mathml mtable\Hnewline \mml:class="alignedat" \mtable:align:attribute>}} {\HCode{</\a:mathml mtable>}} {\HCode{<\a:mathml mtr\Hnewline>}} {\HCode{</\a:mathml mtr>}} {\HCode{<\a:mathml mtd diff --git a/Master/texmf-dist/tex/generic/tex4ht/svg.4ht b/Master/texmf-dist/tex/generic/tex4ht/svg.4ht index 1a745704f07..172c9be5a3e 100644 --- a/Master/texmf-dist/tex/generic/tex4ht/svg.4ht +++ b/Master/texmf-dist/tex/generic/tex4ht/svg.4ht @@ -1,5 +1,5 @@ -% svg.4ht (2021-04-18-08:39), generated from tex4ht-4ht.tex -% Copyright 2018-2021 TeX Users Group +% svg.4ht (2025-01-09-13:20), generated from tex4ht-4ht.tex +% Copyright 2018-2025 TeX Users Group % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -16,7 +16,7 @@ % % If you modify this program, changing the % version identification would be appreciated. -\immediate\write-1{version 2021-04-18-08:39} +\immediate\write-1{version 2025-01-09-13:20} \renewcommand\includesvg[2][]{% % get file name with \svgpath support @@ -39,7 +39,7 @@ \fi% \expandafter\includegraphics\expandafter[\svg@tempb]{\svg@file@base.\svg@file@ext} \else - \typeout{SVG file #1 cannot be found} + \PackageWarning{svg.4ht}{SVG file "#2" cannot be found} \fi } diff --git a/Master/texmf-dist/tex/latex/aomart/aomart.cls b/Master/texmf-dist/tex/latex/aomart/aomart.cls index 2ac7d3db931..fde26059766 100644 --- a/Master/texmf-dist/tex/latex/aomart/aomart.cls +++ b/Master/texmf-dist/tex/latex/aomart/aomart.cls @@ -37,7 +37,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \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] \long\def\aom@size@warning#1{% \ClassWarning{aomart}{Size-changing option #1 will not be honored}}% @@ -71,7 +71,20 @@ \ClassInfo{aomart}{% Configuration file aomart.cfg is not found}} \ProcessOptions\relax +\let\@makefnmark@kernel\@makefnmark \LoadClass[11pt]{amsart} +\let\@makefnmark\@makefnmark@kernel +\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}} \RequirePackage{fancyhdr, lastpage, ifpdf, graphicx} \RequirePackage[breaklinks,colorlinks]{hyperref} \if@aom@screen@mode @@ -131,6 +144,12 @@ \setlength{\parskip}{\z@} \widowpenalty=10000 \clubpenalty=10000 +\AtBeginDocument{% + \labelsep=5pt\relax + \settowidth\leftmargini{\labelenumi\hskip\labelsep}% + \leftmargin=\leftmargini + \labelwidth=\leftmargini \advance\labelwidth-\labelsep + \@listi} \setlength{\headsep}{14pt} \setlength{\headheight}{18.0pt} \renewcommand{\headrulewidth}{0pt} diff --git a/Master/texmf-dist/tex/latex/beamerthemecelestia/beamerthemeCelestia.sty b/Master/texmf-dist/tex/latex/beamerthemecelestia/beamerthemeCelestia.sty new file mode 100644 index 00000000000..fad9ba136fb --- /dev/null +++ b/Master/texmf-dist/tex/latex/beamerthemecelestia/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/Master/texmf-dist/tex/latex/beamertools/beamertools.sty b/Master/texmf-dist/tex/latex/beamertools/beamertools.sty new file mode 100644 index 00000000000..1bf9de40fc6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/beamertools/beamertools.sty @@ -0,0 +1,72 @@ +%% +%% This is file `beamertools.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% beamertools.dtx (with options: `table,beamertools.sty') +%% +%% __________________________________________________ +%% 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. +%% +%% \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 \~} +%% +\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% +} +\endinput +%% +%% End of file `beamertools.sty'. diff --git a/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls b/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls index eeec561cdce..dd437b5bbbb 100644 --- a/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls +++ b/Master/texmf-dist/tex/latex/elsarticle/elsarticle.cls @@ -6,7 +6,7 @@ %% %% elsarticle.dtx (with options: `class') %% -%% Copyright 2007-2024 Elsevier Ltd +%% Copyright 2007-2025 Elsevier Ltd %% %% This file is part of the 'Elsarticle Bundle'. %% ------------------------------------------- @@ -26,8 +26,8 @@ %% %% \def\RCSfile{elsarticle}% - \def\RCSversion{3.4a}% - \def\RCSdate{2024/12/02}% + \def\RCSversion{3.4b}% + \def\RCSdate{2025/01/09}% \def\@shortjnl{\relax} \def\@journal{Elsevier Ltd} \def\@company{Elsevier Ltd} @@ -1263,7 +1263,6 @@ footnotesep=24pt plus 2pt minus 12pt, } \global\let\bibfont=\footnotesize - \global\bibsep=0pt \if@twocolumn\global\@twocolumnfalse\fi \else\ifnum\jtype=3 \RequirePackage{geometry} @@ -1280,7 +1279,6 @@ columnsep=2pc } \global\let\bibfont=\footnotesize - \global\bibsep=0pt \if@twocolumn\input{fleqn.clo}\fi \else\ifnum\jtype=5 \RequirePackage{geometry} @@ -1297,7 +1295,6 @@ columnsep=18pt }% \global\let\bibfont=\footnotesize - \global\bibsep=0pt \input{fleqn.clo} \global\@twocolumntrue %% diff --git a/Master/texmf-dist/tex/latex/fillpages/fillpages.sty b/Master/texmf-dist/tex/latex/fillpages/fillpages.sty new file mode 100644 index 00000000000..c7c170a18e4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/fillpages/fillpages.sty @@ -0,0 +1,192 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% Made by Gabriel Ruprecht % +% % +% This work is published under the % +% LaTeX project public license 1.3 % +% % +% Package version 1.0.0 % +% 2025-01-07 % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\ProvidesPackage{fillpages}[version 1.0.0] + +%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Number definitions %%% +%%%%%%%%%%%%%%%%%%%%%%%%%% + +% How many pages were inserted in the last run +% (at begin document) and how many pages are already +% inserted in this run (after begin document). The +% default value is overwritten with the content from +% the aux file (if there had ever be a run). +\newcount\GFM@FiPa@numberOfInsertedPages\relax +\GFM@FiPa@numberOfInsertedPages=0\relax + +% To distribute the fill pages on evenly on all +% insertion points, they must be counted. Default +% value must be 1 to avoid division by 0. It will +% be overwritten by the aux file value. +\newcount\GFM@FiPa@numberOfFillPagePositions\relax +\GFM@FiPa@numberOfFillPagePositions=1\relax + +% Number of pages, if there weren't any fill pages. +\newcount\GFM@FiPa@pageCountWithoutFillPages\relax +\GFM@FiPa@pageCountWithoutFillPages=0\relax + +% Self-explaining. Will be calculated. It is a +% float number, therefore realized as a length. +\newdimen\GFM@FiPa@pagesPerFillPosition\relax +\GFM@FiPa@pagesPerFillPosition=0pt\relax + +% The currentLimit defines, how many new fill pages +% are inserted. If there were over all 3 and current +% limit is 5, 2 fill pages will be inserted at the +% current insertion point. +\newdimen\GFM@FiPa@currentLimit\relax +\GFM@FiPa@currentLimit=0pt\relax + +% The number, by which the page number must be +% dividable. +\newcount\GFM@FiPa@Divisor\relax +\GFM@FiPa@Divisor=4\relax + +% An offset, if the numbers must be i.e. dividable +% by 4 and have 2 extra pages. +\newcount\GFM@FiPa@DivideableOffset\relax +\GFM@FiPa@DivideableOffset=0\relax + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Set the number by which the %%% +%%% page count must be dividable %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\NewDocumentCommand\pagesDividableBy{m O{0}}{% +\GFM@FiPa@Divisor=#1\relax% +\ifnum\GFM@FiPa@Divisor<1\relax% + \PackageError{fillpages.sty}{line 31: Illegal number}{You can't divide a page count by zero. Replaced with 1.}% + \GFM@FiPa@Divisor=1\relax% +\fi% +\ifnum\GFM@FiPa@Divisor>50\relax% + \PackageWarning{fillpages.sty}{Strange number. You want your pages dividable by a number greater than 50}% +\fi% +\GFM@FiPa@DivideableOffset=#2\relax% +} + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Defines a custom fillpage %%% +%%% %%% +%%% i.e. \setFillPage{1}{custom Text} lets %%% +%%% appear "custom Text" on fillpage no. 1 %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\long\def\setFillPage#1#2{ +\expandafter\global\expandafter\def\csname GFM@FiPa@AusgleichSeite#1\endcsname { +#2% +}%\def\csname... +}%\def\setFillPage + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Do the calculations, after %%% +%%% the aux file had been read. %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\AtBeginDocument{ +% From aux-file: +% GFM@FiPa@numberOfFillPagePositions +% GFM@FiPa@numberOfInsertedPages + +% Calculate pagesCountWithoutFillPages +\GFM@FiPa@pageCountWithoutFillPages=\PreviousTotalPages\relax +\advance\GFM@FiPa@pageCountWithoutFillPages by -\GFM@FiPa@numberOfInsertedPages\relax +% Reset to 0 for the next counting round. +\GFM@FiPa@numberOfInsertedPages=0\relax + +\GFM@FiPa@pagesPerFillPosition=\the\GFM@FiPa@pageCountWithoutFillPages pt\relax +\advance\GFM@FiPa@pagesPerFillPosition by -\GFM@FiPa@DivideableOffset pt\relax + +\ifdim\GFM@FiPa@pagesPerFillPosition>0 pt% +\loop% +\advance\GFM@FiPa@pagesPerFillPosition by -\GFM@FiPa@Divisor pt\relax% +\ifdim\GFM@FiPa@pagesPerFillPosition>0 pt\repeat% +%loop% +\fi + +\multiply\GFM@FiPa@pagesPerFillPosition by -1\relax% + +\divide\GFM@FiPa@pagesPerFillPosition by \GFM@FiPa@numberOfFillPagePositions\relax% + +\GFM@FiPa@numberOfFillPagePositions=0\relax +}%AtBeginDocument + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% This defines an insertion point %%% +%%% where the fill pages will appear. %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\insertFillPages{% +% i++ for GFM@FiPa@numberOfFillPagePositions% +\advance\GFM@FiPa@numberOfFillPagePositions by 1\relax% +% +% calculate the GFM@FiPa@currentLimit for insertion% +\GFM@FiPa@currentLimit=\GFM@FiPa@pagesPerFillPosition\relax% +\multiply\GFM@FiPa@currentLimit by \GFM@FiPa@numberOfFillPagePositions\relax% +\advance\GFM@FiPa@currentLimit by -0.98pt\relax% +% +% insert pages% +\ifdim\GFM@FiPa@numberOfInsertedPages pt<\GFM@FiPa@currentLimit% + \loop% + \advance\GFM@FiPa@numberOfInsertedPages by 1\relax% + \clearpage% + % choose the content of a predefined page. If it doesn't exist, csname expands to nothing. + \csname % + GFM@FiPa@AusgleichSeite\the\GFM@FiPa@numberOfInsertedPages + \endcsname% + \mbox{}% + \clearpage% + \ifnum\GFM@FiPa@numberOfInsertedPages>1000\relax% + \PackageError{fillpages.sty}{line 101: More than 1000 fill pages produced.}{You tried to insert more than 1000 fill pages. This must be an infinite loop.}% + \errmessage{Infinite loop detected} + \fi% + \ifdim\GFM@FiPa@numberOfInsertedPages pt<\GFM@FiPa@currentLimit\repeat% + %end loop% +\fi%ifdim +}%insertFillPages + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Do a calculation and write %%% +%%% numbers to the aux file. %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\AtEndDocument{ +% Write to aux +\ifnum\GFM@FiPa@numberOfFillPagePositions > 0\relax + \write\@auxout{% + \noexpand\global% + \noexpand\GFM@FiPa@numberOfFillPagePositions=% + \the\GFM@FiPa@numberOfFillPagePositions% + \noexpand\relax} +\fi + +\write\@auxout{% + \noexpand\global% + \noexpand\GFM@FiPa@numberOfInsertedPages=% + \the\GFM@FiPa@numberOfInsertedPages% + \noexpand\relax} + +% Write to log: +\wlog{Number of fill page positions: \the\GFM@FiPa@pagesPerFillPosition\relax}% +\wlog{Number of inserted fill pages: \the\GFM@FiPa@numberOfInsertedPages\relax}% + +}%AtEndDocument + diff --git a/Master/texmf-dist/tex/latex/gentium-otf/gentium-otf.sty b/Master/texmf-dist/tex/latex/gentium-otf/gentium-otf.sty new file mode 100644 index 00000000000..f4250afcbe1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/gentium-otf/gentium-otf.sty @@ -0,0 +1,132 @@ +%% $Id: gentium-otf.sty 1058 2025-01-08 08:02:06Z herbert $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.3 or, at your option, any later version. +%% +% +\ProvidesPackage{gentium-otf}[% + 2025/01/04 v. 0.01 (Herbert Voss) Supports gentium fonts for lualatex and xelatex.] + +\RequirePackage{iftex,xkeyval,textcomp,fontspec} + +\def\@gentium@book{} +\DeclareOptionX{book}{\def\@gentium@book{Book}} + +\newcommand*\gentiumRM@scale{1} +\DeclareOptionX{ScaleRM}{\renewcommand*{\gentiumRM@scale}{#1}} + +\newcommand*\gentium@math{} +\newcommand*\gentium@math@features{} +\DeclareOptionX{math}{\renewcommand*{\gentium@math}{#1}} +\DeclareOptionX{mathFeatures}{\renewcommand*{\gentium@math@features}{#1}} + +\newcommand*\gentium@sans{} +\newcommand*\gentium@sans@features{} +\DeclareOptionX{sans}{\renewcommand*{\gentium@sans}{#1}} +\DeclareOptionX{sansFeatures}{\renewcommand*{\gentium@sans@features}{#1}} + +\newcommand*\gentium@mono{} +\newcommand*\gentium@mono@features{} +\DeclareOptionX{mono}{\renewcommand*{\gentium@mono}{#1}} +\DeclareOptionX{monoFeatures}{\renewcommand*{\gentium@mono@features}{#1}} + +\def\gentium@defaultfeatures{} +\DeclareOptionX{defaultfeatures}{\def\gentium@defaultfeatures{#1}} + +\ProcessOptionsX\relax + +\ifxetex\XeTeXtracingfonts=1\fi +\defaultfontfeatures[\rmfamily]{ + Ligatures = TeX , + SmallCapsFeatures={Letters=SmallCaps},% \ifluatex,Renderer=Basic\fi}, + \gentium@defaultfeatures +} + +%------------------------ filenames start ------------------------- +% 1. GentiumBookPlus-Bold.ttf +% 2. GentiumBookPlus-BoldItalic.ttf +% 3. GentiumBookPlus-Italic.ttf +% 4. GentiumBookPlus-Regular.ttf +% 5. GentiumPlus-Bold.ttf +% 6. GentiumPlus-BoldItalic.ttf +% 7. GentiumPlus-Italic.ttf +% 8. GentiumPlus-Regular.ttf + +\edef\gentium@main@font{Gentium\@gentium@book Plus}% GentiumPlus or GentiumBookPlus + +\if$\gentium@math$\else + \RequirePackage{unicode-math} + \expandafter\setmathfont\expandafter[\gentium@math@features]{\gentium@math} +\fi + +\if$\gentium@sans$\else + \expandafter\setsansfont\expandafter[\gentium@sans@features]{\gentium@sans} +\fi + +\if$\gentium@mono$\else + \expandafter\setmonofont\expandafter[\gentium@mono@features]{\gentium@mono} +\fi + +\setmainfont{\gentium@main@font}[ + Scale = \gentiumRM@scale , + UprightFont = *-Regular, + ItalicFont = *-Italic, + ItalicFeatures = { SmallCapsFont = *-Italic }, + SlantedFont = *-Regular, + SlantedFeatures= {FakeSlant=0.2}, + BoldFont = *-Bold, + BoldFeatures = { SmallCapsFont = *-Bold }, + BoldItalicFont = *-BoldItalic, + BoldItalicFeatures = { SmallCapsFont = *-BoldItalic }, + BoldSlantedFont= *-Bold, + BoldSlantedFeatures= {FakeSlant=0.2, SmallCapsFont = *-bold }, + SmallCapsFont = *-Regular, +% SmallCapsFeatures={RawFeature=+smcp}, + SmallCapsFeatures={Letters=SmallCaps}, + Extension = .ttf +] + +\def\Lctosc#1{{\addfontfeature{RawFeature=+c2sc}#1}} +\def\LCtoSC{\@ifnextchar-\L@CtoSC\L@@CtoSC} +\def\L@CtoSC-{\addfontfeature{RawFeature=-c2sc}} +\def\L@@CtoSC#1{\addfontfeature{RawFeature=+c2sc}\ifx#1+\else#1\fi} + +\def\Lctosmcp#1{{\addfontfeature{RawFeature={+c2sc,+smcp}}#1}} +\def\LCtoSMCP{\@ifnextchar-\L@CtoSMCP\L@@CtoSMCP} +\def\L@CtoSMCP-{\addfontfeature{RawFeature={-c2sc,-smcp}}} +\def\L@@CtoSMCP#1{\addfontfeature{RawFeature={+c2sc,+smcp}}\ifx#1+\else#1\fi} + +\def\Lliga#1{{\addfontfeature{RawFeature=+liga}#1}} +\def\LLIGA{\@ifnextchar-\L@LIGA\L@@LIGA} +\def\L@LIGA-{\addfontfeature{RawFeature=-liga}} +\def\L@@LIGA#1{\addfontfeature{RawFeature=+liga}\ifx#1+\else#1\fi} + +\def\Lss#1#2#3{{\addfontfeature{RawFeature=+ss#1#2}#3}} +\def\LSS#1#2{\addfontfeature{RawFeature=+ss#1#2}} + +\def\Lcv{\@ifnextchar[\Lcv@i{\Lcv@i[1]}} +\def\Lcv@i[#1]#2#3#4{{\addfontfeature{RawFeature={+cv#2#3=#1}}#4}} +\def\LCV#1#2{\@ifnextchar[\LCV@i{\LCV@i[1]}} +\def\LCV[#1]#2#3{\addfontfeature{RawFeature={+cv#2#3=#1}}} + +\def\Llang#1{\addfontfeature{Script=Cyrillic,Language=Serbian}} + +\def\Lsup#1{{\addfontfeature{RawFeature=+sups}#1}} +\def\LSUP{\@ifnextchar-\L@SUP\L@@SUP} +\def\L@SUP-{\addfontfeature{RawFeature=-sups}} +\def\L@@SUP#1{\addfontfeature{RawFeature=+sups}\ifx#1+\else#1\fi} + +\def\Lsub#1{{\addfontfeature{RawFeature=+subs}#1}} +\def\LSUB{\@ifnextchar-\L@SUB\L@@SUB} +\def\L@SUB-{\addfontfeature{RawFeature=-subs}} +\def\L@@SUB#1{\addfontfeature{RawFeature=+subs}\ifx#1+\else#1\fi} + +\def\Lfrac#1{{\addfontfeature{RawFeature=+frac}#1}} +\def\LFRAC{\@ifnextchar-\L@FRAC\L@@FRAC} +\def\L@FRAC-{\addfontfeature{RawFeature=-frac}} +\def\L@@FRAC#1{\addfontfeature{RawFeature=+frac}\ifx#1+\else#1\fi} + + +\endinput + diff --git a/Master/texmf-dist/tex/latex/keytheorems/keytheorems.sty b/Master/texmf-dist/tex/latex/keytheorems/keytheorems.sty index 0c025cce0c7..efc25150be5 100644 --- a/Master/texmf-dist/tex/latex/keytheorems/keytheorems.sty +++ b/Master/texmf-dist/tex/latex/keytheorems/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/Master/texmf-dist/tex/latex/libertinus-type1/LY1LibertinusMono-TLF.fd b/Master/texmf-dist/tex/latex/libertinus-type1/LY1LibertinusMono-TLF.fd index 1db4c228d04..51c68fbfa34 100644 --- a/Master/texmf-dist/tex/latex/libertinus-type1/LY1LibertinusMono-TLF.fd +++ b/Master/texmf-dist/tex/latex/libertinus-type1/LY1LibertinusMono-TLF.fd @@ -1,7 +1,7 @@ -%% Generated by autoinst on 2024/09/22 +%% Generated by autoinst on 2025/01/07 %% \ProvidesFile{LY1LibertinusMono-TLF.fd} - [2024/09/22 (autoinst) Font definitions for LY1/LibertinusMono-TLF.] + [2025/01/07 (autoinst) Font definitions for LY1/LibertinusMono-TLF.] \ifcsname s@fct@alias\endcsname\else \gdef\s@fct@alias{\sub@sfcnt\@font@aliasinfo} @@ -31,6 +31,21 @@ }{} +% ---- b = bold ---- + +\DeclareFontShape{LY1}{LibertinusMono-TLF}{b}{n}{ + <-> \LibertinusMono@@scale LibertinusMono-Bold-tlf-ly1 +}{} + +\DeclareFontShape{LY1}{LibertinusMono-TLF}{bold}{n}{ + <-> alias * LibertinusMono-TLF/b/n +}{} + + % ---- Extra 'ssub' rules to map 'bx' to 'b' ---- +\DeclareFontShape{LY1}{LibertinusMono-TLF}{bx}{n}{ + <-> ssub * LibertinusMono-TLF/b/n +}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/libertinus-type1/OT1LibertinusMono-TLF.fd b/Master/texmf-dist/tex/latex/libertinus-type1/OT1LibertinusMono-TLF.fd index fd29777b08f..9d93edbe3d9 100644 --- a/Master/texmf-dist/tex/latex/libertinus-type1/OT1LibertinusMono-TLF.fd +++ b/Master/texmf-dist/tex/latex/libertinus-type1/OT1LibertinusMono-TLF.fd @@ -1,7 +1,7 @@ -%% Generated by autoinst on 2024/09/22 +%% Generated by autoinst on 2025/01/07 %% \ProvidesFile{OT1LibertinusMono-TLF.fd} - [2024/09/22 (autoinst) Font definitions for OT1/LibertinusMono-TLF.] + [2025/01/07 (autoinst) Font definitions for OT1/LibertinusMono-TLF.] \ifcsname s@fct@alias\endcsname\else \gdef\s@fct@alias{\sub@sfcnt\@font@aliasinfo} @@ -20,6 +20,17 @@ \DeclareFontFamily{OT1}{LibertinusMono-TLF}{\hyphenchar\font=-1} +% ---- b = bold ---- + +\DeclareFontShape{OT1}{LibertinusMono-TLF}{b}{n}{ + <-> \LibertinusMono@@scale LibertinusMono-Bold-tlf-ot1 +}{} + +\DeclareFontShape{OT1}{LibertinusMono-TLF}{bold}{n}{ + <-> alias * LibertinusMono-TLF/b/n +}{} + + % ---- m = regular ---- \DeclareFontShape{OT1}{LibertinusMono-TLF}{m}{n}{ @@ -33,4 +44,8 @@ % ---- Extra 'ssub' rules to map 'bx' to 'b' ---- +\DeclareFontShape{OT1}{LibertinusMono-TLF}{bx}{n}{ + <-> ssub * LibertinusMono-TLF/b/n +}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/libertinus-type1/T1LibertinusMono-TLF.fd b/Master/texmf-dist/tex/latex/libertinus-type1/T1LibertinusMono-TLF.fd index ba7f4efbc9a..a400f0fcbe3 100644 --- a/Master/texmf-dist/tex/latex/libertinus-type1/T1LibertinusMono-TLF.fd +++ b/Master/texmf-dist/tex/latex/libertinus-type1/T1LibertinusMono-TLF.fd @@ -1,7 +1,7 @@ -%% Generated by autoinst on 2024/09/22 +%% Generated by autoinst on 2025/01/07 %% \ProvidesFile{T1LibertinusMono-TLF.fd} - [2024/09/22 (autoinst) Font definitions for T1/LibertinusMono-TLF.] + [2025/01/07 (autoinst) Font definitions for T1/LibertinusMono-TLF.] \ifcsname s@fct@alias\endcsname\else \gdef\s@fct@alias{\sub@sfcnt\@font@aliasinfo} @@ -20,6 +20,17 @@ \DeclareFontFamily{T1}{LibertinusMono-TLF}{\hyphenchar\font=-1} +% ---- b = bold ---- + +\DeclareFontShape{T1}{LibertinusMono-TLF}{b}{n}{ + <-> \LibertinusMono@@scale LibertinusMono-Bold-tlf-t1 +}{} + +\DeclareFontShape{T1}{LibertinusMono-TLF}{bold}{n}{ + <-> alias * LibertinusMono-TLF/b/n +}{} + + % ---- m = regular ---- \DeclareFontShape{T1}{LibertinusMono-TLF}{m}{n}{ @@ -33,4 +44,8 @@ % ---- Extra 'ssub' rules to map 'bx' to 'b' ---- +\DeclareFontShape{T1}{LibertinusMono-TLF}{bx}{n}{ + <-> ssub * LibertinusMono-TLF/b/n +}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/libertinus-type1/TS1LibertinusMono-TLF.fd b/Master/texmf-dist/tex/latex/libertinus-type1/TS1LibertinusMono-TLF.fd index 0ac2b3b4f9c..8ff15b5e3f8 100644 --- a/Master/texmf-dist/tex/latex/libertinus-type1/TS1LibertinusMono-TLF.fd +++ b/Master/texmf-dist/tex/latex/libertinus-type1/TS1LibertinusMono-TLF.fd @@ -1,7 +1,7 @@ -%% Generated by autoinst on 2024/09/22 +%% Generated by autoinst on 2025/01/07 %% \ProvidesFile{TS1LibertinusMono-TLF.fd} - [2024/09/22 (autoinst) Font definitions for TS1/LibertinusMono-TLF.] + [2025/01/07 (autoinst) Font definitions for TS1/LibertinusMono-TLF.] \ifcsname s@fct@alias\endcsname\else \gdef\s@fct@alias{\sub@sfcnt\@font@aliasinfo} @@ -20,6 +20,17 @@ \DeclareFontFamily{TS1}{LibertinusMono-TLF}{\hyphenchar\font=-1} +% ---- b = bold ---- + +\DeclareFontShape{TS1}{LibertinusMono-TLF}{b}{n}{ + <-> \LibertinusMono@@scale LibertinusMono-Bold-tlf-ts1 +}{} + +\DeclareFontShape{TS1}{LibertinusMono-TLF}{bold}{n}{ + <-> alias * LibertinusMono-TLF/b/n +}{} + + % ---- m = regular ---- \DeclareFontShape{TS1}{LibertinusMono-TLF}{m}{n}{ @@ -33,4 +44,8 @@ % ---- Extra 'ssub' rules to map 'bx' to 'b' ---- +\DeclareFontShape{TS1}{LibertinusMono-TLF}{bx}{n}{ + <-> ssub * LibertinusMono-TLF/b/n +}{} + \endinput diff --git a/Master/texmf-dist/tex/latex/neoschool/neoschool.cls b/Master/texmf-dist/tex/latex/neoschool/neoschool.cls new file mode 100644 index 00000000000..388cb45ab60 --- /dev/null +++ b/Master/texmf-dist/tex/latex/neoschool/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/Master/texmf-dist/tex/latex/scrlayer-fancyhdr/scrlayer-fancyhdr.sty b/Master/texmf-dist/tex/latex/scrlayer-fancyhdr/scrlayer-fancyhdr.sty index 3bf4018e424..a943af1bfd1 100644 --- a/Master/texmf-dist/tex/latex/scrlayer-fancyhdr/scrlayer-fancyhdr.sty +++ b/Master/texmf-dist/tex/latex/scrlayer-fancyhdr/scrlayer-fancyhdr.sty @@ -26,7 +26,7 @@ %%% docstrip run: identify \NeedsTeXFormat{LaTeX2e}[2020/10/01] \ProvidesPackage{scrlayer-fancyhdr} - [2025-01-07 v0.3 + [2025-01-08 v0.3.1 combining fancyhdr with KOMA-Script's scrlayer] %%% docstrip run: init \RequirePackage{scrlayer}[2021/02/15] @@ -53,8 +53,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[% @@ -69,7 +69,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} diff --git a/Master/texmf-dist/tex/latex/skdoc/skdoc.cls b/Master/texmf-dist/tex/latex/skdoc/skdoc.cls index ececc0cbed8..2d060ca8cac 100644 --- a/Master/texmf-dist/tex/latex/skdoc/skdoc.cls +++ b/Master/texmf-dist/tex/latex/skdoc/skdoc.cls @@ -8,7 +8,7 @@ %% %% 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 @@ -26,7 +26,7 @@ %% and the derived filebase skdoc.cls. \RequirePackage{expl3} \ProvidesExplClass{skdoc} - {2020/11/16}{1.5d}{skdoc documentation class} + {2025/01/08}{1.5e}{skdoc documentation class} \PassOptionsToPackage{log-declarations=false}{xparse} \LoadClass[ DIV7, headings=big, @@ -130,7 +130,7 @@ \cs_undefine:N\cl@linenumber \cs_undefine:N\p@linenumber \cs_undefine:N\thelinenumber - \RequirePackage{minted} + \RequirePackage{minted2} \renewcommand{\theFancyVerbLine}{ \sffamily\tiny\textcolor{lightgray}{ \oldstylenums{\arabic{FancyVerbLine}}} @@ -1050,7 +1050,7 @@ \underline{\hyperup{#1}} } \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 @@ -1062,10 +1062,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} @@ -1129,28 +1126,25 @@ 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 } +\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} +} \newglossarystyle{changelog}{ - \glossarystyle{altlist} + \setglossarystyle{altlist} \renewenvironment{theglossary}{ \bool_gset_true:N\g__skdoc_no_index_bool \begin{multicols}{2}\begin{description} @@ -1158,15 +1152,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 } } \newglossary{changes}{gls}{glo}{Changes} @@ -1231,7 +1226,7 @@ }% \IfNoValueTF{#1}{}{\keys_set:nn{skdoc@package}{#1}}% \def\@package{#2}% - \title{The~\textbf{\pkg*{\@package}}~package}% + \title{The~\textbf{\textsf{\@package}}~package}% } \DeclareDocumentCommand\ctan{m}{% \def\@ctan{\url{http://www.ctan.org/pkg/#1}}% @@ -1254,7 +1249,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/Master/texmf-dist/tex/latex/tikz-bpmn/tikzlibrarybpmn.code.tex b/Master/texmf-dist/tex/latex/tikz-bpmn/tikzlibrarybpmn.code.tex new file mode 100644 index 00000000000..01c9e9db197 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikz-bpmn/tikzlibrarybpmn.code.tex @@ -0,0 +1,1031 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tikz-bpmn}[2011/08/16 BPMN diagrams using the +Tikz library] + +\RequirePackage{xcolor} +\RequirePackage{tikz} +\RequirePackage{bm} + +%this can be overridden to set the background colour, necessary for drawing double lines and other things. +\colorlet{defaultbackgroundcolour}{white} + +\usetikzlibrary{shapes,shapes.geometric} +\usetikzlibrary{arrows} +\usetikzlibrary{calc} + +\tikzstyle{every task} = [] +\tikzstyle{every gateway} = [] +\tikzstyle{every sequence} = [] +\tikzstyle{every message} = [] +\tikzstyle{every association} = [] +\tikzstyle{every event} = [] +\tikzstyle{every intermediate event} = [] +\tikzstyle{every token} = [] +\tikzstyle{every call activity} = [] + +\tikzstyle{task} = [rectangle, draw, minimum width=4em, minimum height=2em,rounded corners,align=center,every task] + +\tikzstyle{sequence} = [->,>=triangle 45,every sequence] +\tikzstyle{reverse sequence} = [sequence,<-] +\tikzstyle{message} = [o->,dashed,>=open triangle 45,every sequence] +\tikzstyle{reverse message} = [message,<-o] +\tikzstyle{association} = [densely dotted,>=angle 45,every association] +\tikzstyle{event} = [circle,minimum width=1.5em, minimum height=1.5em,draw,every event] +\tikzstyle{end event} = [event,ultra thick,every event] +\tikzstyle{intermediate event}[defaultbackgroundcolour] = [event,double=#1,every event, every intermediate event] +\tikzstyle{token} = [solid,circle,fill,inner sep=0.5mm] +\tikzstyle{open token} = [solid,circle,draw,fill=red,inner sep=0.5mm,thick] + +\tikzset{fit margins/.style={/tikz/afit/.cd,#1, + /tikz/.cd, + inner xsep=\pgfkeysvalueof{/tikz/afit/left}+\pgfkeysvalueof{/tikz/afit/right}, + inner ysep=\pgfkeysvalueof{/tikz/afit/top}+\pgfkeysvalueof{/tikz/afit/bottom}, + xshift=-\pgfkeysvalueof{/tikz/afit/left}+\pgfkeysvalueof{/tikz/afit/right}, + yshift=-\pgfkeysvalueof{/tikz/afit/bottom}+\pgfkeysvalueof{/tikz/afit/top}}, + afit/.cd,left/.initial=2pt,right/.initial=2pt,bottom/.initial=2pt,top/.initial=2pt} + +\tikzstyle{text annotation} = [ + font=\tiny, + path picture = { + \def\w{3mm} + \draw ($(path picture bounding box.north west)+(\w,0)$) to (path picture bounding box.north west) to (path picture bounding box.south west) to ($(path picture bounding box.south west)+(\w,0)$); + } +] + +%%%%% gateways %%%%% + +\tikzstyle{gateway} = [ + diamond, + draw, + inner sep=0pt, + minimum width=1.5em, + minimum height=1.5em, + align=center, + every gateway +] + +\tikzstyle{and gateway} = [parallel gateway] +\tikzstyle{parallel gateway} = [ + gateway, + label=center:\Large + +] + +\tikzstyle{xor gateway} = [exclusive gateway] +\tikzstyle{exclusive gateway} = [ + gateway, + label=center:\Large\texttimes +] + +\tikzstyle{or gateway} = [inclusive gateway] +\tikzstyle{inclusive gateway} = [ + gateway, + path picture = { + \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}} + \pgfmathsetmacro\d{\csname pgf@y\endcsname} + \node [draw, thick, circle, inner sep=0, minimum size=0.55*\d pt, anchor=center] at (path picture bounding box.center) {}; + } +] + +\tikzstyle{eventbased gateway} = [ + gateway, + path picture = { + \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}} + \pgfmathsetmacro\d{\csname pgf@y\endcsname} + \node [draw, thin, circle, inner sep=0, minimum size=0.6*\d pt, anchor=center] at (path picture bounding box.center) {}; + \node [draw, thin, circle, inner sep=0, minimum size=0.5*\d pt, anchor=center] at (path picture bounding box.center) {}; + \node [draw, thin, regular polygon, regular polygon sides=5, inner sep=0, minimum size=0.35*\d pt, anchor=center] at (path picture bounding box.center) {}; + } +] + +%%%%% empty events %%%%% + +\tikzstyle{start event} = [event] +\tikzstyle{none start event} = [start event] + +%%%%% message events %%%%% + +\tikzstyle{message start event} = [ + start event, + draw message +] + +\tikzstyle{catching message intermediate event}[defaultbackgroundcolour] = [ + draw message, + intermediate event=#1 +] + +\tikzstyle{throwing message event}[defaultbackgroundcolour] = [ + path picture = { + \def\w{1.7mm} + \def\h{1.1mm} + \fill ($(path picture bounding box)+(\w,\h)$) rectangle ($(path picture bounding box)+(-\w,-\h)$); + \draw [#1, line cap=round, thin] ($(path picture bounding box)+(\w,\h)$) to (path picture bounding box.center); + \draw [#1, line cap=round, thin] ($(path picture bounding box)+(-\w,\h)$) to (path picture bounding box.center); + } +] + +\tikzstyle{throwing message intermediate event}[defaultbackgroundcolour] = [ + draw filled message={#1}, + intermediate event=#1 +] + +\tikzstyle{message end event}[defaultbackgroundcolour] = [ + end event, + draw filled message={#1} +] + +\tikzstyle{terminate event} = [ + end event, + path picture = { + \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}} + \pgfmathsetmacro\d{\csname pgf@y\endcsname} + \node [fill, circle, inner sep=0, minimum size=0.65*\d pt, anchor=center] at (path picture bounding box.center) {}; + } +] + +%%%%% other events %%%%% + +\tikzstyle{draw signal}[] = [ + path picture = { + \def\ma{0.8} %1 - margin + \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}} + \pgfmathsetmacro\d{\csname pgf@y\endcsname} + \coordinate (a) at ($(path picture bounding box.center)+(90:\ma*0.5*\d pt)$); + \coordinate (b) at ($(path picture bounding box.center)+(210:\ma*0.5*\d pt)$); + \coordinate (c) at ($(path picture bounding box.center)+(330:\ma*0.5*\d pt)$); + \draw [solid, #1] (a) to (b) to (c) to cycle; + } +] + +\tikzstyle{draw error}[] = [ + path picture = { + \def\de{38} %degrees low peaks + \def\df{100} %degrees high peaks + \def\dd{0.38} %width at valleys + \def\ma{0.8} %1 - margin + \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}} + \pgfmathsetmacro\d{\csname pgf@y\endcsname} + \coordinate (path picture bounding box a) at ($(path picture bounding box.center)+(\de:\ma*0.5*\d pt)$); + \coordinate (path picture bounding box b) at ($(path picture bounding box.center)+(180+\de:\ma*0.5*\d pt)$); + \coordinate (path picture bounding box c) at ($(path picture bounding box.center)+(\df:\ma*0.5*\d pt)$); + \coordinate (path picture bounding box d) at ($(path picture bounding box.center)+(180+\df:\ma*0.5*\d pt)$); + \coordinate (path picture bounding box e) at ($(path picture bounding box c)+(0,-\dd*\d pt)$); + \coordinate (path picture bounding box f) at ($(path picture bounding box d)+(0,\dd*\d pt)$); + \draw [solid, #1] (path picture bounding box a) to (path picture bounding box f) to (path picture bounding box c) to (path picture bounding box b) to (path picture bounding box e) to (path picture bounding box d) to cycle; + } +] + +\tikzstyle{draw message} = [ + path picture = { + \def\de{38} %degrees + \def\ma{0.2} %margin + \def\li{0.4} %lid + \coordinate (path picture bounding box a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$); + \coordinate (path picture bounding box a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$); + \coordinate (path picture bounding box a) at (path picture bounding box a1 -| path picture bounding box a2); + \coordinate (path picture bounding box b1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.south east)$); + \coordinate (path picture bounding box b) at (path picture bounding box b1 -| path picture bounding box a2); + \coordinate (path picture bounding box c1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.north west)$); + \coordinate (path picture bounding box c2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.west)$); + \coordinate (path picture bounding box c) at (path picture bounding box c1 -| path picture bounding box c2); + \coordinate (path picture bounding box d1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.south west)$); + \coordinate (path picture bounding box d) at (path picture bounding box d1 -| path picture bounding box c2); + \coordinate (path picture bounding box e1) at ($(path picture bounding box a)!0.5!(path picture bounding box c)$); + \coordinate (path picture bounding box e2) at ($(path picture bounding box b)!0.5!(path picture bounding box d)$); + \coordinate (path picture bounding box e) at ($(path picture bounding box e1)!\li!(path picture bounding box e2)$); + \draw [solid] (path picture bounding box a) to (path picture bounding box b) to (path picture bounding box d) to (path picture bounding box c) to cycle; + \draw [solid, line cap=round] (path picture bounding box a) to (path picture bounding box e) to (path picture bounding box c); + } +] + +\tikzstyle{draw filled message} = [ + path picture = { + \def\de{38} %degrees + \def\ma{0.2} %margin + \def\li{0.4} %lid + \coordinate (path picture bounding box a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$); + \coordinate (path picture bounding box a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$); + \coordinate (path picture bounding box a) at (path picture bounding box a1 -| path picture bounding box a2); + \coordinate (path picture bounding box b1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.south east)$); + \coordinate (path picture bounding box b) at (path picture bounding box b1 -| path picture bounding box a2); + \coordinate (path picture bounding box c1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.north west)$); + \coordinate (path picture bounding box c2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.west)$); + \coordinate (path picture bounding box c) at (path picture bounding box c1 -| path picture bounding box c2); + \coordinate (path picture bounding box d1) at ($(path picture bounding box.west)!{sin(\de)-\ma}!(path picture bounding box.south west)$); + \coordinate (path picture bounding box d) at (path picture bounding box d1 -| path picture bounding box c2); + \coordinate (path picture bounding box e1) at ($(path picture bounding box a)!0.5!(path picture bounding box c)$); + \coordinate (path picture bounding box e2) at ($(path picture bounding box b)!0.5!(path picture bounding box d)$); + \coordinate (path picture bounding box e) at ($(path picture bounding box e1)!\li!(path picture bounding box e2)$); + \fill (path picture bounding box a) to (path picture bounding box b) to (path picture bounding box d) to (path picture bounding box c) to cycle; + \draw [line cap=round, line width=1pt, #1] (path picture bounding box a) to (path picture bounding box e) to (path picture bounding box c); + } +] + +\tikzstyle{draw compensation}[] = [ + path picture = { + \def\de{40} %degrees + \def\ma{0.2} %margin + \coordinate (a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$); + \coordinate (a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$); + \coordinate (a) at (a1 -| a2); + \coordinate (b1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.south east)$); + \coordinate (b) at (b1 -| a2); + \coordinate (c) at ($(path picture bounding box.west)!\ma!(path picture bounding box.center)$); + \coordinate (d1) at ($(a)!0.5!(b)$); + \coordinate (d) at ($(c)!0.5!(d1)$); + \coordinate (e) at (d |- a); + \coordinate (f) at (d |- b); + \draw [solid, #1] (d) + to (a) + to (b) + to cycle; + \draw [solid, #1] (c) + to (e) + to (f) + to cycle; + } +] + +\tikzstyle{draw timer} = [ + path picture = { + \def\ma{0.75} %1 - margin + \pgfpointdiff{\pgfpointanchor{path picture bounding box}{south east}}{\pgfpointanchor{path picture bounding box}{north east}} + \pgfmathsetmacro\r{\csname pgf@y\endcsname} + \draw [solid, #1] (path picture bounding box.center) circle (\ma*0.5*\r pt); + \foreach \angle in {0,30,...,330} + \draw [solid, ultra thin, #1] ($(path picture bounding box.center)+(\angle:\ma*0.4*\r pt)$) to ($(path picture bounding box.center)+(\angle:\ma*0.5*\r pt)$); + \draw [solid, line cap=round, #1] ($(path picture bounding box.center)+(77:\ma*0.425*\r pt)$) to (path picture bounding box.center); + \draw [solid, line cap=round, #1] ($(path picture bounding box.center)+(0:\ma*0.3*\r pt)$) to (path picture bounding box.center); + } +] + +\tikzstyle{throwing compensation intermediate event}[defaultbackgroundcolour] = [ + draw compensation={fill}, + intermediate event=#1, +] + +\tikzstyle{throwing compensation end event} = [ + end event, + draw compensation={fill,thin} +] + +\tikzstyle{error event} = [throwing error end event] +\tikzstyle{throwing error end event} = [ + end event, + draw error={fill,thin} +] + +\tikzstyle{timer start event} = [ + start event, + draw timer +] + +\tikzstyle{timer event} = [timer intermediate event] +\tikzstyle{timer intermediate event}[defaultbackgroundcolour] = [ + intermediate event=#1, + draw timer +] + +\tikzstyle{signal start event} = [ + start event, + draw signal +] + +\tikzstyle{signal intermediate event}[defaultbackgroundcolour] = [catching signal intermediate event=#1] +\tikzstyle{catching signal intermediate event}[defaultbackgroundcolour] = [ + intermediate event=#1, + draw signal +] + +\tikzstyle{throwing signal intermediate event}[defaultbackgroundcolour] = [ + intermediate event=#1, + draw signal={fill,draw=none} +] + +\tikzstyle{signal end event} = [ + end event, + draw signal={fill,draw=none} +] + +%%%%% boundary events %%%%% + +\tikzstyle{boundary event}[defaultbackgroundcolour] = [ + circle, + draw, + fill=#1, + double=#1, + anchor=center +] + +\tikzstyle{noninterrupting boundary event}[defaultbackgroundcolour] = [ + circle, + dashed, + dash pattern=on 1.5pt off 1pt, + draw, + fill=#1, + double=#1, + anchor=center +] + +\tikzstyle{compensation boundary event}[defaultbackgroundcolour] = [ + boundary event=#1, + draw compensation +] + +\tikzstyle{message boundary event}[defaultbackgroundcolour] = [ + boundary event=#1, + draw message +] + +\tikzstyle{message noninterrupting boundary event}[defaultbackgroundcolour] = [ + draw message, + noninterrupting boundary event=#1 +] + +\tikzstyle{timer boundary event}[defaultbackgroundcolour] = [ + boundary event=#1, + draw timer +] + +\tikzstyle{timer noninterrupting boundary event}[defaultbackgroundcolour] = [ + draw timer, + noninterrupting boundary event=#1 +] + +\tikzstyle{error boundary event}[defaultbackgroundcolour] = [ + boundary event=#1, + draw error +] + +\tikzstyle{signal boundary event}[defaultbackgroundcolour] = [ + boundary event=#1, + draw signal +] + +\tikzstyle{signal noninterrupting boundary event}[defaultbackgroundcolour] = [ + draw signal, + noninterrupting boundary event=#1 +] + +%%%%% event sub-process %%%%% + +\tikzstyle{event subprocess} = [ + expanded subprocess, + dotted +] + +\tikzstyle{collapsed event subprocess} = [ + collapsed subprocess, + dotted, + label={[anchor=north west,#1,circle,draw,minimum size=0.3cm,inner sep=0,xshift=0.1cm,yshift=-0.1cm]north west:} +] + +\tikzstyle{collapsed noninterrupting event subprocess} = [ + collapsed subprocess, + dotted, + label={[anchor=north west, + #1, + dashed, + draw, + circle, + dash pattern=on 1pt off 1pt, + minimum size=0.3cm, + inner sep=0, + xshift=0.1cm, + yshift=-0.1cm]north west:} +] + +\tikzstyle{event subprocess label} = [ + task, + fit margins={left=1.5mm,right=1.5mm,bottom=1.5mm,top=2.1mm}, + label={[anchor=north west]north west:\footnotesize#1}, + dotted +] + +\tikzstyle{message event subprocess} = [ + collapsed event subprocess=draw message +] + +\tikzstyle{timer event subprocess} = [ + collapsed event subprocess=draw timer +] + +\tikzstyle{compensation event subprocess} = [ + collapsed event subprocess=draw compensation +] + +\tikzstyle{signal event subprocess} = [ + collapsed event subprocess=draw signal +] + +\tikzstyle{error event subprocess} = [ + collapsed event subprocess=draw error +] + +\tikzstyle{message noninterrupting event subprocess} = [ + collapsed noninterrupting event subprocess=draw message +] + +\tikzstyle{timer noninterrupting event subprocess} = [ + collapsed noninterrupting event subprocess=draw timer +] + +\tikzstyle{signal noninterrupting event subprocess} = [ + collapsed noninterrupting event subprocess=draw signal +] + +\tikzstyle{subprocess event} = [ + start event +] + +\tikzstyle{noninterrupting subprocess event} = [ + start event, + dashed, + dash pattern=on 2pt off 2pt +] + +\tikzstyle{message subprocess event} = [ + subprocess event, + draw message +] + +\tikzstyle{message noninterrupting subprocess event} = [ + noninterrupting subprocess event, + draw message +] + +\tikzstyle{timer subprocess event} = [ + subprocess event, + draw timer +] + +\tikzstyle{timer noninterrupting subprocess event} = [ + noninterrupting subprocess event, + draw timer +] + +\tikzstyle{signal subprocess event} = [ + subprocess event, + draw signal +] + +\tikzstyle{signal noninterrupting subprocess event} = [ + noninterrupting subprocess event, + draw signal +] + +\tikzstyle{compensation subprocess event} = [ + subprocess event, + draw compensation +] + +\tikzstyle{error subprocess event} = [ + subprocess event, + draw error +] + +%%%%% call activity %%%%% + +\tikzstyle{call task} = [ + task, + thick, + every call activity +] + +\tikzstyle{collapsed call subprocess} = [call subprocess] +\tikzstyle{call subprocess} = [ + call task, + inner sep=3mm, + label={[anchor=south, + inner sep=-0.25mm, + shape=square, + draw, + regular polygon, + regular polygon sides=4, + yshift=0.5mm + ]below:\footnotesize +}, + every call activity +] + +%%%%% sub-processes %%%%% + +\def\tikzsubprocessmarker{\tikz{\node[draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +};}} +\def\tikzmultimarker{% + \def\x{0.5mm}% + \def\y{0.6mm}% + \tikz{ + \node (b) [opacity=0, draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +}; + \draw ($(b.center)+(0,-\y)$) to ++(0,2*\y); + \draw ($(b.center)+(\x,-\y)$) to ++(0,2*\y); + \draw ($(b.center)+(-\x,-\y)$) to ++(0,2*\y); + }% +} +\def\tikzloopmarker{% + \tikz{ + \node (b) [opacity=0, draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +}; + \node at (b.center) [rotate=170,yshift=-0.9mm] {\pmb{\circlearrowleft}}; + }% +} +\def\tikzcompensationmarker{% + \tikz{ + \def\y{0.4mm} + \node (b) [opacity=0, draw, regular polygon, regular polygon sides=4, inner sep=-0.25mm]{\footnotesize +}; + \draw [rounded corners=0.05mm] (b.center) to ($(b.north)+(0,-\y)$) to (b.west) to ($(b.south)+(0,\y)$) to (b.center); + \draw [rounded corners=0.05mm] (b.center) to ($(b.north east)+(0,-\y)$) to ($(b.south east)+(0,\y)$) to cycle; + }% +} + +\tikzstyle{subprocess marker} = [ + task, + inner sep=3mm, + task marker=#1 +] +\tikzstyle{task marker} = [ + task, + label={[anchor=south,inner sep=0]below:#1} +] + +\tikzstyle{subprocess} = [ + subprocess marker=\tikzsubprocessmarker +] +\tikzstyle{collapsed subprocess} = [subprocess] +\tikzstyle{expanded subprocess} = [task, inner sep=3mm] +\tikzstyle{subprocess label} = [task, fit margins={left=1.5mm,right=1.5mm,bottom=1.5mm,top=2.1mm}, label={[anchor=north]above:\footnotesize#1}] + +\tikzstyle{adhoc subprocess} = [collapsed adhoc subprocess] +\tikzstyle{collapsed adhoc subprocess} = [ + subprocess marker=\tikzsubprocessmarker{} $\thicksim$ +] + +\tikzstyle{expanded adhoc subprocess} = [ + subprocess marker=$\thicksim$ +] + +\tikzstyle{multiinstance task} = [ + subprocess marker=\tikzmultimarker +] + +\tikzstyle{multiinstance subprocess} = [collapsed multiinstance subprocess] +\tikzstyle{collapsed multiinstance subprocess} = [ + subprocess marker=\tikzsubprocessmarker \tikzmultimarker +] + +\tikzstyle{expanded multiinstance subprocess} = [ + subprocess marker=\tikzmultimarker +] + +\tikzstyle{loop task} = [ + task marker=\tikzloopmarker +] + +\tikzstyle{loop subprocess} = [collapsed loop subprocess] +\tikzstyle{collapsed loop subprocess} = [ + subprocess marker=\tikzsubprocessmarker{} \tikzloopmarker +] + +\tikzstyle{expanded loop subprocess} = [ + subprocess marker=\tikzloopmarker +] + +\tikzstyle{compensation task} = [ + fit margins={left=0.8mm,right=0.8mm,bottom=2.1mm,top=0.8mm}, + task marker=\tikzcompensationmarker +] + +\tikzstyle{compensation subprocess} = [collapsed compensation subprocess] +\tikzstyle{collapsed compensation subprocess} = [ + subprocess marker=\tikzsubprocessmarker{} \tikzcompensationmarker +] + +\tikzstyle{expanded compensation subprocess} = [ + subprocess marker=\tikzcompensationmarker +] + +%%%%% task type marker %%%%% + +\tikzstyle{task type marker} = [ + task, + label={[anchor=north west, + line width=0.1pt, + #1, + minimum size=0.2cm, + inner sep=0, + xshift=0.05cm, + yshift=-0.05cm]north west:} +] + +\tikzstyle{manual task} = [ + task type marker=draw manual +] + +\tikzstyle{receive task} = [ + task type marker=draw message +] + +\tikzstyle{script task} = [ + task type marker=draw script +] + +\tikzstyle{send task}[defaultbackgroundcolour] = [ + task type marker={draw filled message={#1, line width=0.1pt}} +] + +\tikzstyle{service task}[defaultbackgroundcolour] = [ + task type marker={draw service={#1}} +] + +\tikzstyle{user task} = [ + task type marker=draw user +] + +\tikzstyle{draw service}[defaultbackgroundcolour] = [ + path picture = { + \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$); + \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$); + %\draw (path picture bounding box.north east) rectangle (path picture bounding box.south west); +\coordinate (c1x) at ($(sw)!0.613157894736843!(ne)$);\coordinate (c1y) at ($(sw)!0.774869109947646!(ne)$);\coordinate (c4x) at ($(sw)!0.673684210526316!(ne)$);\coordinate (c4y) at ($(sw)!0.837696335078536!(ne)$);\coordinate (c8x) at ($(sw)!0.665789473684211!(ne)$);\coordinate (c8y) at ($(sw)!0.869109947643979!(ne)$);\coordinate (c12x) at ($(sw)!0.649999999999999!(ne)$);\coordinate (c12y) at ($(sw)!0.890052356020943!(ne)$);\coordinate (c16x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c16y) at ($(sw)!0.908376963350787!(ne)$);\coordinate (c20x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c20y) at ($(sw)!0.916230366492146!(ne)$);\coordinate (c24x) at ($(sw)!0.526315789473684!(ne)$);\coordinate (c24y) at ($(sw)!0.853403141361256!(ne)$);\coordinate (c28x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c28y) at ($(sw)!0.869109947643979!(ne)$);\coordinate (c32x) at ($(sw)!0.452631578947368!(ne)$);\coordinate (c32y) at ($(sw)!0.882198952879582!(ne)$);\coordinate (c36x) at ($(sw)!0.444736842105262!(ne)$);\coordinate (c36y) at ($(sw)!0.976439790575915!(ne)$);\coordinate (c40x) at ($(sw)!0.421052631578948!(ne)$);\coordinate (c40y) at ($(sw)!0.992146596858639!(ne)$);\coordinate (c44x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c44y) at ($(sw)!1!(ne)$);\coordinate (c48x) at ($(sw)!0.360526315789475!(ne)$);\coordinate (c48y) at ($(sw)!0.992146596858639!(ne)$);\coordinate (c52x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c52y) at ($(sw)!0.976439790575915!(ne)$);\coordinate (c56x) at ($(sw)!0.328947368421053!(ne)$);\coordinate (c56y) at ($(sw)!0.882198952879582!(ne)$);\coordinate (c60x) at ($(sw)!0.278947368421053!(ne)$);\coordinate (c60y) at ($(sw)!0.866492146596859!(ne)$);\coordinate (c64x) at ($(sw)!0.234210526315788!(ne)$);\coordinate (c64y) at ($(sw)!0.840314136125656!(ne)$);\coordinate (c68x) at ($(sw)!0.150000000000001!(ne)$);\coordinate (c68y) at ($(sw)!0.916230366492146!(ne)$);\coordinate (c72x) at ($(sw)!0.121052631578947!(ne)$);\coordinate (c72y) at ($(sw)!0.908376963350787!(ne)$);\coordinate (c76x) at ($(sw)!0.0947368421052642!(ne)$);\coordinate (c76y) at ($(sw)!0.890052356020943!(ne)$);\coordinate (c80x) at ($(sw)!0.0789473684210531!(ne)$);\coordinate (c80y) at ($(sw)!0.869109947643979!(ne)$);\coordinate (c84x) at ($(sw)!0.0736842105263161!(ne)$);\coordinate (c84y) at ($(sw)!0.837696335078536!(ne)$);\coordinate (c88x) at ($(sw)!0.150000000000001!(ne)$);\coordinate (c88y) at ($(sw)!0.751308900523561!(ne)$);\coordinate (c92x) at ($(sw)!0.131578947368421!(ne)$);\coordinate (c92y) at ($(sw)!0.709424083769635!(ne)$);\coordinate (c96x) at ($(sw)!0.118421052631578!(ne)$);\coordinate (c96y) at ($(sw)!0.667539267015707!(ne)$);\coordinate (c100x) at ($(sw)!0.0184210526315796!(ne)$);\coordinate (c100y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c104x) at ($(sw)!0.00263157894736852!(ne)$);\coordinate (c104y) at ($(sw)!0.636125654450263!(ne)$);\coordinate (c108x) at ($(sw)!0!(ne)$);\coordinate (c108y) at ($(sw)!0.607329842931938!(ne)$);\coordinate (c112x) at ($(sw)!0.00263157894736852!(ne)$);\coordinate (c112y) at ($(sw)!0.578534031413614!(ne)$);\coordinate (c116x) at ($(sw)!0.0184210526315796!(ne)$);\coordinate (c116y) at ($(sw)!0.55497382198953!(ne)$);\coordinate (c120x) at ($(sw)!0.118421052631578!(ne)$);\coordinate (c120y) at ($(sw)!0.547120418848168!(ne)$);\coordinate (c124x) at ($(sw)!0.126315789473684!(ne)$);\coordinate (c124y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c128x) at ($(sw)!0.147368421052632!(ne)$);\coordinate (c128y) at ($(sw)!0.473821989528796!(ne)$);\coordinate (c132x) at ($(sw)!0.0736842105263161!(ne)$);\coordinate (c132y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c136x) at ($(sw)!0.0789473684210531!(ne)$);\coordinate (c136y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c140x) at ($(sw)!0.0947368421052642!(ne)$);\coordinate (c140y) at ($(sw)!0.340314136125655!(ne)$);\coordinate (c144x) at ($(sw)!0.121052631578947!(ne)$);\coordinate (c144y) at ($(sw)!0.321989528795811!(ne)$);\coordinate (c148x) at ($(sw)!0.150000000000001!(ne)$);\coordinate (c148y) at ($(sw)!0.316753926701573!(ne)$);\coordinate (c152x) at ($(sw)!0.226315789473685!(ne)$);\coordinate (c152y) at ($(sw)!0.382198952879583!(ne)$);\coordinate (c156x) at ($(sw)!0.273684210526316!(ne)$);\coordinate (c156y) at ($(sw)!0.353403141361257!(ne)$);\coordinate (c160x) at ($(sw)!0.328947368421053!(ne)$);\coordinate (c160y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c164x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c164y) at ($(sw)!0.23821989528796!(ne)$);\coordinate (c168x) at ($(sw)!0.360526315789475!(ne)$);\coordinate (c168y) at ($(sw)!0.222513089005236!(ne)$);\coordinate (c172x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c172y) at ($(sw)!0.217277486910995!(ne)$);\coordinate (c176x) at ($(sw)!0.421052631578948!(ne)$);\coordinate (c176y) at ($(sw)!0.222513089005236!(ne)$);\coordinate (c180x) at ($(sw)!0.444736842105262!(ne)$);\coordinate (c180y) at ($(sw)!0.23821989528796!(ne)$);\coordinate (c184x) at ($(sw)!0.452631578947368!(ne)$);\coordinate (c184y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c188x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c188y) at ($(sw)!0.350785340314137!(ne)$);\coordinate (c192x) at ($(sw)!0.53421052631579!(ne)$);\coordinate (c192y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c196x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c196y) at ($(sw)!0.316753926701573!(ne)$);\coordinate (c200x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c200y) at ($(sw)!0.321989528795811!(ne)$);\coordinate (c204x) at ($(sw)!0.649999999999999!(ne)$);\coordinate (c204y) at ($(sw)!0.340314136125655!(ne)$);\coordinate (c208x) at ($(sw)!0.665789473684211!(ne)$);\coordinate (c208y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c212x) at ($(sw)!0.673684210526316!(ne)$);\coordinate (c212y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c216x) at ($(sw)!0.621052631578948!(ne)$);\coordinate (c216y) at ($(sw)!0.452879581151832!(ne)$);\coordinate (c220x) at ($(sw)!0.647368421052631!(ne)$);\coordinate (c220y) at ($(sw)!0.500000000000001!(ne)$);\coordinate (c224x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c224y) at ($(sw)!0.547120418848168!(ne)$);\coordinate (c228x) at ($(sw)!0.760526315789472!(ne)$);\coordinate (c228y) at ($(sw)!0.55497382198953!(ne)$);\coordinate (c232x) at ($(sw)!0.776315789473683!(ne)$);\coordinate (c232y) at ($(sw)!0.578534031413614!(ne)$);\coordinate (c236x) at ($(sw)!0.778947368421052!(ne)$);\coordinate (c236y) at ($(sw)!0.607329842931938!(ne)$);\coordinate (c240x) at ($(sw)!0.776315789473683!(ne)$);\coordinate (c240y) at ($(sw)!0.636125654450263!(ne)$);\coordinate (c244x) at ($(sw)!0.760526315789472!(ne)$);\coordinate (c244y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c248x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c248y) at ($(sw)!0.667539267015707!(ne)$);\coordinate (c252x) at ($(sw)!0.642105263157894!(ne)$);\coordinate (c252y) at ($(sw)!0.722513089005235!(ne)$);\coordinate (c256x) at ($(sw)!0.613157894736843!(ne)$);\coordinate (c256y) at ($(sw)!0.774869109947646!(ne)$); + \draw (c1x |- c1y) -- (c4x |- c4y) -- (c8x |- c8y) -- (c12x |- c12y) -- (c16x |- c16y) -- (c20x |- c20y) -- (c24x |- c24y) -- (c28x |- c28y) -- (c32x |- c32y) -- (c36x |- c36y) -- (c40x |- c40y) -- (c44x |- c44y) -- (c48x |- c48y) -- (c52x |- c52y) -- (c56x |- c56y) -- (c60x |- c60y) -- (c64x |- c64y) -- (c68x |- c68y) -- (c72x |- c72y) -- (c76x |- c76y) -- (c80x |- c80y) -- (c84x |- c84y) -- (c88x |- c88y) -- (c92x |- c92y) -- (c96x |- c96y) -- (c100x |- c100y) -- (c104x |- c104y) -- (c108x |- c108y) -- (c112x |- c112y) -- (c116x |- c116y) -- (c120x |- c120y) -- (c124x |- c124y) -- (c128x |- c128y) -- (c132x |- c132y) -- (c136x |- c136y) -- (c140x |- c140y) -- (c144x |- c144y) -- (c148x |- c148y) -- (c152x |- c152y) -- (c156x |- c156y) -- (c160x |- c160y) -- (c164x |- c164y) -- (c168x |- c168y) -- (c172x |- c172y) -- (c176x |- c176y) -- (c180x |- c180y) -- (c184x |- c184y) -- (c188x |- c188y) -- (c192x |- c192y) -- (c196x |- c196y) -- (c200x |- c200y) -- (c204x |- c204y) -- (c208x |- c208y) -- (c212x |- c212y) -- (c216x |- c216y) -- (c220x |- c220y) -- (c224x |- c224y) -- (c228x |- c228y) -- (c232x |- c232y) -- (c236x |- c236y) -- (c240x |- c240y) -- (c244x |- c244y) -- (c248x |- c248y) -- (c252x |- c252y) -- (c256x |- c256y) ; + \coordinate (c301x) at ($(sw)!0.476315789473685!(ne)$);\coordinate (c301y) at ($(sw)!0.672774869109948!(ne)$);\coordinate (c304x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c304y) at ($(sw)!0.696335078534033!(ne)$);\coordinate (c308x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c308y) at ($(sw)!0.709424083769635!(ne)$);\coordinate (c312x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c312y) at ($(sw)!0.719895287958115!(ne)$);\coordinate (c316x) at ($(sw)!0.481578947368422!(ne)$);\coordinate (c316y) at ($(sw)!0.725130890052356!(ne)$);\coordinate (c320x) at ($(sw)!0.471052631578948!(ne)$);\coordinate (c320y) at ($(sw)!0.730366492146597!(ne)$);\coordinate (c324x) at ($(sw)!0.442105263157894!(ne)$);\coordinate (c324y) at ($(sw)!0.704188481675394!(ne)$);\coordinate (c328x) at ($(sw)!0.413157894736843!(ne)$);\coordinate (c328y) at ($(sw)!0.712041884816756!(ne)$);\coordinate (c332x) at ($(sw)!0.410526315789474!(ne)$);\coordinate (c332y) at ($(sw)!0.751308900523561!(ne)$);\coordinate (c336x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c336y) at ($(sw)!0.761780104712043!(ne)$);\coordinate (c340x) at ($(sw)!0.368421052631578!(ne)$);\coordinate (c340y) at ($(sw)!0.751308900523561!(ne)$);\coordinate (c344x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c344y) at ($(sw)!0.712041884816756!(ne)$);\coordinate (c348x) at ($(sw)!0.347368421052632!(ne)$);\coordinate (c348y) at ($(sw)!0.706806282722515!(ne)$);\coordinate (c352x) at ($(sw)!0.331578947368421!(ne)$);\coordinate (c352y) at ($(sw)!0.701570680628274!(ne)$);\coordinate (c356x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c356y) at ($(sw)!0.730366492146597!(ne)$);\coordinate (c360x) at ($(sw)!0.286842105263159!(ne)$);\coordinate (c360y) at ($(sw)!0.725130890052356!(ne)$);\coordinate (c364x) at ($(sw)!0.276315789473685!(ne)$);\coordinate (c364y) at ($(sw)!0.719895287958115!(ne)$);\coordinate (c368x) at ($(sw)!0.271052631578948!(ne)$);\coordinate (c368y) at ($(sw)!0.709424083769635!(ne)$);\coordinate (c372x) at ($(sw)!0.268421052631579!(ne)$);\coordinate (c372y) at ($(sw)!0.696335078534033!(ne)$);\coordinate (c376x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c376y) at ($(sw)!0.664921465968586!(ne)$);\coordinate (c380x) at ($(sw)!0.28421052631579!(ne)$);\coordinate (c380y) at ($(sw)!0.630890052356022!(ne)$);\coordinate (c384x) at ($(sw)!0.244736842105262!(ne)$);\coordinate (c384y) at ($(sw)!0.630890052356022!(ne)$);\coordinate (c388x) at ($(sw)!0.239473684210525!(ne)$);\coordinate (c388y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c392x) at ($(sw)!0.239473684210525!(ne)$);\coordinate (c392y) at ($(sw)!0.599476439790576!(ne)$);\coordinate (c396x) at ($(sw)!0.244736842105262!(ne)$);\coordinate (c396y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c400x) at ($(sw)!0.28421052631579!(ne)$);\coordinate (c400y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c404x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c404y) at ($(sw)!0.55759162303665!(ne)$);\coordinate (c408x) at ($(sw)!0.268421052631579!(ne)$);\coordinate (c408y) at ($(sw)!0.526178010471204!(ne)$);\coordinate (c412x) at ($(sw)!0.271052631578948!(ne)$);\coordinate (c412y) at ($(sw)!0.513089005235604!(ne)$);\coordinate (c416x) at ($(sw)!0.276315789473685!(ne)$);\coordinate (c416y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c420x) at ($(sw)!0.286842105263159!(ne)$);\coordinate (c420y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c424x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c424y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c428x) at ($(sw)!0.328947368421053!(ne)$);\coordinate (c428y) at ($(sw)!0.518324607329842!(ne)$);\coordinate (c432x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c432y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c436x) at ($(sw)!0.368421052631578!(ne)$);\coordinate (c436y) at ($(sw)!0.465968586387435!(ne)$);\coordinate (c440x) at ($(sw)!0.378947368421052!(ne)$);\coordinate (c440y) at ($(sw)!0.458115183246073!(ne)$);\coordinate (c444x) at ($(sw)!0.389473684210526!(ne)$);\coordinate (c444y) at ($(sw)!0.455497382198952!(ne)$);\coordinate (c448x) at ($(sw)!0.4!(ne)$);\coordinate (c448y) at ($(sw)!0.458115183246073!(ne)$);\coordinate (c452x) at ($(sw)!0.410526315789474!(ne)$);\coordinate (c452y) at ($(sw)!0.465968586387435!(ne)$);\coordinate (c456x) at ($(sw)!0.413157894736843!(ne)$);\coordinate (c456y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c460x) at ($(sw)!0.444736842105262!(ne)$);\coordinate (c460y) at ($(sw)!0.515706806282724!(ne)$);\coordinate (c464x) at ($(sw)!0.471052631578948!(ne)$);\coordinate (c464y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c468x) at ($(sw)!0.481578947368422!(ne)$);\coordinate (c468y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c472x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c472y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c476x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c476y) at ($(sw)!0.513089005235604!(ne)$);\coordinate (c480x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c480y) at ($(sw)!0.526178010471204!(ne)$);\coordinate (c484x) at ($(sw)!0.481578947368422!(ne)$);\coordinate (c484y) at ($(sw)!0.547120418848168!(ne)$);\coordinate (c488x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c488y) at ($(sw)!0.568062827225132!(ne)$);\coordinate (c492x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c492y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c496x) at ($(sw)!0.53421052631579!(ne)$);\coordinate (c496y) at ($(sw)!0.586387434554973!(ne)$);\coordinate (c500x) at ($(sw)!0.542105263157895!(ne)$);\coordinate (c500y) at ($(sw)!0.599476439790576!(ne)$);\coordinate (c504x) at ($(sw)!0.542105263157895!(ne)$);\coordinate (c504y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c508x) at ($(sw)!0.53421052631579!(ne)$);\coordinate (c508y) at ($(sw)!0.630890052356022!(ne)$);\coordinate (c512x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c512y) at ($(sw)!0.633507853403143!(ne)$);\coordinate (c516x) at ($(sw)!0.489473684210527!(ne)$);\coordinate (c516y) at ($(sw)!0.651832460732984!(ne)$);\coordinate (c520x) at ($(sw)!0.476315789473685!(ne)$);\coordinate (c520y) at ($(sw)!0.672774869109948!(ne)$); + \draw (c301x |- c301y) -- (c304x |- c304y) -- (c308x |- c308y) -- (c312x |- c312y) -- (c316x |- c316y) -- (c320x |- c320y) -- (c324x |- c324y) -- (c328x |- c328y) -- (c332x |- c332y) -- (c336x |- c336y) -- (c340x |- c340y) -- (c344x |- c344y) -- (c348x |- c348y) -- (c352x |- c352y) -- (c356x |- c356y) -- (c360x |- c360y) -- (c364x |- c364y) -- (c368x |- c368y) -- (c372x |- c372y) -- (c376x |- c376y) -- (c380x |- c380y) -- (c384x |- c384y) -- (c388x |- c388y) -- (c392x |- c392y) -- (c396x |- c396y) -- (c400x |- c400y) -- (c404x |- c404y) -- (c408x |- c408y) -- (c412x |- c412y) -- (c416x |- c416y) -- (c420x |- c420y) -- (c424x |- c424y) -- (c428x |- c428y) -- (c432x |- c432y) -- (c436x |- c436y) -- (c440x |- c440y) -- (c444x |- c444y) -- (c448x |- c448y) -- (c452x |- c452y) -- (c456x |- c456y) -- (c460x |- c460y) -- (c464x |- c464y) -- (c468x |- c468y) -- (c472x |- c472y) -- (c476x |- c476y) -- (c480x |- c480y) -- (c484x |- c484y) -- (c488x |- c488y) -- (c492x |- c492y) -- (c496x |- c496y) -- (c500x |- c500y) -- (c504x |- c504y) -- (c508x |- c508y) -- (c512x |- c512y) -- (c516x |- c516y) -- (c520x |- c520y) ; + \coordinate (c601x) at ($(sw)!0.834210526315788!(ne)$);\coordinate (c601y) at ($(sw)!0.55497382198953!(ne)$);\coordinate (c604x) at ($(sw)!0.892105263157893!(ne)$);\coordinate (c604y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c608x) at ($(sw)!0.88421052631579!(ne)$);\coordinate (c608y) at ($(sw)!0.649214659685863!(ne)$);\coordinate (c612x) at ($(sw)!0.86578947368421!(ne)$);\coordinate (c612y) at ($(sw)!0.675392670157068!(ne)$);\coordinate (c616x) at ($(sw)!0.844736842105262!(ne)$);\coordinate (c616y) at ($(sw)!0.691099476439792!(ne)$);\coordinate (c620x) at ($(sw)!0.815789473684211!(ne)$);\coordinate (c620y) at ($(sw)!0.701570680628274!(ne)$);\coordinate (c624x) at ($(sw)!0.742105263157895!(ne)$);\coordinate (c624y) at ($(sw)!0.636125654450263!(ne)$);\coordinate (c628x) at ($(sw)!0.705263157894736!(ne)$);\coordinate (c628y) at ($(sw)!0.651832460732984!(ne)$);\coordinate (c632x) at ($(sw)!0.668421052631579!(ne)$);\coordinate (c632y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c636x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c636y) at ($(sw)!0.761780104712043!(ne)$);\coordinate (c640x) at ($(sw)!0.636842105263157!(ne)$);\coordinate (c640y) at ($(sw)!0.777486910994766!(ne)$);\coordinate (c644x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c644y) at ($(sw)!0.782722513089005!(ne)$);\coordinate (c648x) at ($(sw)!0.578947368421052!(ne)$);\coordinate (c648y) at ($(sw)!0.777486910994766!(ne)$);\coordinate (c652x) at ($(sw)!0.550000000000001!(ne)$);\coordinate (c652y) at ($(sw)!0.761780104712043!(ne)$);\coordinate (c656x) at ($(sw)!0.547368421052632!(ne)$);\coordinate (c656y) at ($(sw)!0.662303664921466!(ne)$);\coordinate (c660x) at ($(sw)!0.49736842105263!(ne)$);\coordinate (c660y) at ($(sw)!0.649214659685863!(ne)$);\coordinate (c664x) at ($(sw)!0.452631578947368!(ne)$);\coordinate (c664y) at ($(sw)!0.623036649214661!(ne)$);\coordinate (c668x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c668y) at ($(sw)!0.701570680628274!(ne)$);\coordinate (c672x) at ($(sw)!0.336842105263158!(ne)$);\coordinate (c672y) at ($(sw)!0.691099476439792!(ne)$);\coordinate (c676x) at ($(sw)!0.31578947368421!(ne)$);\coordinate (c676y) at ($(sw)!0.675392670157068!(ne)$);\coordinate (c680x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c680y) at ($(sw)!0.649214659685863!(ne)$);\coordinate (c684x) at ($(sw)!0.289473684210527!(ne)$);\coordinate (c684y) at ($(sw)!0.62041884816754!(ne)$);\coordinate (c688x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c688y) at ($(sw)!0.534031413612566!(ne)$);\coordinate (c692x) at ($(sw)!0.347368421052632!(ne)$);\coordinate (c692y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c696x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c696y) at ($(sw)!0.452879581151832!(ne)$);\coordinate (c700x) at ($(sw)!0.234210526315788!(ne)$);\coordinate (c700y) at ($(sw)!0.445026178010473!(ne)$);\coordinate (c704x) at ($(sw)!0.21842105263158!(ne)$);\coordinate (c704y) at ($(sw)!0.421465968586388!(ne)$);\coordinate (c708x) at ($(sw)!0.215789473684211!(ne)$);\coordinate (c708y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c712x) at ($(sw)!0.21842105263158!(ne)$);\coordinate (c712y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c716x) at ($(sw)!0.234210526315788!(ne)$);\coordinate (c716y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c720x) at ($(sw)!0.33421052631579!(ne)$);\coordinate (c720y) at ($(sw)!0.332460732984293!(ne)$);\coordinate (c724x) at ($(sw)!0.347368421052632!(ne)$);\coordinate (c724y) at ($(sw)!0.293193717277488!(ne)$);\coordinate (c728x) at ($(sw)!0.363157894736841!(ne)$);\coordinate (c728y) at ($(sw)!0.259162303664921!(ne)$);\coordinate (c732x) at ($(sw)!0.289473684210527!(ne)$);\coordinate (c732y) at ($(sw)!0.17539267015707!(ne)$);\coordinate (c736x) at ($(sw)!0.294736842105264!(ne)$);\coordinate (c736y) at ($(sw)!0.146596858638744!(ne)$);\coordinate (c740x) at ($(sw)!0.31578947368421!(ne)$);\coordinate (c740y) at ($(sw)!0.120418848167541!(ne)$);\coordinate (c744x) at ($(sw)!0.336842105263158!(ne)$);\coordinate (c744y) at ($(sw)!0.104712041884818!(ne)$);\coordinate (c748x) at ($(sw)!0.365789473684209!(ne)$);\coordinate (c748y) at ($(sw)!0.0994764397905771!(ne)$);\coordinate (c752x) at ($(sw)!0.442105263157894!(ne)$);\coordinate (c752y) at ($(sw)!0.164921465968588!(ne)$);\coordinate (c756x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c756y) at ($(sw)!0.136125654450262!(ne)$);\coordinate (c760x) at ($(sw)!0.547368421052632!(ne)$);\coordinate (c760y) at ($(sw)!0.117801047120421!(ne)$);\coordinate (c764x) at ($(sw)!0.550000000000001!(ne)$);\coordinate (c764y) at ($(sw)!0.0235602094240846!(ne)$);\coordinate (c768x) at ($(sw)!0.578947368421052!(ne)$);\coordinate (c768y) at ($(sw)!0.00785340314136155!(ne)$);\coordinate (c772x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c772y) at ($(sw)!0!(ne)$);\coordinate (c776x) at ($(sw)!0.636842105263157!(ne)$);\coordinate (c776y) at ($(sw)!0.00785340314136155!(ne)$);\coordinate (c780x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c780y) at ($(sw)!0.0235602094240846!(ne)$);\coordinate (c784x) at ($(sw)!0.668421052631579!(ne)$);\coordinate (c784y) at ($(sw)!0.117801047120421!(ne)$);\coordinate (c788x) at ($(sw)!0.710526315789473!(ne)$);\coordinate (c788y) at ($(sw)!0.133507853403141!(ne)$);\coordinate (c792x) at ($(sw)!0.750000000000001!(ne)$);\coordinate (c792y) at ($(sw)!0.154450261780105!(ne)$);\coordinate (c796x) at ($(sw)!0.815789473684211!(ne)$);\coordinate (c796y) at ($(sw)!0.0994764397905771!(ne)$);\coordinate (c800x) at ($(sw)!0.844736842105262!(ne)$);\coordinate (c800y) at ($(sw)!0.104712041884818!(ne)$);\coordinate (c804x) at ($(sw)!0.86578947368421!(ne)$);\coordinate (c804y) at ($(sw)!0.120418848167541!(ne)$);\coordinate (c808x) at ($(sw)!0.88421052631579!(ne)$);\coordinate (c808y) at ($(sw)!0.146596858638744!(ne)$);\coordinate (c812x) at ($(sw)!0.892105263157893!(ne)$);\coordinate (c812y) at ($(sw)!0.17539267015707!(ne)$);\coordinate (c816x) at ($(sw)!0.836842105263157!(ne)$);\coordinate (c816y) at ($(sw)!0.235602094240839!(ne)$);\coordinate (c820x) at ($(sw)!0.863157894736842!(ne)$);\coordinate (c820y) at ($(sw)!0.280104712041885!(ne)$);\coordinate (c824x) at ($(sw)!0.878947368421053!(ne)$);\coordinate (c824y) at ($(sw)!0.332460732984293!(ne)$);\coordinate (c828x) at ($(sw)!0.976315789473683!(ne)$);\coordinate (c828y) at ($(sw)!0.337696335078534!(ne)$);\coordinate (c832x) at ($(sw)!0.992105263157895!(ne)$);\coordinate (c832y) at ($(sw)!0.363874345549739!(ne)$);\coordinate (c836x) at ($(sw)!1!(ne)$);\coordinate (c836y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c840x) at ($(sw)!0.992105263157895!(ne)$);\coordinate (c840y) at ($(sw)!0.421465968586388!(ne)$);\coordinate (c844x) at ($(sw)!0.976315789473683!(ne)$);\coordinate (c844y) at ($(sw)!0.445026178010473!(ne)$);\coordinate (c848x) at ($(sw)!0.878947368421053!(ne)$);\coordinate (c848y) at ($(sw)!0.452879581151832!(ne)$);\coordinate (c852x) at ($(sw)!0.863157894736842!(ne)$);\coordinate (c852y) at ($(sw)!0.505235602094242!(ne)$);\coordinate (c856x) at ($(sw)!0.834210526315788!(ne)$);\coordinate (c856y) at ($(sw)!0.55497382198953!(ne)$); + \draw [fill=#1] (c601x |- c601y) -- (c604x |- c604y) -- (c608x |- c608y) -- (c612x |- c612y) -- (c616x |- c616y) -- (c620x |- c620y) -- (c624x |- c624y) -- (c628x |- c628y) -- (c632x |- c632y) -- (c636x |- c636y) -- (c640x |- c640y) -- (c644x |- c644y) -- (c648x |- c648y) -- (c652x |- c652y) -- (c656x |- c656y) -- (c660x |- c660y) -- (c664x |- c664y) -- (c668x |- c668y) -- (c672x |- c672y) -- (c676x |- c676y) -- (c680x |- c680y) -- (c684x |- c684y) -- (c688x |- c688y) -- (c692x |- c692y) -- (c696x |- c696y) -- (c700x |- c700y) -- (c704x |- c704y) -- (c708x |- c708y) -- (c712x |- c712y) -- (c716x |- c716y) -- (c720x |- c720y) -- (c724x |- c724y) -- (c728x |- c728y) -- (c732x |- c732y) -- (c736x |- c736y) -- (c740x |- c740y) -- (c744x |- c744y) -- (c748x |- c748y) -- (c752x |- c752y) -- (c756x |- c756y) -- (c760x |- c760y) -- (c764x |- c764y) -- (c768x |- c768y) -- (c772x |- c772y) -- (c776x |- c776y) -- (c780x |- c780y) -- (c784x |- c784y) -- (c788x |- c788y) -- (c792x |- c792y) -- (c796x |- c796y) -- (c800x |- c800y) -- (c804x |- c804y) -- (c808x |- c808y) -- (c812x |- c812y) -- (c816x |- c816y) -- (c820x |- c820y) -- (c824x |- c824y) -- (c828x |- c828y) -- (c832x |- c832y) -- (c836x |- c836y) -- (c840x |- c840y) -- (c844x |- c844y) -- (c848x |- c848y) -- (c852x |- c852y) -- (c856x |- c856y) -- cycle; + \coordinate (c901x) at ($(sw)!0.694736842105262!(ne)$);\coordinate (c901y) at ($(sw)!0.455497382198952!(ne)$);\coordinate (c904x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c904y) at ($(sw)!0.481675392670158!(ne)$);\coordinate (c908x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c908y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c912x) at ($(sw)!0.710526315789473!(ne)$);\coordinate (c912y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c916x) at ($(sw)!0.699999999999999!(ne)$);\coordinate (c916y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c920x) at ($(sw)!0.686842105263159!(ne)$);\coordinate (c920y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c924x) at ($(sw)!0.657894736842105!(ne)$);\coordinate (c924y) at ($(sw)!0.486910994764399!(ne)$);\coordinate (c928x) at ($(sw)!0.628947368421051!(ne)$);\coordinate (c928y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c932x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c932y) at ($(sw)!0.534031413612566!(ne)$);\coordinate (c936x) at ($(sw)!0.61842105263158!(ne)$);\coordinate (c936y) at ($(sw)!0.541884816753927!(ne)$);\coordinate (c940x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c940y) at ($(sw)!0.544502617801048!(ne)$);\coordinate (c944x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c944y) at ($(sw)!0.541884816753927!(ne)$);\coordinate (c948x) at ($(sw)!0.586842105263157!(ne)$);\coordinate (c948y) at ($(sw)!0.534031413612566!(ne)$);\coordinate (c952x) at ($(sw)!0.58157894736842!(ne)$);\coordinate (c952y) at ($(sw)!0.497382198952881!(ne)$);\coordinate (c956x) at ($(sw)!0.563157894736841!(ne)$);\coordinate (c956y) at ($(sw)!0.489528795811519!(ne)$);\coordinate (c960x) at ($(sw)!0.547368421052632!(ne)$);\coordinate (c960y) at ($(sw)!0.481675392670158!(ne)$);\coordinate (c964x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c964y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c968x) at ($(sw)!0.502631578947367!(ne)$);\coordinate (c968y) at ($(sw)!0.510471204188483!(ne)$);\coordinate (c972x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c972y) at ($(sw)!0.502617801047122!(ne)$);\coordinate (c976x) at ($(sw)!0.486842105263159!(ne)$);\coordinate (c976y) at ($(sw)!0.49476439790576!(ne)$);\coordinate (c980x) at ($(sw)!0.48421052631579!(ne)$);\coordinate (c980y) at ($(sw)!0.481675392670158!(ne)$);\coordinate (c984x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c984y) at ($(sw)!0.445026178010473!(ne)$);\coordinate (c988x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c988y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c992x) at ($(sw)!0.460526315789473!(ne)$);\coordinate (c992y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c996x) at ($(sw)!0.457894736842105!(ne)$);\coordinate (c996y) at ($(sw)!0.400523560209424!(ne)$);\coordinate (c1000x) at ($(sw)!0.455263157894736!(ne)$);\coordinate (c1000y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c1004x) at ($(sw)!0.457894736842105!(ne)$);\coordinate (c1004y) at ($(sw)!0.379581151832462!(ne)$);\coordinate (c1008x) at ($(sw)!0.460526315789473!(ne)$);\coordinate (c1008y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c1012x) at ($(sw)!0.499999999999999!(ne)$);\coordinate (c1012y) at ($(sw)!0.36649214659686!(ne)$);\coordinate (c1016x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c1016y) at ($(sw)!0.340314136125655!(ne)$);\coordinate (c1020x) at ($(sw)!0.48421052631579!(ne)$);\coordinate (c1020y) at ($(sw)!0.308900523560211!(ne)$);\coordinate (c1024x) at ($(sw)!0.486842105263159!(ne)$);\coordinate (c1024y) at ($(sw)!0.295811518324608!(ne)$);\coordinate (c1028x) at ($(sw)!0.492105263157896!(ne)$);\coordinate (c1028y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1032x) at ($(sw)!0.502631578947367!(ne)$);\coordinate (c1032y) at ($(sw)!0.280104712041885!(ne)$);\coordinate (c1036x) at ($(sw)!0.513157894736841!(ne)$);\coordinate (c1036y) at ($(sw)!0.277486910994765!(ne)$);\coordinate (c1040x) at ($(sw)!0.544736842105264!(ne)$);\coordinate (c1040y) at ($(sw)!0.30366492146597!(ne)$);\coordinate (c1044x) at ($(sw)!0.563157894736841!(ne)$);\coordinate (c1044y) at ($(sw)!0.293193717277488!(ne)$);\coordinate (c1048x) at ($(sw)!0.58157894736842!(ne)$);\coordinate (c1048y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1052x) at ($(sw)!0.586842105263157!(ne)$);\coordinate (c1052y) at ($(sw)!0.248691099476442!(ne)$);\coordinate (c1056x) at ($(sw)!0.594736842105263!(ne)$);\coordinate (c1056y) at ($(sw)!0.243455497382201!(ne)$);\coordinate (c1060x) at ($(sw)!0.607894736842106!(ne)$);\coordinate (c1060y) at ($(sw)!0.23821989528796!(ne)$);\coordinate (c1064x) at ($(sw)!0.61842105263158!(ne)$);\coordinate (c1064y) at ($(sw)!0.243455497382201!(ne)$);\coordinate (c1068x) at ($(sw)!0.626315789473683!(ne)$);\coordinate (c1068y) at ($(sw)!0.248691099476442!(ne)$);\coordinate (c1072x) at ($(sw)!0.628947368421051!(ne)$);\coordinate (c1072y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1076x) at ($(sw)!0.663157894736842!(ne)$);\coordinate (c1076y) at ($(sw)!0.298429319371729!(ne)$);\coordinate (c1080x) at ($(sw)!0.686842105263159!(ne)$);\coordinate (c1080y) at ($(sw)!0.277486910994765!(ne)$);\coordinate (c1084x) at ($(sw)!0.699999999999999!(ne)$);\coordinate (c1084y) at ($(sw)!0.280104712041885!(ne)$);\coordinate (c1088x) at ($(sw)!0.710526315789473!(ne)$);\coordinate (c1088y) at ($(sw)!0.287958115183247!(ne)$);\coordinate (c1092x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c1092y) at ($(sw)!0.295811518324608!(ne)$);\coordinate (c1096x) at ($(sw)!0.71578947368421!(ne)$);\coordinate (c1096y) at ($(sw)!0.308900523560211!(ne)$);\coordinate (c1100x) at ($(sw)!0.69736842105263!(ne)$);\coordinate (c1100y) at ($(sw)!0.332460732984293!(ne)$);\coordinate (c1104x) at ($(sw)!0.705263157894736!(ne)$);\coordinate (c1104y) at ($(sw)!0.348167539267016!(ne)$);\coordinate (c1108x) at ($(sw)!0.713157894736841!(ne)$);\coordinate (c1108y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c1112x) at ($(sw)!0.750000000000001!(ne)$);\coordinate (c1112y) at ($(sw)!0.36910994764398!(ne)$);\coordinate (c1116x) at ($(sw)!0.757894736842104!(ne)$);\coordinate (c1116y) at ($(sw)!0.379581151832462!(ne)$);\coordinate (c1120x) at ($(sw)!0.760526315789472!(ne)$);\coordinate (c1120y) at ($(sw)!0.392670157068063!(ne)$);\coordinate (c1124x) at ($(sw)!0.757894736842104!(ne)$);\coordinate (c1124y) at ($(sw)!0.400523560209424!(ne)$);\coordinate (c1128x) at ($(sw)!0.750000000000001!(ne)$);\coordinate (c1128y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c1132x) at ($(sw)!0.713157894736841!(ne)$);\coordinate (c1132y) at ($(sw)!0.413612565445027!(ne)$);\coordinate (c1136x) at ($(sw)!0.705263157894736!(ne)$);\coordinate (c1136y) at ($(sw)!0.437172774869111!(ne)$);\coordinate (c1140x) at ($(sw)!0.694736842105262!(ne)$);\coordinate (c1140y) at ($(sw)!0.455497382198952!(ne)$); + \draw (c901x |- c901y) -- (c904x |- c904y) -- (c908x |- c908y) -- (c912x |- c912y) -- (c916x |- c916y) -- (c920x |- c920y) -- (c924x |- c924y) -- (c928x |- c928y) -- (c932x |- c932y) -- (c936x |- c936y) -- (c940x |- c940y) -- (c944x |- c944y) -- (c948x |- c948y) -- (c952x |- c952y) -- (c956x |- c956y) -- (c960x |- c960y) -- (c964x |- c964y) -- (c968x |- c968y) -- (c972x |- c972y) -- (c976x |- c976y) -- (c980x |- c980y) -- (c984x |- c984y) -- (c988x |- c988y) -- (c992x |- c992y) -- (c996x |- c996y) -- (c1000x |- c1000y) -- (c1004x |- c1004y) -- (c1008x |- c1008y) -- (c1012x |- c1012y) -- (c1016x |- c1016y) -- (c1020x |- c1020y) -- (c1024x |- c1024y) -- (c1028x |- c1028y) -- (c1032x |- c1032y) -- (c1036x |- c1036y) -- (c1040x |- c1040y) -- (c1044x |- c1044y) -- (c1048x |- c1048y) -- (c1052x |- c1052y) -- (c1056x |- c1056y) -- (c1060x |- c1060y) -- (c1064x |- c1064y) -- (c1068x |- c1068y) -- (c1072x |- c1072y) -- (c1076x |- c1076y) -- (c1080x |- c1080y) -- (c1084x |- c1084y) -- (c1088x |- c1088y) -- (c1092x |- c1092y) -- (c1096x |- c1096y) -- (c1100x |- c1100y) -- (c1104x |- c1104y) -- (c1108x |- c1108y) -- (c1112x |- c1112y) -- (c1116x |- c1116y) -- (c1120x |- c1120y) -- (c1124x |- c1124y) -- (c1128x |- c1128y) -- (c1132x |- c1132y) -- (c1136x |- c1136y) -- (c1140x |- c1140y); + } +] + +\tikzstyle{draw manual} = [ + path picture = { + \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$); + \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$); + %\draw (path picture bounding box.north east) rectangle (path picture bounding box.south west); +\coordinate (c1x) at ($(sw)!0.70189701897019!(ne)$); +\coordinate (c2x) at ($(sw)!0.520325203252032!(ne)$); +\coordinate (c3x) at ($(sw)!0.51219512195122!(ne)$); +\coordinate (c4x) at ($(sw)!0.506775067750678!(ne)$); +\coordinate (c5x) at ($(sw)!0.51219512195122!(ne)$); +\coordinate (c6x) at ($(sw)!0.520325203252032!(ne)$); +\coordinate (c7x) at ($(sw)!0.905149051490515!(ne)$); +\coordinate (c8x) at ($(sw)!0.932249322493225!(ne)$); +\coordinate (c9x) at ($(sw)!0.956639566395664!(ne)$); +\coordinate (c10x) at ($(sw)!0.975609756097561!(ne)$); +\coordinate (c11x) at ($(sw)!0.994579945799458!(ne)$); +\coordinate (c12x) at ($(sw)!1!(ne)$); +\coordinate (c13x) at ($(sw)!0.986449864498645!(ne)$); +\coordinate (c14x) at ($(sw)!0.97289972899729!(ne)$); +\coordinate (c15x) at ($(sw)!0.959349593495935!(ne)$); +\coordinate (c16x) at ($(sw)!0.284552845528455!(ne)$); +\coordinate (c17x) at ($(sw)!0.314363143631436!(ne)$); +\coordinate (c18x) at ($(sw)!0.485094850948509!(ne)$); +\coordinate (c19x) at ($(sw)!0.528455284552846!(ne)$); +\coordinate (c20x) at ($(sw)!0.563685636856369!(ne)$); +\coordinate (c21x) at ($(sw)!0.590785907859079!(ne)$); +\coordinate (c22x) at ($(sw)!0.590785907859079!(ne)$); +\coordinate (c23x) at ($(sw)!0.582655826558266!(ne)$); +\coordinate (c24x) at ($(sw)!0.168021680216802!(ne)$); +\coordinate (c25x) at ($(sw)!0!(ne)$); +\coordinate (c26x) at ($(sw)!0!(ne)$); +\coordinate (c27x) at ($(sw)!0.0921409214092141!(ne)$); +\coordinate (c28x) at ($(sw)!0.769647696476965!(ne)$); +\coordinate (c29x) at ($(sw)!0.794037940379404!(ne)$); +\coordinate (c30x) at ($(sw)!0.815718157181572!(ne)$); +\coordinate (c31x) at ($(sw)!0.831978319783198!(ne)$); +\coordinate (c32x) at ($(sw)!0.840108401084011!(ne)$); +\coordinate (c33x) at ($(sw)!0.826558265582656!(ne)$); +\coordinate (c34x) at ($(sw)!0.799457994579946!(ne)$); +\coordinate (c35x) at ($(sw)!0.669376693766938!(ne)$); +\coordinate (c36x) at ($(sw)!0.650406504065041!(ne)$); +\coordinate (c37x) at ($(sw)!0.542005420054201!(ne)$); +\coordinate (c38x) at ($(sw)!0.531165311653117!(ne)$); +\coordinate (c39x) at ($(sw)!0.528455284552846!(ne)$); +\coordinate (c40x) at ($(sw)!0.531165311653117!(ne)$); +\coordinate (c41x) at ($(sw)!0.542005420054201!(ne)$); +\coordinate (c42x) at ($(sw)!0.688346883468834!(ne)$); +\coordinate (c43x) at ($(sw)!0.823848238482385!(ne)$); +\coordinate (c44x) at ($(sw)!0.853658536585366!(ne)$); +\coordinate (c45x) at ($(sw)!0.875338753387534!(ne)$); +\coordinate (c46x) at ($(sw)!0.894308943089431!(ne)$); +\coordinate (c47x) at ($(sw)!0.910569105691057!(ne)$); +\coordinate (c48x) at ($(sw)!0.921409214092141!(ne)$); +\coordinate (c49x) at ($(sw)!0.905149051490515!(ne)$); +\coordinate (c50x) at ($(sw)!0.894308943089431!(ne)$); +\coordinate (c51x) at ($(sw)!0.880758807588076!(ne)$); +\coordinate (c52x) at ($(sw)!0.550135501355014!(ne)$); +\coordinate (c53x) at ($(sw)!0.542005420054201!(ne)$); +\coordinate (c54x) at ($(sw)!0.536585365853658!(ne)$); +\coordinate (c55x) at ($(sw)!0.542005420054201!(ne)$); +\coordinate (c56x) at ($(sw)!0.550135501355014!(ne)$); +\coordinate (c57x) at ($(sw)!0.688346883468834!(ne)$); +\coordinate (c58x) at ($(sw)!0.70189701897019!(ne)$); +\coordinate (c59x) at ($(sw)!0.856368563685637!(ne)$); +\coordinate (c60x) at ($(sw)!0.888888888888889!(ne)$); +\coordinate (c61x) at ($(sw)!0.91869918699187!(ne)$); +\coordinate (c62x) at ($(sw)!0.940379403794038!(ne)$); +\coordinate (c63x) at ($(sw)!0.959349593495935!(ne)$); +\coordinate (c64x) at ($(sw)!0.970189701897019!(ne)$); +\coordinate (c65x) at ($(sw)!0.953929539295393!(ne)$); +\coordinate (c66x) at ($(sw)!0.937669376693767!(ne)$); +\coordinate (c67x) at ($(sw)!0.924119241192412!(ne)$); +\coordinate (c68x) at ($(sw)!0.70189701897019!(ne)$); +\coordinate (c1y) at ($(sw)!0.73657094216209!(ne)$); +\coordinate (c2y) at ($(sw)!0.73657094216209!(ne)$); +\coordinate (c3y) at ($(sw)!0.741947045383272!(ne)$); +\coordinate (c4y) at ($(sw)!0.752699251825636!(ne)$); +\coordinate (c5y) at ($(sw)!0.760763406657407!(ne)$); +\coordinate (c6y) at ($(sw)!0.763451458268!(ne)$); +\coordinate (c7y) at ($(sw)!0.763451458268!(ne)$); +\coordinate (c8y) at ($(sw)!0.768827561489182!(ne)$); +\coordinate (c9y) at ($(sw)!0.774203664710364!(ne)$); +\coordinate (c10y) at ($(sw)!0.787643922763317!(ne)$); +\coordinate (c11y) at ($(sw)!0.803772232426863!(ne)$); +\coordinate (c12y) at ($(sw)!0.82796469692218!(ne)$); +\coordinate (c13y) at ($(sw)!0.862909367859866!(ne)$); +\coordinate (c14y) at ($(sw)!0.873661574302225!(ne)$); +\coordinate (c15y) at ($(sw)!0.879037677523407!(ne)$); +\coordinate (c16y) at ($(sw)!0.879037677523407!(ne)$); +\coordinate (c17y) at ($(sw)!0.895165987186953!(ne)$); +\coordinate (c18y) at ($(sw)!0.895165987186953!(ne)$); +\coordinate (c19y) at ($(sw)!0.905918193629317!(ne)$); +\coordinate (c20y) at ($(sw)!0.924734554903457!(ne)$); +\coordinate (c21y) at ($(sw)!0.956991174230544!(ne)$); +\coordinate (c22y) at ($(sw)!0.981183638725865!(ne)$); +\coordinate (c23y) at ($(sw)!1!(ne)$); +\coordinate (c24y) at ($(sw)!1!(ne)$); +\coordinate (c25y) at ($(sw)!0.879037677523407!(ne)$); +\coordinate (c26y) at ($(sw)!0.427445006944135!(ne)$); +\coordinate (c27y) at ($(sw)!0.376372026342908!(ne)$); +\coordinate (c28y) at ($(sw)!0.376372026342908!(ne)$); +\coordinate (c29y) at ($(sw)!0.379060077953497!(ne)$); +\coordinate (c30y) at ($(sw)!0.392500336006455!(ne)$); +\coordinate (c31y) at ($(sw)!0.403252542448814!(ne)$); +\coordinate (c32y) at ($(sw)!0.422068903722953!(ne)$); +\coordinate (c33y) at ($(sw)!0.448949419828863!(ne)$); +\coordinate (c34y) at ($(sw)!0.459701626271228!(ne)$); +\coordinate (c35y) at ($(sw)!0.459701626271228!(ne)$); +\coordinate (c36y) at ($(sw)!0.46507772949241!(ne)$); +\coordinate (c37y) at ($(sw)!0.46507772949241!(ne)$); +\coordinate (c38y) at ($(sw)!0.467765781102998!(ne)$); +\coordinate (c39y) at ($(sw)!0.478517987545362!(ne)$); +\coordinate (c40y) at ($(sw)!0.486582142377133!(ne)$); +\coordinate (c41y) at ($(sw)!0.494646297208908!(ne)$); +\coordinate (c42y) at ($(sw)!0.494646297208908!(ne)$); +\coordinate (c43y) at ($(sw)!0.486582142377133!(ne)$); +\coordinate (c44y) at ($(sw)!0.489270193987726!(ne)$); +\coordinate (c45y) at ($(sw)!0.497334348819497!(ne)$); +\coordinate (c46y) at ($(sw)!0.510774606872454!(ne)$); +\coordinate (c47y) at ($(sw)!0.524214864925407!(ne)$); +\coordinate (c48y) at ($(sw)!0.543031226199542!(ne)$); +\coordinate (c49y) at ($(sw)!0.575287845526634!(ne)$); +\coordinate (c50y) at ($(sw)!0.586040051968998!(ne)$); +\coordinate (c51y) at ($(sw)!0.59141615519018!(ne)$); +\coordinate (c52y) at ($(sw)!0.59141615519018!(ne)$); +\coordinate (c53y) at ($(sw)!0.594104206800774!(ne)$); +\coordinate (c54y) at ($(sw)!0.604856413243132!(ne)$); +\coordinate (c55y) at ($(sw)!0.615608619685497!(ne)$); +\coordinate (c56y) at ($(sw)!0.620984722906679!(ne)$); +\coordinate (c57y) at ($(sw)!0.620984722906679!(ne)$); +\coordinate (c58y) at ($(sw)!0.623672774517272!(ne)$); +\coordinate (c59y) at ($(sw)!0.620984722906679!(ne)$); +\coordinate (c60y) at ($(sw)!0.623672774517272!(ne)$); +\coordinate (c61y) at ($(sw)!0.631736929349043!(ne)$); +\coordinate (c62y) at ($(sw)!0.642489135791407!(ne)$); +\coordinate (c63y) at ($(sw)!0.661305497065547!(ne)$); +\coordinate (c64y) at ($(sw)!0.68280990995027!(ne)$); +\coordinate (c65y) at ($(sw)!0.717754580887955!(ne)$); +\coordinate (c66y) at ($(sw)!0.731194838940908!(ne)$); +\coordinate (c67y) at ($(sw)!0.739258993772679!(ne)$); +\coordinate (c68y) at ($(sw)!0.739258993772679!(ne)$); +\draw[line width=0.1pt, line cap=rect,line join=round] + (c1x |- c1y) -- (c2x |- c2y)-- (c3x |- c3y)-- (c4x |- c4y)-- (c5x |- c5y)-- (c6x |- c6y)-- (c7x |- c7y)-- (c8x |- c8y)-- (c9x |- c9y)-- (c10x |- c10y)-- (c11x |- c11y)-- (c12x |- c12y)-- (c13x |- c13y)-- (c14x |- c14y)-- (c15x |- c15y)-- (c16x |- c16y)-- (c17x |- c17y)-- (c18x |- c18y)-- (c19x |- c19y)-- (c20x |- c20y)-- (c21x |- c21y)-- (c22x |- c22y)-- (c23x |- c23y)-- (c24x |- c24y)-- (c25x |- c25y)-- (c26x |- c26y)-- (c27x |- c27y)-- (c28x |- c28y)-- (c29x |- c29y)-- (c30x |- c30y)-- (c31x |- c31y)-- (c32x |- c32y)-- (c33x |- c33y)-- (c34x |- c34y)-- (c35x |- c35y)-- (c36x |- c36y)-- (c37x |- c37y)-- (c38x |- c38y)-- (c39x |- c39y)-- (c40x |- c40y)-- (c41x |- c41y)-- (c42x |- c42y)-- (c43x |- c43y)-- (c44x |- c44y)-- (c45x |- c45y)-- (c46x |- c46y)-- (c47x |- c47y)-- (c48x |- c48y)-- (c49x |- c49y)-- (c50x |- c50y)-- (c51x |- c51y)-- (c52x |- c52y)-- (c53x |- c53y)-- (c54x |- c54y)-- (c55x |- c55y)-- (c56x |- c56y)-- (c57x |- c57y)-- (c58x |- c58y)-- (c59x |- c59y)-- (c60x |- c60y)-- (c61x |- c61y)-- (c62x |- c62y)-- (c63x |- c63y)-- (c64x |- c64y)-- (c65x |- c65y)-- (c66x |- c66y)-- (c67x |- c67y)-- (c68x |- c68y); + } +] + +\tikzstyle{draw script} = [ + path picture = { + \def\de{40} %degrees + \def\ma{0.2} %margin + \coordinate (a1) at ($(path picture bounding box.east)!{sin(\de)-\ma}!(path picture bounding box.north east)$); + \coordinate (a2) at ($(path picture bounding box.center)!{cos(\de)-\ma}!(path picture bounding box.east)$); + %\coordinate (ne) at (4.323838pt, -0.8041138pt); + %\coordinate (sw) at (0.7419678pt, -4.077197pt); + \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$); + \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$); + \coordinate (sm) at ($(sw)!0.6793108!(ne |- sw)$); %south middle: lower right corner + \coordinate (nm) at ($(ne)!0.6793108!(ne -| sw)$); %north middle: top left corner + \coordinate (l1) at ($(ne)!0.20377!(sw)$); + \coordinate (l2) at ($(ne)!0.4!(sw)$); + \coordinate (l3) at ($(ne)!0.626414!(sw)$); + \coordinate (l4) at ($(ne)!0.826416!(sw)$); + \coordinate (linestart12) at ($(sw)!0.179310!(ne)$); + \coordinate (lineend12) at ($(sw)!0.637931!(ne)$); + \coordinate (linestart3) at ($(sw)!0.2965524!(ne)$); + \coordinate (lineend3) at ($(sw)!0.751723!(ne)$); + \coordinate (linestart4) at ($(sw)!0.286207!(ne)$); + \coordinate (lineend4) at ($(sw)!0.74137868!(ne)$); + \coordinate (em) at ($(ne)!0.4792457!(sw)$); + \coordinate (bezierright) at ($(sw)!0.7793097!(ne)$); + \coordinate (bezierleft) at ($(sw)!0.0965516!(ne)$); + \coordinate (b11x) at ($(sw)!0.632702!(ne)$); + \coordinate (b11y) at ($(ne)!0.219119!(sw)$); + \coordinate (b12x) at ($(sw)!0.775287!(ne)$); + \coordinate (b12y) at ($(ne)!0.087421!(sw)$); + \coordinate (b21x) at ($(sw)!0.951148!(ne)$); + \coordinate (b21y) at ($(ne)!0.686793!(sw)$); + \coordinate (b22x) at ($(sw)!0.933448!(ne)$); + \coordinate (b22y) at ($(ne)!0.898365!(sw)$); + \coordinate (b31x) at ($(sw)!-0.051781!(ne)$); + \coordinate (b31y) at ($(ne)!0.220063!(sw)$); + \coordinate (b32x) at ($(sw)!0.092529!(ne)$); + \coordinate (b32y) at ($(ne)!0.084087!(sw)$); + \coordinate (b41x) at ($(sw)!0.265459!(ne)$); + \coordinate (b41y) at ($(ne)!0.694026!(sw)$); + \coordinate (b42x) at ($(sw)!0.250402!(ne)$); + \coordinate (b42y) at ($(ne)!0.886981!(sw)$); + \draw[line width=0.1pt, solid,line cap=round,line join=round] + (linestart12 |- l1) -- (lineend12 |- l1) %(302.6953pt, -147.1082pt) + (linestart12 |- l2) -- (lineend12 |- l2) %(302.6953pt, -211.3347pt) + (linestart3 |- l3) -- (lineend3 |- l3) %(343.4541pt, -285.4421pt) + (linestart4 |- l4) -- (lineend4 |- l4) %(339.749pt, -350.9043pt) + (ne) -- (nm) %top + (sw) -- (sm) %bottom + (bezierright |- em) + .. controls (b11x |- b11y) and (b12x |- b12y) .. + (ne) + (bezierright |- em) + .. controls (b21x |- b21y) and (b22x |- b22y) .. + (sm) + (bezierleft |- em) + .. controls (b31x |- b31y) and (b32x |- b32y) .. + (nm) + (bezierleft |- em) + .. controls (b41x |- b41y) and (b42x |- b42y) .. + (sw); + } +] + +\tikzstyle{draw user} = [ + path picture = { + \coordinate (ne) at ($(path picture bounding box.north east)-(0.5pt,0.5pt)$); + \coordinate (sw) at ($(path picture bounding box.south west)+(0.5pt,0.5pt)$); +% \draw (path picture bounding box.north east) rectangle (path picture bounding box.south west); +\coordinate (c1x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c1y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c2x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c2y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c3x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c3y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c4x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c4y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c5x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c5y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c6x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c6y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c7x) at ($(sw)!0.67936507936508!(ne)$); \coordinate (c7y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c8x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c8y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c9x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c9y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c10x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c10y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c11x) at ($(sw)!0.644444444444444!(ne)$); \coordinate (c11y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c12x) at ($(sw)!0.511111111111112!(ne)$); \coordinate (c12y) at ($(sw)!1!(ne)$); +\coordinate (c13x) at ($(sw)!0.511111111111112!(ne)$); \coordinate (c13y) at ($(sw)!1!(ne)$); +\coordinate (c14x) at ($(sw)!0.511111111111112!(ne)$); \coordinate (c14y) at ($(sw)!1!(ne)$); +\coordinate (c15x) at ($(sw)!0.371428571428571!(ne)$); \coordinate (c15y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c16x) at ($(sw)!0.371428571428571!(ne)$); \coordinate (c16y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c17x) at ($(sw)!0.371428571428571!(ne)$); \coordinate (c17y) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (c18x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c18y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c19x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c19y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c20x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c20y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c21x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c21y) at ($(sw)!0.555905797101449!(ne)$); +\coordinate (c22x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c22y) at ($(sw)!0.509316770186336!(ne)$); +\coordinate (c23x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c23y) at ($(sw)!0.509316770186336!(ne)$); +\coordinate (c24x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c24y) at ($(sw)!0.509316770186336!(ne)$); +\coordinate (c25x) at ($(sw)!0.336507936507936!(ne)$); \coordinate (c25y) at ($(sw)!0.509316770186336!(ne)$); +\coordinate (c26x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c26y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c27x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c27y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c28x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c28y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c29x) at ($(sw)!0.333333333333333!(ne)$); \coordinate (c29y) at ($(sw)!0.527950310559006!(ne)$); +\coordinate (c30x) at ($(sw)!0!(ne)$); \coordinate (c30y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c31x) at ($(sw)!0!(ne)$); \coordinate (c31y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c32x) at ($(sw)!0!(ne)$); \coordinate (c32y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c33x) at ($(sw)!0!(ne)$); \coordinate (c33y) at ($(sw)!0!(ne)$); +\coordinate (c34x) at ($(sw)!0!(ne)$); \coordinate (c34y) at ($(sw)!0!(ne)$); +\coordinate (c35x) at ($(sw)!0!(ne)$); \coordinate (c35y) at ($(sw)!0!(ne)$); +\coordinate (c36x) at ($(sw)!0!(ne)$); \coordinate (c36y) at ($(sw)!0!(ne)$); +\coordinate (c37x) at ($(sw)!1!(ne)$); \coordinate (c37y) at ($(sw)!0!(ne)$); +\coordinate (c38x) at ($(sw)!1!(ne)$); \coordinate (c38y) at ($(sw)!0!(ne)$); +\coordinate (c39x) at ($(sw)!1!(ne)$); \coordinate (c39y) at ($(sw)!0!(ne)$); +\coordinate (c40x) at ($(sw)!1!(ne)$); \coordinate (c40y) at ($(sw)!0!(ne)$); +\coordinate (c41x) at ($(sw)!1!(ne)$); \coordinate (c41y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c42x) at ($(sw)!1!(ne)$); \coordinate (c42y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c43x) at ($(sw)!1!(ne)$); \coordinate (c43y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c44x) at ($(sw)!1!(ne)$); \coordinate (c44y) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (c45x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c45y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c46x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c46y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c47x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c47y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c48x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c48y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c49x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c49y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c50x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c50y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c51x) at ($(sw)!0.555555555555556!(ne)$); \coordinate (c51y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (c52x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c52y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c53x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c53y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c54x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c54y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c55x) at ($(sw)!0.53015873015873!(ne)$); \coordinate (c55y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c56x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c56y) at ($(sw)!0.397515527950311!(ne)$); +\coordinate (c57x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c57y) at ($(sw)!0.397515527950311!(ne)$); +\coordinate (c58x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c58y) at ($(sw)!0.397515527950311!(ne)$); +\coordinate (c59x) at ($(sw)!0.498412698412698!(ne)$); \coordinate (c59y) at ($(sw)!0.397515527950311!(ne)$); +\coordinate (c60x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c60y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c61x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c61y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c62x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c62y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c63x) at ($(sw)!0.473015873015873!(ne)$); \coordinate (c63y) at ($(sw)!0.400626293995859!(ne)$); +\coordinate (c64x) at ($(sw)!0.444444444444444!(ne)$); \coordinate (c64y) at ($(sw)!0.406832298136645!(ne)$); +\coordinate (b11x1) at ($(sw)!0.798148148148148!(ne)$); +\coordinate (b11y1) at ($(sw)!0.722670807453416!(ne)$); +\coordinate (b11x2) at ($(sw)!0.722222222222222!(ne)$); +\coordinate (b11y2) at ($(sw)!0.994151138716356!(ne)$); +\coordinate (b11x3) at ($(sw)!0.511111111111112!(ne)$); +\coordinate (b11y3) at ($(sw)!1!(ne)$); +\coordinate (b14x1) at ($(sw)!0.297671957671958!(ne)$); +\coordinate (b14y1) at ($(sw)!1.00020703933747!(ne)$); +\coordinate (b14x2) at ($(sw)!0.215714285714286!(ne)$); +\coordinate (b14y2) at ($(sw)!0.723240165631469!(ne)$); +\coordinate (b14x3) at ($(sw)!0.371428571428571!(ne)$); +\coordinate (b14y3) at ($(sw)!0.593167701863355!(ne)$); +\coordinate (b29x1) at ($(sw)!0.209100529100529!(ne)$); +\coordinate (b29y1) at ($(sw)!0.531418219461698!(ne)$); +\coordinate (b29x2) at ($(sw)!0.062804232804232!(ne)$); +\coordinate (b29y2) at ($(sw)!0.455020703933747!(ne)$); +\coordinate (b29x3) at ($(sw)!0!(ne)$); +\coordinate (b29y3) at ($(sw)!0.350931677018634!(ne)$); +\coordinate (b44x1) at ($(sw)!0.935185185185186!(ne)$); +\coordinate (b44y1) at ($(sw)!0.454606625258799!(ne)$); +\coordinate (b44x2) at ($(sw)!0.800899470899472!(ne)$); +\coordinate (b44y2) at ($(sw)!0.523654244306418!(ne)$); +\coordinate (b44x3) at ($(sw)!0.67936507936508!(ne)$); +\coordinate (b44y3) at ($(sw)!0.527950310559006!(ne)$); +\draw[line width=0.1pt, line cap=rect,line join=round] + (c1x |- c1y) -- (c2x |- c2y) -- (c3x |- c3y) -- (c4x |- c4y) -- (c5x |- c5y) -- (c6x |- c6y) -- (c7x |- c7y) -- (c8x |- c8y) -- (c9x |- c9y) -- (c10x |- c10y) -- (c11x |- c11y) .. controls (b11x1 |- b11y1) and (b11x2 |- b11y2) .. (b11x3 |- b11y3) -- (c12x |- c12y) -- (c13x |- c13y) -- (c14x |- c14y) .. controls (b14x1 |- b14y1) and (b14x2 |- b14y2) .. (b14x3 |- b14y3) -- (c15x |- c15y) -- (c16x |- c16y) -- (c17x |- c17y) -- (c18x |- c18y) -- (c19x |- c19y) -- (c20x |- c20y) -- (c21x |- c21y) -- (c22x |- c22y) -- (c23x |- c23y) -- (c24x |- c24y) -- (c25x |- c25y) -- (c26x |- c26y) -- (c27x |- c27y) -- (c28x |- c28y) -- (c29x |- c29y) .. controls (b29x1 |- b29y1) and (b29x2 |- b29y2) .. (b29x3 |- b29y3) -- (c30x |- c30y) -- (c31x |- c31y) -- (c32x |- c32y) -- (c33x |- c33y) -- (c34x |- c34y) -- (c35x |- c35y) -- (c36x |- c36y) -- (c37x |- c37y) -- (c38x |- c38y) -- (c39x |- c39y) -- (c40x |- c40y) -- (c41x |- c41y) -- (c42x |- c42y) -- (c43x |- c43y) -- (c44x |- c44y) .. controls (b44x1 |- b44y1) and (b44x2 |- b44y2) .. (b44x3 |- b44y3); + (c45x |- c45y) -- (c46x |- c46y) -- (c47x |- c47y) -- (c48x |- c48y) -- (c49x |- c49y) -- (c50x |- c50y) -- (c51x |- c51y) -- (c52x |- c52y) -- (c53x |- c53y) -- (c54x |- c54y) -- (c55x |- c55y) -- (c56x |- c56y) -- (c57x |- c57y) -- (c58x |- c58y) -- (c59x |- c59y) -- (c60x |- c60y) -- (c61x |- c61y) -- (c62x |- c62y) -- (c63x |- c63y) -- (c64x |- c64y) -- cycle; + } +] + +%%%%% resources %%%%% + +\tikzstyle{pool} = [ + draw +] + +\tikzstyle{pool label} = [ + pool, + label={[rotate=90,anchor=north]left:\footnotesize #1}, + fit margins={left=0.8em,right=0.1em,bottom=0.1em,top=0.1em}, + path picture = { + \def\x{1.2em} + \draw ($(path picture bounding box.north west)+(\x,0)$) to ($(path picture bounding box.south west)+(\x,0)$); + } +] + +%%%%% data %%%%% + +\tikzstyle{data object} = [ + inner sep=0, + minimum width=1em, + minimum height=1.5em, + path picture = { + \def\i{0.3em} + \draw (path picture bounding box.north west) to (path picture bounding box.south west) to (path picture bounding box.south east) |- ($(path picture bounding box.north east)+(-\i,-\i)$) |- cycle; + \draw ($(path picture bounding box.north east)+(-\i,0)$) to ($(path picture bounding box.north east)+(0,-\i)$); + } +] + +\tikzstyle{data collection} = [ + data object, + label={[anchor=south,inner sep=0]below:\tikzmultimarker} +] + +\tikzstyle{data store} = [ + database, + database segment height=0.3mm, + database bottom segment height=3mm, + database aspect ratio=0.25, + database radius=0.35cm +] + +%adapted from https://tex.stackexchange.com/questions/442991/database-shape-in-tikz +\makeatletter +\tikzset{ + database/.style={ + path picture={ + \draw (0, 1.5*\database@segmentheight+0.5*\database@bottomsegmentheight) circle [x radius=\database@radius,y radius=\database@aspectratio*\database@radius]; + \draw (-\database@radius, 0.5*\database@segmentheight+0.5*\database@bottomsegmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius]; + \draw (-\database@radius,-0.5*\database@segmentheight+0.5*\database@bottomsegmentheight) arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius]; + \draw (-\database@radius,1.5*\database@segmentheight+0.5*\database@bottomsegmentheight) + to ++(0,-2*\database@segmentheight-\database@bottomsegmentheight) + arc [start angle=180,end angle=360,x radius=\database@radius, y radius=\database@aspectratio*\database@radius] + to ++(0,2*\database@segmentheight+\database@bottomsegmentheight); + }, + minimum width=2*\database@radius + 2*\pgflinewidth, + minimum height=2*\database@segmentheight + \database@bottomsegmentheight + 2*\database@aspectratio*\database@radius + 2*\pgflinewidth, + }, + database segment height/.store in=\database@segmentheight, + database bottom segment height/.store in=\database@bottomsegmentheight, + database radius/.store in=\database@radius, + database aspect ratio/.store in=\database@aspectratio, + database segment height=0.1cm, + database radius=0.25cm, + database aspect ratio=0.35, +} +\makeatother diff --git a/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty b/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty index 4ecad3156ba..6e170c76719 100644 --- a/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty +++ b/Master/texmf-dist/tex/latex/tikzquests/tikzquests.sty @@ -12,7 +12,7 @@ %% %% The Current Maintainer of this work is Alceu Frigeri %% -%% This is version {1.1} {2024/01/11} +%% This is version {1.2} {2025/01/09} %% %% The list of files that compose this work can be found in the README.md file at %% https://ctan.org/pkg/tikzquests @@ -27,8 +27,8 @@ \ProvidesExplPackage {tikzquests} - {2024/01/11} - {1.1} + {2025/01/09} + {1.2} {A Simple Framework for (tikz/text) Parametric Questions} \ExplSyntaxOn @@ -42,8 +42,8 @@ { name .code:n = {tikzquests} , prefix .code:n = {tikzquests} , - date .code:n = {2024/01/11}, - version .code:n = {1.1} , + date .code:n = {2025/01/09}, + version .code:n = {1.2} , description .code:n = {A Simple Framework for (tikz/text) Parametric Questions} } \cs_if_exist:NF \PkgInfo @@ -134,7 +134,8 @@ \seq_new:N \l__tikzquests_repositories_seq \tl_new:N \l__tikzquests_active_repository_tl -\seq_new:N \l__tikzquests_tmp_seq +\seq_new:N \l__tikzquests_tmpa_seq +\seq_new:N \l__tikzquests_tmpb_seq \tl_new:N \l__tikzquests_tmp_tl \cs_new_protected:Npn \__tikzquests_select_repository:n #1 @@ -155,10 +156,10 @@ \msg_warning:nnne {tikzquests}{repository already defined}{new~01}{#2} } { - \prop_new:c {l__tikzquests_ #2 _tikzrepo_prop} - \prop_new:c {l__tikzquests_ #2 _tikzrepo_remarks_prop} - \prop_new:c {l__tikzquests_ #2 _textrepo_prop} - \prop_new:c {l__tikzquests_ #2 _textrepo_remarks_prop} + \prop_new_linked:c {l__tikzquests_ #2 _tikzrepo_prop} + \prop_new_linked:c {l__tikzquests_ #2 _tikzrepo_remarks_prop} + \prop_new_linked:c {l__tikzquests_ #2 _textrepo_prop} + \prop_new_linked:c {l__tikzquests_ #2 _textrepo_remarks_prop} \seq_put_right:Nn \l__tikzquests_repositories_seq {#2} } \bool_if:nT {#1} @@ -365,19 +366,41 @@ { \tl_if_blank:nTF {#1} { - \seq_set_eq:NN \l__tikzquests_tmp_seq \l__tikzquests_repositories_seq + \seq_set_eq:NN \l__tikzquests_tmpb_seq \l__tikzquests_repositories_seq } { - \seq_set_from_clist:Nn \l__tikzquests_tmp_seq {#1} + \seq_set_from_clist:Nn \l__tikzquests_tmpb_seq {#1} } - \seq_remove_duplicates:N \l__tikzquests_tmp_seq - \seq_sort:Nn \l__tikzquests_tmp_seq + + \seq_map_inline:Nn \l__tikzquests_tmpb_seq + { + \regex_match:nnTF {/$}{##1} + { + \tl_set:Nn \l_tmpa_tl {##1} + \regex_replace_once:nnN {/$}{} \l_tmpa_tl + \seq_put_right:Nn \l__tikzquests_tmpa_seq {\l_tmpa_tl} + \seq_map_inline:Nn \l__tikzquests_repositories_seq + { + \regex_match:nnTF {##1}{####1} + { + \seq_put_right:Nn \l__tikzquests_tmpa_seq {####1} + } + {} + } + } + { + \seq_put_right:Nn \l__tikzquests_tmpa_seq {##1} + } + } + + \seq_remove_duplicates:N \l__tikzquests_tmpa_seq + \seq_sort:Nn \l__tikzquests_tmpa_seq { \str_compare:eNeTF { ##1 } > { ##2 } { \sort_return_swapped: } { \sort_return_same: } } - \seq_map_inline:Nn \l__tikzquests_tmp_seq + \seq_map_inline:Nn \l__tikzquests_tmpa_seq { \prop_if_exist:cTF {l__tikzquests_ ##1 _tikzrepo_prop} { diff --git a/Master/texmf-dist/tex/latex/yb-book/yb-book.cls b/Master/texmf-dist/tex/latex/yb-book/yb-book.cls index fd9069b5cf6..273b572317c 100644 --- a/Master/texmf-dist/tex/latex/yb-book/yb-book.cls +++ b/Master/texmf-dist/tex/latex/yb-book/yb-book.cls @@ -32,7 +32,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesClass{yb-book} -[2025/01/05 0.5.1 YB Branded Book Style] +[2025/01/08 0.6.0 YB Branded Book Style] @@ -57,6 +57,7 @@ \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, @@ -97,6 +98,8 @@ \fi \makeatother +\RequirePackage{href-ul} + \RequirePackage{anyfontsize} \RequirePackage{tikz} @@ -139,9 +142,18 @@ \ifdefined\yb@manuscript\setstretch{1.1}\fi \makeatother -\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}% @@ -187,7 +199,7 @@ \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} @@ -206,9 +218,19 @@ \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 @@ -220,7 +242,7 @@ }; \end{textblock} } - \fancyfoot[C,CO,CE]{\small\ttfamily% + \fancyfoot[C,CO,C]{\small\ttfamily% page \#\thepage{} of \pageref{LastPage}} \fi \makeatother diff --git a/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty b/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty index 91c15789e43..20cb27760a3 100644 --- a/Master/texmf-dist/tex/lualatex/plantuml/plantuml.sty +++ b/Master/texmf-dist/tex/lualatex/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 |