-
Notifications
You must be signed in to change notification settings - Fork 2
/
commonheaders.tex
1056 lines (841 loc) · 35 KB
/
commonheaders.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
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%%%%%%%%%%%%%%% STANDARD PACKAGES %%%%%%%%%%%%%%%
%% much is based on the work of Matthias Bry (hereafter Matthias or MB) for the Nocturnale Romanum project. https://github.com/Nocturnale-Romanum/nocturnale-romanum
%% 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.
%%%%%%%%%%%%%%% INDICES %%%%%%%%%%%%%%%
%%\usepackage{imakeidx}
%%
%%\indexsetup{level=\section*,toclevel=section,noclearpage,othercode=\footnotesize\thispagestyle{empty}}
%%\makeindex[name=H,title=Index Hymnorum, columns=2,columnseprule]
%%\makeindex[name=A,title=Index Antiphonarum, columns=2,columnseprule]
%%%%\makeindex[name=R,title=Index Responsoriorum, columns=2,columnseprule]
%%\makeindex[name=P,title=Index Psalmorum, columns=2,columnseprule]
%%\makeindex[name=T,title=Toni Communes, columns=2,columnseprule]
%%\makeindex[name=F,title=Index Festorum, columns=2,columnseprule]
%% This is the format of the recent Solesmes books.
\usepackage[paperheight=205mm,paperwidth=135mm]{geometry}
\usepackage{fontspec}
\usepackage[english,french,ecclesiasticlatin.usej,activeacute]{babel} %%added activeacute as an option for convenience especially for Kyrie
\babelprovide[hyphenrules=latin]{ecclesiasticlatin}
\usepackage{xspace}%% better to use {} after certain macros (or even within definitions)
% \usepackage{multicol}
%\usepackage{paracol}
%\footnotelayout{m} %% this allows merged footnote if text is in parallel columns (mostly translations)
\usepackage{emptypage} %% The emptypage package prevents page numbers and
% headings from appearing on empty pages.
\usepackage[savepos]{zref}
\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. %%mais ça génère des problèmes lorsque il faut 2 ou 3 titres l'un après l'autre (date ou jour, nom d'une fête, rang liturgique, office célébré…
\usepackage[compact]{titlesec}
\usepackage{xcolor}
\usepackage{multicol}
%\usepackage{xstring}
\usepackage{enumitem}%% psalm textes are in list format modified via this package
%\usepackage{expl3}
\usepackage{etoolbox}
\usepackage{lettrine}
\usepackage{perpage}%%%to reset footnotes at each page%%%
\usepackage{hyperref}
\usepackage{refcount}
%%%%%%%%%%%%%%% HYPHENATION AND TYPOGRAPHICAL CONVENTIONS %%%%%%%%%%%%%%
%%%%%%%%%%%%%%% GEOMETRY %%%%%%%%%%%%%%%
\geometry{bindingoffset=5mm,
inner=10mm,
outer=10mm,
top=12mm,
bottom=15mm,
headsep=3mm,
} %%borrowed from MB, based on the Solesmes books; binding offset TBD. He has inner=15mm instead.
%%will need serious revision
%% General scale of all graphical elements. Also borrowed from MB
%% Values different from 1 are largely untested per MB
%% Used in those commands (e.g. everything FontSpec) that use a scale parameter.
\newcommand{\customscale}{1}
\AtBeginDocument{\setlength{\parindent}{1em}} %% default is 20 pt, this reduces indent from that of Computer Modern to the font's
\sloppy %% to allow larger spaces which avoid overfull hbox (MB: %% We want to allow large inter-words space
%% to avoid overfull boxes in two-columns rubrics.)
%%%%%%%%%%%%%%% GREGORIO CONFIG %%%%%%%%%%%%%%%
\usepackage[autocompile]{gregoriotex}
%% sets * and † to font called via fontspec
\def\GreStar{*}
\def\GreDagger{†}
%%prints asterisk instead of star normally inserted by <v>\greheightstar</v>
\gredefsymbol{greheightstar}{EB Garamond}{asterisk}
%% should prevent flat turning custos into a clef, as Solesmes uses an altered custos in only one chant per Élie Roux.
\gresetcustosalteration{invisible}
%% any chant using gregorioscore in some way will need alteration to account for indexing chant name, psalms etc.
\NewDocumentCommand{\initialscore}{O{}m}{%
\grechangedim{initialraise}{0.5cm}{scalable}%
\greannotation{#1}%
\grechangestyle{initial}{\fontspec{EB Garamond Initials}\fontsize{45}{45}\selectfont}% larger, illustrated initial for first antiphon
\gregorioscore{partitions/#2}%
\grechangedim{initialraise}{0cm}{scalable}}
%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. %%update 23/5/23 apparently
\NewDocumentCommand{\gscore}{O{}mm}{% %%you can also omit the mode and it typesets correctly.
\greannotation{#1}%
\greannotation{#2}%
\grechangestyle{initial}{\fontsize{28}{28}\selectfont}%
\gregorioscore{partitions/#3}%
}
%% 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}
}
%%using the new bar-spacing algorithm by default optimizes spacing. Occasionally asterisks or other signs float too far in one direction or the other.
%%Left default is 0.3cm, right default 0.15cm
\NewDocumentCommand{\zerobaroffsettextleft}{}%
{%
\grechangedim{maxbaroffsettextleft}%
{0cm}%
{scalable}%
}
\NewDocumentCommand{\zerobaroffsettextright}{}%
{%
\grechangedim{maxbaroffsettextright}%
{0cm}%
{scalable}%
}
%%%the default for left bar offset is 0.3cm. Right is 0.15cm. This needs to be applied after a score where the bar offset is modified.
\NewDocumentCommand{\resetbaroffsettextleft}{}%
{%
\grechangedim{maxbaroffsettextleft}%
{0.3cm}%
{scalable}%
}
\NewDocumentCommand{\resetbaroffsettextright}{}%
{%
\grechangedim{maxbaroffsettextright}%
{0.15cm}%
{scalable}%
}
% \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}}
%% fine-tuning of space between the staff and the text above lines (used for Magnificats; needs to be rethought and worked into \smallscore
\newcommand{\altraise}{-0.4mm} %% default is -0.1cm %% needs to be fine-tuned for \rubrique command with EB Garamond font. -0.4mm is MB value, previously 1.4mm and -0.2cm (this value works best for Magnificat but it does not work with common tones)
\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. currently 6mm in MB command
\grechangedim{abovelinestextheight}{\altheight}{scalable} %% this is a very finicky command.
%% Essentially what happens is that there is either not enough space above (Magnificat, crashing into words above) or below (common tones, crashing into staff)
%% fine-tuning of space between the staff and the lyrics
%\newcommand{\textraise}{2.8ex} %% default is 3.48471 ex MB 2.8ex
%\grechangedim{spacelinestext}{\textraise}{scalable}
%%% fine-tuning of space between the initial and the annotations
%\newcommand{\annraise}{0mm} %% default is -0.2mm MB 0mm
%\grechangedim{annotationraise}{\annraise}{scalable}
%% fine-tuning the behavior of text placed under bars. We use the so-called "new algorithm" which
%% places the bar in the middle of surrounding notes, and the text in the middle of surrounding text.
%% however, we restrict drastically the deviation of the text from the position of the bar.
%\grechangedim{maxbaroffsettextleft}{0.5mm}{scalable} MB 0.5mm
%\grechangedim{maxbaroffsettextright}{0.5mm}{scalable}
%% allows printing of glyphs from Gregorio score font as text (available glyphs are listed in the Gregorio documentation).
%% above all needed for the indications before certain Magnificat tones
\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 should be removed/adjusted if this font is abandoned.
%% as of 5.17.2024 \kern, although more semantic, is being replaced systematically with \hspace to better respect LaTeX format
\newfontfamily\symbolfont{liturgy}
%% text must be written {\symbolfont{+}} or called via a command but may conflict as + is † in gabc. Cross should be \small or even \footnotesize. Font also supports V & R for verse/response, but EB Garamond contains appropriate matching glyphs.
%StylisticSet=6 is long Q. Abandoned but always possible to use again
%%%Roman numerals for the year %% https://tex.stackexchange.com/questions/185548/the-year-in-roman-and-the-month-in-text
\makeatletter
\newcommand{\YEAR}{\@Roman{\the\year}}
\makeatother
%%% 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}%
}}
%%for smallcaps
\NewDocumentCommand\scspace{m}{\textsc{{{\addfontfeature{LetterSpace=5.0}{#1}}}}}
%% macro to print Alleluia for versicles.
\NewDocumentCommand{\tpalleluia}{}{(\textit{T.P.} Allelúia.)}
\newcommand{\specialcharhsep}{3pt} % space after invoking R/ or V/ or A/ outside rubrics from Matthias with value of 3mm
%%3mm – note unit— is value from MB; changed to pt
%\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]}}
%\newcommand{\vv}{{\normalfont ℣.~}} %%at the beginning of a line so it shouldn't ever split from the rest but space is needed for macro to work
%\newcommand{\rr}{{\normalfont ℟.~}}
%\newcommand{\cc}{{\fontspec[Scale=\customscale]{FreeSerif}\symbol{"2720}~}}%from Matthias
%% 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 added space will keep symbol together with incipit)
%% no scale included
\newcommand{\vvrub}{{\normalfont ℣.~}}
\newcommand{\rrrub}{{\normalfont ℟.~}}
%%rubrics: black italics, smaller than body of psalms etc
\NewDocumentCommand{\rubrique}{m}{%
{%
\fontsize{8}{10}%
\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{8}{10}%
\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 but is contemporary practice of Le Barroux). Here for completeness.
\NewDocumentCommand{\rougeit}{m}{%
\textcolor{gregoriocolor}%
{\fontsize{8}{10}%
\selectfont%
\textit{#1%
}%
}}
%%https://tex.stackexchange.com/questions/156540/spacing-between-single-line-paragraph-with-lettrine%
%\pretocmd{\lettrine}{\checklettrine}{}{}
%\newcommand{\checklettrine}{%
% \ifnum\prevgraf<2 \vspace{\baselineskip}\fi
%}
%%this value seems more balanced with this font than the definition provided in the ecclesiasticlatin documentation.
%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 customizable. (from u/Independent-Comb-257 on Reddit)
%%thickness started at 0.4pt%%
\NewDocumentCommand{\myrule}{}{%
\par%
{%
\centering%
\textcolor{black}{\rule{0.3\textwidth}{0.6pt}}%
\par%
}%
}
%%typesets a horizontal rule like on the page with the prayers before and after the office.
%%thickness started at 0.4pt
\NewDocumentCommand{\biggerrule}{}{%
\par%
{%
\centering%
\textcolor{black}{\rule{0.75\textwidth}{0.6pt}}%
\par%
}%
}
%% macro to format psalm text. Revised May 17, 2024 to use `enumerate` rather than inserting numbers in .tex file while usng `itemize` and to specify start value via `enumitem` package.
%%
%% these values reflect Liber Usualis but do not appear as if typed on a typewriter. Single words (particularly monosyllables) may need adjustment.
%%leftmargin=* and itemindent=* appear to be the way to a hanging indent like the modern antiphonal (but that looks like crap)
\NewDocumentCommand{\pstexte}{m}{%
\smallskip%
\noindent%
\begin{enumerate}[%
label=\arabic*.,%
% align=left,%
leftmargin=10pt, %
itemindent=15pt, %
labelsep=3pt, %
labelwidth=0pt,
rightmargin=0pt, %
parsep=0pt, %
topsep=0pt, %
itemsep=0pt,%
start=2]
\input{psaumes/#1}
\end{enumerate}}
%%same as above but for the printing of the Magnificat since it always has 2 chant verses. (As of 5.17.2024) it seems more reasonable to do this unless there is an even better way to do so to avoid 4 arguments per invocation of \psalmus, siince that 3rd argument will just about always be {2}.
%% the problem is that this repeats a bunch in the Magnificat section and that the Nunc Dimittis sometimes begins on 3.
\NewDocumentCommand{\magnificattexte}{m}{%
\smallskip%
\noindent%
\begin{enumerate}[%
label=\arabic*.,%
% align=left,%
leftmargin=10pt, %
itemindent=15pt, %
labelsep=3pt, %
labelwidth=0pt,
rightmargin=0pt, %
parsep=0pt, %
topsep=0pt, %
itemsep=0pt,%
start=3]
\input{psaumes/#1}
\end{enumerate}}
%% Command de Matthias Bry modifié, prints psalm incipit score with the text
%% #1 is psalm number (so an integer from 1 to 150
%% #2 is the gabc file somethng like #1_7a.gabc — if there is a way to append a variable mode and ending to #1, then that'd be cool
%% #3 is the psalm file name described above (and which is confusingly a different argument number when the command is nested): something like 109_7.tex
\NewDocumentCommand{\psalmus}{mmm}{
\needspace{4\baselineskip}%
\smalltitle{Psalmus #1.}% %% needspace plus smalltitle with \vspace{baselineskip} adds a lot of white space
\smallscore[n]{#2}%
\pstexte{#3}}
%%r5.17.2024: removed obsolete, never-really-used version for multicolumn formatting inappropriate on such a small sheet
%% sd=semiduplex. especially for Dominica ad Vesperas in the Psalterium (the only example which comes to mind, in fact!)
\NewDocumentCommand{\sdpsalmus}{mm}{
\needspace{4\baselineskip}%
\smalltitle{Psalmus #1.}% needspace plus smalltitle with \vspace{baselineskip} adds a lot of white space
\pstexte{#2}%
}
%%identical to \pstexte EXCEPT we need to sometimes start the canticle on 3 such as for Compline of the Paschal Vigil
\NewDocumentCommand{\cantiquetexte}{mm}{%
\smallskip%
\noindent%
\begin{enumerate}[%
label=\arabic*.,%
% align=left,%
leftmargin=10pt, %
itemindent=15pt, %
labelsep=3pt, %
labelwidth=0pt,
rightmargin=0pt, %
parsep=0pt, %
topsep=0pt, %
itemsep=0pt,%
start=#1]
\input{psaumes/#2}
\end{enumerate}}
%% Command de Matthias Bry modifié, prints canticle incipit score with the text and scriptural reference
%% \vspace{-\baselineskip} essentially removes the spacing from \smalltitle but enough versus too much space or widows/orphans is hard (as of 5.17.2024)
%% #1 is Canticle name in Latin, e.g. (and most often) Canticum Simeonis.
%% #2 is the Scriptural citation from the Vulgate as given in the antiphonal/Solesmes editions.
%% #3 is the gabc file somethng like #1_7a.gabc — if there is a way to append a variable mode and ending to #1, then that'd be cool
%% #4 is the verse at which the list (verses wth \item) starts on (pretty much always 2 or 3)
%% #5 is the psalm file name described above (and which is confusingly a different argument number when the command is nested): something like 109_7.tex
\NewDocumentCommand{\canticum}{mmmmm}{%
\needspace{4\baselineskip}%
\smalltitle{Canticum #1.}%
\vspace{-\baselineskip}%
\smalltitle{\textit{#2.}}%
\smallscore[n]{#3}%
\cantiquetexte{#4}%
{#5}%
}
%%in particular for canticle at OPBMV and Compline of dead for 1 November after II Vespers and Vespers of dead
\NewDocumentCommand{\canticumspecial}{mmm}{
\needspace{4\baselineskip}%
\smalltitle{#1.}% %%filename %% needspace plus smalltitle with \vspace{baselineskip} adds a lot of white space
\smallscore[n]{#2}% %%file
\cantiquetexte{#3}% %%verse number, can be 2 or 3, in case of Compline of the dead
}
% Could use, before \smallscore \grecommentary taking an argument instead but this sits too low on Nunc Dimittis
%% macro to print any additional text (Capitiulum, oratio, rubrics)
\NewDocumentCommand{\textes}{ m }{%
\input{textes/#1}%
}
%% 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}
\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{}{}
%%note as of 5.17.2024: we need to learn how to get fancyhdr or titlesec or both to work in the fulll book
%% TITLE COMMANDS %%%% had been dead in NR version of the same, but Matthias says this isn't a good idea.
%%need to figure out multiple section headers AND a chapter header so that everything fits…
%%these are defined with \sc but we want full caps for the first two in particular. Also, Missing number, treated as 0 occurs when section titleformat is copied…
\titleformat{\chapter}[display]{\Huge\filcenter\sc\addfontfeature{LetterSpace=5.0}}{}{0pt}{} %%
\titleformat{\section}[display]{\huge\filcenter\sc\addfontfeature{LetterSpace=5.0}}{}{}{} %%
\titleformat{\subsection}[display]{\LARGE\filcenter\sc\addfontfeature{LetterSpace=5.0}}{}{}{} %%originally \large, then \Large
\setcounter{secnumdepth}{0}
\titlespacing*{\chapter}{0pt}{-25pt}{20pt} %%this should reduce spacing before chapter title while putting it flush with the top of the text area
%% see https://tex.stackexchange.com/questions/63390/how-to-decrease-spacing-before-chapter-title
%%\titlespacing*{\chapter}{0pt}{-50pt}{40pt} %%this puts chapter title in HEADER which we do not want
\titlespacing{\section}{0pt}{*0}{*0}
%%need section titleformat more appropriate for weekdays of psalter and minor feasts
% See https://tex.stackexchange.com/questions/623797/multiple-section-styles-in-same-document.
\addto\captionsecclesiasticlatin{\renewcommand\contentsname{\centerline{INDEX GENERALIS.}}}
%this command still needs work
\NewDocumentCommand{\header}{m}{\setheaders{{\scshape\addfontfeature{LetterSpace=5.0}#1}}{{\scshape\addfontfeature{LetterSpace=5.0} #1}}}
\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}%
}
%% bigtitle as written adds too much space below (or rather the combination of needspace is too large with following text)
%% possibile to have something that is a macro which takes away a fixed amount? and then I can change the definition later (though as of 17 dec 2023), cf. the screenshot from the Praglia code
\NewDocumentCommand{\bigtitle}{m}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\Large#1}\par}%
}
%%formatting date on major feasts of sanctoral cycle or moveable feasts that follow Easter where this is listed in antiphonal.
% \NewDocumentCommand{\biglitdate}{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} %}
%%formatting date of feasts where this listed at top of page
\NewDocumentCommand{\litdate}{m}{%
\smalltitle{Die #1.}%
}
%for most/ordinary feasts of Sanctorale
%%"as long as text isn't long enough to over-print number according to David Carlisle
\NewDocumentCommand{\datefeast}{mm}{%
\par
\noindent
\makebox[0pt][l]{#1.}%
\makebox[\textwidth]{\Large #2.}%
}
%%for feasts such as Imposition of Stigmata of St Francis on Sept 17.
%%first two arguments as above, Dedication of the Lateran on Nov 9
%%break line as needed and the remaining text is the 3rd argument
\NewDocumentCommand{\longdatefeast}{mmm}{%
\par
\noindent
\makebox[0pt][l]{#1.}%
\makebox[\textwidth]{\Large #2}%
\hfill\makebox[\textwidth]{\large #3.}%
}
%% alternatively
%% \NewDocumentCommand\datefeast{mm}{%
%%\noindent #1.\hfill{}{\Large#2.}\hfill{}%
%%}
%%formatting for Sunday feasts : inter, post… name is for consistency
\NewDocumentCommand{\dominicadate}{m}{%
\smalltitle{Dominica #1.}%
}
%%formatting for feasts that fall on a weekday fixed to some other thing, like Corpus Christi, Sacred Heart, BVM in Passiontide, and the new feasts found in the appendix (Feria Roman numeral in Latin: inter, post… name is for consistency
\NewDocumentCommand{\feriadate}{m}{%
\smalltitle{Feria #1.}%
}
%%for most important feasts (as of 16 dec 2023 leaving section alone as is, but it's similar styling)
\NewDocumentCommand{\festum}{m}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\LARGE%
{\MakeUppercase{%
{\capspace{#1.}}
}%
}%
\par}%
}%
}
%%for ranks of feast; easiest to use rank for duplex 1 or 2 classis because the number changes, the octaves change.
%%probably need to reduce vspace used
\NewDocumentCommand{\rank}{m}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large #1.}}\par}%
}
%%looks like xparse formatting changed so o just has No Default Value whereas O{} is that OR you can insert something in braces!
%%answer thanks to David Carlisle
\NewDocumentCommand{\duplexclassis}{mo}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering\textit{\large Duplex #1 classis\IfValueT{#2}{ #2}.}\par}%
}
\NewDocumentCommand{\duplexmajus}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Duplex majus.}}\par}%
}
%%is Duplex even specified.as it's the default?
\NewDocumentCommand{\duplex}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Duplex.}}\par}%
}
\NewDocumentCommand{\semiduplex}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Semiduplex.}}\par}%
}
\NewDocumentCommand{\simplex}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Simplex.}}\par}%
}
%%for feasts where the third verse (third part of 1st verse in modern terms) is changed (Mutatur tertius vers.)
\NewDocumentCommand{\mtv}{}{%
{\normalfont{(m.t.v.)}%
}%
}
%%e.g. St Joachim, D2C
\NewDocumentCommand{\duplexclassismtv}{mo}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering\textit{\large Duplex #1 classis.} \mtv \par}%
}
\NewDocumentCommand{\duplexmtv}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Duplex.} \mtv \par}%
}%
}
\NewDocumentCommand{\semiduplexmtv}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Semiduplex.} \mtv \par}%
}%
}
\NewDocumentCommand{\simplexmtv}{}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\textit{\large Simplex.} \mtv \par}%
}%
}
%% The needspace package inserts white space that we don't want!
%%especially for Sab/Dom PP which has sentence-case text below main title of page
\NewDocumentCommand{\subtitle}{m}{%
{\centering{\Large #1}\par%
}%
}
%%to replace original idea of subsection; will need work on the spacing (the needspace and vspace both might be too big
%%leaving subsection as is for now (16 dec 2023), for reference and in case I used it and didn't remember it
%% argument here is i or ii; will need another command if the vespers are identical.
\NewDocumentCommand{\invesperis}{m}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\LARGE%
{\scspace{in #1 vesperis.}%
}%
}\par}%
}
%%for double major and below
\NewDocumentCommand{\invesperisminor}{m}{%
\needspace{5\baselineskip}%
\vspace{\baselineskip}%
{\centering{\Large In #1 Vesperis.}\par}%
}
\NewDocumentCommand{\primaantiphona}{m}{%
\smalltitle{I Antiphona. #1}%
}
%%for vel where this occurs between texts or chants
\NewDocumentCommand{\vel}{}{%
{\rubrique{Vel:}%
}%
}
%% for prayers, e.g. at beginning (and end) of office.
\NewDocumentCommand{\secreto}{}{%
Pater noster. \rubrique{secreto.}%
}
\NewDocumentCommand{\pateravedeus}{}{%
Pater noster et Ave María. ℣. Deus in adjutórium.%
}
\NewDocumentCommand{\pateravecredo}{}{%
Pater noster, Ave María, \textit{et} Credo.%
}
\NewDocumentCommand{\lectiobrevis}{m}{%
{\quad Lectio brevis.%
\hfill \textit{#1}%
\hspace*{1em}%
\par%
}%
}
%%%original commands
%\NewDocumentCommand{\capitulum}{}{%
%\smalltitle{Capitulum.}%
%}
%%for Scriptural references, originally of the chapter but now primarily Magnificat in psalter
\NewDocumentCommand{\scripture}{m}{%
{\raggedleft{\textit{#1}%
}%
\par}%
}
%%above chapter (Capitulum)
%%should indent by 1 em or a quad and then preserve space at end of line without needing to resort to table
%%imitation,sort of, of Liber antiphonarius style; AM1934 indentation is bigger
%%argument is Scriptural reference
\NewDocumentCommand{\capitulum}{m}{%
{\needspace{5\baselineskip}%
\vspace{\baselineskip}%
\quad Capitulum.%
\hfill \textit{#1.}%
\hspace*{1em}%
\par%
}%
}
%%for use in commons
%%#1 is Pro… e.g. Pro Virgine Martyre.
%%#2 is Scriptural citation Prov. 31, 10 – 11.
%%one problem is that hfill doesnt really CENTER it
\NewDocumentCommand{\specialcapitulum}{mm}{%
{\needspace{5\baselineskip}%
\vspace{\baselineskip}%
\quad #1%
\hfill Capitulum.%
\hfill \textit{#2.}
\hspace*{1em}%
\par%
}%
}
%%above Hymn if listed this way in the antiphonal (Hymnus)
\NewDocumentCommand{\hymnus}{}{%
\smalltitle{Hymnus.}%
}
%%especially for common of apostles etc. in paschal time
\NewDocumentCommand{\hymnusspecial}{mO{}}{%
\smalltitle{#1, Hymnus. #2}%
}
%%for proper of saints where the hymn is proper
\NewDocumentCommand{\hymnusbothvespers}{}{%
\smalltitle{In utrisque Vesperis, Hymnus.}%
}
\NewDocumentCommand{\hymnusmode}{m}{%
\smalltitle{Hymnus. #1}%
}
%%for 2nd tone of hymn
\NewDocumentCommand{\altertonus}{}{%
\smalltitle{Alter Tonus.}%
}
%%for 2nd tone of hymn where Alius is employed %%optional argument is in particular for Iste Confessor tones of which there are 4 per common of confessors (bishop and not a bishop)
\NewDocumentCommand{\aliustonus}{O{}}{%
\smalltitle{Alius Tonus. #1}%
}
%%above Te lucis
%%for, e.g. St Michael (not present in LA but preesnt in LU), St John Cantius. Hymn uses what would be ALT but we wish to avoid this feature. Unlike Ave Maris Stella rubric,
%% which is never in LA, this is, at least once, so we include it.
\NewDocumentCommand{\sequensconclusio}{}{%
\rubrique{Sequens conclusio numquam mutatur.}%
}
\NewDocumentCommand{\hymnusadcompletorium}{}{%
\smalltitle{Tonus Hymni ad Completorium.}%
}
%%above Magnificat antiphon where this is done in Liber antiphonarius (Or Vaticana Vesperale) (Sundays to be determined because there are so many of them; Liber Usualis and ferial format may be best)
\NewDocumentCommand{\admagnificat}{}{%
\smalltitle{Ad Magnificat, Antiphona.}%
}
%%to pair with initial score in cases where only Mag antiphon is proper e.g. on Feb 2
\NewDocumentCommand{\admagnificatmode}{m}{%
\smalltitle{Ad Magnificat, Antiphona. #1}%
}
%%for use in collects etc. %%\@ would lead to too narrow of a space (see LU)
%%needs to be followed by {}
\NewDocumentCommand{\nomen}{}{%
\textit{N.}%
}
%%above collect (Oratio)
\NewDocumentCommand{\oratio}{}{%
\smalltitle{Oratio.}%
}
%%for use in the commons
\NewDocumentCommand{\aliaoratio}{}{%
\smalltitle{\textit{Alia Oratio.}}%
}
%%for use in the commons
\NewDocumentCommand{\specialoratio}{m}{%
\smalltitle{#1 \textit{Oratio.}}%
}
%%%these are used before II Vespers
\NewDocumentCommand{\omniapraeter}{}{%
{\rubrique{Omnia ut in I Vesperis, præter sequentia.}%
}%
}
\NewDocumentCommand{\ivesperisrubrique}{}{%
{\rubrique{Antiphonæ, Psalmi, Capit.\@ et Hymnus ut in I Vesperis.}%
}%
}
\NewDocumentCommand{\sedlocoultimi}{mm}{%
{\rubrique{Antiphonæ et Psalmi ut in #1 Vesperis, sed loco ultimi Ps.\@ \normaltext{#2,} ut infra.}%
}%
}
%%for referring to chapter and/or hymn and/or verse placed at I or II Vespers (where II has different parts)
\NewDocumentCommand{\caphymn}{m}{%
\rubrique{Capitulum et Hymnus ut in #1 Vesperis.}%
}
\NewDocumentCommand{\caphymnvv}{m}{%
\rubrique{Capitulum, Hymnus, et \vv ut in #1 Vesperis.}%
}
\NewDocumentCommand{\hymnusut}{m}{%
\rubrique{Hymnus ut in #1 Vesperis.}%
}
%%a few doubles even are permanently impeded at II Vespers by another (higher-ranking) double the next day, e.g. St Clement, St Cecilia…
\NewDocumentCommand{\procomm}{m}{%
\smalltitle{Pro comm.\@ S.\@ #1, Antiphona.}%
}
%%for commemoration of following at II Vespers of major feasts.
\NewDocumentCommand{\commemoration}{}{%
\rubrique{Et fit comm.\@ sequentis.}%
}
%%for Vespers of the following
\NewDocumentCommand{\vespsequenti}{}{%
\rubrique{Vesp.\@ de sequenti.}%
}
%%for Vespers of the following at II Vespers
\NewDocumentCommand{\commsequentis}{}{%
\rubrique{In II Vesperis, comm.\@ sequentis.}%
}
%%for Vespers of the following where the commemoration of the previous day is still made
%%fixed latin sequentis to sequenti Sept 4 2024
\NewDocumentCommand{\vespsequentiscomm}{}{%
\rubrique{Vesp.\@ de sequenti, comm.\@ præced.}%
}
%%for Vespers of the following day beginning at the chapter (doubles that concur with each other)
%%changed 4 Sept 2024 from de to a because while de is probably OK Latin, I see a more often in the books.
\NewDocumentCommand{\capitdeseq}{}{%
\rubrique{Vesp. a capit.\@ de seq., comm.\@ præced.}%
}
%%commemoration of the Lenten feria
\NewDocumentCommand{\quadcommferiae}{}{%
\rubrique{In Quadrag.\@ commem. feriæ.}%
}
\NewDocumentCommand{\commferiae}{}{%
\rubrique{Commem.\@ feriæ.}%
}
%%for Fridays where Vespers is of Our Lady on Saturday, unless the next day is a feast of IX Lessons.
\NewDocumentCommand{\bvmsabbato}{}{%
\rubrique{Ad Vesperas, nisi occurrat Festum IX Lectionum, a Capitulo fit de Sancta Maria in Sabbato.}%
}
%%for feasts of the BVM
\NewDocumentCommand{\infestisbmv}{}{%
\rubrique{Antiphonæ, Psalmi et Capitulum ut in festis B.M.V., \normaltext{\pageref{vr_NN_commune_bmv}.}%
}%
}
\NewDocumentCommand{\amsrubrique}{}{%
\rubrique{Hymnus \normaltext{Ave Maris Stella, \pageref{M-hy_ave_maris_stella_mode_1_LA1949}.}%
}%
}
\NewDocumentCommand{\vigiliarubrique}{m}{%
\rubrique{De Vigilia #1 nihil fit nisi in Missa.}%
}
%%%%%%%SPACING%%
%\NewDocumentCommand{\baselineskipvspace}{m}{%
%\vspace{#1\baselineskip}%
%}
%%does this count as a magic number?
\NewDocumentCommand{\baselineskipvspace}{m}{%
\vspace{1\baselineskip}%
}
\NewDocumentCommand{\negativebaselineskipvspace}{m}{%
\vspace{-1\baselineskip}%
}
%% for litanies and other things like antiphon O Doctor Optime
\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}%