From f83e8b39df08ea9e9ca130a4578c749d48d55844 Mon Sep 17 00:00:00 2001
From: Sébastien Dailly <sebastien@chimrod.com>
Date: Sat, 10 Aug 2019 20:36:56 +0200
Subject: First commit

---
 model_4/resources/99_sidebar.tex | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100755 model_4/resources/99_sidebar.tex

(limited to 'model_4/resources/99_sidebar.tex')

diff --git a/model_4/resources/99_sidebar.tex b/model_4/resources/99_sidebar.tex
new file mode 100755
index 0000000..3ee6dca
--- /dev/null
+++ b/model_4/resources/99_sidebar.tex
@@ -0,0 +1,33 @@
+\newlength{\notesep}
+
+\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
+\let\endchangemargin=\endlist 
+
+% Une commande dédiée pour les notes de marge
+\setlength{\columnsep}{0.25cm}
+\columnratio{0.28}
+
+\ifdefinedcolor{backsidecolor}{%
+  \backgroundcolor{c[1]}{backsidecolor}
+}{}
+
+\newcommand{\DUsidebar}[1]{%
+  \switchcolumn[0]
+  \begin{changemargin}{0.7cm}{1.5cm} 
+  \LibertineFont\selectfont
+  \ifdefinedcolor{textsidecolor}{\color{textsidecolor}}{}
+  #1
+  \end{changemargin}
+  \vspace{\notesep}
+  \switchcolumn
+  \ifdefinedcolor{textsidecolor}{\color{black}}{}
+}
+
+\AtBeginDocument{%
+  \begin{paracol}{2}
+}
+\AtEndDocument{%
+  % Make the column go to the bottom
+  \flushpage
+  \end{paracol}
+}
-- 
cgit v1.2.3

