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