You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

216 lines
5.0 KiB

3 years ago
\documentclass[a5, 10pt, twosides]{book}
\usepackage[utf8]{inputenc}
\usepackage{fontspec}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{fancyhdr}
\usepackage{fontenc}[T1]
\usepackage[raggedright]{titlesec}
\usepackage{tocloft}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{afterpage}
\usepackage{listings}
\usepackage{array} % for fixed width tables
\usepackage{tabularx} % for multiple alignments in cells
\usepackage[hang]{footmisc}
% \usepackage[a4,cross,pdftex,center]{crop} % cropmarks
\usepackage{perpage}
\usepackage{setspace}
\usepackage{hyphenat}
\usepackage{scrextend}
\usepackage{xcolor}
\usepackage{tcolorbox}
\usepackage{afterpage}
\usepackage{paralist}
\usepackage{caption}
\usepackage{ltablex}
\usepackage{vcell}
\usepackage{float}
3 years ago
\usepackage{calc}
\usepackage{etoolbox}
\usepackage[vskip=12pt,indentfirst=false, leftmargin=2em, rightmargin=2em]{quoting}
\usepackage{multicol}
3 years ago
\usepackage{yfonts}
\usepackage{graphicx}
\usepackage{pbox}
\usepackage{eso-pic}
\usepackage{xespotcolor}
\usepackage{hyperref}
3 years ago
\usepackage{changepage}
\hypersetup{
hidelinks, % Remove visible links altogether
%urlbordercolor = 1 1 1% Make URL link border white
}
3 years ago
% CONFIGURE PACKAGES
\usetikzlibrary{positioning}
\RequirePackage{fix-cm}
\tcbuselibrary{skins}
\setlength\LTpre{12pt}
\setlength\LTpost{12pt}
\makeatletter
\g@addto@macro{\newpage}{\nointerlineskip}
\makeatother
3 years ago
\newcommand\BackgroundPic{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight,%
keepaspectratio]{04_magic-magick/test_toc-03-white.png}%
\vfill
}}}
3 years ago
% CONFIGURE PACKAGES > SIZE
\geometry{a5paper,left=24mm,top=12mm,bottom=20mm,right=16mm}
% COMMANDS
\let\endchangemargin=\endlist
\setlength{\footnotemargin}{1em} % footnote space
% VARIABLES
3 years ago
\newcommand{\titlefontsize}{64pt}
\newcommand{\titlelineheight}{56pt}
3 years ago
\newcommand{\chapterfontsize}{24pt}
\newcommand{\chapterlineheight}{24pt}
\newcommand{\imgwidth}{\textwidth}
\newcommand{\imgdir}{../00_contributions/FINAL/}
\newcommand{\ballsize}{7mm}
3 years ago
% VARIABLES > CHAPTER SIGNS
\newcommand{\chaptersignone}{*}
\newcommand{\chaptersigntwo}{}
\newcommand{\chaptersignthree}{}
\newcommand{\chaptersignfour}{§}
\newcommand{\chaptersignfive}{}
\newcommand{\chaptersignsix}{}
3 years ago
% FONT-FACES
\setmainfont[Scale=0.95]{Arial}
\setsansfont[Scale=0.95]{Arial}
\setmonofont[Scale=0.95]{Courier}
\newfontfamily\sectionfont{Times}[ItalicFont ={* Italic},
BoldFont ={* Bold},
BoldItalicFont={* Bold Italic}]
% PAGE STYLES
% All pages
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{}
\fancyhead[RE,LO]{}
\fancyfoot[CE,CO]{}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Chapter pages
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[LE,RO]{\fontsize{\chapterfontsize}{\chapterlineheight}\selectfont\bfseries\thepage}
\fancyfoot[LO,RE]{\fontsize{\chapterfontsize}{\chapterlineheight}\selectfont\bfseries\thechapter}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\fontruleskip}{0pt}
\renewcommand{\headruleskip}{0pt}
3 years ago
}
% COVER
\usetikzlibrary{positioning,fadings,through}
\definecolor{left} {HTML}{000000}
\title{''Titre du livre''}
\author{''Nom de l'auteur''}
\date{''date de fin de rédaction''}
% CONTENTS
\renewcommand{\contentsname}{}
\renewcommand\cftchapfont{\bfseries}
\renewcommand\cftchappagefont{\bfseries}
% CHAPTER
\renewcommand{\chaptername}{}
\renewcommand{\thechapter}{\fnsymbol{chapter}}
\titleformat{\chapter}[block]{\bfseries\fontsize{\chapterfontsize}{\chapterlineheight}\selectfont}{\chaptername}{0pt}{}
3 years ago
\titlespacing{\chapter}{0pt}{0pt}{0pt}
% SECTION
\renewcommand{\thesection}{\arabic{section}}
\titleformat{\section}[block]{\sectionfont\fontsize{\chapterfontsize}{\chapterlineheight}\selectfont}{}{0pt}{}
\titlespacing{\section}{2em}{12pt}{8pt}{}
3 years ago
% SUBSECTION
\renewcommand{\thesubsection}{\arabic{subsection}}
\titleformat{\subsection}[block]{\bfseries\fontsize{10pt
}{12pt}\selectfont}{}{0pt}{}
\titlespacing{\subsection}{0pt}{12pt}{12pt}{}
3 years ago
% SUBSUBSECTION
\renewcommand{\thesubsubsection}{\arabic{subsubsection}}
\titleformat{\subsubsection}[block]{\sectionfont\fontsize{11pt}{12pt}\selectfont}{}{0pt}{}
\titlespacing{\subsubsection}{24pt}{12pt}{8pt}{}
3 years ago
% PARAGRAPHS
\setlength{\parindent}{2em}
\setlength{\parskip}{0pt}
3 years ago
\renewcommand{\baselinestretch}{1.0}
% CODE STYLE
\lstset{
3 years ago
aboveskip=12pt,
belowskip=12pt,
3 years ago
showstringspaces=false,
columns=flexible,
3 years ago
basicstyle={\ttfamily\fontsize{9pt}{12pt}\selectfont},
3 years ago
numbers=none,
numberstyle=\tiny,
keywordstyle=\bfseries,
commentstyle=
stringstyle=,
breaklines=true,
breakatwhitespace=true,
tabsize=3espace=true,
tabsize=3
}
\setlength{\textfloatsep}{0cm}
% FOOTNOTE
\begin{document}
\setlength{\baselineskip}{12pt}
\frenchspacing
\urlstyle{sf}
\tcbset{enhanced}
\nointerlineskip
3 years ago
% CONTENTS
% \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
% \vspace*{-8\baselineskip}
% \tableofcontents{\thispagestyle{empty}}
% \clearpage{\thispagestyle{empty}\cleardoublepage}