-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommonheaders_letterpaper.tex
508 lines (404 loc) · 17.5 KB
/
commonheaders_letterpaper.tex
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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
%%%%%%%%%%%%%%% STANDARD PACKAGES %%%%%%%%%%%%%%%
%% for personal reasons, the commands are a mix of French and English names. Feel free to choose one or the other if you make use of them. This file is subject to change later on.
\usepackage{geometry}
\usepackage{fontspec}
\usepackage[english,ecclesiasticlatin.usej]{babel}
\babelprovide[hyphenrules=latin]{ecclesiasticlatin}
% \usepackage{xspace} %% better to use {} after certain macros (or even within defintion
\usepackage{multicol}
%\usepackage{paracol}
%\footnotelayout{m} %% this allows merged footnote if text is in parallel columns (mostly translations)
\usepackage{fancyhdr}
\usepackage{needspace} %%pour réserver de l'espace en bas de page ; ça évite des séparations entre les titres et la partition ou le texte qui les suivent.
\usepackage[compact]{titlesec}
\usepackage{xcolor}
%\usepackage{xstring}
\usepackage{enumitem} %% nécessaire pour les textes des psaumes.
\usepackage{lettrine}
\usepackage{tocloft}%%to fix toc title. titlesec companion packages could also work.
\usepackage{indentfirst}%% to allow for \section with indented 1st paragraphs in good Franco-Latin style (LaTeX default is to suppress this. Package sets \@afterindentfalse to (always) true.
\usepackage[savepos]{zref}
\usepackage{lettrine}
\usepackage{hyperref}
\usepackage{refcount}
%%%%%%%%%%%%%%% HYPHENATION AND TYPOGRAPHICAL CONVENTIONS %%%%%%%%%%%%%%
%% page settings %%%%
\sloppy %% to avoid overfull hboxes
%\setlength{\textwidth}{5.75in}
\geometry{letterpaper}
\geometry{bindingoffset=0.5in,
inner=1in,
outer=1.35in,
top=1.25in,
bottom=1.25in,
headsep=0.75in
} %%
%% General scale of all graphical elements. Also borrowed from MB
%% Values different from 1 are largely untested.
%% Used in those commands (e.g. everything FontSpec) that use a scale parameter.
\newcommand{\customscale}{1}
\AtBeginDocument{\setlength{\parindent}{1em}} %% should set 1em to EB Garamond not Computer Modern.
%%%%%%%%%%%%%%% GREGORIO CONFIG %%%%%%%%%%%%%%%
\usepackage[autocompile]{gregoriotex}
%% sets * and † to font called via fontspec
\def\GreStar{*}
\def\GreDagger{†}
%% should prevent flat turning custos into a clef, as Solesmes uses an altered custos in only one chant per Élie Roux.
\gresetcustosalteration{invisible}
%produces a score with a smaller initial (default is 40 pt) and annotations like in the Solesmes books; the 1st is optional and can be omitted as needed.
\NewDocumentCommand{\gscore}{O{}mm}{%
% \grechangedim{initialraise}{0.5cm}{scalable}%
\greannotation{#1}%
\greannotation{#2}%
\grechangestyle{initial}{\fontsize{28}{28}\selectfont}%
\gregorioscore{partitions/#3}%
\grechangedim{initialraise}{0cm}{scalable}}
\NewDocumentCommand{\lectionscore}{O{}m}{%
\grechangedim{initialraise}{0.15cm}{scalable}%
\grecommentary{#1}%
\grechangestyle{initial}{\fontsize{36}{36}\selectfont}%
\gregorioscore{partitions/#2}%
\grechangedim{initialraise}{0cm}{scalable}}
%% default should be 40, if not using, annotations need to be turned off in gabc. For the first antiphon of the office, Gospel canticle etc. (initial is both to refer to first and the large illustrated initial, used sometimes with an annotation, cf. Christus factus est of Tenebrae in the ritus monasticus.
\NewDocumentCommand{\initialscore}{O{}m}{%
\greannotation{#1}%
\grechangestyle{initial}{\fontspec{EB Garamond Initials}\fontsize{45}{45}\selectfont}%
\gregorioscore{partitions/#2}}
%% score with no initial, e.g psalms, common tones, etc.
\newcommand{\smallscore}[2][y]{
\gresetinitiallines{0}
\gregorioscore{partitions/#2} %% à remplacer avec NewDocumentCommand ; les arguments ne marchent pas correctement … que fait le [y] ?
\gresetinitiallines{1}
}
\NewDocumentCommand{\MagAnnotation}{}{%
\grechangedim{annotationseparation}{-0.01cm}{fixed}%
} %% pour les antiennes où le chiffre convient mieux aux miniscules (parfois 1, 2, 4, 7…) ; il n'est pas nécessaire pour 6 ou 8.
%\gresetheadercapture{annotation}{greannotation}{string}
%% A-bove L-ines T-ext shall be italicized and in a smaller font
\grechangestyle{abovelinestext}{\itshape\fontsize{8}{10}\selectfont}
%% for psalm tones etc. Roman/upright text is what the Liber Usualis uses.
\NewDocumentCommand{\altnormal}{}{\grechangestyle{abovelinestext}{\normalfont\fontsize{8}{10}\selectfont}}
%% resets ALT font
\NewDocumentCommand{\altitshape}{}{\grechangestyle{abovelinestext}{\itshape\fontsize{8}{10}\selectfont}}
\NewDocumentCommand{\altlarge}{}{\grechangestyle{abovelinestext}{\large}} %% for I reading of Lamentations
\NewDocumentCommand{\altupright}{}{\grechangestyle{abovelinestext}{\normalfont}} %%
%% fine-tuning of space beween the staff and the text above lines (used for Magnificats; needs to be rethought (again, should 2 and 3 be raised or not?) and worked into \smallscore
\newcommand{\altraise}{0.1cm} %% default is -0.1cm %% needs to be fine-tuned for \rubrique command with EB Garamond font. -0.2cm is MB value
\grechangedim{abovelinestextraise}{\altraise}{scalable}
\newcommand{\altheight}{0.5cm} %% default is 0.3cm and value must be bigger than text height; this should fix the problem. but needs further investigation.
\grechangedim{abovelinestextheight}{\altheight}{scalable} %% this is a very finicky command.
\newcommand{\comraise}{0.4cm} %% default is 0,2m %%
\grechangedim{commentaryraise}{\comraise}{scalable}
%% allows printing of glyphs from Gregorio score font (available glyphs listed in documentation) as text.
\makeatletter
\def\gretextglyph#1{{\gre@font@music\csname GreCP#1\endcsname}}
\makeatother
%%% Font %%%
\setmainfont{EB Garamond}[UprightFont=EB Garamond Regular,
ItalicFont= EB Garamond Italic,
BoldFont= EB Garamond Bold,
Ligatures=Rare,
Numbers=Proportional,
Numbers=OldStyle] %% all \kern numbers are based on this and can be removed if this font is abandoned.
\newfontfamily\symbolfont{liturgy}
%% text must be written {\symbolfont{+}} (you can use V and R as well) but may conflict as + is † in gabc. Cross should be \small or even \footnotesize
% \grechangestyle{initial}{\fontspec{EB Garamond Initials}\fontsize{#1}{#1}\selectfont}
%%% default initial size is 32 points
%\newcommand{\defaultinitialsize}{28}
%\initialsize{\defaultinitialsize}
%%%% Font %%%
%\setmainfont{EB Garamond}[UprightFont=EB Garamond Regular,
%ItalicFont= EB Garamond Italic,
%BoldFont= EB Garamond Bold,
%Ligatures=Rare,
%StylisticSet=6,
%Numbers=Proportional,
%Numbers=OldStyle] %% all \kern numbers are based on this and can be removed if this font is abandoned. %%StylisticSet=6 is, in Pardo EBGaramond, the long-tailed Q.
%\newfontfamily\symbolfont{liturgy}
%% text must be written {\symbolfont{+}} (you can use V and R as well) but may conflict as + is † in gabc. Cross should be \small or even \footnotesize
%%% TYPOGRAPHICAL AND SYMBOL COMMANDS %%%%
%% \P is pilcrow and is defined in LaTeX as is.
%% Add {\textcolor{gregoriocolor} as first part of command's definition if changing to red.
%%for proper spacing of all-caps letters to prevent clashes, e.g. serif strokes touching.
\NewDocumentCommand\capspace{m}{{\addfontfeature{LetterSpace=5.0}{#1}}}
\NewDocumentCommand\scspace{m}{\textsc{{{\addfontfeature{LetterSpace=5.0}{#1}}}}}
%% macro to print Alleluia for versicles.
\NewDocumentCommand{\tpalleluia}{}{(\textit{T.P.} Allelúia.)}
\newcommand{\specialcharhsep}{3mm} % space after invoking R/ or V/ or A/ outside rubrics
%\newcommand{\vv}{\textcolor{gregoriocolor}{\fontspec[Scale=\customscale]{Charis SIL}℣.\nolinebreak[4]\hspace{\specialcharhsep}\nolinebreak[4]}} %% format from MB
\newcommand{\vv}{{\normalfont ℣.\nolinebreak[4]\hspace{\specialcharhsep}\nolinebreak[4]}}
\newcommand{\rr}{{\normalfont ℟.\nolinebreak[4]\hspace{\specialcharhsep}\nolinebreak[4]}}
%% typesets a cross pattée.
\NewDocumentCommand{\cc}{}{%
% Grouping to keep font changes local
{%
% Ensure we're not in italics (since liturgy.ttf doesn't have italic)
\normalfont%
% Select the font liturgy.ttf
\symbolfont%
% Set the size
\footnotesize%
% In liturgy.ttf, the plus (+) is a cross pattée
+%
}%
} %% can replace <+> with <U+2720> (see above) if a suitable font is found (or EB Garamond font is fixed); command will be useful in lieu of typing the Unicode.
%% use <v> tag to insert into a gabc score (usually for the faithful or for blessings, e.g. the font.
%% Same special characters, for in-score use (<sp>V/ R/ A/ +</sp>)
\gresetspecial{V/}{{\fontspec[Scale=\customscale]{EB Garamond}℣.~}}
\gresetspecial{R/}{{\fontspec[Scale=\customscale]{EB Garamond}℟.~}}
\gresetspecial{+}{{\fontspec[Scale=\customscale]{EB Garamond}†~}}
\gresetspecial{*}{\gresixstar}
\gresetspecial{cross}{\cc}
%% Same special characters, for use in rubrics (no space)
\newcommand{\vvrub}{{\normalfont ℣.~}}
\newcommand{\rrrub}{{\normalfont ℟.~}}
%%rubrics: black italics, smaller than body of psalms etc
\NewDocumentCommand{\rubrique}{m}{%
{%
\fontsize{10}{12}%
\selectfont%
\textit{%
%
#1%
}%
}}
%% macro to print normal text inside of rubric (name of a chant or prayer, etc.)
\NewDocumentCommand{\normaltext}{m}{%
{%
\normalfont%
#1%
}%
}
%% in case something should be bolded inside of a rubrique
\NewDocumentCommand{\rubriquegras}{m}{%
{%
\normalfont%
\textbf{#1%
}%
}}
%% to print in red instead of italicizing
\NewDocumentCommand{\rouge}{m}{%
\textcolor{gregoriocolor}%
{\fontsize{10}{12}%
\selectfont{%
#1%
}%
}}
%% to print in black within rouge group.
%\NewDocumentCommand{\textenoir}{m}{%
\NewDocumentCommand{\textenoir}{m}{%
\textcolor{black}%
{%
\normalfont%
#1%
}%
}
%% rouge but in italic (this is technically not correct).
\NewDocumentCommand{\rougeit}{m}{%
\textcolor{gregoriocolor}%
{\fontsize{10}{12}%
\selectfont%
\textit{#1%
}%
}}
%\newcommand{\rubriquegras}[1]{{\fontsize{9}{11}\selectfont\textbf{#1}}}
%%macro to space punctuation with ecclesiasticlatin language from babel.
\NewDocumentCommand{\espaceponctuation}{}{\hspace{0.10em}} %%this value seems more balanced with this font than the definition provided in the ecclesiasticlatin documentation.
\NewDocumentCommand{\myrule}{}{%
\par%
{%
\centering%
\rule{0.3\textwidth}{0.4pt}%
\par%
}% typesets a horizontal rule like on the page with the prayers before and after the office.
} %%If you're using color at all in your document, you might want to either force \myrule to use black or make it cusotmizable. (from u/Independent-Comb-257)
\NewDocumentCommand{\bigrule}{}{%
\par%
{%
\centering%
\rule{0.6\textwidth}{0.4pt}%
\par%
}% typesets a horizontal rule like on the page with the prayers before and after the office.
} %%If you're using color at all in your document, you might want to either force \myrule to use black or make it cusotmizable. (from u/Independent-Comb-257)
%%% typesets a cross pattée.
\NewDocumentCommand{\mycross}{}{%
{\symbolfont\small{{+}}}%
{}
} %% can replace <+> with <U+2720> if a suitable font is found (or EB Garamond font is fixed); command will be useful in lieu of typing the Unicode.
%% macro to format psalm text
%\NewDocumentCommand{\pstexte}{ m }{%
% \smallskip%
% \noindent%
% \begin{itemize}[%
% label=\null, %
% leftmargin=0pt, %
% itemindent=0mm, %
% labelsep=0pt, %
% labelwidth=0pt, %
% rightmargin=0pt, %
% parsep=0pt, %
% topsep=0pt, %
% itemsep=0pt]%
% \input{psaumes/#1}
% \end{itemize}}
\setlength{\columnsep}{3pc}
%\setlength{\columnsep}{10pt}
\setlength\columnseprule{0.4pt}
\NewDocumentCommand{\pstexte}{ m }{%
\smallskip%
\noindent%%
\begin{multicols}{2}
\begin{itemize}[%
label=\null, %
leftmargin=0pt, %
itemindent=3mm, %
labelsep=0pt, %
labelwidth=0pt, %
rightmargin=0pt, %
parsep=0pt, %
topsep=0pt, %
itemsep=0pt]%
\input{psaumes/#1}
\end{itemize}
\end{multicols}} %% modified from original in order to allow 2 column psalms
%% Command de Matthias Bry modifié, prints psalm incipit score with the text
\NewDocumentCommand{\psalmus}{mmm}{
\needspace{4\baselineskip}
\smalltitle{Psalmus #1.}
\smallscore[n]{#2}
\pstexte{#3}
}
%% Command de Matthias Bry modifié, prints canticle incipit score with the text and scriptural commentary
\NewDocumentCommand{\canticum}{mmmm}{
\needspace{4\baselineskip}
\smalltitle{Canticum #1.}
\grecommentary{#2}
\smallscore[n]{#3}
\pstexte{#4}
}
%% macro to print any additional text (Capitiulum, oratio, rubrics)
\NewDocumentCommand{\textes}{ m }{%
\input{textes/#1}}
% \NewDocumentCommand{\lection}{m}{%
% \begin{multicols}{2}#1\end{multicols}} %% this doesn't work as expected, needs to be fixed
%% SC work for page headers and for secondary headings but not so much for things like "Dominica…" and certainly not the feast name%%
%%%% Headers%%%%
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{13.59999pt} %% recommended by LaTeX
%\fancyhead[RO]{\small\thepage}
%\fancyhead[LE]{\small\thepage}
\fancyhead[RO]{\small\rightmark\hspace{0.5cm}\thepage}
\fancyhead[LE]{\small\thepage\hspace{0.5cm}\leftmark}
\newcommand{\setheaders}[2]{
\renewcommand{\rightmark}{{\sc#2}}
\renewcommand{\leftmark}{{\sc#1}}
}
\setheaders{}{}
%% TITLE Commands %%%% %% TITLE Commands %%%% currently dead but Matthias says this isn't a good idea.
\titleformat{\section}[display]{\huge\filcenter\addfontfeature{LetterSpace=5.0}}{}{}{}
\titleformat{\subsection}[display]{\large\scshape\filcenter\addfontfeature{LetterSpace=5.0}}{}{}{}
\setcounter{secnumdepth}{0}
\titlespacing{\section}{0pt}{*0}{*0}
% \NewDocumentCommand{\mysection}{m}{\section{#1}\setheaders{{\scshape\addfontfeature{LetterSpace=5.0}#1}}{{\scshape\addfontfeature{LetterSpace=5.0} #1}}}
\NewDocumentCommand{\header}{m}{\setheaders{{\scshape\addfontfeature{LetterSpace=5.0}#1}}{{\scshape\addfontfeature{LetterSpace=5.0} #1}}}
%% all of these are a mess and should probably be ignored, but feel free to use them by referring to Matthias B's originals in the Nocturnale Romanum repository.
\newcommand{\officiumtitulum}[1]{
% \newpage
% \thispagestyle{empty}
\setheaders{{\scshape\addfontfeature{LetterSpace=3.0}#1}}{{\scshape\addfontfeature{LetterSpace=3.0} #1}}
\begin{center}
{\scshape\large #1}\par
\end{center}}
% \setheaders{{{\scshape\addfontfeature{LetterSpace=3.0}}}{{{\scshape\addfontfeature{LetterSpace=3.0} {#1}}}
\NewDocumentCommand{\rank}{m}{
\needspace{5\baselineskip} %% very small if there are neumes above the staff, including flats in mode 2, e.g. O Doctor optime
\vspace{\baselineskip}
{\centering{\textit{\large #1}}\par}
}
\NewDocumentCommand{\bigtitle}{m}{
\needspace{5\baselineskip} %% very small if there are neumes above the staff, including flats in mode 2, e.g. O Doctor optime
\vspace{\baselineskip}
{\centering{\large#1}\par}
}
\NewDocumentCommand{\smalltitle}{m}{
\needspace{5\baselineskip} %% very small if there are neumes above the staff, including flats in mode 2, e.g. O Doctor optime
\vspace{\baselineskip}
{\centering #1\par}
}
%\newcommand{\subtitulum}[1]{
% \subsection{
% \begin{center}
% {\large#1}\par
% \end{center}}}
%% something has broken here
%% see https://tex.stackexchange.com/questions/545841/paragraph-ended-before-ttlformatsi-was-complete
%% originally used apparently for typesetting portions of the Common of the BVM
\newcommand{\espacetitre}{\vspace{-0.5cm}}
\newcommand{\espaceps}{\vspace{-3mm}} %% ps =psaume
\newcommand{\espacecap}{\vspace{-3mm}} %% cap is capitulum
\newcommand{\espace}{\vspace{2mm}}
\NewDocumentCommand{\secreto}{}{Pater noster. \rubrique{secreto.}}
\NewDocumentCommand{\pateravecredo}{}{\large{Pater noster, Ave María, \textit{et} Credo.}}
%%for litanies
\makeatletter
\newcounter{score}
\newcounter{tabstop}[score]
\newcommand{\grealign}{%
\@bsphack%
\ifgre@boxing\else%
\kern\gre@dimen@begindifference%
\stepcounter{tabstop}%
\expandafter\zsavepos{stop-\thescore-\thetabstop}%
\kern-\gre@dimen@begindifference%
\fi%
\@esphack%
}
\newcommand{\setstops}{%
\gdef\nstabbing@stops{%
\hspace*{-\oddsidemargin}\hspace{-1in}%
\hspace*{\zposx{stop-\thescore-1} sp}\=%
}%
\count@=\@ne
\loop\ifnum\count@<\value{tabstop}%
\begingroup\edef\x{\endgroup
\noexpand\g@addto@macro\noexpand\nstabbing@stops{%
\noexpand\hspace{-\noexpand\zposx{stop-\thescore-\the\count@} sp}%
\noexpand\hspace{\noexpand\zposx{stop-\thescore-\the\numexpr\count@+1} sp}\noexpand\=%
}%
}\x
\advance\count@\@ne
\repeat
\nstabbing@stops\kill
}
\makeatother
\newenvironment{nstabbing}
{\setlength{\topsep}{0pt}%
\setlength{\partopsep}{0pt}%
\tabbing%
\setstops}
{\endtabbing\stepcounter{score}}
\makeatletter
\newcounter{blankpages} %% should remove number on blank page at end of preface. Cf https://tex.stackexchange.com/questions/250761/how-to-not-count-blank-pages-in-frontmatter-of-two-sided-document
\def\cleardoublepage{%
\clearpage
\if@twoside
\ifodd\c@page
\else
\hbox{}
\thispagestyle{empty}%
\newpage\stepcounter{blankpages}%
\if@twocolumn\hbox{}\newpage\fi
\fi
\fi
}
\newcommand{\@romannoblank}[1]{%
\@roman{\numexpr#1-\value{blankpages}\relax}%
}
\makeatother
\providecommand\phantomsection{} %% should make hyperref work properly %%only works with section etc., not with label etc. (that requires \phantomsection
%
\renewcommand{\contentsname}{\hfill\bfseries\LARGE Index Generalis.\hfill\null} %% modifies TOC title
\renewcommand{\cfttoctitlefont}{\hfil\LARGE}