first commit

This commit is contained in:
François Pelletier 2021-07-02 16:04:55 -04:00
commit 99c4ca5204
7 changed files with 748 additions and 0 deletions

290
.gitignore vendored Normal file
View file

@ -0,0 +1,290 @@
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
*.ptc
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
main.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib

Binary file not shown.

4
StyleInd.ist Executable file
View file

@ -0,0 +1,4 @@
delim_0 "\\dotfill\ "
delim_1 "\\dotfill\ "
headings_flag 1
heading_prefix "\\nopagebreak\n\\tikz\\node at (0pt,0pt) [draw=none,fill=ocre!50,line width=1pt,inner sep=5pt]{\\parbox{\\linewidth-2\\fboxsep-2\\fboxrule-2pt}{\\centering\\large\\sffamily\\bfseries\\textcolor{white}{" heading_suffix "}}};\\vspace*{0.2cm}\\nopagebreak\n"

24
guide-preparation-vacances.bib Executable file
View file

@ -0,0 +1,24 @@
@book{book_key,
address = {City},
publisher = {Publisher},
author = {Smith, John},
title = {Book title},
year = {2012},
volume = {3},
series = {2},
edition = {1},
pages = {123--200},
month = {January}
}
@article{article_key,
address = {City},
publisher = {Publisher},
author = {Smith, James},
title = {Article title},
year = {2013},
volume = {14},
number = {6},
pages = {1--8},
month = {March}
}

136
main.tex Executable file
View file

@ -0,0 +1,136 @@
\documentclass[12pt]{book}
\input{structure.tex}
\begin{document}
%pagetitre
\begingroup
\thispagestyle{empty} % Suppress headers and footers on the title page
\begin{tikzpicture}[remember picture,overlay]
\node[inner sep=0pt] (background) at (current page.center) {\includegraphics[width=\paperwidth]{background-guide-preparation-vacances.pdf}};
\draw (current page.center) node [fill=turquoisefonce!30!white,fill opacity=0.6,text opacity=1,inner sep=1cm]{\Huge\centering\bfseries\sffamily\parbox[c][][t]{\paperwidth}{\centering Sur la route de l'autonomie,\\un guide de préparation de vacances\\[15pt] % Book title
{\Large Un guide 100\% logiciel libre}\\[20pt] % Subtitle
{\huge Je valide ça, par François Pelletier}}}; % Author name
\end{tikzpicture}
\vfill
\endgroup
%colophon
\newpage
~\vfill
\thispagestyle{empty}
\noindent Certains droits réservés \copyright\ 2021 Je valide ça, par François Pelletier\\
\noindent \url{https://jevalide.ca}\\
\noindent Cette œuvre est mise à disposition sous licence Attribution - Pas dUtilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International. Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-sa/4.0/ ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.\\
\noindent \textit{Publié le 12 juillet 2021} % Printing/edition date
%table des matières
\usechapterimagefalse
\pagestyle{empty}
\tableofcontents
\cleardoublepage
\pagestyle{fancy}
\usechapterimagetrue
%section 1
\part{Passer au pilote automatique}
\chapterimage{chapter-cover-ebook-guide-preparation-vacances.pdf}
\chapter{Automatiser ses tâches récurrentes}
\section{Paragraphe 1-1}
\lipsum[1-5]
\chapter{Rediriger ses alertes courriel}
\section{Paragraphe 2-1}
\lipsum[1-5]
\chapter{Préparer ses sauvegardes}
\section{Paragraphe 3-1}
\lipsum[1-5]
\chapter{Faire ses mises à jour}
\section{Paragraphe 4-1}
\lipsum[1-5]
%section 2
\part{Un séjour en autohébergement simple}
\chapterimage{chapter-cover-ebook-guide-preparation-vacances.pdf}
\chapter{Classer ses photos de voyage}
\section{Paragraphe 1-2}
\lipsum[1-5]
\chapter{Assembler un recueil de recettes exotiques}
\section{Paragraphe 2-2}
\lipsum[1-5]
\chapter{Définir un parcours touristique}
\section{Paragraphe 3-2}
\lipsum[1-5]
\chapter{Préparer son journal de bord}
\section{Paragraphe 4-2}
\lipsum[1-5]
%section 3
\part{De l'analyse à la détente}
\chapterimage{chapter-cover-ebook-guide-preparation-vacances.pdf}
\chapter{Optimiser ses dépenses}
\section{Paragraphe 1-3}
\lipsum[1-5]
\chapter{Identifier les meilleures sorties en ville}
\section{Paragraphe 2-3}
\lipsum[1-5]
\chapter{Résumer les avis sur un restaurant}
\section{Paragraphe 3-3}
\lipsum[1-5]
\chapter{Éviter le plus possible les travaux routiers}
\section{Paragraphe 4-3}
\lipsum[1-5]
\phantomsection
\chapter*{Bibliographie}
\addcontentsline{toc}{chapter}{\textcolor{turquoisefonce}{Références}}
\printbibliography[heading=bibempty]
\section*{Livres}
\addcontentsline{toc}{section}{Articles}
\printbibliography[heading=bibempty,type=books]
\section*{Sites web}
\addcontentsline{toc}{section}{Sites web}
\printbibliography[heading=bibempty,type=web]
\cleardoublepage
\phantomsection
\setlength{\columnsep}{0.75cm}
\addcontentsline{toc}{chapter}{\textcolor{turquoisefonce}{Index}}
\printindex
\end{document}

294
structure.tex Executable file
View file

@ -0,0 +1,294 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel} % Césure en français
\usepackage{graphicx}
\graphicspath{{Images/}}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{xcolor}
\definecolor{turquoisefonce}{RGB}{3, 152, 158}
\definecolor{vertdeau}{RGB}{0, 194, 203}
\definecolor{turquoisevif}{RGB}{92, 225, 230}
\definecolor{black}{RGB}{0, 0, 0}
% options
\setlist{nolistsep}
\usepackage{geometry}
\geometry{
paper=letterpaper,
top=2cm,
bottom=2cm,
left=2cm,
right=2cm,
headheight=16pt,
footskip=1.4cm,
headsep=12pt,
}
\usepackage{avant}
\usepackage{mathptmx}
\usepackage{microtype}
\usepackage[style=reading,citestyle=reading,sorting=nyt]{biblatex}
\addbibresource{guide-preparation-vacances.bib}
\defbibheading{bibempty}{}
\usepackage{calc}
\usepackage{makeidx}
\makeindex
\usepackage{titletoc} % Required for manipulating the table of contents
\contentsmargin{0cm} % Removes the default margin
% styles de titres
\titlecontents{part}
[0cm]
{\addvspace{20pt}\bfseries}
{}
{}
{}
\titlecontents{chapter}
[1cm]
{\addvspace{12pt}\large\sffamily\bfseries}
{\color{turquoisefonce!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{turquoisefonce}}
{\color{turquoisefonce}} {\color{turquoisefonce!60}\normalsize\;\titlerule*[.5pc]{.}\;\thecontentspage}
\titlecontents{section}
[1cm]
{\addvspace{4pt}\sffamily\bfseries}
{\contentslabel[\thecontentslabel]{1cm}}
{}
{\hfill\color{black}\thecontentspage}
\titlecontents{subsection}
[1cm]
{\addvspace{2pt}\sffamily\small}
{\contentslabel[\thecontentslabel]{1cm}}
{}
{\ \titlerule*[.5pc]{.}\;\thecontentspage}
\titlecontents{figure}
[1cm]
{\addvspace{2pt}\sffamily\small}
{\thecontentslabel\hspace*{1em}}
{}
{\ \titlerule*[.5pc]{.}\;\thecontentspage}
\titlecontents{table}
[1]
{\addvspace{2pt}\sffamily\small}
{\thecontentslabel\hspace*{1em}}
{}
{\ \titlerule*[.5pc]{.}\;\thecontentspage}
% styles de titres sur page de partie
\titlecontents{lchapter}
[0em]
{\addvspace{15pt}\large\sffamily\bfseries}
{\color{turquoisefonce}\contentslabel[\Large\thecontentslabel]{1cm}\color{turquoisefonce}}
{}
{\color{turquoisefonce}\normalsize\sffamily\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage}
\titlecontents{lsection}
[0em]
{\sffamily\small}
{\contentslabel[\thecontentslabel]{1cm}}
{}
{}
\titlecontents{lsubsection}
[.5em] % Left indentation
{\sffamily\footnotesize} % Spacing and font options for subsections
{\contentslabel[\thecontentslabel]{1cm}}
{}
{}
% entête et pied de page
\usepackage{fancyhdr}
\pagestyle{fancy}
\newcommand*\parttitle{}
\let\origpart\part
\renewcommand*{\part}[2][]{%
\ifx\\#1\\
\origpart{#2}%
\renewcommand*\parttitle{#2}%
\else
\origpart[#1]{#2}%
\renewcommand*\parttitle{#1}%
\fi
}
\renewcommand{\chaptermark}[1]{\markboth{\sffamily\normalsize\bfseries\chaptername\ \thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\sffamily\normalsize\thesection\hspace{5pt}#1}{}}
\fancyhf{}
\fancyhead[LE,RO]{\sffamily\normalsize\thepage}
\fancyhead[LO]{\rightmark}
\fancyhead[RE]{\leftmark}
%\fancyfoot[C]{\thepart. \parttitle}
\renewcommand{\headrulewidth}{0.5pt}
\fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}
\makeatletter
\renewcommand{\cleardoublepage}{
\clearpage\ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\thispagestyle{empty}
\newpage
\fi}
\makeatletter
\renewcommand{\@seccntformat}[1]{\llap{\textcolor{turquoisefonce}{\csname the#1\endcsname}\hspace{1em}}}
\renewcommand{\section}{\@startsection{section}{1}{\z@}
{-4ex \@plus -1ex \@minus -.4ex}
{1ex \@plus.2ex }
{\normalfont\large\sffamily\bfseries}}
\renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}
{-3ex \@plus -0.1ex \@minus -.4ex}
{0.5ex \@plus.2ex }
{\normalfont\sffamily\bfseries}}
\renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}
{-2ex \@plus -0.1ex \@minus -.2ex}
{.2ex \@plus.2ex }
{\normalfont\small\sffamily\bfseries}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}
{-2ex \@plus-.2ex \@minus .2ex}
{.1ex}
{\normalfont\small\sffamily\bfseries}}
\newcommand{\@mypartnumtocformat}[2]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{turquoisefonce!20}{\strut\parbox[c][.7cm]{\ecart}{\color{turquoisefonce!70}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{turquoisefonce!40}{\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}%
}
\newcommand{\@myparttocformat}[1]{%
\setlength\fboxsep{0pt}%
\noindent\colorbox{turquoisefonce!40}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}%
}
\newlength\esp
\setlength\esp{4pt}
\newlength\ecart
\setlength\ecart{1.2cm-\esp}
\newcommand{\thepartimage}{}%
\newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax%
\refstepcounter{part}%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ ---\ #1}}
\else%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
\fi%
\startcontents%
\markboth{}{}%
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[turquoisefonce!10](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{15cm}{
\printcontents{l}{0}{\setcounter{tocdepth}{1}}
}};
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{18cm}{\strut\raggedleft\color{turquoisefonce!60!white}\fontsize{30}{30}\sffamily\bfseries\thepart.#2}};
\end{tikzpicture}};
\end{tikzpicture}}%
\@endpart}
\def\@spart#1{%
\startcontents%
\phantomsection
{\thispagestyle{empty}%
\begin{tikzpicture}[remember picture,overlay]%
\node at (current page.north west){\begin{tikzpicture}[remember picture,overlay]%
\fill[turquoisefonce!10](0cm,0cm) rectangle (\paperwidth,-\paperheight);
\node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{turquoisefonce!60!white}\fontsize{30}{30}\sffamily\bfseries#1}};
\end{tikzpicture}};
\end{tikzpicture}}
\addcontentsline{toc}{part}{\texorpdfstring{%
\setlength\fboxsep{0pt}%
\noindent\protect\colorbox{turquoisefonce!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}
\newif\ifusechapterimage
\usechapterimagetrue
\newcommand{\thechapterimage}{}%
\newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%
\newcommand{\autodot}{.}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=turquoisefonce,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\else
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=2pt,rounded corners=15pt,draw=turquoisefonce,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-9cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\fi\fi\par\vspace*{270\p@}}}
%-------------------------------------------
\def\@makeschapterhead#1{%
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.north west)
{\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};
\draw[anchor=west] (\Gm@lmargin,-5cm) node [line width=2pt,rounded corners=15pt,draw=turquoisefonce,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};
\draw[anchor=west] (\Gm@lmargin+.3cm,-5cm) node {\huge\sffamily\bfseries\color{black}#1\strut};
\end{tikzpicture}};
\end{tikzpicture}
\par\vspace*{270\p@}}
\makeatother
\usepackage{hyperref}
\usepackage{xcolor}
\hypersetup{
colorlinks,
linkcolor={turquoisefonce!50!black},
citecolor={turquoisevif!50!black},
urlcolor={turquoisevif!80!black}
}
\usepackage{bookmark}
\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=turquoisefonce,bold}%
\fi
}
}