blob: 5bc96cdfdbb1955e2adc6ce65fb798571eed90be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
\usepackage{paracol}
\newlength{\notesep}
% All the models uses two columns.
% At any time in the RST document, you can add elements in the sidebar using
% the sidebar directive.
%
% .. sidebar:: Informations
%
% * 17 allée des cerisiers
% * 75001 Paris |phoneicon|
% * 01 23 45 67 89 |mailicon|
% * email@example |noicon|
%
% You can close the sidebar at any time, but this requires to use latex code in the document
%
% .. raw:: latex
%
% \flushpage
% \end{paracol}
% \newgeometry{left=3cm,right=3cm,bottom=1cm,top=1cm}
% Switch in paracol mode from the begining of the document
% This can be disabled by defining \nocolumns before loading
% this template.
%
% \def\nocolumns{}
\ifdefined\nocolumns
\else
\AtBeginDocument{%
\begin{paracol}{2}
}
\fi
\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}}{}
}
% If the column is still active, make it go to the bottom of the page.
\makeatletter
\AtEndDocument{%
\ifthenelse{\equal{\@currenvir}{paracol}}{\flushpage\end{paracol}}{}
}
\makeatother
|