-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon_headers.tex
259 lines (206 loc) · 6.86 KB
/
common_headers.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
\usepackage[paperwidth=150mm, paperheight=230mm]{geometry}
\usepackage{fontspec}
%\usepackage[latin1]{inputenc}
\usepackage[french]{babel}
\usepackage[strict]{changepage}
\usepackage{fancyhdr}
\usepackage{paracol}
\usepackage{tableof}
\usepackage{setspace}
\usepackage{alltt}
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage{xstring}
\usepackage{parskip}
\usepackage{enumitem}
\usepackage{etoolbox}
\usepackage{needspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Mise en page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% on numérote les nbp par page et non globalement
\usepackage[perpage]{footmisc}
% définition des en-têtes et pieds de page
\pagestyle{empty}
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{0pt}
% la commande titres permet de changer les titres de gauche et de droite.
\newcommand{\titres}[2]{
\renewcommand{\rightmark}{\textcolor{red}{\sc #2}}
\renewcommand{\leftmark}{\textcolor{red}{\sc #1}}
}
\titres{}{}
% pas d'indentation
\setlength{\parindent}{0mm}
\geometry{
inner=20mm,
outer=20mm,
top=10mm,
bottom=25mm,
headsep=0mm,
}
\twosided[p]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Options gregorio %%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[autocompile]{gregoriotex}
%\usepackage{gregoriotex}
\definecolor{gregoriocolor}{RGB}{215,65,29}
%% style général de gregorio :
% lignes rouges, commenter pour du noir
%\gresetlinecolor{gregoriocolor}
% texte <alt> (au-dessus de la portée) en rouge et en petit, avec réglage de sa position verticale
\grechangestyle{abovelinestext}{\color{gregoriocolor}\footnotesize}
\newcommand{\altraise}{-1mm}
\grechangedim{abovelinestextraise}{\altraise}{scalable}
% taille des initiales
\newcommand{\initialsize}[1]{
\grechangestyle{initial}{\fontspec{ZallmanCaps}\fontsize{#1}{#1}\selectfont}
}
\newcommand{\defaultinitialsize}{32}
\initialsize{\defaultinitialsize}
% espace avant et après les initiales
\newcommand{\initialspace}[1]{
\grechangedim{afterinitialshift}{#1}{scalable}
\grechangedim{beforeinitialshift}{#1}{scalable}
}
\newcommand{\defaultinitialspace}{0cm}
\initialspace{\defaultinitialspace}
% on définit le système qui capture des headers pour générer des annotations
% cette commande sera appelée pour définir des abréviations ou autres substitutions
\newcommand{\resultat}{}
\newcommand{\abbrev}[3]{
\IfSubStr{#1}{#2}{ \renewcommand{\resultat}{#3} }{}
}
\newcommand{\officepartannotation}[1]{
\renewcommand{\resultat}{#1}
\abbrev{#1}{ntro}{Intr.}
\abbrev{#1}{re}{Resp.}
\abbrev{#1}{espo}{Resp.}
\abbrev{#1}{adu}{Gr.}
\abbrev{#1}{ll}{All.}
\abbrev{#1}{act}{Tract.}
\abbrev{#1}{equen}{Seq.}
\abbrev{#1}{ffert}{Off.}
\abbrev{#1}{ommun}{Co.}
\abbrev{#1}{an}{Ant.}
\abbrev{#1}{ntiph}{Ant.}
\abbrev{#1}{ntic}{Cant.}
\abbrev{#1}{ymn}{Hy.}
\abbrev{#1}{salm}{}
\abbrev{#1}{Toni Communes}{}
\abbrev{#1}{yrial}{}
\greannotation{\resultat}
}
\newcommand{\modeannotation}[1]{
\renewcommand{\resultat}{#1}
\abbrev{#1}{1}{ {\sc i} }
\abbrev{#1}{2}{ {\sc ii} }
\abbrev{#1}{3}{ {\sc iii} }
\abbrev{#1}{4}{ {\sc iv} }
\abbrev{#1}{5}{ {\sc v} }
\abbrev{#1}{6}{ {\sc vi} }
\abbrev{#1}{7}{ {\sc vii} }
\abbrev{#1}{8}{ {\sc viii} }
\greannotation{\resultat}
}
\gresetheadercapture{office-part}{officepartannotation}{}
\gresetheadercapture{mode}{modeannotation}{string}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Graphisme %%%%%%%%%%%%%%%%%%%%%%%%%%%
% on définit l'échelle générale
\newcommand{\echelle}{1}
% on centre les titres et on ne les numérote pas
\titleformat{\section}[block]{\Large\filcenter\sc}{}{}{}
\titleformat{\subsection}[block]{\large\filcenter\sc}{}{}{}
\titleformat{\paragraph}[block]{\filcenter\sc}{}{}{}
\setcounter{secnumdepth}{0}
% on diminue l'espace avant les titres
\titlespacing*{\paragraph}{0pt}{1.8ex plus .4ex minus .4ex}{1.2ex plus .2ex minus .2ex}
% commandes versets, repons et croix
\newcommand{\vv}{\textcolor{gregoriocolor}{\fontspec[Scale=\echelle]{Charis SIL}℣.\hspace{3mm}}}
\newcommand{\rr}{\textcolor{gregoriocolor}{\fontspec[Scale=\echelle]{Charis SIL}℟.\hspace{3mm}}}
\newcommand{\cc}{\textcolor{gregoriocolor}{\fontspec[Scale=\echelle]{FreeSerif}\symbol{"2720}~}}
\renewcommand{\aa}{\textcolor{gregoriocolor}{\fontspec[Scale=\echelle]{Charis SIL}\Abar.\hspace{3mm}}}
% commandes diverses
\newcommand{\antiphona}{\textcolor{gregoriocolor}{\noindent Antiphona.\hspace{4mm}}}
\newcommand{\antienne}{\textcolor{gregoriocolor}{\noindent Antienne.\hspace{4mm}}}
% rubrique
\newcommand{\rubrique}[1]{\textcolor{gregoriocolor}{\emph{#1}}}
% pour afficher du texte noir roman au milieu d'une rubrique
\newcommand{\normaltext}[1]{{\normalfont\normalcolor #1}}
\newcommand{\saut}{\hspace{1cm}}
\newcommand{\capsaut}{\hspace{3mm}}
% pour affichier 1 en rouge et un peu d'espace
\newcommand{\un}{{\color{gregoriocolor} 1~~~}}
% abréviations
\newcommand{\tpalleluia}{\rubrique{(T.P.} \mbox{Allelúia.\rubrique{)}}}
\newcommand{\tpalleluiafr}{\rubrique{(T.P.} \mbox{Alléluia.\rubrique{)}}}
\newcommand{\tqomittitur}{{\small \rubrique{(In Tempore Quadragesimæ ommittitur} Allelúia.\rubrique{)}}}
\newcommand{\careme}{{\small \rubrique{(Pendant le Carême on omet l'}Alléluia.\rubrique{)}}}
% environnement hymne : alltt + normalfont + marges custom
\newenvironment{hymne}
{
\begin{adjustwidth}{1.6cm}{1mm}
\begin{alltt}\normalfont
}
{
\end{alltt}
\end{adjustwidth}
}
% la commande \u permet de souligner les inflexions
\let\u\textbf
% on définit la police par défaut
\setmainfont[Ligatures=TeX, Scale=\echelle]{Charis SIL}
%renderer=ICU a l'air de ne plus marcher...
%\setmainfont[Renderer=ICU, Ligatures=TeX, Scale=\echelle]{Charis SIL}
\setstretch{0.9}
%%%%%%%%%%%%%%%% Commandes de mise en forme %%%%%%%%%%%%%%%%
\newcommand{\lectioresponsorium}[8]{
\needspace{3\baselineskip}
\paragraph{#1}
\vv Jube, domne, benedícere.\\
\vv #3.\\
\rr Amen.
#5
\vv Tu autem, Dómine, miserére nobis.\\
\rr Deo grátias.
\ifblank{#7}{}{\gregorioscore{gabc/#7}}
\switchcolumn
%\needspace{3\baselineskip}
\paragraph{#2}
\vv Veuillez, maître, bénir.\\
\vv #4.\\
\rr Amen.
#6
\vv Et toi Seigneur, prends pitié de nous.\\
\rr Nous rendons grâces à Dieu.
\ifblank{#8}{}{#8}
\switchcolumn*
}
\newcommand{\versiculus}[2]{
\vv #1.\\
\rr #2.\\
}
\newcommand{\versiculusabsolutio}[6]{
\paragraph{Versiculus et Absolutio}
\versiculus{#1}{#2}
\vv Pater noster... \rubrique{(secrètement)} Et ne nos indúcas in tentatiónem. \\
\rr Sed líbera nos a malo. \\
\vv #3. \rr Amen.
\switchcolumn
\paragraph{Versicule et Absolution}
\versiculus{#4}{#5}
\vv Notre Père... Et ne nous laisse pas entrer en tentation. \\
\rr Mais délivre-nous du mal. \\
\vv #6. \rr Amen.
\switchcolumn*
}
\newcommand{\versetGloireAuPere}{
\vv Gloire au Père, au Fils, et au Saint-Esprit.
}
\newcommand{\gscore}[1]{
\gregorioscore{gabc/#1}
}
\newcommand{\smallscore}[1]{
\gresetinitiallines{0}
\gscore{#1}
\gresetinitiallines{1}
}