aboutsummaryrefslogtreecommitdiff
path: root/common/classes/tex/DUClasses
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2024-06-13 10:25:52 +0200
committerSébastien Dailly <sebastien@dailly.me>2024-06-13 10:25:52 +0200
commit29f0b0efcee3b462b5469aec45763e820f3311a2 (patch)
tree0a13074743240bd985c4e817a2e7749336cc867b /common/classes/tex/DUClasses
parent1dafbcc4532d63d389d9d33b3efae15452bcf0bb (diff)
Added all the styles requirements
Diffstat (limited to 'common/classes/tex/DUClasses')
-rwxr-xr-xcommon/classes/tex/DUClasses/DUclasses.sty40
1 files changed, 40 insertions, 0 deletions
diff --git a/common/classes/tex/DUClasses/DUclasses.sty b/common/classes/tex/DUClasses/DUclasses.sty
new file mode 100755
index 0000000..737fbf1
--- /dev/null
+++ b/common/classes/tex/DUClasses/DUclasses.sty
@@ -0,0 +1,40 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUclasses}[2019/08/13 Docutils custom classes]
+
+\RequirePackage{xstring}
+\RequirePackage{environ}
+
+%
+% Permet d'appliquer des paramètres aux styles de classes, et fournis quelques styles
+% correspondant
+%
+% .. container:: textcolor-white centering
+%
+% Ceci est un test
+%
+% Sur plusieurs lignes
+
+% Mise à jour de l'environnement DUclass
+
+% class handling for environments (block-level elements)
+% \begin{DUclass}{foo-bar} tries \DUCLASSfoo[bar] and
+% \end{DUclass}{foo} tries \endDUCLASSfoo
+\ifx\DUclass\undefined
+ \newenvironment{DUclass}[1]%
+ {\StrCut{#1}{-}\csA\csB
+ \def\DocutilsClassFunctionName{DUCLASS\csA}% arg cannot be used in end-part of environment.
+ \csname \DocutilsClassFunctionName \endcsname{\csB}}%
+ {\csname end\DocutilsClassFunctionName \endcsname}%
+\fi
+
+
+% Creation d'une boite de hauteur fixe
+\NewEnviron{DUCLASShbox}[1]{
+ \parbox[s][#1][c]{\linewidth}{\BODY}
+}
+
+% Mise en couleur du texte
+\newcommand{\DUCLASStextcolor}[1]{\color{#1}}
+
+\NewEnviron{DUCLASScentering}{\centering\BODY\par}
+