aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Makefile.common66
-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_title_style.tex1
-rwxr-xr-xmodel_7/Makefile2
-rw-r--r--model_7/example.rst39
-rwxr-xr-xmodel_7/resources/00_colors.tex15
-rwxr-xr-xmodel_7/resources/00_length.tex2
-rwxr-xr-xmodel_7/resources/00_preamble.tex25
-rw-r--r--model_7/resources/10_decoration.tex37
-rwxr-xr-xmodel_7/resources/10_fonts.tex29
-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.tex7
-rwxr-xr-xmodel_7/resources/modules15
-rwxr-xr-xreadme.rst8
-rw-r--r--snapshots/model7.pngbin0 -> 45049 bytes
19 files changed, 386 insertions, 18 deletions
diff --git a/common/Makefile.common b/common/Makefile.common
new file mode 100644
index 0000000..59a795c
--- /dev/null
+++ b/common/Makefile.common
@@ -0,0 +1,66 @@
+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 $< $@
+ pkill -HUP mupdf
+
+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)
+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 $<
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_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_7/Makefile b/model_7/Makefile
new file mode 100755
index 0000000..05631bf
--- /dev/null
+++ b/model_7/Makefile
@@ -0,0 +1,2 @@
+include ../common/Makefile.common
+TEX=lualatex
diff --git a/model_7/example.rst b/model_7/example.rst
new file mode 100644
index 0000000..5b8cf6c
--- /dev/null
+++ b/model_7/example.rst
@@ -0,0 +1,39 @@
+.. -*- mode: rst -*-
+.. -*- coding: utf-8 -*-
+
+
+Main title
+==========
+
+.. raw:: latex
+
+ \setstretch{1.2}
+ \changefontsize{13pt}
+
+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..d5dc470
--- /dev/null
+++ b/model_7/resources/00_length.tex
@@ -0,0 +1,2 @@
+% Distance de la colonne
+%\setlength{\columnsep}{0.25cm}
diff --git a/model_7/resources/00_preamble.tex b/model_7/resources/00_preamble.tex
new file mode 100755
index 0000000..30c4fd3
--- /dev/null
+++ b/model_7/resources/00_preamble.tex
@@ -0,0 +1,25 @@
+\usepackage[a4paper, landscape, top=1.0cm, left=1.5cm, right=1.5cm, bottom=2.0cm]{geometry}
+%\pagestyle{empty}
+%\pagenumbering{arabic}
+\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{../common/10_language.tex}
+\input{../common/10_lists.tex}
+\input{../common/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..b394599
--- /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
+\newcommand{\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_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..5d9ca89
--- /dev/null
+++ b/model_7/resources/99_begin.tex
@@ -0,0 +1,7 @@
+\input{../common/90_ref.tex}
+
+%% On charge les colonnes dès le début du document.
+%\AtBeginDocument{%
+% \begin{paracol}{1}
+%}
+
diff --git a/model_7/resources/modules b/model_7/resources/modules
new file mode 100755
index 0000000..c7b9742
--- /dev/null
+++ b/model_7/resources/modules
@@ -0,0 +1,15 @@
+tikz
+parskip # Ne pas indenter la premiere ligne d'un paragraphe
+setspace
+
+# Polices mathematiques.
+amsmath
+amsfonts
+amssymb
+
+DUsmallcaps
+paracol
+lipsum
+DUcolumn
+Ducenter
+fontsize
diff --git a/readme.rst b/readme.rst
index 8629320..408a0a2 100755
--- a/readme.rst
+++ b/readme.rst
@@ -93,6 +93,14 @@ 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
+
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