Skip to content

Commit

Permalink
[tutodoc] Clean imports #2
Browse files Browse the repository at this point in the history
  • Loading branch information
projetmbc committed Nov 22, 2024
1 parent 4edb4c3 commit 327af6e
Show file tree
Hide file tree
Showing 32 changed files with 1,994 additions and 69 deletions.
87 changes: 32 additions & 55 deletions tutodoc/rollout/code/tutodoc.cls
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
\ProcessKeyOptions[tutodoc / main / class / options]

\exp_last_unbraced:NNV \LoadClass[ \l__tutodoc_other_cls_options_tl ]%
{ article }%
[ 2022-06-01 ]
{ article }

\ExplSyntaxOff

Expand All @@ -57,78 +56,56 @@
% -- IMPORTS -- %
% ------------- %

\RequirePackage[svgnames]%
{xcolor}%
[2023/11/15]

\RequirePackage[
top = 2.5cm,
bottom = 2.5cm,
left = 2.5cm,
right = 2.5cm,
marginparwidth = 2cm,
marginparsep = 2mm,
heightrounded
]{geometry}%
[2020-01-02]

\RequirePackage[raggedright]%
{titlesec}%
[2023/10/27]

\RequirePackage{tocbasic}

\RequirePackage{xcolor}%
[2022/06/12]

\RequirePackage{hyperref}% To load after titlesec!
[2023-02-07]

% :::::::::::: %
% :: LOCALE :: %
% :::::::::::: %

% We delegate the management of quoting to the ''csquotes'' package,
% which takes care of the locale settings.
\RequirePackage{csquotes}%
[2022-09-14]
\RequirePackage{csquotes}

% :::::::::::: %
% :: STYLES :: %
% :::::::::::: %

\RequirePackage{fontawesome5}%
[2022-05-02]
\RequirePackage[svgnames]%
{xcolor}

\RequirePackage{keytheorems}%
[2024/09/19]
\RequirePackage{fontawesome5}

\RequirePackage[svgnames]%
{xcolor}%
[2023/11/15]
\RequirePackage{keytheorems}

\RequirePackage{tcolorbox}%
[2024/07/10]
\RequirePackage{tcolorbox}

\tcbuselibrary{breakable,
\tcbuselibrary{minted,
breakable,
skins}

\RequirePackage{clrstrip}

\RequirePackage{clrstrip}%
[2021-08-28]
\RequirePackage{fontawesome5}

\RequirePackage{marginnote}

\RequirePackage[highlightmode = immediate]%
{minted}%
[2024/09/22]
{minted}

\RequirePackage{tcolorbox}%
[2024/07/10]

\tcbuselibrary{minted,
breakable,
skins}
\RequirePackage[
top = 2.5cm,
bottom = 2.5cm,
left = 2.5cm,
right = 2.5cm,
marginparwidth = 2cm,
marginparsep = 2mm,
heightrounded
]{geometry}

\RequirePackage[raggedright]%
{titlesec}

\RequirePackage{fontawesome5}%
[2022-05-02]
\RequirePackage{tocbasic}

\RequirePackage{marginnote}%
[2018/08/09]
\RequirePackage{hyperref}% To load after titlesec!


% =============== %
Expand Down
80 changes: 80 additions & 0 deletions tutodoc/rollout/debug/pdf-highlight-colorful.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
\documentclass{tutodoc}

\input{regression-test}

\begin{document}
\START

\section{No footnote}

\begin{tdocnote}
\textcolor{black}{One note}

One note...
\end{tdocnote}

\begin{tdoctip}
\textcolor{black}{Useful tip.}

Useful tip.
\end{tdoctip}

\begin{tdocimp}
\textcolor{black}{Something important.}

Something important.
\end{tdocimp}

\begin{tdoccaut}
\textcolor{black}{Be aware.}

Be aware.
\end{tdoccaut}

\begin{tdocwarn}
\textcolor{black}{Be prudent!}

Be prudent!
\end{tdocwarn}


\section{With one footnote}

\begin{tdocnote}
\textcolor{black}{One note}

One note...%
\footnote{\textcolor{black}{Good color and not good doctor!} \par Good color and not good doctor!}
\end{tdocnote}

\begin{tdoctip}
\textcolor{black}{Useful tip.}

Useful tip.%
\footnote{\textcolor{black}{Good color and not good doctor!} \par Good color and not good doctor!}
\end{tdoctip}

\begin{tdocimp}
\textcolor{black}{Something important.}

Something important.%
\footnote{\textcolor{black}{Good color and not good doctor!} \par Good color and not good doctor!}
\end{tdocimp}

\begin{tdoccaut}
\textcolor{black}{Be aware.}

Be aware.%
\footnote{\textcolor{black}{Good color and not good doctor!} \par Good color and not good doctor!}
\end{tdoccaut}

\begin{tdocwarn}
\textcolor{black}{Be prudent!}

Be prudent!%
\footnote{\textcolor{black}{Good color and not good doctor!} \par Good color and not good doctor!}
\end{tdocwarn}

\showoutput

\end{document}
46 changes: 46 additions & 0 deletions tutodoc/rollout/debug/tutodoc-bw-admonitions.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
% -- COLORFUL HIGHLIGHTING OF CONTENT -- %

\NewExpandableDocumentCommand{\tutodoc@build@title@color}{m}{%
white%
}

\NewExpandableDocumentCommand{\tutodoc@build@upper@color}{m}{%
\tdocdarkcolor[40]{Gray}%
}

\NewExpandableDocumentCommand{\tutodoc@build@back@color}{m}{%
\tdoclightcolor[10]{Gray}%
}

\NewExpandableDocumentCommand{\tutodoc@build@frame@color}{m}{%
Gray!75!black!45%
}

\colorlet{tutodoc@admonition@shadow@color}{Gray!15}


\ExplSyntaxOn

%%%
% We use two ''prop'' variables to factorize the code just after.
%%%
\prop_new:N \g__tutodoc_focus_color_prop
\prop_new:N \g__tutodoc_focus_icon_prop

\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop {
note = DarkGray,
tip = DarkGray,
imp = DarkGray,
caut = DarkGray,
warn = DarkGray,
}

\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop {
note = \faInfoCircle,
tip = \faLightbulb,
imp = \faHighlighter,
caut = \faBiohazard,
warn = \faSkullCrossbones,
}

\ExplSyntaxOff
30 changes: 30 additions & 0 deletions tutodoc/rollout/debug/tutodoc-bw-listing.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
% :: INLINE LATEX MACRO :: %

\newcommand{\tutodoc@latex@style}{friendly_grayscale}

\colorlet{tutodoc@latex@back@color}{gray!5}
\colorlet{tutodoc@latex@text@color}{black}


% :: THE TCOLORBOX LISTING STYLE :: %

\colorlet{tutodoc@latex@frame@color}{darkgray}

\newcommand{\tutodoc@latex@left@len}{1mm}
\newcommand{\tutodoc@latex@right@len}{1mm}
\newcommand{\tutodoc@latex@top@len}{1mm}
\newcommand{\tutodoc@latex@bottom@len}{1mm}

\newcommand{\tutodoc@latex@arc@len}{.75mm}

\newcommand{\tutodoc@latex@left@rule@len}{1pt}
\newcommand{\tutodoc@latex@right@rule@len}{1pt}
\newcommand{\tutodoc@latex@top@rule@len}{1pt}
\newcommand{\tutodoc@latex@bottom@rule@len}{1pt}

\colorlet{tutodoc@latex@shadow@color}{black!30}
\newcommand{\tutodoc@latex@shadow@xshift@len}{.75mm}
\newcommand{\tutodoc@latex@shadow@yshift@len}{-.75mm}
\newcommand{\tutodoc@latex@shadow@offset@len}{0mm}

\colorlet{tutodoc@latex@segment@color}{gray}
3 changes: 3 additions & 0 deletions tutodoc/rollout/debug/tutodoc-bw-main.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% -- LINKS -- %

\definecolor{tutodoc@link@color}{named}{DimGray}
21 changes: 21 additions & 0 deletions tutodoc/rollout/debug/tutodoc-bw-showcase.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
% -- SHOWCASE -- %

\NewExpandableDocumentCommand{\tutodoc@showcase@rule@color}{}{%
black%
}

\NewExpandableDocumentCommand{\tutodoc@showcase@stripe@color}{}{%
darkgray%
}

\NewExpandableDocumentCommand{\tutodoc@showcase@text@color}{}{%
black%
}

\NewExpandableDocumentCommand{\tutodoc@showcase@build@rule@color}{m}{%
black%
}

\NewExpandableDocumentCommand{\tutodoc@showcase@build@back@color}{m}{%
gray!10%
}
5 changes: 5 additions & 0 deletions tutodoc/rollout/debug/tutodoc-bw-version-n-change.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% -- VERSION & CHANGES -- %

\NewExpandableDocumentCommand{\tutodoc@changes@when@color}{}{%
gray%
}
50 changes: 50 additions & 0 deletions tutodoc/rollout/debug/tutodoc-color-admonitions.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
% -- COLORFUL HIGHLIGHTING OF CONTENT -- %

\NewExpandableDocumentCommand{\tutodoc@build@title@color}{m}{%
white%
}

\NewExpandableDocumentCommand{\tutodoc@build@upper@color}{m}{%
\tdocdarkcolor{#1}%
}

\NewExpandableDocumentCommand{\tutodoc@build@lower@color}{m}{%
\tdocdarkcolor{#1}%
}

\NewExpandableDocumentCommand{\tutodoc@build@back@color}{m}{%
\tdoclightcolor{#1}%
}

\NewExpandableDocumentCommand{\tutodoc@build@frame@color}{m}{%
#1!75!black!45%
}

\colorlet{tutodoc@admonition@shadow@color}{black!30}


\ExplSyntaxOn

%%%
% We use two ''prop'' variables to factorize the code just after.
%%%
\prop_new:N \g__tutodoc_focus_color_prop
\prop_new:N \g__tutodoc_focus_icon_prop

\prop_set_from_keyval:Nn \g__tutodoc_focus_color_prop {
note = cyan,
tip = ForestGreen,
imp = orange,
caut = violet,
warn = red,
}

\prop_set_from_keyval:Nn \g__tutodoc_focus_icon_prop {
note = \faInfoCircle,
tip = \faLightbulb,
imp = \faHighlighter,
caut = \faBiohazard,
warn = \faSkullCrossbones,
}

\ExplSyntaxOff
30 changes: 30 additions & 0 deletions tutodoc/rollout/debug/tutodoc-color-listing.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
% :: INLINE LATEX MACRO :: %

\newcommand{\tutodoc@latex@style}{pastie}

\colorlet{tutodoc@latex@back@color}{yellow!4}
\colorlet{tutodoc@latex@text@color}{black}


% :: THE TCOLORBOX LISTING STYLE :: %

\colorlet{tutodoc@latex@frame@color}{darkgray}

\newcommand{\tutodoc@latex@left@len}{1mm}
\newcommand{\tutodoc@latex@right@len}{1mm}
\newcommand{\tutodoc@latex@top@len}{1mm}
\newcommand{\tutodoc@latex@bottom@len}{1mm}

\newcommand{\tutodoc@latex@arc@len}{.75mm}

\newcommand{\tutodoc@latex@left@rule@len}{1pt}
\newcommand{\tutodoc@latex@right@rule@len}{1pt}
\newcommand{\tutodoc@latex@top@rule@len}{1pt}
\newcommand{\tutodoc@latex@bottom@rule@len}{1pt}

\colorlet{tutodoc@latex@shadow@color}{black!30}
\newcommand{\tutodoc@latex@shadow@xshift@len}{.75mm}
\newcommand{\tutodoc@latex@shadow@yshift@len}{-.75mm}
\newcommand{\tutodoc@latex@shadow@offset@len}{0mm}

\colorlet{tutodoc@latex@segment@color}{gray}
3 changes: 3 additions & 0 deletions tutodoc/rollout/debug/tutodoc-color-main.css.cls.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% -- LINKS -- %

\colorlet{tutodoc@link@color}{NavyBlue!85!white}
Loading

0 comments on commit 327af6e

Please sign in to comment.