Created
December 12, 2016 08:59
-
-
Save ar7hur/7316def61afa410db84b23bc4dd6d8d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% XeLaTeX can use any Mac OS X font. See the setromanfont command below. | |
% Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source. | |
% The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding. | |
%!TEX TS-program = xelatex | |
%!TEX encoding = UTF-8 Unicode | |
\documentclass[11pt,openany,showtrims]{memoir} %showtrims removed for final PDF | |
\usepackage{graphicx} | |
\usepackage{array} % centrage figures | |
\usepackage{polyglossia} | |
\setdefaultlanguage{french} | |
% printing on Blurb (6" x 9", bleed) | |
\setstocksize{234.95mm}{155.57mm} | |
\settrimmedsize{228.61mm}{152.4mm}{*} | |
\settrims{3.17mm}{3.17mm} % top and outside edges | |
\setlrmarginsandblock{20mm}{15mm}{*} % "Steve Jobs" margins topxoutxbottomxinside 15 15 12 20 | |
\setulmarginsandblock{19.76mm}{14mm}{*} % upper margin was 20mm, minus 0.24mm because of higher footer | |
\setheadfoot{14.3pt}{\footskip} % because of the À (original header was 13.6pt high; added 0.7pt = 0.24mm) | |
% printing on Lulu (Royal: 15.593cm x 23.389cm, no bleed) | |
% \setstocksize{233.89mm}{155.93mm} | |
% \settrimmedsize{233.89mm}{155.93mm}{*} % no bleed - larger than 6x9: 5.28mm x 3.53mm | |
% \setlrmarginsandblock{20mm}{18.53mm}{*} % added 3.53mm to outer margin | |
% \setulmarginsandblock{23mm}{16.04mm}{*} % added 3.24mm to upper, 2.04mm to lower | |
% \setheadfoot{14.3pt}{\footskip} % because of the À (original header was 13.6pt high; added 0.7pt = 0.24mm) | |
\checkandfixthelayout | |
\makeatletter | |
% fix for line breaks before ":", see http://tex.stackexchange.com/questions/330844/prevent-line-break-before | |
\XeTeXinterchartoks 4095 \french@punctthin = {\xpg@unskip\nobreak\thinspace}% | |
\XeTeXinterchartoks 4095 \french@punctthick = {\xpg@unskip\nobreakspace}% | |
% toc vertical spacing | |
\setlength{\cftbeforepartskip}{1em \@plus\p@} % default is ?, could add more as long as toc fits on 4 pages | |
\setlength{\cftbeforechapterskip}{0.1em \@plus\p@} % default is 1.0em | |
\makeatother | |
\usepackage[threshold=0]{csquotes} | |
% fix for spaces inside guillemets http://tex.stackexchange.com/questions/331214/space-inside-french-guillemets | |
\DeclareQuoteStyle[quotes]{french} | |
{\mkfrenchopenquote{«}} | |
{\mkfrenchclosequote{\nobreakspace»}} | |
{\textquotedblleft} | |
{\textquotedblright} | |
\DeclareQuoteStyle[quotes*]{french} | |
{\mkfrenchopenquote{«}} | |
{\mkfrenchclosequote{\nobreakspace»}} | |
{\mkfrenchopenquote{\textquotedblleft}} | |
{\mkfrenchclosequote{\textquotedblright}} | |
\DeclareQuoteStyle[guillemets]{french} | |
[\initfrenchquotes] | |
{\mkfrenchopenquote{«}} | |
[\mkfrenchopenquote{«}] | |
{\mkfrenchclosequote{\nobreakspace»}} | |
{\mkfrenchopenquote{«}} | |
[\mkfrenchopenquote{«}] | |
{\mkfrenchclosequote{\nobreakspace»}} | |
\DeclareQuoteStyle[guillemets*]{french} | |
[\initfrenchquotes] | |
{\mkfrenchopenquote{«}} | |
[\mkfrenchopenquote{\nobreakspace»}] | |
{\mkfrenchclosequote{\nobreakspace»}} | |
{\mkfrenchopenquote{«}} | |
[\mkfrenchopenquote{\nobreakspace»}] | |
{\mkfrenchclosequote{\nobreakspace»}} | |
\MakeOuterQuote{"} | |
\usepackage{xifthen} % for variable arity newcommand | |
\usepackage{hyperref} % for \url | |
\usepackage{changepage} % for the adjustwidth environment | |
\setmainfont{Hoefler Text} | |
\setsansfont[Scale=MatchLowercase]{Gill Sans} | |
\setmonofont[Scale=MatchLowercase]{Andale Mono} | |
% Headers --- | |
\addtopsmarks{headings}{}{ | |
\createmark{chapter}{left}{nonumber}{}{} | |
} | |
\pagestyle{headings} % activate changes | |
\makeevenhead{headings}{\thepage}{\small VOILÀ, C'EST DIT !}{} | |
\makeoddhead{headings}{}{\small\leftmark}{\thepage} | |
% remove page numbers from chapter and part pages | |
\copypagestyle{chapter}{plain} | |
\makeoddfoot{chapter}{}{}{} | |
\makeevenfoot{chapter}{}{}{} | |
\copypagestyle{part}{plain} | |
\makeoddfoot{part}{}{}{} | |
\makeevenfoot{part}{}{}{} | |
% Headings --- | |
\chapterstyle{dash} | |
% section heading style | |
\setsecheadstyle{\normalfont\itshape} | |
% don't number sections | |
\setsecnumdepth{chapter} | |
% super important | |
\tolerance=1000 % default was 400 | |
% Custom commands --- | |
\newcommand\PostDate[1]{ | |
{\large \emph{#1}}} | |
\newcommand\Chapter[2]{ | |
\chapter[#1]{#1 (\emph{#2})}} % the first arg is used for heading | |
\newcommand\q[2]{ | |
\ifthenelse{\equal{#2}{}}{\blockquote{#1}}{\blockquote[#2]{#1}}} | |
\newcommand\itw[2]{ % interview question and response | |
\noindent\textbf{#1}\par | |
\smallskip | |
\noindent{#2}\par | |
\bigskip | |
} | |
\newcommand\p[2]{ % poem | |
\begin{verse} | |
{\itshape #1} | |
\ifthenelse{\equal{#2}{}}{}{(#2)} | |
\end{verse}} | |
\def\el{\textelp{}\ } % ellipsis | |
\def\els{\textelp{}} % ellipsis without space (when before.) | |
\newcommand\pic[3]{ | |
\begin{figure}[htbp] | |
\centering | |
\includegraphics[width=#2cm]{images/#1}\\ | |
\emph{#3} | |
\end{figure}} | |
% Start --------------------------- | |
\begin{document} | |
% White page for dedicace | |
\mbox{} | |
\thispagestyle{empty} | |
\newpage | |
% Title page --- | |
\cleardoublepage | |
\thispagestyle{empty} % no page number on title page | |
% \author{Gérard Lebrun} % useless since we don't use maketitle | |
% \title{Voilà, c'est dit !} | |
{\centering | |
{\scshape Gérard Lebrun}\\[\baselineskip] | |
\vspace{5.5cm} | |
{\Huge\bfseries Voilà, c'est dit !}\\[\baselineskip] | |
{\scshape Extraits des chroniques\\du blog \emph{voilacestdit}}\\ | |
%\vspace{0.5cm} | |
{\scshape (2008 -- 2016)\par} | |
%\vfill | |
%{\scshape 2008 -- 2016\par} | |
} | |
\clearpage | |
\thispagestyle{empty} | |
\mbox{} | |
\vfill | |
\noindent{\centering \small {\scshape En couverture :} nature morte (huile) réalisée par Gérard en 1950\\à l'âge de douze ans.\par} | |
% Dedication | |
\cleardoublepage | |
\thispagestyle{empty} % no page number on title page | |
\mbox{} | |
\vspace{3.5cm} | |
\begin{flushright}% | |
\setlength{\rightskip}{3em}% | |
\emph{À Chantal\\Alexandre\\\& Éléonore} | |
\end{flushright} | |
% Exergue | |
\cleardoublepage | |
\thispagestyle{empty} % no page number on title page | |
\mbox{} | |
\vspace{5.5cm} | |
\begin{adjustwidth}{3cm}{} | |
\begin{verse} | |
{\itshape | |
Tu es pressé d’écrire,\\ | |
Comme si tu étais en retard sur la vie.\\ | |
S’il en est ainsi fais cortège à tes sources.\\ | |
Hâte-toi.\\ | |
Hâte-toi de transmettre\\ | |
Ta part de merveilleux de rébellion de bienveillance.} | |
René Char, \emph{Commune présence} | |
\end{verse} | |
\end{adjustwidth} | |
% Table of contents ------------------------ | |
\maxtocdepth{chapter} | |
\renewcommand*{\cftchapterfont}{\normalfont} % http://tex.stackexchange.com/questions/196598/remove-bold-from-table-of-contents | |
\renewcommand*{\cftchapterpagefont}{\normalfont} % ibid | |
\renewcommand{\contentsname}{Sommaire} | |
\cleardoublepage | |
\tableofcontents* | |
% Main content --------------- | |
% Extra blank page to avoid 1st part to start right after TOC | |
\cleardoublepage | |
\thispagestyle{empty} | |
\mbox{} | |
\include{part1} | |
\include{part2a} | |
\include{part2b} | |
\include{part2c} | |
\include{part2d} | |
\include{part2e} | |
\include{part2f} | |
\include{part2g} | |
\include{part3a} | |
\include{part3b} | |
\include{part3c} | |
\include{part3d} | |
\include{part3e} | |
\include{part4a} | |
\include{part4b} | |
\include{part5} | |
\include{part6} | |
\include{part7} | |
\include{part8} | |
% Remerciements -------------------------- | |
\cleardoublepage | |
\thispagestyle{empty} % no page number on title page | |
\mbox{} | |
\vspace{5.5cm} | |
\begin{adjustwidth}{1cm}{} | |
\emph{Tous mes remerciements à mon "éditeur" Alexandre qui s'est passionné pour la réalisation technique de ce livre en} \LaTeX\ \emph{à partir des fichiers du blog.} | |
\end{adjustwidth} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment