From b6bebdc03066e513efbbb5ff9424681bbcceff0c Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 1 Dec 2020 21:32:20 +0100 Subject: Added a new model, and did some factorisation --- model_5/Makefile | 46 +++++++++++ model_5/example.pdf | Bin 0 -> 54523 bytes model_5/example.rst | 155 +++++++++++++++++++++++++++++++++++ model_5/resources/00_colors.tex | 13 +++ model_5/resources/00_length.tex | 5 ++ model_5/resources/00_preamble.tex | 25 ++++++ model_5/resources/10_fonts.tex | 13 +++ model_5/resources/10_title_style.tex | 60 ++++++++++++++ model_5/resources/99_begin.tex | 7 ++ model_5/resources/modules | 13 +++ 10 files changed, 337 insertions(+) create mode 100755 model_5/Makefile create mode 100644 model_5/example.pdf create mode 100755 model_5/example.rst create mode 100755 model_5/resources/00_colors.tex create mode 100755 model_5/resources/00_length.tex create mode 100755 model_5/resources/00_preamble.tex create mode 100755 model_5/resources/10_fonts.tex create mode 100755 model_5/resources/10_title_style.tex create mode 100755 model_5/resources/99_begin.tex create mode 100755 model_5/resources/modules (limited to 'model_5') diff --git a/model_5/Makefile b/model_5/Makefile new file mode 100755 index 0000000..c02fab5 --- /dev/null +++ b/model_5/Makefile @@ -0,0 +1,46 @@ +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 $< $@ + +clean: + rm -r tmp diff --git a/model_5/example.pdf b/model_5/example.pdf new file mode 100644 index 0000000..f8afd80 Binary files /dev/null and b/model_5/example.pdf differ diff --git a/model_5/example.rst b/model_5/example.rst new file mode 100755 index 0000000..ff5716a --- /dev/null +++ b/model_5/example.rst @@ -0,0 +1,155 @@ +.. -*- mode: rst -*- +.. -*- coding: utf-8 -*- + + +.. role:: latex(raw) + :format: latex + +.. role:: level +.. role:: levelbox +.. role:: star + +.. default-role:: latex + +.. raw:: latex + + + \setstretch{1.4} + + % Espacement entre chaque note de marge + \setlength{\notesep}{0cm} + + \renewcommand{\labelitemi}{} + + +.. role:: smallcaps +.. role:: smallemph + +.. |phoneicon| replace:: `\renewcommand{\labelitemi}{\iconBox{\faPhone}}` +.. |mailicon| replace:: `\renewcommand{\labelitemi}{\iconBox{\faEnvelope}}` +.. |noicon| replace:: `\renewcommand{\labelitemi}{}` + +============= +Nom et Prénom +============= + +-------------- +Petite légende +-------------- + +.. sidebar:: \ + + .. image:: ../common/Parmenides.jpg + :width: 100% + + +.. sidebar:: Informations + + * 17 allée des cerisiers + * 75001 Paris |phoneicon| + * 01 23 45 67 89 |mailicon| + * email@example |noicon| + * 01/02/1980 + * Permis B + +.. sidebar:: Compétences + + .. class:: checklist + + * Conception + * Esprit de synthèse + * Écoute |noicon| + * \ + +.. sidebar:: Niveaux + + Autre + + :star:`4.5` + + Anglais + + :levelbox:`5` + + Bureautique + + :level:`3` + + + +Expériences +=========== + +`\renewcommand{\labelitemi}{$\bullet$}` + +:Actuellement: + + **Poste actuel** — *Entreprise* — Adresse. + + :latex:`\lipsum[1-3][4-7]` + + - :latex:`\lipsum[1-3][1]` + - :latex:`\lipsum[1-3][2]` + - :latex:`\lipsum[1-3][3]` + + +:2011 — 2018: + + **Poste occupé** — *Entreprise* — Adresse. + + :latex:`\lipsum[1-3][5-10]` + + :latex:`\lipsum[4-7][5-10]` + +:2010 — 2011: + + **Poste occupé** — *Entreprise* — Adresse. + + :latex:`\lipsum[1-3][10-15]` + + +:2008 — 2010: + + **Poste occupé** — *Entreprise* — Adresse. + + :latex:`\lipsum[1-3][15-21]` + + +Réalisations +============ + +Description +----------- + +:latex:`\lipsum[4-7][10-15]` + +:latex:`\lipsum[4-7][15-20]` + +Description +----------- + +:latex:`\lipsum[7-10][10-15]` + +:latex:`\lipsum[7-10][15-20]` + + +Formations +========== + +:Année: + + **Niveau M1** — *Université de Paris* + + +:Année: + + **Licence** — *Université de Paris* + + Mention + + +:Année: + + **Baccalauréat Scientifique** — *Lycée* – Ville + + Spécialité diff --git a/model_5/resources/00_colors.tex b/model_5/resources/00_colors.tex new file mode 100755 index 0000000..3afc69c --- /dev/null +++ b/model_5/resources/00_colors.tex @@ -0,0 +1,13 @@ +\usepackage{xcolor} + +% Couleur utilisée pour le bandeau +\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}{HTML}{5e81ac} diff --git a/model_5/resources/00_length.tex b/model_5/resources/00_length.tex new file mode 100755 index 0000000..3e0ee3d --- /dev/null +++ b/model_5/resources/00_length.tex @@ -0,0 +1,5 @@ +% Distance de la colonne +\setlength{\columnsep}{0.25cm} + +% Occupation de la colonne +\columnratio{0.25} diff --git a/model_5/resources/00_preamble.tex b/model_5/resources/00_preamble.tex new file mode 100755 index 0000000..eb1b7a5 --- /dev/null +++ b/model_5/resources/00_preamble.tex @@ -0,0 +1,25 @@ +\usepackage{calc} + +\usepackage[a4paper, top=0.5cm, bottom=0.5cm, outer=0.5cm, inner=0.5cm]{geometry} +\pagestyle{empty} +\pagenumbering{gobble} + +\newcommand{\DUrolelatex}[1]{#1} + +% 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} +\input{../common/10_levels.tex} +\input{../common/10_icons.tex} +\input{../common/99_sidebar.tex} diff --git a/model_5/resources/10_fonts.tex b/model_5/resources/10_fonts.tex new file mode 100755 index 0000000..befadd5 --- /dev/null +++ b/model_5/resources/10_fonts.tex @@ -0,0 +1,13 @@ +\usepackage{fontspec} +\setmainfont{Linux Libertine O} + +\newcommand{\DUtitletitle}[1]{% + {\begin{center}\textbf{\textsc{#1}}\end{center}} + } + +\setmonofont{Latin Modern Mono Light} +\newfontfamily\TitleFont + {EB Garamond} + [ Mapping=tex-text ] + +\newfontfamily\AltFont[Mapping=tex-text]{Linux Libertine O} diff --git a/model_5/resources/10_title_style.tex b/model_5/resources/10_title_style.tex new file mode 100755 index 0000000..eb62129 --- /dev/null +++ b/model_5/resources/10_title_style.tex @@ -0,0 +1,60 @@ +\usepackage[explicit]{titlesec} +\usepackage{pgfplots} +\pgfplotsset{compat=newest} + +\providecommand{\DUdocumentsubtitle}[1]{% + %\begin{nthcolumn}{1} + \color{black} + \em + \TitleFont\selectfont + \Large + #1 + %\end{nthcolumn} +} + +\makeatletter + +\def\@maketitle{% + \vspace*{1cm} + \begin{nthcolumn*}{0}% + \textcolor{altColor}{% + \huge \@title + } + \end{nthcolumn*} +} +\makeatother + +\newcommand\SecTitle[1]{% +\begin{tikzpicture} + + \node (A) at (0,0) + {\Large{\textsf{[ #1 ]}}}; + + \draw [line width=0.2mm] + (-7,0) -- (A.west); + + \draw [line width=0.2mm] + (A.east) -- (7,0); +\end{tikzpicture}} + +% Titre de niveau 1 +\titleformat{\section} + {\centering} + {\thesection} + {} + {\SecTitle{#1}} + +% Titre de niveau 2 +\titleformat{\subsection} + {\large} + {\thesubsection} + {} + {\textcolor{altColor}{\Large \bf {#1}}} + +% Titre de niveau 3 +\titleformat{\subsubsection} + {\bfseries\normalsize} + {\thesubsubsection} + {2em} + {} + {} diff --git a/model_5/resources/99_begin.tex b/model_5/resources/99_begin.tex new file mode 100755 index 0000000..7b7a793 --- /dev/null +++ b/model_5/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}{2} +} + diff --git a/model_5/resources/modules b/model_5/resources/modules new file mode 100755 index 0000000..079c678 --- /dev/null +++ b/model_5/resources/modules @@ -0,0 +1,13 @@ +tikz +parskip # Ne pas indenter la premiere ligne d'un paragraphe +setspace + +# Polices mathematiques. +amsmath +amsfonts +amssymb + +DUsmallcaps +pgfornament +paracol +lipsum -- cgit v1.2.3