From 29f0b0efcee3b462b5469aec45763e820f3311a2 Mon Sep 17 00:00:00 2001
From: Sébastien Dailly <sebastien@dailly.me>
Date: Thu, 13 Jun 2024 10:25:52 +0200
Subject: Added all the styles requirements

---
 common/classes/tex/DUsidebar/DUsidebar.sty | 58 ++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 common/classes/tex/DUsidebar/DUsidebar.sty

(limited to 'common/classes/tex/DUsidebar/DUsidebar.sty')

diff --git a/common/classes/tex/DUsidebar/DUsidebar.sty b/common/classes/tex/DUsidebar/DUsidebar.sty
new file mode 100644
index 0000000..d4e709e
--- /dev/null
+++ b/common/classes/tex/DUsidebar/DUsidebar.sty
@@ -0,0 +1,58 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUsidebar}[2017/04/16 Docutils sidebar]
+
+\RequirePackage{kvoptions}
+\RequirePackage{mdframed}
+\RequirePackage{ifthen}
+\RequirePackage{makeidx}
+
+% Option for the color line (
+\DeclareStringOption {linecolor}[blue]
+\ProcessKeyvalOptions*
+
+% Défini une note de marge entourée d'un petit cadre
+%
+
+\ifthenelse{\equal{\DUsidebar@linecolor}{}}{%
+  % Node bar colored defined, juste put the note in the margin
+  \newcommand{\DUsidebar}[1]{\marginpar{\small#1}}%
+}{%
+  \newcommand{\DUsidebar}[1]{%
+    \marginpar[{\begin{mdframed}[topline=false,%
+      bottomline=false,%
+      leftline=false,%
+      linecolor=\DUsidebar@linecolor,%
+      innerrightmargin=2pt,%
+      linewidth=.4pt]%
+      {\small#1}%
+    \end{mdframed}%
+    }]{\begin{mdframed}[topline=false,%
+      bottomline=false,%
+      rightline=false,%
+      linecolor=\DUsidebar@linecolor,%
+      innerleftmargin=2pt,%
+      linewidth=.4pt]%
+      {\small#1}%
+    \end{mdframed}%
+    }%
+  }%
+}%
+
+
+%
+% Permet de créer une note en utilisant le rôle « note »
+%
+%   .. role:: note
+%
+%   :note:`Ceci est un test`
+\newcommand{\DUrolenote}[1]{\marginpar{#1}}
+
+
+
+%
+% Permet de référencer un élément dans la marge en utilisant le rôle « index »
+%
+%   .. role:: index
+%
+%   :index:`Terme`
+\newcommand{\DUroleindex}[1]{\index{#1}\marginpar{\texttt{#1}}}
-- 
cgit v1.2.3

