aboutsummaryrefslogtreecommitdiff
path: root/latex_docutils/texmf/tex/latex/docUtils/DUClasses
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2019-08-13 13:43:42 +0200
committerSébastien Dailly <sebastien@chimrod.com>2019-08-13 13:43:42 +0200
commitae87915b6f4eb3cb3df9608c800c7b5c72708421 (patch)
tree780e1f9ee2ac08a25387b7be50bb0e638d0ca3eb /latex_docutils/texmf/tex/latex/docUtils/DUClasses
parentc5bf957cb89cc223e126eba238f998a317533b6b (diff)
Update custom latex style
Diffstat (limited to 'latex_docutils/texmf/tex/latex/docUtils/DUClasses')
-rwxr-xr-xlatex_docutils/texmf/tex/latex/docUtils/DUClasses/DUclasses.sty37
1 files changed, 37 insertions, 0 deletions
diff --git a/latex_docutils/texmf/tex/latex/docUtils/DUClasses/DUclasses.sty b/latex_docutils/texmf/tex/latex/docUtils/DUClasses/DUclasses.sty
new file mode 100755
index 0000000..b23ab61
--- /dev/null
+++ b/latex_docutils/texmf/tex/latex/docUtils/DUClasses/DUclasses.sty
@@ -0,0 +1,37 @@
+\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:: colorbox-red textcolor-white
+%
+% 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 couleur
+\NewEnviron{DUCLASScolorbox}[1]{
+ \fcolorbox{#1}{#1}{\parbox[t]{\linewidth}{\BODY}}
+}
+
+% Mise en couleur du texte
+\newcommand{\DUCLASStextcolor}[1]{\color{#1}}