-
Notifications
You must be signed in to change notification settings - Fork 1
/
sagesse.sty
412 lines (352 loc) · 11.9 KB
/
sagesse.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
\ProvidesPackage{sagesse}
\newcommand*{\@dv@numberlines}{0}
\DeclareOption{numberlines}{\renewcommand{\@dv@numberlines}{1}}
\let\@dv@chapterpages\@empty
\newif\if@dv@chapterpages
\DeclareOption{chapterpages}{\@dv@chapterpagestrue}
\let\@dv@nochecksec\@empty
\DeclareOption{noseccheck}{\def\@dv@nochecksec{true}}
\ProcessOptions
% HRule
\newcommand{\HRule}{\rule{\linewidth}{0.2mm}}
\newcommand\subtitleskip{\\[0.4em]}
% We fill dynamically
\setlength{\jrnldayafterskip}{\fill}
\setlength{\jrnldaysepskip}{-\baselineskip}
\renewcommand{\jrnl@seclblstyle}{%
\ifthenelse{\isodd{\thepage}}{\raggedleft}{\raggedright}%
\normalfont\scshape\Large%
}
% Book title
\newcommand{\booktitle}[3]{%
\dayheadfont\textsc{\large#1}
\\[1.5cm]
\HRule \\[0.4cm]
\textsc{\Huge#2}\\[0.3cm]
\HRule \\[1.5cm]
{\LARGE#3}\\[1.5cm]
}
\newcommand\subfaketitleskip{\\[0.3em]}
\newcommand{\bookfaketitle}[3]{%
\parbox{0.7\textwidth}{%
\begin{center}
%\textsc{#1}
%\\[1cm]
%\HRule \\[0.3cm]
\dayheadfont\textsc{\LARGE#2}\\[0.3cm]
%
%\HRule \\[1cm]
%{\large#3}\\[1cm]
\end{center}
}
}
% Intro signature
\newcommand{\signature}[1]{%
\vspace{1cm}\parbox{4in}{\raggedleft{\large\emph{#1}}}
}
% Package scrpage2 for headers
\usepackage{scrpage2}
% colon, frenchb's definition
\newcommand\frcolon{%
\ifhmode
\ifdim\lastskip>\z@
\unskip\penalty\@M\Fcolonspace
\else
\FDP@colonspace
\fi
\fi
\string:\space}
% setting lettrines
\usepackage{type1cm} % scalable fonts
\usepackage{lettrine}
\usepackage{xcolor}
\usepackage{ifluatex}
% Wrapper for TeX4HT
\newcommand{\Og}{\og}
\newcommand{\Fg}{\fg{}}
% fonts
\ifluatex
\usepackage{fontspec}
%\defaultfontfeatures{Mapping=tex-text}
\defaultfontfeatures{Ligatures=TeX}
%\setmainfont{Minion Pro}
\setmainfont[OpticalSize=12]{EB Garamond}
\newfontfamily\smallfont[Scale=0.99]{EB Garamond}
\newfontfamily\ssmallfont[Scale=0.98]{EB Garamond}
\newfontfamily\sssmallfont[Scale=0.97]{EB Garamond}
%\setmainfont[Numbers=OldStyle]{Linux Libertine O}
%\newfontfamily\dayheadfont[Scale=1.1,LetterSpace=0.8]{Goudy Trajan}
%\newfontfamily\dayheadfont[Scale=2.9]{Goldwater}
%\newfontfamily\dayheadfont[Scale=2.5,LetterSpace=2]{Latino Elongated LET}
%\newfontfamily\dayheadfont[Scale=1.6]{Nimbus Sans L Regular Condensed}
%\newfontfamily\dayheadfont[Scale=1.3]{DejaVu Sans Condensed}
%\newfontfamily\dayheadfont[Scale=1.2]{DejaVu Serif Condensed}
%\newfontfamily\dayheadfont[Scale=1,LetterSpace=0.2]{Charlemagne Std}
%\newfontfamily\dayheadfont[Scale=1.7]{SF Covington Cond}
%\newfontfamily\dayheadfont[Scale=1.7]{SF Covington SC Cond}
%\newfontfamily\dayheadfont[Scale=2.2]{ModernTypOgraphy}
%\newfontfamily\dayheadfont[Scale=1.5]{Gladifilthefte}
%\newfontfamily\dayheadfont[Scale=1.8]{Six Caps}
%\newfontfamily\dayheadfont[Scale=1.8]{Grov Condensed}
%\newfontfamily\dayheadfont[Scale=1.8]{WinterthurCondensed}
%\newfontfamily\dayheadfont[Scale=1.4]{Myriad Pro}
%\newfontfamily\dayheadfont[Scale=1.4]{Minion Pro}
%\newfontfamily\dayheadfont[Scale=1.6]{Minion Pro Semibold Cond Display}
%\newfontfamily\dayheadfont[Scale=1.5,Letters=SmallCaps]{Minion Pro Semibold Cond Display}
%\newfontfamily\dayheadfont[Scale=1.8]{Minion Pro Cond Display}
%\newfontfamily\dayheadfont[Scale=1.6,Letters=SmallCaps]{Minion Pro Cond Display}
%\newfontfamily\dayheadfont[Scale=1.6]{Garamond Book Condensed SSi}
%\newfontfamily\dayheadfont[Scale=1.35,Letters=SmallCaps]{EB Garamond}
\newfontfamily\dayheadfont[Scale=1.35,Letters=SmallCaps]{IMFELLGreatPrimerPRO}
%\newfontfamily\dayheadfont[Scale=1.5,Letters=SmallCaps]{EBGaramond08-SC}
%\newfontfamily\dayheadfont[Scale=1.6,Letters=SmallCaps]{EB Garamond Condensed}
%\newfontfamily\dayheadfont[Scale=1.7]{GarmdITC BkCn BT}
%\newfontfamily\dayheadfont[Scale=1.7]{Garamond Premier Pro Bold Display}
%\newfontfamily\dayheadfont[Scale=1.3,Letters=SmallCaps]{Garamond Premier Pro Bold Display}
%\newfontfamily\dayheadfont[Scale=1.7]{Garamond Premier Pro Semibold Display}
%\newfontfamily\dayheadfont[Scale=1.3,Letters=SmallCaps]{Garamond Premier Pro Semibold Display}
%\newfontfamily\dayheadfont[Scale=2]{Bodoni MT Condensed}
%\newfontfamily\monthheadfont[Scale=5,LetterSpace=2]{Latino Elongated LET}
\newfontfamily\monthheadfont[Scale=5,LetterSpace=2]{EB Garamond}
%\newfontfamily\dayheadfont[Scale=2.5,Letters=SmallCaps]{[LatinoElongatedLetPlainSC.otf]}
%\newfontfamily\monthheadfont[Scale=2.5,Letters=SmallCaps]{[LatinoElongatedLetPlainSC.otf]}
%\newfontfamily\lettrinefont{Caslon Initials}
\else
\newcommand\smallfont{}
\newcommand\ssmallfont{}
\newcommand\sssmallfont{}
\fi
% Tune chapter headings
\usepackage{fancybox}
\usepackage{fourier-orns}
\usepackage{ragged2e}
% Use ifpdf to generate ebook
\usepackage{ifpdf}
% Make day number in month, in french
\usepackage{ifthen}
% Note du traducteur
\newcommand{\NdT}[1]{\footnote{NdT\frcolon #1}}
% Use footnote package when footnotes (or NdT)
% are called from within \dvquote
% Warning:Load footnote after xcolor
\usepackage{footnote}
\usepackage[bottom,symbol*]{footmisc}
%\setfnsymbol{wiley}
\frenchbsetup{
FrenchFootnotes=false,
AutoSpaceFootnotes=false
}
\usepackage{chngcntr}
\counterwithin*{footnote}{section}
% Lettrines
\renewcommand{\LettrineFontHook}{\color[gray]{0.6}}
% Number lines
\makeatletter
\ifthenelse{\@dv@numberlines=1}{
\usepackage{lineno}%
\pagewiselinenumbers
}
\newcommand{\stoplinenumbers}{%
\ifthenelse{\@dv@numberlines=1}%
{\nolinenumbers}{}%
}
\newcommand{\startlinenumbers}{%
\ifthenelse{\@dv@numberlines=1}%
{\linenumbers}{}%
}
\newcommand{\setinternallinenumbers}[1]{%
\ifthenelse{\@dv@numberlines=1}%
{%
\internallinenumbers%
\renewcommand{\thelinenumber}{#1\arabic{linenumber}}%
\resetlinenumber%
}{}
}
% Lengths for boxes
\newlength{\outparbox}%
\newlength{\inparbox}%
\newlength{\vspaceparbox}%
% opening quote
\newcommand{\dvquote}[3][0.9\textwidth]{%
\stoplinenumbers%
\setlength{\outparbox}{#1}%
\setlength{\vspaceparbox}{-0.07\inparbox}%
\vfill
\begin{center}\parbox{\outparbox}{%
\begin{Center}%
\hyphenpenalty=10000%
\setinternallinenumbers{q}%
\begin{itshape}#2\end{itshape}\\[1.2mm]
\ocadr{}\textsc{#3}%
\end{Center}%
}\end{center}\vspace{\vspaceparbox}%
\vfill
\startlinenumbers%
}
% justify or center
\newsavebox{\@justcentbox}%
\newcommand{\justifyorcenter}[1]{%
\sbox \@justcentbox{#1}%
\ifdim \wd \@justcentbox >\hsize #1%
\else \centerline{\usebox{\@justcentbox}} \fi
}
% central quote, generic
\newcommand{\dvboxgeneric}[2][0.9\textwidth]{%
\stoplinenumbers%
\setlength{\outparbox}{#1}%
\setlength{\inparbox}{0.9\outparbox}%
\setlength{\vspaceparbox}{0.03\inparbox}%
\vfill
\begin{center}\doublebox{%
\parbox{\outparbox}{%
\vspace{\vspaceparbox}%
\begin{Center}%
\@raggedtwoe@spaceskipfalse%
\@raggedtwoe@everyselectfont%
\parbox{\inparbox}{%
\setinternallinenumbers{b}%
\hyphenpenalty=1000%
#2%
}%
\end{Center}%
\vspace{\vspaceparbox}%
}%
}\end{center}%
\vfill
\startlinenumbers%
}
% justifyorcenter
\newcommand{\dvbox}[2][0.9\textwidth]{%
\dvboxgeneric[#1]{%
\justifyorcenter{\large\textsc{#2}}%
}%
}
% no justifyorcenter, required for enumerate
\newcommand{\dvboxnocenter}[2][0.9\textwidth]{%
\dvboxgeneric[#1]{%
\large\textsc{#2}%
}%
}
% ending prayer
\newcommand{\dvprayer}[3][0.8\textwidth]{
\stoplinenumbers%
\begin{center}\parbox{#1}{%
\ifthenelse{\@dv@numberlines=1}%
{\nolinenumbers}{}%
\begin{Center}%
\hyphenpenalty=10000%
\setinternallinenumbers{p}%
\begin{itshape}#2\end{itshape}\\[1.2mm]
\scshape#3%
\end{Center}%
}\end{center}
\startlinenumbers%
}
\makeatother
\usepackage{pifont}
\usepackage{graphicx}
% Minion ornaments, see MinionPro.pdf, page 6
\newcommand{\rightrule}{\Pisymbol{MinionPro-Extra}{121}}
\newcommand{\leftrule}{\reflectbox{\rightrule}}
\newcommand{\diamondone}{\Pisymbol{MinionPro-Extra}{119}}
% Rule sep
\newcommand{\dvrule}[1][0pt]{%
% \vspace{#1}
\vfill
\begin{center}%
%\fontspec[Scale=5]{Davys}5
% \leftrule~~\floweroneleft\floweroneright~~\rightrule
%\includegraphics[width=10em]{rule_square_long}
\fontspec[Scale=9]{HoodHeavenOrnamentsTwoSSi}\char"0050%
\end{center}%
\vspace{-6mm}
\vfill
}
% Dans le Nom de Jésus, Amen.
\newcommand{\Amen}{Amen.}
\newcommand{\DlNdJ}{Au Nom de J\'esus, \Amen}
\newcommand{\DlNdJnp}{Au Nom de J\'esus, nous prions, \Amen}
\newcommand{\NpDlNdJ}{Nous prions au Nom de J\'esus. \Amen}
\newcommand{\NpDlpNdJ}{Nous prions dans le pr\'ecieux Nom de Jésus. \Amen}
\newcommand{\CDlNdJqnp}{C'est au Nom de J\'esus que nous prions, \Amen}
\newcommand{\EsN}{En Son Nom, nous prions, \Amen}
\newcommand{\ESN}{En Son Nom, \Amen}
\newcommand{\CeSNqnp}{C'est en Son Nom que nous prions, \Amen}
\newcommand{\DlPNdJ}{Dans le Pr\'ecieux Nom de Jésus, \Amen}
\newcommand{\NlddlNdJ}{Nous le demandons au Nom de J\'esus, \Amen}
\newcommand{\NpcdlNdJ}{Nous prions ceci au Nom de J\'esus, \Amen}
% YHWH
\newcommand{\Seigneur}{\textsc{Seigneur}}
% cadratin
\newcommand*{\ocadr}{\mbox{---}\nobreak\,\nobreak}
\newcommand*{\fcadr}{\unskip\nobreak\,\nobreak{}---}
% demi-cadratin
\newcommand*{\odcadr}{\mbox{--}\nobreak\thinspace\nobreak}
\newcommand*{\fdcadr}{\unskip\nobreak\thinspace\nobreak{}--}
% King James Fran\c{c}aise
\newcommand{\KJF}{\ocadr{}\emph{Version King James Fran\c{c}aise}}
\newcommand{\NKJF}{\ocadr{}\emph{Version Nouvelle King James Fran\c{c}aise}}
% Bible en Fran\c{c}ais Courant
\newcommand{\BFC}{\ocadr{}\emph{Version de la Bible en Fran\c{c}ais Courant}}
\newcommand{\NKJV}{\ocadr{}\emph{Version NKJV}}
\newcommand{\NBS}{\ocadr{}\emph{Version Nouvelle Bible Segond}}
\newcommand{\PDV}{\ocadr{}\emph{Version Parole de Vie}}
\newcommand{\Ostervald}{\ocadr{}\emph{Version Ostervald}}
\newcommand{\SegondXXI}{\ocadr{}\emph{Version Segond~21}}
% L' doesn't look good in titles with Minion... Fix that
%\newcommand{\ap}{\kern.5pt{'}}
% Patch bibleref to sort Bible books properly
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@bible@verse}{\@bv@idxsort{\csname br@#1\endcsname}}{\@bv@idxsort{#1}}
\makeatother
\renewcommand*{\bvidxpgformat}{transform}
% Page date
% Make indexes
\newcommand{\indextitle}{Index des r\'ef\'erences bibliques}
\usepackage{imakeidx}
\makeindex[name=bibleref,title=\indextitle,intoc,options=-r -s bibleref.ist,columns=2]
\renewcommand{\biblerefindex}{\index[bibleref]}
\makeindex[title={Index th\'ematique},intoc,options=-r -s thematique.ist,columns=2]
\newcommand{\themeindex}[1]{\index{#1|transform}}
\newcommand{\mainthemeindex}[1]{\index{#1|transformmain}}
% Ensure minimal distance of 15pt in dotfill
\def\hfill{\hskip 15pt plus 1fill}
% Use short month names for index
\newdateformat{shortmonthdate}{\ordinaldatefrench{\THEDAY}~\shortmonthname[\THEMONTH]}
\renewcommand\jrnlformatindexdate{\shortmonthdate\formatdate}
% Ensure *voir* entries are not cut
\renewcommand*\see[2]{\mbox{\emph{\seename} #1}}
% Map to dates
\newcommand\getpagedate[1]{\csname jrnldaydate#1\endcsname}
\newcommand{\transform}[1]{%
\def\secondparam{0}%
\forcsvlist\decodesec{#1}}
\newcommand{\transformmain}[1]{%
\def\secondparam{0}%
\forcsvlist\decodesecbf{#1}}
\newcommand{\decodesec}[1]{%
\ifthenelse{\secondparam=1}{, }{}%
\hyperlink{day.#1}{\mbox{\textsc{\getpagedate{#1}}}}%
\def\secondparam{1}}
\newcommand{\decodesecbf}[1]{%
\ifthenelse{\secondparam=1}{, }{}%
\hyperlink{day.#1}{\mbox{\textsc{\textbf{\getpagedate{#1}}}}}%
\def\secondparam{1}}
% Patch imakeidx to map verse num instead of page
\makeatletter
\patchcmd{\@index}{\@wrindex}{\@Wrindex}{}{}
\let\@Wrindex\@wrindex
\patchcmd{\@Wrindex}{\thepage}{\thejrnltotalday}{}{}
\let\protected@iwrite\protected@write
\patchcmd{\protected@iwrite}{\write}{\immediate\write}{}{}
\patchcmd{\@Wrindex}{\protected@write}{\protected@iwrite}{}{}
\makeatother
% Define dummy caltoc, only for ebooks
\newcommand\caltoc{}
% No page numbers
\pagestyle{empty}
\renewcommand*{\partpagestyle}{empty}
\renewcommand*{\chapterpagestyle}{empty}
% Tune fancytabs
\fancytabsStyle{\normalfont\LARGE\scshape}