aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Makefile2
-rw-r--r--common/10_fonts.tex12
-rwxr-xr-xcommon/99_sidebar.tex56
-rw-r--r--common/Makefile.common122
-rwxr-xr-xcommon/classes/tex/DUClasses/DUclasses.sty40
-rw-r--r--common/classes/tex/DUStyle/DUStyle.sty63
-rw-r--r--common/classes/tex/DUcenter/DUcenter.sty12
-rwxr-xr-xcommon/classes/tex/DUcolumns/DUcolumn.sty31
-rw-r--r--common/classes/tex/DUpygments/DUpygments-arduino.sty127
-rw-r--r--common/classes/tex/DUpygments/DUpygments-colorful.sty149
-rw-r--r--common/classes/tex/DUpygments/DUpygments-default.sty130
-rw-r--r--common/classes/tex/DUpygments/DUpygments-monokai.sty143
-rw-r--r--common/classes/tex/DUpygments/DUpygments-tango.sty157
-rw-r--r--common/classes/tex/DUpygments/pygments_css2sty.py66
-rw-r--r--common/classes/tex/DUsidebar/DUsidebar.sty58
-rw-r--r--common/classes/tex/DUsmallcaps/DUsmallcaps.sty4
-rwxr-xr-xexample_1/Makefile47
-rwxr-xr-xmodel_1/Makefile47
-rwxr-xr-xmodel_1/example.rst51
-rwxr-xr-xmodel_1/resources/10_fonts.tex10
-rwxr-xr-xmodel_1/resources/99_begin.tex6
-rwxr-xr-xmodel_2/Makefile51
-rwxr-xr-xmodel_2/resources/00_preamble.tex1
-rwxr-xr-xmodel_2/resources/10_fonts.tex13
-rwxr-xr-xmodel_3/Makefile49
-rwxr-xr-xmodel_3/resources/00_preamble.tex3
-rwxr-xr-xmodel_3/resources/10_fonts.tex9
-rwxr-xr-xmodel_3/resources/99_sidebar.tex30
-rwxr-xr-xmodel_4/Makefile51
-rwxr-xr-xmodel_4/resources/00_preamble.tex1
-rwxr-xr-xmodel_4/resources/10_fonts.tex10
-rwxr-xr-xmodel_4/resources/99_sidebar.tex28
-rwxr-xr-xmodel_5/Makefile47
-rwxr-xr-xmodel_5/resources/10_fonts.tex3
-rwxr-xr-xmodel_5/resources/99_begin.tex6
-rwxr-xr-xmodel_6/Makefile41
-rwxr-xr-xmodel_6/example.rst14
-rwxr-xr-xmodel_6/lettre.rst34
-rwxr-xr-xmodel_6/resources/00_preamble.tex2
-rw-r--r--model_6/resources/10_container.tex24
-rwxr-xr-xmodel_6/resources/10_fonts.tex15
-rwxr-xr-xmodel_6/resources/10_title_style.tex1
-rwxr-xr-xmodel_6/resources/99_begin.tex6
-rw-r--r--model_6/resources/CaviarDreams.ttfbin58864 -> 0 bytes
-rwxr-xr-xmodel_7/Makefile1
-rw-r--r--model_7/example.rst39
-rwxr-xr-xmodel_7/resources/00_colors.tex15
-rwxr-xr-xmodel_7/resources/00_length.tex0
-rwxr-xr-xmodel_7/resources/00_preamble.tex22
-rw-r--r--model_7/resources/10_decoration.tex37
-rwxr-xr-xmodel_7/resources/10_fonts.tex29
-rw-r--r--model_7/resources/10_geometry.tex2
-rw-r--r--model_7/resources/10_header_footer.tex23
-rwxr-xr-xmodel_7/resources/10_title_style.tex61
-rwxr-xr-xmodel_7/resources/99_begin.tex1
-rwxr-xr-xmodel_7/resources/modules8
-rwxr-xr-xmodel_8/Makefile8
-rw-r--r--model_8/example.rst54
-rw-r--r--model_8/resources/10-admonitions.tex30
-rw-r--r--model_8/resources/10-fonts.tex4
-rw-r--r--model_8/resources/10-table.tex28
-rwxr-xr-xmodel_8/resources/10-title_style.tex21
-rw-r--r--model_8/resources/10_preamble.tex8
-rwxr-xr-xmodel_8/resources/modules6
-rwxr-xr-xreadme.rst98
-rw-r--r--snapshots/model7.pngbin0 -> 45049 bytes
-rw-r--r--snapshots/model8.pngbin0 -> 30496 bytes
68 files changed, 1758 insertions, 512 deletions
diff --git a/.gitignore b/.gitignore
index b784400..67b0c89 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
*.pdf
*.swp
+*/example.png
+*/tmp
+readme.html
diff --git a/Makefile b/Makefile
index f1523c7..c0fab78 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ SUBDIRS := $(wildcard model*/. example*/.)
all: $(SUBDIRS)
$(SUBDIRS):
- $(MAKE) -C $@
+ $(MAKE) -j -C $@
pngs: $(SUBDIRS)
for dir in $(SUBDIRS); do \
diff --git a/common/10_fonts.tex b/common/10_fonts.tex
new file mode 100644
index 0000000..11e2a8e
--- /dev/null
+++ b/common/10_fonts.tex
@@ -0,0 +1,12 @@
+\usepackage{fontspec}
+
+\newfontfamily\CaviarDreamsFont{CaviarDreams}
+ [ Path=\commonPath/../fonts/
+ , BoldFont = CaviarDreams_Bold
+ , Mapping=tex-text
+ , Extension = .ttf
+ ]
+
+\newfontfamily\LibertineFont{Linux Libertine O}
+ [ Ligatures=TeX
+ ]
diff --git a/common/99_sidebar.tex b/common/99_sidebar.tex
index ab599a0..57d76ad 100755
--- a/common/99_sidebar.tex
+++ b/common/99_sidebar.tex
@@ -1,15 +1,60 @@
+\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{}
+%
+% The column is supposed to be on the left on the document, with the index 0. You
+% can change this by defining a counter sidebarindex with
+%
+% \newcounter{sidebarindex}
+% \setcounter{sidebarindex}{1}
+
+\ifdefined\sidebarindex
+\else
+ \newcommand\sidebarindex{0}
+\fi
+
+\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}
+ \backgroundcolor{c[\sidebarindex]}{backsidecolor}
}{}
% Une commande dédiée pour les notes de marge
\newcommand{\DUsidebar}[1]{%
- \switchcolumn[0]
+ \switchcolumn[\sidebarindex]
\begin{changemargin}{0.7cm}{0.7cm}
% Sélectionne la police alternative
\AltFont\selectfont
@@ -21,8 +66,9 @@
\ifdefinedcolor{textsidecolor}{\color{black}}{}
}
+% If the column is still active, make it go to the bottom of the page.
+\makeatletter
\AtEndDocument{%
- % Make the column go to the bottom
- \flushpage
- \end{paracol}
+ \ifthenelse{\equal{\@currenvir}{paracol}}{\flushpage\end{paracol}}{}
}
+\makeatother
diff --git a/common/Makefile.common b/common/Makefile.common
new file mode 100644
index 0000000..c3f6959
--- /dev/null
+++ b/common/Makefile.common
@@ -0,0 +1,122 @@
+TEX=$(shell command -v lualatex xelatex | head -n 1)
+SOURCE=.
+MODEL ?= .
+
+SRC =$(wildcard *.rst)
+SVG =$(wildcard content/*.svg)
+
+PDFS = $(SRC:.rst=.pdf)
+INCLUDED_PDF = $(SVG:.svg=.pdf)
+
+all: $(PDFS)
+
+BIBS =$(wildcard *.bib)
+
+DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
+
+# Pick the first file for the given name, either in the path from the model, or
+# in the local path from the source.
+select_file = \
+ $(firstword $(wildcard ./resources/$(1)) $(wildcard $(MODEL)/resources/$1))
+
+
+# Select the files to use in the styles.
+ifeq ($(MODEL),.)
+ $(info Modèle de base)
+
+ SOURCES = $(sort $(filter-out $(FILTERS), $(wildcard $(MODEL)/resources/*.tex) ))
+
+else
+ $(info Modèle surchargé)
+
+ # Remove from the list the elements given in the variable FILTERS
+ NEW_STYLES = $(wildcard resources/*.tex)
+ MODEL_STYLES = $(wildcard $(MODEL)/resources/*.tex)
+ # For each file, extract the name, and sort the list by order.
+ STYLE_NAME = $(sort $(foreach fic,$(NEW_STYLES) $(filter-out $(FILTERS),$(MODEL_STYLES)),$(notdir $(fic))))
+ # Pick the file either in the current directory, or in the model path
+ SOURCES = $(foreach fic,$(STYLE_NAME),$(call select_file,$(fic)))
+
+endif
+
+null :=
+space := $(null) #
+comma := ,
+TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
+TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
+
+# Add a variable for specific options to add in the rst2latex command
+#
+EXTRA_RST_OPTIONS ?=
+
+EXTRA_STYLES ?=
+
+# Remove the comments and the empty lines from the module list file
+PACK = $(shell sed -e 's/\#.*$$//' -e '/^\s$$/d' $(MODEL)/resources/modules)
+PACKAGES = $(subst $(space),$(comma),$(strip $(PACK)))
+
+tmp:
+ mkdir tmp
+
+# Hack used to identify the path to the shared configuration in latex.
+tmp/model.tex: | tmp
+ # Transform the path to the model into an absolute path, because this path
+ # will be used in the lualatex cache to references the fonts, and using
+ # relative path can cause issues if we need to references the font from
+ # another location.
+ $(file >$@,\def\commonPath{$(abspath $(MODEL)/../common/)})
+
+# Generate the latex file from rst
+tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES) | tmp
+ $$(command -v rst2latex rst2latex.py | head -n 1) \
+ --no-section-subtitles \
+ --table-style=borderless \
+ --use-latex-citations \
+ --use-latex-docinfo \
+ --documentclass=extarticle \
+ --documentoption=12pt,A4,table \
+ --syntax-highlight=short \
+ $(EXTRA_RST_OPTIONS) \
+ --stylesheet=tmp/model.tex,$(PACKAGES),$(subst $(space),$(comma),\$(EXTRA_STYLES)),$(TEX_STYLE) $< $@
+ sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
+ sed -i -e 's/admonition-/admonition/g' $@
+
+# Generate each pdf with latex
+tmp/%.pdf: tmp/%.tex tmp/model.tex $(BIBS) | tmp
+ # Make the first run in batch mode (no pdf produced)
+ TEXMFHOME=$(MODEL)/../common/classes $(TEX) -output-directory tmp --halt-on-error --draftmode $<
+ TEXMFHOME=$(MODEL)/../common/classes $(TEX) -output-directory tmp $<
+ #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
+ while grep 'Rerun to get ' tmp/$*.log ; do \
+ $(TEX) -output-directory tmp $< ;\
+ done
+
+# Put the pdf in the right place
+%.pdf: tmp/%.pdf | tmp
+ cp $< $@
+ # Update mupdf if the process exist, or do nothing.
+ pkill -HUP mupdf || true
+
+.PHONY: clean
+clean:
+ rm -r tmp
+
+# Generate the final PDF document
+# Send a notification to mupdf in order to refresh the document
+%.png: %.pdf
+ gs -dTextAlphaBits=4 -dFirstPage=1 -dLastPage=1 -dBATCH -dNOPAUSE -sDEVICE=png16m -r150 -dUseCropBox -sOutputFile=$@ $<
+
+# Watch mode, which regenerate the documents as soon there is a change in a
+# file.,
+# requires inotifywait (package inotify-tools)
+.PHONY: watch
+watch:
+ while true; do \
+ $(MAKE) all; \
+ inotifywait -qre close_write . ; \
+ done
+
+# Format the pages in order to make them printable in a book
+book: $(PDFS)
+
+ pdfbook2 --no-crop $<
diff --git a/common/classes/tex/DUClasses/DUclasses.sty b/common/classes/tex/DUClasses/DUclasses.sty
new file mode 100755
index 0000000..737fbf1
--- /dev/null
+++ b/common/classes/tex/DUClasses/DUclasses.sty
@@ -0,0 +1,40 @@
+\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:: textcolor-white centering
+%
+% 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 hauteur fixe
+\NewEnviron{DUCLASShbox}[1]{
+ \parbox[s][#1][c]{\linewidth}{\BODY}
+}
+
+% Mise en couleur du texte
+\newcommand{\DUCLASStextcolor}[1]{\color{#1}}
+
+\NewEnviron{DUCLASScentering}{\centering\BODY\par}
+
diff --git a/common/classes/tex/DUStyle/DUStyle.sty b/common/classes/tex/DUStyle/DUStyle.sty
new file mode 100644
index 0000000..666d703
--- /dev/null
+++ b/common/classes/tex/DUStyle/DUStyle.sty
@@ -0,0 +1,63 @@
+\NeedsTeXFormat{LaTeX2e}[1994/06/01]
+\ProvidesPackage{DUStyle}[2018/02/25 DUStyle Package]
+
+% The macro can be used to create your own style :
+% the style will apply by declaring a custom class :
+
+%\createIconifiedDUStyle{warning}{orange}{!}{large}
+%\createIconifiedDUStyle{note}{blue}{}{large}
+
+% .. admonition:: Title
+% :class: warning
+
+% .. sidebar:: Title
+% :class: note
+
+\RequirePackage{tikz}
+\RequirePackage{mdframed}
+\RequirePackage{xcolor}
+\RequirePackage{ifthen}
+
+% Background color for the frame.
+\definecolor{DUStyle@lightGray}{RGB}{245, 245, 245}
+
+% arg1 : The circle backround color
+% arg2 : The dot content
+% arg3 : The title environment
+% arg4 : The title
+\newcommand{\DUStyle@iconizedTitle}[4]{%
+ \begin{#3}%
+ \ifthenelse{\equal{#2}{}}
+ {}
+ {%
+ \tikz[baseline]{%
+ \node[circle,fill=#1,inner sep=3pt,anchor=base] at (0, 0)%
+ {\color{DUStyle@lightGray}#2};
+ }%
+ }
+ {#4}
+ \end{#3}
+}
+
+\newcommand{\DUStyle@colorBox}[2]{%
+ \begin{mdframed}[topline=false,
+ bottomline=false,
+ rightline=false,
+ linecolor=#1,
+ linewidth=3pt,
+ skipabove=0.5cm,
+ %backgroundcolor=DUStyle@lightGray
+ ]%
+ #2
+ \end{mdframed}
+}
+
+% Create two commands with the same style :
+% - for the admonition colored box
+% - for the titles in styles (sidebar, admonitions...)
+\newcommand\createIconifiedDUStyle[4]{%
+ \expandafter\newcommand\csname DUadmonition#1\endcsname[1]{\DUStyle@colorBox{#2}{##1}}
+ \expandafter\newcommand\csname DUtitle#1\endcsname[1]{\DUStyle@iconizedTitle{#2}{#3}{#4}{##1}}
+}
+
+
diff --git a/common/classes/tex/DUcenter/DUcenter.sty b/common/classes/tex/DUcenter/DUcenter.sty
new file mode 100644
index 0000000..f5e0781
--- /dev/null
+++ b/common/classes/tex/DUcenter/DUcenter.sty
@@ -0,0 +1,12 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUcenter}[2017/04/16 Docutils center role]
+
+%
+% Permet de centrer un texte en utilisant la classe « center »
+%
+% .. class:: center
+%
+% Ce texte sera centré
+
+\newcommand{\DUrolecenter}[1]{\begin{center}#1\end{center}}
+
diff --git a/common/classes/tex/DUcolumns/DUcolumn.sty b/common/classes/tex/DUcolumns/DUcolumn.sty
new file mode 100755
index 0000000..d8e7141
--- /dev/null
+++ b/common/classes/tex/DUcolumns/DUcolumn.sty
@@ -0,0 +1,31 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUcolumn}[2017/04/16 Docutils multicol]
+
+\RequirePackage{multicol}
+
+%
+% .. container:: paracol2
+%
+% Create a section of two column using paracol
+%
+%
+% .. container:: multicols2
+%
+% Create a section of two column using multicols
+
+\newenvironment{DUCLASSparacol2}%
+ {\begin{paracol}{2}}
+ {\end{paracol}}
+
+\newenvironment{DUclasstparacol3}%
+ {\begin{paracol}{2}}
+ {\end{paracol}}
+
+\newenvironment{DUCLASSmulticols2}%
+ {\begin{multicols}{2}}
+ {\end{multicols}}
+
+\newenvironment{DUCLASSmulticols3}%
+ {\begin{multicols}{3}}
+ {\end{multicols}}
+
diff --git a/common/classes/tex/DUpygments/DUpygments-arduino.sty b/common/classes/tex/DUpygments/DUpygments-arduino.sty
new file mode 100644
index 0000000..c1f623b
--- /dev/null
+++ b/common/classes/tex/DUpygments/DUpygments-arduino.sty
@@ -0,0 +1,127 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUpygments-arduino}[2017/04/16 Docutils Pygments]
+
+% Stylesheet for syntax highlight with Docutils
+% Generated by pygments_css2sty.py from a Pygments CSS style
+% (output of `pygmentize -S <style> -f html`).
+
+\RequirePackage{color}
+\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}}
+% Comment
+\providecommand*\DUrolec[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}}
+% Error
+\providecommand*\DUroleerr[1]{\textcolor[rgb]{0.65,0.09,0.09}{#1}}
+% Keyword
+\providecommand*\DUrolek[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Name
+\providecommand*\DUrolen[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Operator
+\providecommand*\DUroleo[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Comment.Hashbang
+\providecommand*\DUrolech[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}}
+% Comment.Multiline
+\providecommand*\DUrolecm[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}}
+% Comment.Preproc
+\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Comment.PreprocFile
+\providecommand*\DUrolecpf[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}}
+% Comment.Single
+\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}}
+% Comment.Special
+\providecommand*\DUrolecs[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}}
+% Keyword.Constant
+\providecommand*\DUrolekc[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}}
+% Keyword.Declaration
+\providecommand*\DUrolekd[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Keyword.Namespace
+\providecommand*\DUrolekn[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Keyword.Pseudo
+\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}}
+% Keyword.Reserved
+\providecommand*\DUrolekr[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}}
+% Keyword.Type
+\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}}
+% Literal.Number
+\providecommand*\DUrolem[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
+% Literal.String
+\providecommand*\DUroles[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Name.Attribute
+\providecommand*\DUrolena[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Builtin
+\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Name.Class
+\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Constant
+\providecommand*\DUroleno[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Decorator
+\providecommand*\DUrolend[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Entity
+\providecommand*\DUroleni[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Exception
+\providecommand*\DUrolene[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Function
+\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.83,0.33,0.00}{#1}}
+% Name.Label
+\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Namespace
+\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Other
+\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Name.Property
+\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Tag
+\providecommand*\DUrolent[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Variable
+\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Operator.Word
+\providecommand*\DUroleow[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Literal.Number.Bin
+\providecommand*\DUrolemb[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
+% Literal.Number.Float
+\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
+% Literal.Number.Hex
+\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
+% Literal.Number.Integer
+\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
+% Literal.Number.Oct
+\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
+% Literal.String.Affix
+\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Backtick
+\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Char
+\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Delimiter
+\providecommand*\DUroledl[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Doc
+\providecommand*\DUrolesd[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Double
+\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Escape
+\providecommand*\DUrolese[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Heredoc
+\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Interpol
+\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Other
+\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Regex
+\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Single
+\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Literal.String.Symbol
+\providecommand*\DUroless[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}}
+% Name.Builtin.Pseudo
+\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}}
+% Name.Function.Magic
+\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.83,0.33,0.00}{#1}}
+% Name.Variable.Class
+\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Variable.Global
+\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Variable.Instance
+\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Name.Variable.Magic
+\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}}
+% Literal.Number.Integer.Long
+\providecommand*\DUroleil[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}}
diff --git a/common/classes/tex/DUpygments/DUpygments-colorful.sty b/common/classes/tex/DUpygments/DUpygments-colorful.sty
new file mode 100644
index 0000000..f8a1d13
--- /dev/null
+++ b/common/classes/tex/DUpygments/DUpygments-colorful.sty
@@ -0,0 +1,149 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUpygments-colorful}[2017/04/19 Docutils Pygments]
+
+% Stylesheet for syntax highlight with Docutils
+% Generated by pygments_css2sty.py from a Pygments CSS style
+% (output of `pygmentize -S <style> -f html`).
+
+\RequirePackage{color}
+\providecommand*\DUrolehll[1]{\textcolor[rgb]{0.64,0.62,0.61}{#1}}
+% Comment
+\providecommand*\DUrolec[1]{\textcolor[rgb]{0.25,0.53,0.23}{#1}}
+% Error
+\providecommand*\DUroleerr[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Keyword
+\providecommand*\DUrolek[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}}
+% Literal
+\providecommand*\DUrolel[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Name
+\providecommand*\DUrolen[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Operator
+\providecommand*\DUroleo[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}}
+% Punctuation
+\providecommand*\DUrolep[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Comment.Hashbang
+\providecommand*\DUrolech[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}}
+% Comment.Multiline
+\providecommand*\DUrolecm[1]{\textcolor[rgb]{0.25,0.53,0.23}{#1}}
+% Comment.Preproc
+\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}}
+% Comment.PreprocFile
+\providecommand*\DUrolecpf[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}}
+% Comment.Single
+\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textcolor[rgb]{0.25,0.53,0.23}{#1}}
+% Comment.Special
+\providecommand*\DUrolecs[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}}
+% Generic.Deleted
+\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Generic.Emph
+\providecommand*\DUrolege[1]{\textit{#1}}
+% Generic.Heading
+\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.18,0.12,0.18}{#1}}}
+% Generic.Inserted
+\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Generic.Prompt
+\providecommand*\DUrolegp[1]{\textbf{\textcolor[rgb]{0.55,0.53,0.53}{#1}}}
+% Generic.Strong
+\providecommand*\DUrolegs[1]{\textbf{#1}}
+% Generic.Subheading
+\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.36,0.77,0.75}{#1}}}
+% Keyword.Constant
+\providecommand*\DUrolekc[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}}
+% Keyword.Declaration
+\providecommand*\DUrolekd[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}}
+% Keyword.Namespace
+\providecommand*\DUrolekn[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}}
+% Keyword.Pseudo
+\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}}
+% Keyword.Reserved
+\providecommand*\DUrolekr[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}}
+% Keyword.Type
+\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.50,0.77,0.09}{#1}}
+% Literal.Date
+\providecommand*\DUroleld[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.Number
+\providecommand*\DUrolem[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.String
+\providecommand*\DUroles[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Name.Attribute
+\providecommand*\DUrolena[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}}
+% Name.Builtin
+\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Name.Class
+\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.50,0.77,0.09}{#1}}
+% Name.Constant
+\providecommand*\DUroleno[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Name.Decorator
+\providecommand*\DUrolend[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}}
+% Name.Entity
+\providecommand*\DUroleni[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Name.Exception
+\providecommand*\DUrolene[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Name.Function
+\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}}
+% Name.Label
+\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Name.Namespace
+\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.50,0.77,0.09}{#1}}
+% Name.Other
+\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}}
+% Name.Property
+\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Name.Tag
+\providecommand*\DUrolent[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}}
+% Name.Variable
+\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Operator.Word
+\providecommand*\DUroleow[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}}
+% Text.Whitespace
+\providecommand*\DUrolew[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Literal.Number.Bin
+\providecommand*\DUrolemb[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.Number.Float
+\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.Number.Hex
+\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.Number.Integer
+\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.Number.Oct
+\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.String.Affix
+\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Backtick
+\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Char
+\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Literal.String.Delimiter
+\providecommand*\DUroledl[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Doc
+\providecommand*\DUrolesd[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}}
+% Literal.String.Double
+\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Escape
+\providecommand*\DUrolese[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.String.Heredoc
+\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Interpol
+\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
+% Literal.String.Other
+\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Regex
+\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Single
+\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Literal.String.Symbol
+\providecommand*\DUroless[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}}
+% Name.Builtin.Pseudo
+\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}}
+% Name.Function.Magic
+\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}}
+% Name.Variable.Class
+\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Name.Variable.Global
+\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Name.Variable.Instance
+\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Name.Variable.Magic
+\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}}
+% Literal.Number.Integer.Long
+\providecommand*\DUroleil[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}}
diff --git a/common/classes/tex/DUpygments/DUpygments-default.sty b/common/classes/tex/DUpygments/DUpygments-default.sty
new file mode 100644
index 0000000..cf0fa8e
--- /dev/null
+++ b/common/classes/tex/DUpygments/DUpygments-default.sty
@@ -0,0 +1,130 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUpygments-default}[2017/04/16 Docutils Pygments]
+
+% Stylesheet for syntax highlight with Docutils
+% Generated by makesty.py from a Pygments CSS style
+% (output of `pygmentize -S <style> -f html`).
+
+\RequirePackage{color}
+\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}}
+% Comment
+\providecommand*\DUrolecomment[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+% Error
+\definecolor{DUcolor0}{rgb}{1.00,0.00,0.00}
+\providecommand*\DUroleerr[1]{\colorbox{DUcolor0}{#1}}
+% Keyword
+\providecommand*\DUrolekeyword[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+% Operator
+\providecommand*\DUroleo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+% Comment.Multiline
+\providecommand*\DUrolecm[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+% Comment.Preproc
+\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}}
+% Comment.Single
+\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+% Comment.Special
+\providecommand*\DUrolecs[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}}
+% Generic.Deleted
+\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.63,0.00,0.00}{#1}}
+% Generic.Emph
+\providecommand*\DUrolege[1]{\textit{#1}}
+% Generic.Error
+\providecommand*\DUrolegr[1]{\textcolor[rgb]{1.00,0.00,0.00}{#1}}
+% Generic.Heading
+\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+% Generic.Inserted
+\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}}
+% Generic.Output
+\providecommand*\DUrolego[1]{\textcolor[rgb]{0.50,0.50,0.50}{#1}}
+% Generic.Prompt
+\providecommand*\DUrolegp[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+% Generic.Strong
+\providecommand*\DUrolegs[1]{\textbf{#1}}
+% Generic.Subheading
+\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}}
+% Generic.Traceback
+\providecommand*\DUrolegt[1]{\textcolor[rgb]{0.00,0.25,0.82}{#1}}
+% Keyword.Constant
+\providecommand*\DUrolekc[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+% Keyword.Declaration
+\providecommand*\DUrolekd[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+% Keyword.Namespace
+\providecommand*\DUrolekn[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+% Keyword.Pseudo
+\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+% Keyword.Reserved
+\providecommand*\DUrolekr[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+% Keyword.Type
+\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.69,0.00,0.25}{#1}}
+% Literal.Number
+\providecommand*\DUrolenumber[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+% Literal.String
+\providecommand*\DUrolestring[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+% Name.Attribute
+\providecommand*\DUrolename[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}}
+% Name.Builtin
+\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+% Name.Class
+\providecommand*\DUrolenc[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
+% Name.Constant
+\providecommand*\DUroleno[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}}
+% Name.Decorator
+\providecommand*\DUrolend[1]{\textcolor[rgb]{0.67,0.13,1.00}{#1}}
+% Name.Entity
+\providecommand*\DUroleni[1]{\textbf{\textcolor[rgb]{0.60,0.60,0.60}{#1}}}
+% Name.Exception
+\providecommand*\DUrolene[1]{\textbf{\textcolor[rgb]{0.82,0.25,0.23}{#1}}}
+% Name.Function
+\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.00,0.00,1.00}{#1}}
+% Name.Label
+\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.63,0.63,0.00}{#1}}
+% Name.Namespace
+\providecommand*\DUrolenn[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}}
+% Name.Tag
+\providecommand*\DUrolent[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}}
+% Name.Variable
+\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+% Operator.Word
+\providecommand*\DUroleow[1]{\textbf{\textcolor[rgb]{0.67,0.13,1.00}{#1}}}
+% Text.Whitespace
+\providecommand*\DUrolew[1]{\textcolor[rgb]{0.73,0.73,0.73}{#1}}
+% Literal.Number.Float
+\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+% Literal.Number.Hex
+\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+% Literal.Number.Integer
+\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+% Literal.Number.Oct
+\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
+% Literal.String.Backtick
+\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+% Literal.String.Char
+\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+% Literal.String.Doc
+\providecommand*\DUrolesd[1]{\textit{\textcolor[rgb]{0.73,0.13,0.13}{#1}}}
+% Literal.String.Double
+\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+% Literal.String.Escape
+\providecommand*\DUrolese[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.13}{#1}}}
+% Literal.String.Heredoc
+\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+% Literal.String.Interpol
+\providecommand*\DUrolesi[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.53}{#1}}}
+% Literal.String.Other
+\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+% Literal.String.Regex
+\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}}
+% Literal.String.Single
+\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}}
+% Literal.String.Symbol
+\providecommand*\DUroless[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+% Name.Builtin.Pseudo
+\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}}
+% Name.Variable.Class
+\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+% Name.Variable.Global
+\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+% Name.Variable.Instance
+\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}}
+% Literal.Number.Integer.Long
+\providecommand*\DUroleil[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}}
diff --git a/common/classes/tex/DUpygments/DUpygments-monokai.sty b/common/classes/tex/DUpygments/DUpygments-monokai.sty
new file mode 100644
index 0000000..e95f4dc
--- /dev/null
+++ b/common/classes/tex/DUpygments/DUpygments-monokai.sty
@@ -0,0 +1,143 @@
+% Stylesheet for syntax highlight with Docutils
+% Generated by pygments_css2sty.py from a Pygments CSS style
+% (output of `pygmentize -S <style> -f html`).
+
+\RequirePackage{color}
+\providecommand*\DUroleln[1]{\textcolor[rgb]{1.00,1.00,1.00}{#1}}
+\providecommand*\DUrolehll[1]{\textcolor[rgb]{0.29,0.28,0.24}{#1}}
+% Comment
+\providecommand*\DUrolec[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Error
+\providecommand*\DUroleerr[1]{\textcolor[rgb]{0.59,0.00,0.31}{#1}}
+% Keyword
+\providecommand*\DUrolek[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Literal
+\providecommand*\DUrolel[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Name
+\providecommand*\DUrolen[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Operator
+\providecommand*\DUroleo[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}}
+% Punctuation
+\providecommand*\DUrolep[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Comment.Hashbang
+\providecommand*\DUrolech[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Comment.Multiline
+\providecommand*\DUrolecm[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Comment.Preproc
+\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Comment.PreprocFile
+\providecommand*\DUrolecpf[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Comment.Single
+\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Comment.Special
+\providecommand*\DUrolecs[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Generic.Deleted
+\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}}
+% Generic.Emph
+\providecommand*\DUrolege[1]{\textit{#1}}
+% Generic.Inserted
+\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Generic.Strong
+\providecommand*\DUrolegs[1]{\textbf{#1}}
+% Generic.Subheading
+\providecommand*\DUrolegu[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}}
+% Keyword.Constant
+\providecommand*\DUrolekc[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Keyword.Declaration
+\providecommand*\DUrolekd[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Keyword.Namespace
+\providecommand*\DUrolekn[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}}
+% Keyword.Pseudo
+\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Keyword.Reserved
+\providecommand*\DUrolekr[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Keyword.Type
+\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Literal.Date
+\providecommand*\DUroleld[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.Number
+\providecommand*\DUrolem[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.String
+\providecommand*\DUroles[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Name.Attribute
+\providecommand*\DUrolena[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Builtin
+\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Class
+\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Constant
+\providecommand*\DUroleno[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}}
+% Name.Decorator
+\providecommand*\DUrolend[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Entity
+\providecommand*\DUroleni[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Exception
+\providecommand*\DUrolene[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Function
+\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Label
+\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Namespace
+\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Other
+\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Property
+\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Tag
+\providecommand*\DUrolent[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}}
+% Name.Variable
+\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Operator.Word
+\providecommand*\DUroleow[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}}
+% Text.Whitespace
+\providecommand*\DUrolew[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Literal.Number.Bin
+\providecommand*\DUrolemb[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.Number.Float
+\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.Number.Hex
+\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.Number.Integer
+\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.Number.Oct
+\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.String.Affix
+\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Backtick
+\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Char
+\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Delimiter
+\providecommand*\DUroledl[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Doc
+\providecommand*\DUrolesd[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Double
+\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Escape
+\providecommand*\DUrolese[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
+% Literal.String.Heredoc
+\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Interpol
+\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Other
+\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Regex
+\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Single
+\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Literal.String.Symbol
+\providecommand*\DUroless[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}}
+% Name.Builtin.Pseudo
+\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Function.Magic
+\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}}
+% Name.Variable.Class
+\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Variable.Global
+\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Variable.Instance
+\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Name.Variable.Magic
+\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}}
+% Literal.Number.Integer.Long
+\providecommand*\DUroleil[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}}
diff --git a/common/classes/tex/DUpygments/DUpygments-tango.sty b/common/classes/tex/DUpygments/DUpygments-tango.sty
new file mode 100644
index 0000000..e5a8fd6
--- /dev/null
+++ b/common/classes/tex/DUpygments/DUpygments-tango.sty
@@ -0,0 +1,157 @@
+% Stylesheet for syntax highlight with Docutils
+% Generated by pygments_css2sty.py from a Pygments CSS style
+% (output of `pygmentize -S <style> -f html`).
+
+\RequirePackage{color}
+\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}}
+% Comment
+\providecommand*\DUrolec[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Error
+\definecolor{DUcolor0}{rgb}{0.64,0.00,0.00}
+\providecommand*\DUroleerr[1]{\colorbox{DUcolor0}{\textcolor[rgb]{0.64,0.00,0.00}{#1}}}
+% Generic
+\providecommand*\DUroleg[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Keyword
+\providecommand*\DUrolek[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Literal
+\providecommand*\DUrolel[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name
+\providecommand*\DUrolen[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Operator
+\providecommand*\DUroleo[1]{\textbf{\textcolor[rgb]{0.81,0.36,0.00}{#1}}}
+% Other
+\providecommand*\DUrolex[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Punctuation
+\providecommand*\DUrolep[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.00}{#1}}}
+% Comment.Hashbang
+\providecommand*\DUrolech[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Comment.Multiline
+\providecommand*\DUrolecm[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Comment.Preproc
+\providecommand*\DUrolecp[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Comment.PreprocFile
+\providecommand*\DUrolecpf[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Comment.Single
+\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Comment.Special
+\providecommand*\DUrolecs[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Generic.Deleted
+\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.64,0.00,0.00}{#1}}
+% Generic.Emph
+\providecommand*\DUrolege[1]{\textit{\textcolor[rgb]{0.00,0.00,0.00}{#1}}}
+% Generic.Error
+\providecommand*\DUrolegr[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}}
+% Generic.Heading
+\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}}
+% Generic.Inserted
+\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}}
+% Generic.Output
+\providecommand*\DUrolego[1]{\textit{\textcolor[rgb]{0.00,0.00,0.00}{#1}}}
+% Generic.Prompt
+\providecommand*\DUrolegp[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
+% Generic.Strong
+\providecommand*\DUrolegs[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.00}{#1}}}
+% Generic.Subheading
+\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}}
+% Generic.Traceback
+\providecommand*\DUrolegt[1]{\textbf{\textcolor[rgb]{0.64,0.00,0.00}{#1}}}
+% Keyword.Constant
+\providecommand*\DUrolekc[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Keyword.Declaration
+\providecommand*\DUrolekd[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Keyword.Namespace
+\providecommand*\DUrolekn[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Keyword.Pseudo
+\providecommand*\DUrolekp[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Keyword.Reserved
+\providecommand*\DUrolekr[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Keyword.Type
+\providecommand*\DUrolekt[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Literal.Date
+\providecommand*\DUroleld[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Literal.Number
+\providecommand*\DUrolem[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
+% Literal.String
+\providecommand*\DUroles[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Name.Attribute
+\providecommand*\DUrolena[1]{\textcolor[rgb]{0.77,0.63,0.00}{#1}}
+% Name.Builtin
+\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
+% Name.Class
+\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Constant
+\providecommand*\DUroleno[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Decorator
+\providecommand*\DUrolend[1]{\textbf{\textcolor[rgb]{0.36,0.21,0.80}{#1}}}
+% Name.Entity
+\providecommand*\DUroleni[1]{\textcolor[rgb]{0.81,0.36,0.00}{#1}}
+% Name.Exception
+\providecommand*\DUrolene[1]{\textbf{\textcolor[rgb]{0.80,0.00,0.00}{#1}}}
+% Name.Function
+\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Label
+\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.96,0.47,0.00}{#1}}
+% Name.Namespace
+\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Other
+\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Property
+\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Tag
+\providecommand*\DUrolent[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Name.Variable
+\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Operator.Word
+\providecommand*\DUroleow[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}}
+% Text.Whitespace
+\providecommand*\DUrolew[1]{\textcolor[rgb]{0.97,0.97,0.97}{#1}}
+% Literal.Number.Bin
+\providecommand*\DUrolemb[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
+% Literal.Number.Float
+\providecommand*\DUrolemf[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
+% Literal.Number.Hex
+\providecommand*\DUrolemh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
+% Literal.Number.Integer
+\providecommand*\DUrolemi[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
+% Literal.Number.Oct
+\providecommand*\DUrolemo[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
+% Literal.String.Affix
+\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Backtick
+\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Char
+\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Delimiter
+\providecommand*\DUroledl[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Doc
+\providecommand*\DUrolesd[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}}
+% Literal.String.Double
+\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Escape
+\providecommand*\DUrolese[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Heredoc
+\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Interpol
+\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Other
+\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Regex
+\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Single
+\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Literal.String.Symbol
+\providecommand*\DUroless[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
+% Name.Builtin.Pseudo
+\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.20,0.40,0.64}{#1}}
+% Name.Function.Magic
+\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Variable.Class
+\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Variable.Global
+\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Variable.Instance
+\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Name.Variable.Magic
+\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
+% Literal.Number.Integer.Long
+\providecommand*\DUroleil[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}}
diff --git a/common/classes/tex/DUpygments/pygments_css2sty.py b/common/classes/tex/DUpygments/pygments_css2sty.py
new file mode 100644
index 0000000..185050b
--- /dev/null
+++ b/common/classes/tex/DUpygments/pygments_css2sty.py
@@ -0,0 +1,66 @@
+#! /usr/bin/env python
+# coding: utf8
+# Copyright: Raphael 'kena' Poss <r.c.poss@uva.nl>
+# this file is placed in the public domain.
+#
+# Convert a CSS stylesheet into one for Docutils' LaTeX output.
+#
+# Usage example::
+#
+# pygmentize -S default -f html | pygments_css2sty.py >pygments-default.sty
+#
+# Versions:
+#
+# 2012-05-09: Günter Milde <milde@users.sf.net>:
+# Bugfix: do not fail at lines without comment.
+# Support for digits in role names.
+# ``\providecommand`` instead of ``\newcommand``.
+# Renamed from makesty.py to pygments_css2sty.py.
+# 2013-03-27: Günter Milde:
+# Implement bugfix from Juan Luis Cano Rodríguez for csnames.
+
+import sys
+import re
+
+print '% Stylesheet for syntax highlight with Docutils'
+print '% Generated by pygments_css2sty.py from a Pygments CSS style'
+print '% (output of `pygmentize -S <style> -f html`).'
+print
+print r'\RequirePackage{color}'
+
+cnt = 0
+for l in sys.stdin:
+
+ if '/*' in l:
+ print "% " + l.split('*')[1]
+ key = l.split(' ', 1)[0][1:]
+
+ s = '#1'
+
+ if 'color:' in l:
+ col = l.split('#',1)[1][:6]
+ r = float(int(col[0:2], 16)) / 255.
+ g = float(int(col[2:4], 16)) / 255.
+ b = float(int(col[4:6], 16)) / 255.
+ s = r'\textcolor[rgb]{%.2f,%.2f,%.2f}{%s}' % (r, g, b, s)
+
+ if 'font-style: italic' in l:
+ s = r'\textit{%s}' % s
+ if 'font-weight: bold' in l:
+ s = r'\textbf{%s}' % s
+
+ if 'border:' in l:
+ col = l.split('#',1)[1][:6]
+ r = float(int(col[0:2], 16)) / 255.
+ g = float(int(col[2:4], 16)) / 255.
+ b = float(int(col[4:6], 16)) / 255.
+ cname = 'DUcolor%d' % cnt
+ cnt += 1
+ print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cname, r, g, b)
+ s = r'\colorbox{%s}{%s}' % (cname, s)
+
+ if re.match(r'.*[0-9]', key) is None:
+ print(r'\providecommand*\DUrole%s[1]{%s}' % (key, s))
+ else:
+ print(r'\expandafter\providecommand\csname DUrole%s\endcsname[1]{%s}'
+ % (key, s))
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}}}
diff --git a/common/classes/tex/DUsmallcaps/DUsmallcaps.sty b/common/classes/tex/DUsmallcaps/DUsmallcaps.sty
new file mode 100644
index 0000000..2b11be8
--- /dev/null
+++ b/common/classes/tex/DUsmallcaps/DUsmallcaps.sty
@@ -0,0 +1,4 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{DUsmallcaps}[2017/04/16 Docutils smallcaps role]
+
+\newcommand{\DUrolesmallcaps}[1]{\textsc{\MakeLowercase{#1}}}
diff --git a/example_1/Makefile b/example_1/Makefile
index 99eb4e8..25786c6 100755
--- a/example_1/Makefile
+++ b/example_1/Makefile
@@ -1,46 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_1/Makefile b/model_1/Makefile
index 99eb4e8..25786c6 100755
--- a/model_1/Makefile
+++ b/model_1/Makefile
@@ -1,46 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_1/example.rst b/model_1/example.rst
index 7cf0a1a..11c066d 100755
--- a/model_1/example.rst
+++ b/model_1/example.rst
@@ -14,7 +14,6 @@
\setstretch{1.4}
- %\definecolor{orangeColor}{RGB}{255, 165, 0}
% Espacement entre chaque note de marge
\setlength{\notesep}{1.3cm}
@@ -25,12 +24,6 @@
.. role:: smallcaps
.. role:: smallemph
-.. |EDD| replace:: :smallcaps:`EDD`
-.. |ISO9001| replace:: :smallcaps:`ISO9001`
-.. |PDF| replace:: :smallcaps:`PDF`
-
-.. |ITIL| replace:: :smallcaps:`ITIL`
-
.. |tuxicon| replace:: `\renewcommand{\labelitemi}{\faLinux}`
.. |phoneicon| replace:: `\renewcommand{\labelitemi}{\faPhone}`
.. |mailicon| replace:: `\renewcommand{\labelitemi}{\faEnvelope}`
@@ -54,8 +47,6 @@ Créateur de talent
* 75001 Paris |phoneicon|
* 01 23 45 67 89 |mailicon|
* email@example |noicon|
- * 01/02/1980
- * Permis B
.. sidebar:: Compétences
@@ -64,23 +55,17 @@ Créateur de talent
* Conception
* Esprit de synthèse
* Écoute |noicon|
- * \
.. sidebar:: Niveaux
- Autre
+ Étoiles
:star:`4.5`
- Anglais
+ Autres
:level:`5`
- Bureautique
-
- :level:`3`
-
-
Expériences
===========
@@ -95,29 +80,6 @@ Expériences
- :latex:`\lipsum[1-3][1]`
- :latex:`\lipsum[1-3][2]`
- - :latex:`\lipsum[1-3][3]`
-
-
-:2011 — 2018:
-
- **Poste occupé** — *Entreprise* — Adresse.
-
- :latex:`\lipsum[1-3][5-10]`
-
- :latex:`\lipsum[4-7][5-10]`
-
-:2010 — 2011:
-
- **Poste occupé** — *Entreprise* — Adresse.
-
- :latex:`\lipsum[1-3][10-15]`
-
-
-:2008 — 2010:
-
- **Poste occupé** — *Entreprise* — Adresse.
-
- :latex:`\lipsum[1-3][15-21]`
Réalisations
@@ -128,15 +90,11 @@ Description
:latex:`\lipsum[4-7][10-15]`
-:latex:`\lipsum[4-7][15-20]`
-
Description
-----------
:latex:`\lipsum[7-10][10-15]`
-:latex:`\lipsum[7-10][15-20]`
-
Formations
==========
@@ -158,8 +116,3 @@ Formations
**Baccalauréat Scientifique** — *Lycée* – Ville
Spécialité
-
-.. raw:: latex
-
- \vspace{1cm}
- \center\pgfornament[color=backsidecolor,width=1cm]{3}
diff --git a/model_1/resources/10_fonts.tex b/model_1/resources/10_fonts.tex
index 24f6cfc..d070ac6 100755
--- a/model_1/resources/10_fonts.tex
+++ b/model_1/resources/10_fonts.tex
@@ -1,15 +1,12 @@
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={Common, Required, Contextual}}
\setmainfont{EB Garamond}
+ [ BoldFont = {Linux Libertine O Bold}]
\newcommand{\DUtitletitle}[1]{%
{\begin{center}\textbf{\textsc{#1}}\end{center}}
}
-% Change the font for bold text
-\let\bf\textbf
-\renewcommand{\textbf}[1]{{\AltFont\selectfont\bf{#1}}}
-
\setmonofont{Latin Modern Mono Light}
\newfontfamily\EBGaramond
{EB Garamond}
@@ -24,6 +21,5 @@
, Contextual
, Historic } ]
-\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O}
-\newfontfamily\CaviarDreamsFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams}
-\newfontfamily\CaviarDreamsBoldFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams_Bold}
+\input{../common/10_fonts.tex}
+\let\AltFont\LibertineFont
diff --git a/model_1/resources/99_begin.tex b/model_1/resources/99_begin.tex
index 7b7a793..8783087 100755
--- a/model_1/resources/99_begin.tex
+++ b/model_1/resources/99_begin.tex
@@ -1,7 +1 @@
\input{../common/90_ref.tex}
-
-% On charge les colonnes dès le début du document.
-\AtBeginDocument{%
- \begin{paracol}{2}
-}
-
diff --git a/model_2/Makefile b/model_2/Makefile
index ae2f58e..25786c6 100755
--- a/model_2/Makefile
+++ b/model_2/Makefile
@@ -1,50 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Image generation
-content/%.pdf: content/%.svg
- inkscape -D -z --export-pdf=$@ $<
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_2/resources/00_preamble.tex b/model_2/resources/00_preamble.tex
index 89cb0c4..a199f07 100755
--- a/model_2/resources/00_preamble.tex
+++ b/model_2/resources/00_preamble.tex
@@ -21,4 +21,5 @@
\input{../common/10_lists.tex}
\input{../common/10_nowidows.tex}
\input{../common/10_levels.tex}
+\def\nocolumns{}
\input{../common/99_sidebar.tex}
diff --git a/model_2/resources/10_fonts.tex b/model_2/resources/10_fonts.tex
index 928f801..0bb7c03 100755
--- a/model_2/resources/10_fonts.tex
+++ b/model_2/resources/10_fonts.tex
@@ -1,17 +1,14 @@
\usepackage{fontspec}
+
\defaultfontfeatures{Ligatures={Common, Required, Contextual}}
\setmainfont{EB Garamond}
-
-% Change the font for bold text
-\let\bf\textbf
-\renewcommand{\textbf}[1]{{\AltFont\selectfont\bf{#1}}}
+ [ BoldFont = {Linux Libertine O Bold}]
\setmonofont{Latin Modern Mono Light}
+
\newfontfamily\EBLigatures{EB Garamond}[
Mapping=tex-text,
Ligatures={Common, Required, Contextual, Historic}
]
-\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O}
-\newfontfamily\CaviarDreamsFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams}
-\newfontfamily\CaviarDreamsBoldFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams_Bold}
-
+\input{../common/10_fonts.tex}
+\let\AltFont\LibertineFont
diff --git a/model_3/Makefile b/model_3/Makefile
index c078875..25786c6 100755
--- a/model_3/Makefile
+++ b/model_3/Makefile
@@ -1,48 +1 @@
-TEX=xelatex
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Image generation
-content/%.pdf: content/%.svg
- inkscape -D -z --export-pdf=$@ $<
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_3/resources/00_preamble.tex b/model_3/resources/00_preamble.tex
index 69b2818..1ec0cd1 100755
--- a/model_3/resources/00_preamble.tex
+++ b/model_3/resources/00_preamble.tex
@@ -23,6 +23,9 @@
\input{../common/10_lists.tex}
\input{../common/10_levels.tex}
\input{../common/10_nowidows.tex}
+\def\nocolumns{}
+\newcommand\sidebarindex{1}
+\input{../common/99_sidebar.tex}
\newcommand{\DUtitletitle}[1]{%
\begin{CaviarDreamsFont}%
diff --git a/model_3/resources/10_fonts.tex b/model_3/resources/10_fonts.tex
index d437a25..f565b74 100755
--- a/model_3/resources/10_fonts.tex
+++ b/model_3/resources/10_fonts.tex
@@ -1,3 +1,5 @@
+\usepackage{fontspec}
+
\newfontfamily\EBGaramond{EB Garamond}[
Mapping=tex-text,
Ligatures={Common, Required, Contextual}
@@ -6,13 +8,12 @@
Mapping=tex-text,
Ligatures={Common, Required, Contextual, Historic}
]
-\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O}
-\newfontfamily\CaviarDreamsFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams}
-\newfontfamily\CaviarDreamsBoldFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams_Bold}
-\usepackage{fontspec}
\setmainfont{Quicksand-Light}[
Path=../fonts/,
BoldFont = Quicksand-Medium]
\setmonofont{Latin Modern Mono Light}
+
+\input{../common/10_fonts.tex}
+\let\AltFont\LibertineFont
diff --git a/model_3/resources/99_sidebar.tex b/model_3/resources/99_sidebar.tex
deleted file mode 100755
index fb98c57..0000000
--- a/model_3/resources/99_sidebar.tex
+++ /dev/null
@@ -1,30 +0,0 @@
-\newlength{\notesep}
-
-\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
-\let\endchangemargin=\endlist
-
-
-\ifdefinedcolor{backsidecolor}{%
- \backgroundcolor{c[1]}{backsidecolor}
-}{}
-
-\setlength{\columnseprule}{0.2pt}
-
-% Une commande dédiée pour les notes de marge
-\newcommand{\DUsidebar}[1]{%
- \switchcolumn[1]
- \begin{changemargin}{0.5cm}{0.0cm}
- \small
- \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}
-}
diff --git a/model_4/Makefile b/model_4/Makefile
index ae2f58e..25786c6 100755
--- a/model_4/Makefile
+++ b/model_4/Makefile
@@ -1,50 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex))
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Image generation
-content/%.pdf: content/%.svg
- inkscape -D -z --export-pdf=$@ $<
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=article --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_4/resources/00_preamble.tex b/model_4/resources/00_preamble.tex
index c92dc33..d6d7875 100755
--- a/model_4/resources/00_preamble.tex
+++ b/model_4/resources/00_preamble.tex
@@ -23,3 +23,4 @@
\input{../common/10_lists.tex}
\input{../common/10_nowidows.tex}
\input{../common/10_levels.tex}
+\input{../common/99_sidebar.tex}
diff --git a/model_4/resources/10_fonts.tex b/model_4/resources/10_fonts.tex
index 424bb0e..164d136 100755
--- a/model_4/resources/10_fonts.tex
+++ b/model_4/resources/10_fonts.tex
@@ -1,15 +1,11 @@
\usepackage{fontspec}
-\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O}
-\newfontfamily\CaviarDreamsFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams}
-\newfontfamily\CaviarDreamsBoldFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams_Bold}
\newfontfamily\BeatrixFont[Path=../fonts/,Mapping=tex-text]{Beatrix}
\defaultfontfeatures{Ligatures={Common, Required, Contextual}}
\setmainfont{EB Garamond}
-
-% Change the font for bold text
-\let\bf\textbf
-\renewcommand{\textbf}[1]{{\AltFont\selectfont\bf{#1}}}
+ [ BoldFont = {Linux Libertine O Bold}]
\setmonofont{Latin Modern Mono Light}
+\input{../common/10_fonts.tex}
+\let\AltFont\LibertineFont
diff --git a/model_4/resources/99_sidebar.tex b/model_4/resources/99_sidebar.tex
index 36bc102..6f3d42f 100755
--- a/model_4/resources/99_sidebar.tex
+++ b/model_4/resources/99_sidebar.tex
@@ -1,30 +1,4 @@
-\newlength{\notesep}
-
-\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
-\let\endchangemargin=\endlist
-
\ifdefinedcolor{backsidecolor}{%
\backgroundcolor{c[1]}{backsidecolor}
+ \backgroundcolor{c[0]}{white}
}{}
-
-% Une commande dédiée pour les notes de marge
-\newcommand{\DUsidebar}[1]{%
- \switchcolumn[0]
- \begin{changemargin}{0.5cm}{1cm}
- \AltFont\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}
-}
diff --git a/model_5/Makefile b/model_5/Makefile
index c02fab5..25786c6 100755
--- a/model_5/Makefile
+++ b/model_5/Makefile
@@ -1,46 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-SVG =$(wildcard content/*.svg)
-
-PDFS = $(SRC:.rst=.pdf)
-INCLUDED_PDF = $(SVG:.svg=.pdf)
-
-all: $(PDFS)
-
-BIBS =$(wildcard *.bib)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex) )
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=extarticle --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex $(BIBS) | tmp
- $(TEX) -output-directory tmp $<
- #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib"
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_5/resources/10_fonts.tex b/model_5/resources/10_fonts.tex
index befadd5..52b69c3 100755
--- a/model_5/resources/10_fonts.tex
+++ b/model_5/resources/10_fonts.tex
@@ -10,4 +10,5 @@
{EB Garamond}
[ Mapping=tex-text ]
-\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O}
+\input{../common/10_fonts.tex}
+\let\AltFont\LibertineFont
diff --git a/model_5/resources/99_begin.tex b/model_5/resources/99_begin.tex
index 7b7a793..8783087 100755
--- a/model_5/resources/99_begin.tex
+++ b/model_5/resources/99_begin.tex
@@ -1,7 +1 @@
\input{../common/90_ref.tex}
-
-% On charge les colonnes dès le début du document.
-\AtBeginDocument{%
- \begin{paracol}{2}
-}
-
diff --git a/model_6/Makefile b/model_6/Makefile
index 170dd32..25786c6 100755
--- a/model_6/Makefile
+++ b/model_6/Makefile
@@ -1,40 +1 @@
-TEX=xelatex
-SOURCE=.
-
-SRC =$(wildcard *.rst)
-
-PDFS = $(SRC:.rst=.pdf)
-
-all: $(PDFS)
-
-DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print))
-SOURCES = $(sort $(wildcard resources/*.tex) )
-
-null :=
-space := $(null) #
-comma := ,
-TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES)))
-
-PACK = $(shell sed -e 's/\#.*$$//' -e '/^$$/d' resources/modules)
-PACKAGES := $(subst $(space),$(comma),$(strip $(PACK)))
-
-tmp:
- mkdir tmp
-
-# Generate the latex file from rst
-tmp/%.tex: %.rst $(SOURCES)| tmp
- $$(command -v rst2latex rst2latex.py | head -n 1) --no-section-subtitles --table-style=borderless --use-latex-citations --use-latex-docinfo --documentclass=extarticle --documentoption=12pt,A4,table --syntax-highlight=short --stylesheet=$(PACKAGES),$(TEX_STYLE) $< $@
- sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@
- sed -i -e 's/admonition-/admonition/g' $@
-
-# Generate each pdf with latex
-tmp/%.pdf: tmp/%.tex | tmp
- $(TEX) -output-directory tmp $<
- while grep 'Rerun to get ' tmp/$*.log ; do $(TEX) -output-directory tmp $< ; done
-
-# Put the pdf in the right place
-%.pdf: tmp/%.pdf | tmp
- cp $< $@
-
-clean:
- rm -r tmp
+include ../common/Makefile.common
diff --git a/model_6/example.rst b/model_6/example.rst
index 5db07a6..42c055b 100755
--- a/model_6/example.rst
+++ b/model_6/example.rst
@@ -11,16 +11,6 @@
.. default-role:: latex
-.. raw:: latex
-
-
- %\setstretch{1.4}
-
- % Espacement entre chaque note de marge
- %\setlength{\notesep}{0cm}
-
- \renewcommand{\labelitemi}{}
-
.. role:: smallcaps
.. role:: smallemph
@@ -37,6 +27,9 @@ Nom et Prénom
Petite légende
--------------
+:latex:`\renewcommand{\labelitemi}{}`
+
+
.. container:: header
* 17 allée des cerisiers
@@ -46,7 +39,6 @@ Petite légende
* 01/02/1980
* Permis B
-
Expériences
===========
diff --git a/model_6/lettre.rst b/model_6/lettre.rst
new file mode 100755
index 0000000..57ad1f1
--- /dev/null
+++ b/model_6/lettre.rst
@@ -0,0 +1,34 @@
+.. -*- mode: rst -*-
+.. -*- coding: utf-8 -*-
+
+
+.. role:: latex(raw)
+ :format: latex
+
+.. default-role:: latex
+
+:latex:`\renewcommand{\labelitemi}{}`
+
+.. |phoneicon| replace:: `\renewcommand{\labelitemi}{\faPhone}`
+.. |mailicon| replace:: `\renewcommand{\labelitemi}{\faEnvelope}`
+.. |noicon| replace:: `\renewcommand{\labelitemi}{}`
+
+.. container:: header
+
+ * 17 allée des cerisiers
+ * 75001 Paris |phoneicon|
+ * 01 23 45 67 89 |mailicon|
+ * email@example |noicon|
+
+* Company Recruitment team
+* *Company, Inc.*
+* *123 somestreet*
+* *some city*
+
+.. raw:: latex
+
+ \setstretch{1.5}
+ \vspace{2cm}
+
+:latex:`\lipsum[1-3]`
+
diff --git a/model_6/resources/00_preamble.tex b/model_6/resources/00_preamble.tex
index e969bba..bd36515 100755
--- a/model_6/resources/00_preamble.tex
+++ b/model_6/resources/00_preamble.tex
@@ -1,6 +1,6 @@
\usepackage{calc}
-\usepackage[a4paper, top=0.5cm, bottom=0.5cm, outer=2.0cm, inner=2.0cm]{geometry}
+\usepackage[a4paper, top=2cm, bottom=0.5cm, outer=2.0cm, inner=2.0cm]{geometry}
\pagestyle{empty}
\pagenumbering{gobble}
diff --git a/model_6/resources/10_container.tex b/model_6/resources/10_container.tex
index a880a85..9b4173b 100644
--- a/model_6/resources/10_container.tex
+++ b/model_6/resources/10_container.tex
@@ -1,8 +1,22 @@
+\usepackage[absolute]{textpos}
\newenvironment{DUCLASSheader}
{ % renew the itemize command in order to apply a flushright to each elements
\let\olditemize\itemize%
- \renewcommand\itemize{\olditemize\raggedleft\setlength\itemsep{0.0em}\small}%
- % Create a minipage on the right
- \begin{flushright}\begin{minipage}[t][0cm][b]{\linewidth}%
- \raggedleft\em\color{gray}}
- { \end{minipage}\end{flushright}}
+ \renewcommand\itemize{
+ \olditemize%
+ \raggedleft%
+ \setlength\itemsep{0.0em}%
+ \small}%
+ \raggedleft%
+ \em%
+ % A textblock is created for placing the header in the topright corner
+ \begin{textblock*}{\linewidth}[0,0](2cm,1.5cm)%
+
+ % Create a new group for the color gray
+ \begingroup%
+ \color{gray}%
+ }
+ {
+ \endgroup%
+ \end{textblock*}%
+ }
diff --git a/model_6/resources/10_fonts.tex b/model_6/resources/10_fonts.tex
index 0dc179e..84eb7a0 100755
--- a/model_6/resources/10_fonts.tex
+++ b/model_6/resources/10_fonts.tex
@@ -1,14 +1,11 @@
\usepackage{fontspec}
-\setmainfont[Mapping=tex-text]{EB Garamond}
-
-% Set the bold font as Linux Libertine as the EB Garamond miss some characters
-\newfontfamily\LibertineFont[Mapping=tex-text]{Linux Libertine O}
-\let\bf\textbf
-\renewcommand{\textbf}[1]{{\LibertineFont\selectfont\bf{#1}}}
+\setmainfont{EB Garamond}
+ [ BoldFont = {Linux Libertine O Bold}
+ , Mapping=tex-text
+ ]
\setmonofont{Latin Modern Mono Light}
-\newfontfamily\TitleFont[Path=resources/, Mapping=tex-text]{CaviarDreams}
-\newfontfamily\CaviarDreamsFont[Path=resources/, Mapping=tex-text]{CaviarDreams}
+\newfontfamily\TitleFont[Path=../fonts/, Mapping=tex-text]{CaviarDreams}
-%\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O}
+\input{../common/10_fonts.tex}
diff --git a/model_6/resources/10_title_style.tex b/model_6/resources/10_title_style.tex
index 05036f4..a194354 100755
--- a/model_6/resources/10_title_style.tex
+++ b/model_6/resources/10_title_style.tex
@@ -13,7 +13,6 @@
\makeatletter
\def\@maketitle{%
- \vspace*{1cm}
\fontsize{1.2cm}{2cm}
\TitleFont\selectfont \@title
}
diff --git a/model_6/resources/99_begin.tex b/model_6/resources/99_begin.tex
index 4867a82..8783087 100755
--- a/model_6/resources/99_begin.tex
+++ b/model_6/resources/99_begin.tex
@@ -1,7 +1 @@
\input{../common/90_ref.tex}
-
-%% On charge les colonnes dès le début du document.
-%\AtBeginDocument{%
-% \begin{paracol}{2}
-%}
-
diff --git a/model_6/resources/CaviarDreams.ttf b/model_6/resources/CaviarDreams.ttf
deleted file mode 100644
index 4ba4279..0000000
--- a/model_6/resources/CaviarDreams.ttf
+++ /dev/null
Binary files differ
diff --git a/model_7/Makefile b/model_7/Makefile
new file mode 100755
index 0000000..25786c6
--- /dev/null
+++ b/model_7/Makefile
@@ -0,0 +1 @@
+include ../common/Makefile.common
diff --git a/model_7/example.rst b/model_7/example.rst
new file mode 100644
index 0000000..3d35b80
--- /dev/null
+++ b/model_7/example.rst
@@ -0,0 +1,39 @@
+.. -*- mode: rst -*-
+.. -*- coding: utf-8 -*-
+
+
+Main title
+==========
+
+.. raw:: latex
+
+ \setstretch{1.2}
+ \fontsize{13pt}{15pt}\selectfont
+
+Title
+-----
+
+.. raw:: latex
+
+ \lipsum[1][1-5]
+ \begin{multicols}{2}
+
+1
+-
+
+.. raw:: latex
+
+ \lipsum[1-9][5-15]
+
+2
+-
+
+.. raw:: latex
+
+ \lipsum[2-3]
+
+
+.. raw:: latex
+
+ \end{multicols}
+
diff --git a/model_7/resources/00_colors.tex b/model_7/resources/00_colors.tex
new file mode 100755
index 0000000..d34ba49
--- /dev/null
+++ b/model_7/resources/00_colors.tex
@@ -0,0 +1,15 @@
+\usepackage{xcolor}
+
+% Couleur utilisée pour le bandeau
+% Ne pas définir la couleur de fond de page pour permettre l¿ajout
+% des dessins
+%\definecolor{backsidecolor}{RGB}{255,255,255}
+
+% Couleur utilisée pour les éléments du bandeau
+%\definecolor{sidecolor}{RGB}{36,63,96}
+%\definecolor{sidecolor}{RGB}{101,114,131}
+
+% Couleur utilisée pour le texte du bandeau
+\definecolor{textsidecolor}{RGB}{0,0,0}
+
+\definecolor{altColor}{named}{lightgray}
diff --git a/model_7/resources/00_length.tex b/model_7/resources/00_length.tex
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/model_7/resources/00_length.tex
diff --git a/model_7/resources/00_preamble.tex b/model_7/resources/00_preamble.tex
new file mode 100755
index 0000000..717d865
--- /dev/null
+++ b/model_7/resources/00_preamble.tex
@@ -0,0 +1,22 @@
+\newcommand{\DUrolelatex}[1]{#1}
+
+\usepackage{tocloft}
+\renewcommand{\cfttoctitlefont}{\normalfont\Large\bfseries}% Remove \bfseries from ToC title
+\renewcommand{\cftsecfont}{\Garamond\selectfont\itshape}% Remove \bfseries from section titles in ToC
+\renewcommand{\cftsecpagefont}{\Garamond\selectfont}% Remove \bfseries from section titles' page in ToC
+
+% Supprime l'indentation pour les listes de définitions
+\newenvironment{DUfieldlist}%
+ {\description[align=left,labelwidth=1.0cm,leftmargin=.5cm]}
+ {\enddescription}
+
+\makeatletter
+\newcommand{\ifdefinedcolor}[3]{%
+ \@ifundefinedcolor{#1}{#3}{#2}
+}
+\makeatother
+
+\input{\commonPath/10_language.tex}
+\input{\commonPath/10_lists.tex}
+\input{\commonPath/10_nowidows.tex}
+
diff --git a/model_7/resources/10_decoration.tex b/model_7/resources/10_decoration.tex
new file mode 100644
index 0000000..b9516ce
--- /dev/null
+++ b/model_7/resources/10_decoration.tex
@@ -0,0 +1,37 @@
+% Add a decoration in the corner of each page
+% The image is selected using pdfornament, and is positionned using the margin
+% of the pages.
+
+\usepackage{tikz}
+\usepackage{eso-pic}
+\usepackage{pgfornament}
+\usepackage{tikzpagenodes}
+\usepackage{ifthen}
+\usetikzlibrary{positioning}
+
+% Apply a decoration over each page
+% Arguments
+% 1: the size of the decoration
+% 2: the distance to the page (not the text margin but the page itself
+% 3: the color
+\providecommand{\pageornament}[3]{%
+ \begin{tikzpicture}[remember picture, overlay]
+ \node[yshift=-#2,xshift=-#2, anchor=north east] at (current page.north east){%
+ \pgfornament[color=#3,width=#1,symmetry=v]{41}
+ };
+ \node[yshift=#2,xshift=-#2,anchor=south east] at (current page.south east){%
+ \pgfornament[color=#3,width=#1,symmetry=c]{61}};
+ \node[yshift=-#2,xshift=#2,anchor=north west] at (current page.north west){%
+
+ \pgfornament[color=#3,width=#1]{41}
+ };
+ \node[yshift=#2,xshift=#2,anchor=south west] at (current page.south west){%
+ \pgfornament[color=#3,width=#1,symmetry=h]{61}
+ };
+ \end{tikzpicture}
+}
+
+\AddToShipoutPictureBG{%
+ \pageornament{1.75cm}{0.5cm}{altColor}
+}
+
diff --git a/model_7/resources/10_fonts.tex b/model_7/resources/10_fonts.tex
new file mode 100755
index 0000000..bc2e3be
--- /dev/null
+++ b/model_7/resources/10_fonts.tex
@@ -0,0 +1,29 @@
+\usepackage{fontspec}
+\setmainfont{Lato Light}[
+ Ligatures={Required,Common,TeX},
+ BoldFont={Lato Bold},
+ ItalicFont={EB Garamond 12 Italic},
+ ItalicFeatures={
+ Ligatures={Required,Common,TeX,Rare},
+ RawFeature={+dlig,+clig}}
+]
+
+\newcommand{\DUtitletitle}[1]{%
+ {\begin{center}\textbf{\textsc{#1}}\end{center}}
+ }
+
+\setmonofont{Latin Modern Mono Light}
+
+\newfontfamily\Garamond{EB Garamond}[
+ Mapping=tex-text,
+ Ligatures={Required,Common,TeX,Rare},
+ RawFeature={+dlig,+clig}
+]
+
+% Variante de la police avec les caractères en capitales modifiés
+% Cette variante est utilisée pour les titres
+\newfontfamily\GaramondSwsh{EB Garamond}[
+ Mapping=tex-text,
+ Ligatures={Required,Common,TeX,Rare},
+ RawFeature={+dlig,+swsh,+calt}
+]
diff --git a/model_7/resources/10_geometry.tex b/model_7/resources/10_geometry.tex
new file mode 100644
index 0000000..2cf4bb4
--- /dev/null
+++ b/model_7/resources/10_geometry.tex
@@ -0,0 +1,2 @@
+\usepackage[a4paper, top=1.0cm, left=1.5cm, right=1.5cm, bottom=2.0cm]{geometry}
+
diff --git a/model_7/resources/10_header_footer.tex b/model_7/resources/10_header_footer.tex
new file mode 100644
index 0000000..e7d0534
--- /dev/null
+++ b/model_7/resources/10_header_footer.tex
@@ -0,0 +1,23 @@
+\usepackage{fancyhdr}
+
+\fancyhf{}
+\pagestyle{empty}
+
+%%% En-tete
+%%pages impaires
+%\fancyhead[LO]{\thedate}
+%
+%%pages paires
+%\fancyhead[RE]{\thedate}
+
+
+\renewcommand{\headrule}{
+}
+%%%Pieds de page
+%pages impaires
+%\fancyfoot[RO]{
+%{page \thepage}} % ici le num de page
+\fancyfoot[LO]{\Garamond\selectfont Page \thepage} % ici l'auteur
+%%pages paires
+%\fancyfoot[LE]{page \thepage} % ici le num de page
+\fancyfoot[RE]{\Garamond\selectfont Page \thepage} % ici l'auteur
diff --git a/model_7/resources/10_title_style.tex b/model_7/resources/10_title_style.tex
new file mode 100755
index 0000000..993b625
--- /dev/null
+++ b/model_7/resources/10_title_style.tex
@@ -0,0 +1,61 @@
+\usepackage[explicit]{titlesec}
+\usepackage{pgfplots}
+\pgfplotsset{compat=newest}
+
+\providecommand{\DUdocumentsubtitle}[1]{%
+ %\begin{nthcolumn}{1}
+ \color{black}
+ \em
+ \GaramondSwsh\selectfont
+ \Large
+ #1
+ %\end{nthcolumn}
+}
+
+\makeatletter
+
+\def\@maketitle{%
+ \vspace*{0.5cm}
+ \textcolor{altColor}{%
+ \Garamond\selectfont
+ \huge \@title
+ }
+ \vspace*{1.0cm}
+}
+\makeatother
+
+\newcommand\SecTitle[1]{%
+\begin{tikzpicture}
+
+ \node (A) at (0,0)
+ {\Large{\textit{#1 }}};
+ \node (B) at (5,0) {};
+ \node (C) at (-5,0) {};
+
+ % Change the color for the lines and apply the ornament
+ \draw [altColor, line width=0.2mm] (C) to (A.west);
+ \draw [altColor, line width=0.2mm] (A.east) to (B);
+\end{tikzpicture}}
+
+% Titre de niveau 1
+% On affiche le Swash sur les initiales ici
+\titleformat{\section}
+ {\centering}
+ {\thesection}
+ {}
+ {\SecTitle{\GaramondSwsh\selectfont{#1 }}}
+
+% Titre de niveau 2
+\titleformat{\subsection}
+ {\bf\centering}
+ {\thesubsection}
+ {}
+ {#1}
+
+% Titre de niveau 3
+\titleformat{\subsubsection}
+ {\bfseries\normalsize}
+ {\thesubsubsection}
+ {2em}
+ {}
+ {}
diff --git a/model_7/resources/99_begin.tex b/model_7/resources/99_begin.tex
new file mode 100755
index 0000000..97d576c
--- /dev/null
+++ b/model_7/resources/99_begin.tex
@@ -0,0 +1 @@
+\input{\commonPath/90_ref.tex}
diff --git a/model_7/resources/modules b/model_7/resources/modules
new file mode 100755
index 0000000..7627b8e
--- /dev/null
+++ b/model_7/resources/modules
@@ -0,0 +1,8 @@
+setspace
+parskip # Ne pas indenter la premiere ligne d'un paragraphe
+
+DUsmallcaps
+paracol
+lipsum
+DUcolumn
+DUcenter
diff --git a/model_8/Makefile b/model_8/Makefile
new file mode 100755
index 0000000..98cc7a6
--- /dev/null
+++ b/model_8/Makefile
@@ -0,0 +1,8 @@
+
+EXTRA_RST_OPTIONS = \
+ --no-section-numbering \
+ --table-style=booktabs \
+ --new-column-widths
+
+
+include ../common/Makefile.common
diff --git a/model_8/example.rst b/model_8/example.rst
new file mode 100644
index 0000000..301b97a
--- /dev/null
+++ b/model_8/example.rst
@@ -0,0 +1,54 @@
+.. -*- mode: rst -*-
+.. -*- coding: utf-8 -*-
+
+
+==========
+Main title
+==========
+
+.. sectnum::
+ :depth: 2
+
+First Title
+-----------
+
+ipsum
+~~~~~
+
+.. sidebar:: Note
+
+ .. raw:: latex
+
+ \lipsum[3-9][10-11]
+
+.. raw:: latex
+
+ \lipsum[1-9][5-10]
+
+.. code:: c
+
+ #include <stdio.h>
+ int main() {
+ printf("Hello, World!");
+ return 0;
+ }
+
+Last one
+--------
+
+.. list-table::
+ :header-rows: 1
+
+ * - Treat
+ - Quantity
+ - Description
+ * - Albatross
+ - 2.99
+ - On a stick!
+ * - Crunchy Frog
+ - 1.49
+ - If we took the bones out, it wouldn't be
+ crunchy, now would it?
+ * - Gannet Ripple
+ - 1.99
+ - On a stick!
diff --git a/model_8/resources/10-admonitions.tex b/model_8/resources/10-admonitions.tex
new file mode 100644
index 0000000..acba12f
--- /dev/null
+++ b/model_8/resources/10-admonitions.tex
@@ -0,0 +1,30 @@
+\usepackage{DUStyle}
+
+
+\usepackage{fontspec}
+\RequirePackage{fontawesome}
+% Style pour les avertissements
+\createIconifiedDUStyle{warning}{orangeColor}{\faExclamation}{CaviarDreamsFont}
+% Style pour les notes
+\createIconifiedDUStyle{note}{lightBlueColor}{\faComment}{CaviarDreamsFont}
+% Style pour les exercices
+\createIconifiedDUStyle{exercice}{greenColor}{\faPencil}{CaviarDreamsFont}
+
+\newenvironment{DUCLASScode}{%
+ \begin{mdframed}[topline=false,%
+ bottomline=false,%
+ rightline=false,%
+ leftline=true,%
+ linecolor=black,%
+ linewidth=3pt,%
+ skipabove=0.5cm,%
+ backgroundcolor=black!5]
+ %\small
+}{%
+ \end{mdframed}
+}
+
+
+\newcommand{\DUtitletitle}[1]{%
+ {\begin{flushleft}\normalsize\CaviarDreamsFont{#1}\end{flushleft}}
+}
diff --git a/model_8/resources/10-fonts.tex b/model_8/resources/10-fonts.tex
new file mode 100644
index 0000000..604d01c
--- /dev/null
+++ b/model_8/resources/10-fonts.tex
@@ -0,0 +1,4 @@
+\usepackage{fontspec}
+\setmainfont[Mapping=tex-text]{Linux Libertine O}
+
+\input{\commonPath/10_fonts.tex}
diff --git a/model_8/resources/10-table.tex b/model_8/resources/10-table.tex
new file mode 100644
index 0000000..cfa2f62
--- /dev/null
+++ b/model_8/resources/10-table.tex
@@ -0,0 +1,28 @@
+\let\oldbf\textbf
+\def\newbf{\color{white}\oldbf}
+
+\colorlet{tableHeader}{red!80!black}
+\rowcolors{1}{lightgray!10}{lightgray!50}
+
+% The tables using the mode are represented like this :
+%
+% \toprule
+% \textbf{%
+% …
+% } & \textbf{%
+% …
+% } \\
+% \midrule
+% \endfirsthead
+%
+% Here, we are updating the toprule command to set the color in the background,
+% and define the text color.
+%
+% In the midrule command, we restore the command `textbf` to the previous
+% definition.
+
+% Update the color for the header row
+\def\toprule{\rowcolor{tableHeader}\global\def\textbf{\newbf}}
+% Restore the previous color after the header
+\def\midrule{\global\def\textbf{\oldbf}}
+\def\bottomrule{}
diff --git a/model_8/resources/10-title_style.tex b/model_8/resources/10-title_style.tex
new file mode 100755
index 0000000..55c1bf3
--- /dev/null
+++ b/model_8/resources/10-title_style.tex
@@ -0,0 +1,21 @@
+\usepackage{titlesec}
+
+\titleformat{\section}[display]% shape
+ {\huge}% format
+ {
+ \makebox[0pt][l]{%
+ \raisebox{-70pt}[0pt][10pt]{%
+ \textcolor{black!30}{\fontsize{136pt}{0pt}\selectfont\thesection}%
+ }
+ }
+ }
+ {0pt}
+ {\CaviarDreamsFont\Huge}
+\titlespacing*{\section}{0pt}{*0}{1cm}
+
+% Titre de niveau 2
+\titleformat{\subsection}[block]
+ {\bfseries\Large}
+ {\llap{\hspace*{-1.3cm}\huge\textcolor{red!75!black}\thesubsection\hfill}}
+ {0em}
+ {}
diff --git a/model_8/resources/10_preamble.tex b/model_8/resources/10_preamble.tex
new file mode 100644
index 0000000..75dc080
--- /dev/null
+++ b/model_8/resources/10_preamble.tex
@@ -0,0 +1,8 @@
+
+\usepackage[a4paper, top=1.5cm, bottom=1.5cm, outer=5cm, inner=2cm, marginparwidth=3.5cm, marginparsep=0.9cm]{geometry}
+
+\patchcmd{\quote}{\rightmargin}{\leftmargin 0em \rightmargin}{}{}
+
+\input{\commonPath/10_language.tex}
+\input{\commonPath/10_lists.tex}
+\input{\commonPath/10_nowidows.tex}
diff --git a/model_8/resources/modules b/model_8/resources/modules
new file mode 100755
index 0000000..318ca26
--- /dev/null
+++ b/model_8/resources/modules
@@ -0,0 +1,6 @@
+parskip # Ne pas indenter la premiere ligne d'un paragraphe
+marginfix
+
+DUpygments-tango
+DUsidebar
+lipsum
diff --git a/readme.rst b/readme.rst
index 8629320..e840474 100755
--- a/readme.rst
+++ b/readme.rst
@@ -16,11 +16,17 @@ Pré-requis
La compilation des fichiers en PDF requiert python et docutils. Il faut bien
sûr latex pour générer le pdf.
+Les dépendances nécessaire peuvent être installées avec la commande suivante :
+
+.. code-block:: bash
+
+ sudo apt install git make docutils texlive texlive-latex-extra \
+ texlive-lang-french texlive-fonts-extra texlive-lualatex
+
compilation
-----------
-Tous les modèles peuvent être générés en une seule commande en lançant `make -j
-4` dans le répertoire principal.
+Tous les modèles peuvent être générés en une seule commande en lançant `make` dans le répertoire principal.
Organisation
============
@@ -28,6 +34,62 @@ Organisation
Chaque répertoire contient un style de document. La commande `make` permet de
générer le fichier PDF à partir du fichier source.
+Pour réutiliser un modèle, il suffit de créer ces lignes dans un fichier
+`Makefile` :
+
+.. code:: Makefile
+
+ MODEL = ../model_7 # Chemin vers le modèle à utiliser
+ include $(MODEL)/../common/Makefile.common
+
+et de créer un document texte avec l’extension `.rst`. La commande `make` va
+lancer la compilation du fichier en pdf.
+
+Personalisation
+---------------
+
+Les règles de basent peuvent être personalisées en fonction des besoins.
+
+Chaque fichier de style présent dans le répertoire du modèle peut être
+surchargé par un fichier de style de même nom présent dans le répertoire
+courant du modèle.
+
+:`EXTRA_RST_OPTIONS`:
+
+ Cette option va donner des directives supplémentaires au compilateur
+ rst2latex
+
+ Exemple :
+
+ .. code:: Makefile
+
+ EXTRA_RST_OPTIONS = \
+ --table-style=booktabs
+
+
+:`EXTRA_STYLES`:
+
+ Cette option permet d’ajouter des styles supplémentaires qui sont appliqués
+ sur le document généré.
+
+ .. code:: Makefile
+
+ EXTRA_STYLES = fontsize\
+
+:`FILTERS`:
+
+ Cette option permet de lister les modules présents dans le modèle de base
+ et ne devant pas être chargé. (En vue de les surcharger par exemple).
+
+ .. code:: Makefile
+
+ FILTERS = %10_geometry.tex \
+ %10_title_style.tex \
+ %00_colors.tex \
+
+Exemples
+========
+
Les images ci-dessous sont construites à partir des fichiers exemples :
Model 1
@@ -93,6 +155,38 @@ Une version inspirée par le fameux `moderncv`__
.. __: /latex_template.git/plain/model_6/example.pdf
+Model 7
+-------
+
+Modèle utilisé pour un mariage
+
+.. image:: /latex_template.git/plain/snapshots/model7.png
+ :width: 400px
+
+Commandes fournies par ce modèle :
+
+:pageornament:
+
+ Commande appliquée en fond de page sur chaque page. Elle prend trois
+ arguments :
+
+ - La dimension de l’image
+ - La distance par rapport au bord de l’image
+ - La couleur à appliquer
+
+:altColor:
+
+ la couleur `altColor` est utilisée pour le titre principal du document, les
+ décoration de page, ainsi que les lignes encadrant les titres de chapitre.
+
+ Valeur par défaut `lightgray`
+
+Model 8
+-------
+
+.. image:: /latex_template.git/plain/snapshots/model8.png
+ :width: 400px
+
La syntaxe
==========
diff --git a/snapshots/model7.png b/snapshots/model7.png
new file mode 100644
index 0000000..887bdea
--- /dev/null
+++ b/snapshots/model7.png
Binary files differ
diff --git a/snapshots/model8.png b/snapshots/model8.png
new file mode 100644
index 0000000..e891f98
--- /dev/null
+++ b/snapshots/model8.png
Binary files differ