aboutsummaryrefslogtreecommitdiff
path: root/model_8
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2024-05-05 16:18:51 +0200
committerSébastien Dailly <sebastien@dailly.me>2024-05-05 16:18:51 +0200
commitbb412937a482dae6552bc5dd1f61188b461dd8e2 (patch)
treecc1b08e99e9e7b5b15fb11224244dc863fed4a09 /model_8
parenta5696db7113a3b1d7350775aecb280300a08031c (diff)
Added a new model
Diffstat (limited to 'model_8')
-rwxr-xr-xmodel_8/Makefile12
-rw-r--r--model_8/example.rst54
-rw-r--r--model_8/resources/10-admonitions.tex30
-rw-r--r--model_8/resources/10-fonts.tex10
-rw-r--r--model_8/resources/10-table.tex9
-rwxr-xr-xmodel_8/resources/10-title_style.tex21
-rw-r--r--model_8/resources/10_preamble.tex8
-rwxr-xr-xmodel_8/resources/modules6
8 files changed, 150 insertions, 0 deletions
diff --git a/model_8/Makefile b/model_8/Makefile
new file mode 100755
index 0000000..091ac60
--- /dev/null
+++ b/model_8/Makefile
@@ -0,0 +1,12 @@
+include ../common/Makefile.common
+TEX=lualatex
+
+tmp/%.tex: %.rst $(INCLUDED_TEX) $(SOURCES) | tmp
+ $$(command -v rst2latex rst2latex.py | head -n 1) \
+ --no-section-numbering \
+ --table-style=booktabs \
+ --documentclass=article \
+ --documentoption=12pt,A4,table \
+ --syntax-highlight=short \
+ --stylesheet=$(PACKAGES),$(TEX_STYLE) \
+ $< $@
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..fab8755
--- /dev/null
+++ b/model_8/resources/10-fonts.tex
@@ -0,0 +1,10 @@
+\usepackage{fontspec}
+\setmainfont[Mapping=tex-text]{Linux Libertine O}
+
+
+\newfontfamily\LibertineFont[Mapping=tex-text]{Linux Libertine O}
+\newfontfamily\CaviarDreamsFont{CaviarDreams}
+ [ Path=../fonts/
+ , BoldFont = *_Bold,
+ , Mapping=tex-text
+ ]
diff --git a/model_8/resources/10-table.tex b/model_8/resources/10-table.tex
new file mode 100644
index 0000000..a3b2488
--- /dev/null
+++ b/model_8/resources/10-table.tex
@@ -0,0 +1,9 @@
+\let\oldbf\textbf
+\def\newbf{\color{white}\oldbf}
+
+\colorlet{tableHeader}{red!80!black}
+\rowcolors{1}{lightgray!10}{lightgray!50}
+
+\def\toprule{\rowcolor{tableHeader}\global\def\textbf{\newbf}}
+\def\midrule{}
+\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..ca60202
--- /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{../common/10_language.tex}
+\input{../common/10_lists.tex}
+\input{../common/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