aboutsummaryrefslogtreecommitdiff
path: root/model_2/resources
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2020-12-01 21:32:20 +0100
committerSébastien Dailly <sebastien@chimrod.com>2020-12-03 17:33:35 +0100
commitb6bebdc03066e513efbbb5ff9424681bbcceff0c (patch)
treead58ccc072efbfdeabe4d9b4b20b79acc8fd19b3 /model_2/resources
parent02b663b21099cdb62cef7b363cae46a56d7aae5f (diff)
Added a new model, and did some factorisation
Diffstat (limited to 'model_2/resources')
-rwxr-xr-xmodel_2/resources/00_length.tex6
-rwxr-xr-xmodel_2/resources/00_preamble.tex15
-rwxr-xr-xmodel_2/resources/10_fonts.tex11
-rwxr-xr-xmodel_2/resources/10_language.tex8
-rwxr-xr-xmodel_2/resources/10_levels.tex73
-rwxr-xr-xmodel_2/resources/10_lists.tex17
-rwxr-xr-xmodel_2/resources/10_nowidows.tex2
-rwxr-xr-xmodel_2/resources/10_title_style.tex17
-rwxr-xr-xmodel_2/resources/99_sidebar.tex48
9 files changed, 39 insertions, 158 deletions
diff --git a/model_2/resources/00_length.tex b/model_2/resources/00_length.tex
new file mode 100755
index 0000000..5b1a80d
--- /dev/null
+++ b/model_2/resources/00_length.tex
@@ -0,0 +1,6 @@
+% Distance de la colonne
+\setlength{\columnsep}{0.5cm}
+
+
+% Occupation de la colonne
+\columnratio{0.29}
diff --git a/model_2/resources/00_preamble.tex b/model_2/resources/00_preamble.tex
index d949922..89cb0c4 100755
--- a/model_2/resources/00_preamble.tex
+++ b/model_2/resources/00_preamble.tex
@@ -2,15 +2,6 @@
\pagestyle{empty}
\pagenumbering{gobble}
-\usepackage{fontspec}
-\defaultfontfeatures{Ligatures={Common, Required, Contextual}}
-\setmainfont{EB Garamond}
-
-% Change the font for bold text
-\let\bf\textbf
-\renewcommand{\textbf}[1]{{\LibertineFont\selectfont\bf{#1}}}
-
-\setmonofont{Latin Modern Mono Light}
\newcommand{\DUrolelatex}[1]{#1}
@@ -25,3 +16,9 @@
\@ifundefinedcolor{#1}{#3}{#2}
}
\makeatother
+
+\input{../common/10_language.tex}
+\input{../common/10_lists.tex}
+\input{../common/10_nowidows.tex}
+\input{../common/10_levels.tex}
+\input{../common/99_sidebar.tex}
diff --git a/model_2/resources/10_fonts.tex b/model_2/resources/10_fonts.tex
index e229582..928f801 100755
--- a/model_2/resources/10_fonts.tex
+++ b/model_2/resources/10_fonts.tex
@@ -1,8 +1,17 @@
+\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}}}
+
+\setmonofont{Latin Modern Mono Light}
\newfontfamily\EBLigatures{EB Garamond}[
Mapping=tex-text,
Ligatures={Common, Required, Contextual, Historic}
]
-\newfontfamily\LibertineFont[Mapping=tex-text]{Linux Libertine O}
+\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}
diff --git a/model_2/resources/10_language.tex b/model_2/resources/10_language.tex
deleted file mode 100755
index 7cc0990..0000000
--- a/model_2/resources/10_language.tex
+++ /dev/null
@@ -1,8 +0,0 @@
-\RequirePackage[french]{babel}
-
-%\frenchbsetup{ItemLabeli=\color{fondetsection}\ding{251}}
-
-\selectlanguage{french}
-\frenchspacing
-\FrenchFootnotes
-
diff --git a/model_2/resources/10_levels.tex b/model_2/resources/10_levels.tex
deleted file mode 100755
index 7660b1d..0000000
--- a/model_2/resources/10_levels.tex
+++ /dev/null
@@ -1,73 +0,0 @@
-\newcommand{\DUrolelevel}[1]{%
- \resizebox{\linewidth}{!}{%
- \begin{tikzpicture}
- \draw (0,0) -- (5,0);
- \fill(#1,-.1) rectangle ($ (#1,0) + (0.1, .1) $);
- \end{tikzpicture}
- }
-}
-
-\ifdefinedcolor{sidecolor}{%
- \colorlet{patterncolor}{sidecolor}
-}{%
- \colorlet{patterncolor}{black}
-}
-
-\ifdefinedcolor{backsidecolor}{%
- \colorlet{emptycolor}{backsidecolor}
-}{%
- \colorlet{emptycolor}{white}
-}
-
-\usetikzlibrary{shapes.geometric,calc}
-\newcommand\starScore[2]{
-\pgfmathsetmacro\pgfxa{#1+1}
-\tikzstyle{scorestars}=[star, star points=5, star point ratio=2.25, draw,inner sep=0.15em,anchor=outer point 3]
-\begin{tikzpicture}[baseline]
- \foreach \i in {1,...,#2} {
- \pgfmathparse{(\i<=#1?"patterncolor":"emptycolor")}
- \edef\starcolor{\pgfmathresult}
- \draw (\i*1em,0) node[name=star\i,scorestars,fill=\starcolor] {};
- }
- \pgfmathparse{(#1>int(#1)?int(#1+1):0}
- \let\partstar=\pgfmathresult
- \ifnum\partstar>0
- \pgfmathsetmacro\starpart{#1-(int(#1))}
- \path [clip] ($(star\partstar.outer point 3)!(star\partstar.outer point 2)!(star\partstar.outer point 4)$) rectangle
- ($(star\partstar.outer point 2 |- star\partstar.outer point 1)!\starpart!(star\partstar.outer point 1 -| star\partstar.outer point 5)$);
- \fill (\partstar*1em,0) node[scorestars,fill=patterncolor] {};
- \fi
-
-,\end{tikzpicture}
-}
-
-
-\newcommand\roundscore[2]{
-\pgfmathsetmacro\pgfxa{#1+1}
-\tikzstyle{scorestars}=[circle, draw, inner sep=0.15em,anchor=west]
-\begin{tikzpicture}[baseline]
- \foreach \i in {1,...,#2} {
- \pgfmathparse{(\i<=#1?"blue!70":"lightgray")}
- \edef\starcolor{\pgfmathresult}
- \draw (\i*1em,0) node[name=star\i,scorestars,fill=\starcolor] {};
- }
- \pgfmathparse{(#1>int(#1)?int(#1+1):0}
- \let\partstar=\pgfmathresult
- \ifnum\partstar>0
- \pgfmathsetmacro\starpart{#1-(int(#1))}
- \path [clip] (star\partstar.north west) rectangle
- ($(star\partstar.south west)!\starpart!(star\partstar.south east)$);
- \fill (\partstar*1em,0) node[scorestars,fill=blue!70] {};
- \fi,
-
-\end{tikzpicture}
-}
-
-\newcommand{\DUrolestar}[1]{%
- \resizebox{\linewidth}{!}{%
- \starScore{#1}{5}
- }
-}
-
-
-
diff --git a/model_2/resources/10_lists.tex b/model_2/resources/10_lists.tex
deleted file mode 100755
index b87845a..0000000
--- a/model_2/resources/10_lists.tex
+++ /dev/null
@@ -1,17 +0,0 @@
-\usepackage{fontawesome}
-
-\newenvironment{DUCLASSdiamondlist}{\renewcommand{\labelitemi}{$\diamond$}}{}
-\newenvironment{DUCLASSastlist}{\renewcommand{\labelitemi}{$\ast$}}{}
-\newenvironment{DUCLASScdotlist}{\renewcommand{\labelitemi}{$\cdot$}}{}
-\newenvironment{DUCLASSbulletlist}{\renewcommand{\labelitemi}{$\bullet$}}{}
-\newenvironment{DUCLASSchecklist}{\renewcommand{\labelitemi}{\faCheck}}{}
-\newenvironment{DUCLASSnonelist}{\renewcommand{\labelitemi}{}}{}
-
-\renewcommand{\labelitemi}{$\bullet$}
-\renewcommand{\labelitemii}{$\cdot$}
-\renewcommand{\labelitemiii}{$\diamond$}
-\renewcommand{\labelitemiv}{$\ast$}
-
-% Réduit l'indentation pour les éléments des listes
-\usepackage{enumitem}
-\setlist[itemize,1]{leftmargin=.0cm}
diff --git a/model_2/resources/10_nowidows.tex b/model_2/resources/10_nowidows.tex
deleted file mode 100755
index 3b96931..0000000
--- a/model_2/resources/10_nowidows.tex
+++ /dev/null
@@ -1,2 +0,0 @@
-\widowpenalty=1000
-\clubpenalty=500
diff --git a/model_2/resources/10_title_style.tex b/model_2/resources/10_title_style.tex
index 3f57a84..f391417 100755
--- a/model_2/resources/10_title_style.tex
+++ b/model_2/resources/10_title_style.tex
@@ -1,4 +1,5 @@
\usepackage{titlesec}
+\usepackage[many]{tcolorbox}
\providecommand*{\DUdocumentsubtitle}[1]{{\EBLigatures\selectfont\em\LARGE\begin{flushright}#1\end{flushright}}}
@@ -44,3 +45,19 @@
{2em}
{}
{}
+
+\newcommand{\DUtitletitle}[1]{%
+ \begin{tcolorbox}[colback=sidecolor, sharp corners]%
+ \begin{center}%
+ \begin{CaviarDreamsBoldFont}%
+ {\textbf\selectfont\color{white}{\scriptsize\uppercase{#1}}}%
+ \end{CaviarDreamsBoldFont}%
+ \end{center}
+ \end{tcolorbox}
+ }
+
+\let\oldtitle\maketitle
+\renewcommand{\maketitle}{%
+ {\oldtitle}
+ \begin{paracol}{2}
+}
diff --git a/model_2/resources/99_sidebar.tex b/model_2/resources/99_sidebar.tex
deleted file mode 100755
index a415a9f..0000000
--- a/model_2/resources/99_sidebar.tex
+++ /dev/null
@@ -1,48 +0,0 @@
-\usepackage{eso-pic}
-\usetikzlibrary{calc}
-
-\newlength{\notesep}
-
-\newlength{\sideBottomMargin}
-\setlength{\sideBottomMargin}{0.2cm}
-
-\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
-\let\endchangemargin=\endlist
-
-% Une commande dédiée pour les notes de marge
-\setlength{\columnsep}{0.5cm}
-\columnratio{0.29}
-
-\ifdefinedcolor{backsidecolor}{%
- \backgroundcolor{c[0]}{backsidecolor}
-}{}
-
-\newcommand{\DUsidebar}[1]{%
- \switchcolumn[0]
- \begin{changemargin}{0.7cm}{0.7cm}
- \LibertineFont\selectfont
- \ifdefinedcolor{textsidecolor}{\color{textsidecolor}}{}
- #1
- \end{changemargin}
- \vspace{\notesep}
- \switchcolumn
-}
-\usepackage[many]{tcolorbox}
-
-\newcommand{\DUtitletitle}[1]{%
- \begin{tcolorbox}[colback=sidecolor, sharp corners]%
- \begin{center}%
- \begin{CaviarDreamsBoldFont}%
- {\textbf\selectfont\color{white}{\scriptsize\uppercase{#1}}}%
- \end{CaviarDreamsBoldFont}%
- \end{center}
- \end{tcolorbox}
- }
-
-
-\AtEndDocument{
- \flushpage
- \end{paracol}
-}
-\let\oldtitle\maketitle
-\renewcommand{\maketitle}{{\oldtitle}\begin{paracol}{2}}