aboutsummaryrefslogtreecommitdiff
path: root/common/99_sidebar.tex
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2020-12-01 21:32:20 +0100
committerSébastien Dailly <sebastien@chimrod.com>2020-12-03 17:33:35 +0100
commitb6bebdc03066e513efbbb5ff9424681bbcceff0c (patch)
treead58ccc072efbfdeabe4d9b4b20b79acc8fd19b3 /common/99_sidebar.tex
parent02b663b21099cdb62cef7b363cae46a56d7aae5f (diff)
Added a new model, and did some factorisation
Diffstat (limited to 'common/99_sidebar.tex')
-rwxr-xr-xcommon/99_sidebar.tex28
1 files changed, 28 insertions, 0 deletions
diff --git a/common/99_sidebar.tex b/common/99_sidebar.tex
new file mode 100755
index 0000000..ab599a0
--- /dev/null
+++ b/common/99_sidebar.tex
@@ -0,0 +1,28 @@
+\newlength{\notesep}
+
+\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
+\let\endchangemargin=\endlist
+
+\ifdefinedcolor{backsidecolor}{%
+ \backgroundcolor{c[0]}{backsidecolor}
+}{}
+
+% Une commande dédiée pour les notes de marge
+\newcommand{\DUsidebar}[1]{%
+ \switchcolumn[0]
+ \begin{changemargin}{0.7cm}{0.7cm}
+ % Sélectionne la police alternative
+ \AltFont\selectfont
+ \ifdefinedcolor{textsidecolor}{\color{textsidecolor}}{}
+ #1
+ \end{changemargin}
+ \vspace{\notesep}
+ \switchcolumn
+ \ifdefinedcolor{textsidecolor}{\color{black}}{}
+}
+
+\AtEndDocument{%
+ % Make the column go to the bottom
+ \flushpage
+ \end{paracol}
+}