aboutsummaryrefslogtreecommitdiff
path: root/model_3
diff options
context:
space:
mode:
Diffstat (limited to 'model_3')
-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
4 files changed, 9 insertions, 82 deletions
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}
-}