summaryrefslogtreecommitdiff
path: root/support/gregoriotex/doc/Command_Index_User.tex
blob: ccd0130ab4256b2e3c031fc673daf2810e92743a (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
% !TEX root = GregorioRef.tex
% !TEX program = LuaLaTeX+se
%
% Copyright (C) 2006-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
% Gregorio is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Gregorio is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Gregorio.  If not, see <http://www.gnu.org/licenses/>.
%
\section{User Controls}

These functions are available to the user to customize elements of the
score which cannot be controlled from the gabc file. They can be added
to any \verb=.tex= file. Do not add them to any \verb=.gtex= or
\verb=.gabc= file.

\subsection{Using the Package}

To use the Gregorio\TeX\ package in a \LaTeX\ document, include \verb=\usepackage{gregoriotex}=
in the document preamble. This macro has the following form:

\macroname{\textbackslash usepackage}{[\optional{(options)}]\{gregoriotex\}}{gregoriotex.sty}

The optional arguments are:

\bigskip\rowcolors{1}{lightgray}{lightgray}
\begin{tabular}{lp{10cm plus .5cm}}
	Argument & Description \\
	\hline
	\texttt{debug} & Debug messages will be printed to the output log.  Can also be specified as \verb:debug={<types>}:, in which case only messages of the categories (see \nameref{DebugCategory}) listed will be printed to the output log.\\
	\hline
	\texttt{nevercompile} & Default. The classic behavior of Gregorio\TeX. The user is %
		responsible for compiling gabc scores into gtex files.\\
	\texttt{autocompile} & Gregorio\TeX\ will automatically compile gtex files from gabc %
		files when necessary. If the gabc has been modified, or the %
		gtex has an outdated version, or the gtex file does not exist, %
		THEN Gregorio\TeX\ will compile a new gtex file.\\
	\texttt{forcecompile} & Gregorio\TeX\ will compile all scores from their gabc files.\\
	\hline
	\texttt{allowdeprecated=false} & Force all deprecated commands to raise a package error %
		rather than a warning. This allows the user to ensure that their file is %
		compliant with the current version of Gregorio\TeX.\\
\end{tabular}\bigskip

\textbf{Note:} \verb=nevercompile=, \verb=autocompile=, and
\verb=forcecompile= conflict with eachother. Only one should be
specified in the options list.\bigskip

To use the package in a Plain \TeX\ document, include \verb=\input gregoriotex.tex= near the top of the document (the area which would correspond to the preamble in \LaTeX).

To use the \texttt{debug} option in Plain \TeX, you'll need to define \verb=\gre@debug= manually as a string listing the kinds of messages you want printed (or as \verb=all= if you want all messages printed).

To use the \texttt{allowdeprecated=false} option, you'll need \verb=\gre@allowdeprecatedfalse=.

The compilation options can be set using \verb=\gresetcompilegabc= (see below).

\textbf{Important:} Gregorio\TeX{} may require up to two passes (runs of
\texttt{lualatex} or \texttt{luatex}) to compute the line heights correctly.  If a second
pass is required, Gregorio\TeX{} will emit the following
warning:\par\medskip

\begin{scriptsize}
\begin{latexcode}
Module gregoriotex warning: Line heights or variable brace lengths may have changed. Rerun to fix.
\end{latexcode}
\end{scriptsize}

Gregorio\TeX{} two-pass processing is compatible with \texttt{latexmk}.

If you only need the special symbols which Gregorio\TeX\ contains, and not the ability to include scores or musical glyphs, then you can load \texttt{gregoriosyms} instead of \texttt{gregoriotex}.  It supports all of the above options except those specifically related to scores.  \textbf{You should not try to load both packages}.

\subsubsection{Gregorio\TeX{} and \texttt{microtype}}

If you are using the \texttt{microtype} package or a package that itself uses
\texttt{microtype}, please load it after \texttt{gregoriotex}.  If you load
\texttt{microtype} before \texttt{gregoriotex}, you may receive an error about
an ``undefined control sequence'' if you use certain Gregorio\TeX{} features.

\subsection{Commands}

Once you've included the package in your document (as explained above) the following commands allow you to insert scores and manipulate the way they appear in the document.

\subsubsection{Including scores}

\macroname{\textbackslash gregorioscore}{[\optional{\#1}]\{\#2\}}{gregoriotex-main.tex}
Macro for including scores.  Works on both gabc and gtex files.

\begin{argtable}
	\#1 & \texttt{n} & Optional. \#2 will be included as is. \\
			& \texttt{a} & Optional. Gregorio\TeX\ will automatically compile gabc files if necessary.\\
			& \texttt{f} & Optional. Forces Gregorio\TeX\ to compile the gabc file.\\
	\#2 & string & Relative or absolute path to the score.\\
\end{argtable}

Example:\par\medskip
\begin{latexcode}
	\gregorioscore[n]{TecumPrincipium.gtex}
	\gregorioscore{Chant/VirgoVirginum.gabc}
	\gregorioscore{/home/user/chant/AdTeLevavi}
	\gregorioscore[a]{AveMaria}

	%The following lines include the same score:
	\gregorioscore{Christus}
	\gregorioscore{Christus.gtex}
	\gregorioscore{./Christus}
	\gregorioscore{./Christus.gabc}

	%With the optional arg [f], #2 must be a file usable by \TeX.
	\gregorioscore[f]{TecumPrincipium.gabc} % Wrong
\end{latexcode}

\textbf{Important:} For the sake of clarity it is recommended that the
file extension be omitted from \texttt{\#2} unless using the \texttt{nevercompile} option. When the \texttt{nevercompile}
option is in effect (either via package option
\texttt{[nevercompile]}, or \verb=\gresetcompilegabc{never}=, or
\verb=\gregorioscore[n]=) \#2 must be a \TeX\ file that exists and
the file extension (normally gtex) must be given.

When called with the optional argument \texttt{[a]} Gregorio\TeX\ will
automatically generate a \texttt{gtex} file in this format:
\texttt{\textit{scorename}-x\_x\_x.gtex} where \texttt{x\_x\_x} is the
gregorio version. This resulting file is not intended to be modified
by the user and will be removed when the gabc file is recompiled. The
rules that Gregorio\TeX\ uses to determine if a gabc file needs to be
compiled are:

\begin{itemize}
\item If a gtex file does not exist.
\item If the modification time of the gabc file is newer than its
	corresponding gtex file.
\item If the version of the gtex file is outdated.
\end{itemize}

When called with the optional argument \texttt{[n]} Gregorio\TeX\ will
include the score without doing anything else. This is the same as the
old behavior of Gregorio\TeX\ and therefore the default behavior.

When called with the optional argument \texttt{[f]} Gregorio\TeX\ will
compile the gabc file into a gtex file. This is similar to
\texttt{[a]} except the gabc is compiled every time.

\macroname{\textbackslash gresetgregpath}{\{\#1\}}{gregoriotex-main.tex}
Set a list of additional directories which should be searched for scores.  Directories may be absolute or relative, but must end with a slash (\verb=/=) and enclosed in braces (\verb={}=), even if there is only one additional directory.  For example, to look in a directory called “Scores” which is alongside the main project directory, one could use the following:

\begin{latexcode}
	\gresetgregpath{{../Scores/}}
\end{latexcode}

Note that these directories are not searched recursively.  If you want to include subdirectories, then each subdirectory must be included individually.


\macroname{\textbackslash gresetcompilegabc}{\{\#1\}}{gregoriotex-main.tex}
A macro to change the behavior of the way Gregorio\TeX\ includes scores.  This is similar to using the package options \verb=[forcecompile]=, \verb=[autocompile]=, and \verb=[nevercompile]=, but does not necessarly apply to the entire document.


\begin{argtable}
	\#1 & \texttt{force} & all later calls of \verb=\gregorioscore= will compile the gabc
file into a gtex file.\\
	& \texttt{auto} & all later calls of \verb=\gregorioscore= will use Gregorio\TeX's
automatic compilation of gabc files.\\
	& \texttt{never} & all later calls of \verb=\gregorioscore= will include the score
without doing anything else.
\end{argtable}

\medskip This macro can be combined in the same document with different arguments to
switch between different behaviors: \par\medskip
\begin{latexcode}
	\usepackage{gregoriotex} % [autocompile] is the default.
	----
	\gregorioscore{TecumPrincipium} % gabc auto compiled.
	\gregorioscore[n]{TecumPrincipium} % gabc never compiled.
	\gregorioscore[f]{TecumPrincipium} % gabc always compiled.

	\gresetcompilegabc{never}
	\gregorioscore{TecumPrincipium} % gabc never compiled.
	\gregorioscore[f]{TecumPrincipium} % gabc always compiled.
	\gregorioscore[a]{TecumPrincipium} % gabc auto compiled.

	\gresetcompilegabc{force}
	\gregorioscore{TecumPrincipium} % gabc always compiled.
	\gregorioscore[n]{TecumPrincipium} % gabc never compiled.
	\gregorioscore[a]{TecumPrincipium} % gabc auto compiled.
\end{latexcode}

\macroname{\textbackslash gabcsnippet}{\{\#1\}}{gregoriotex-main.tex}
Converts the gabc notation specified in \texttt{\#1} to Gregorio\TeX\ and
includes it directly in the document.

\begin{argtable}
	\#1 & string & The gabc to insert into the document.\\
\end{argtable}

\medskip For example:\par\medskip
\begin{latexcode}
	\gabcsnippet{(c3) Al(eg~)le(gv.fhg)lu(efe___)ia(e.) (::)}
\end{latexcode}


\subsubsection{Point-and-click}

Gregorio can add Lilypond-like point-and-click links into the output PDF
file.  The URLs added to the PDF conform with Lilypond and will use the
Lilypond scripts if they are enabled on your system.  To configure your
system for this feature, please see the documentation for Lilypond since
they established the feature.\bigskip

In addition to switching this feature on in \TeX{}, you must also pass the
\texttt{-p} option to \texttt{gregorio} when converting your gabc files to
Gregorio\TeX{} for inclusion.  This will automatically be done for auto- and
force-compiled scores, but if an auto-compiled score was compiled without the
option, Gregorio\TeX{} will not realize it has changed to recompile it.  In
this case, remove the corresponding \texttt{.gtex} file to force it to
recompile.\bigskip

\textbf{Important:} As with LilyPond, you should always turn off
point-and-click before producing gtex and/or PDF files for distribution.
This feature embeds absolute filenames from your computer as links in
the PDF, which can pose a security risk.  This is why this feature is
disabled by default.

\macroname{\textbackslash gresetpointandclick}{\{\#1\}}{gregoriotex-syllable.tex}
Macro to enable or disable the point-and-click feature.

\begin{argtable}
	\#1 & \texttt{on}  & Enable point-and-click link generation.\\
	& \texttt{off} & Disable point-and-click link generation (default).
\end{argtable}

This feature may be switched on and off as desired between scores.


\subsubsection{Overall Size}
While the default size for Gregorio scores is designed to approximate that found in most liturgical books, Gregorio\TeX\ also provides mechanisms for changing the size of your scores for use in any application.

\macroname{\textbackslash grechangestaffsize}{\{\#1\}}{gregoriotex-main.tex}
Macro to adjust the size of the staff.

\begin{argtable}
	\#1 & integer & The size of the staff lines.  Default value is 17.  Higher numbers yield larger staves.
\end{argtable}

\macroname{\textbackslash grechangestafflinethickness}{\{\#1\}}{gregoriotex-spaces.tex}
Macro to adjust the thickness of the staff lines.

\begin{argtable}
	\#1 & integer & The thickness of the staff lines.  The default value is same as staff size.
\end{argtable}


\subsubsection{Fine Tuning Dimensions}
In addition to providing control over the overall size of your scores, Gregorio\TeX\ allows you to fine tune the spacings around and between the various elements using the following functions.

\macroname{\textbackslash grechangedim}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-spaces.tex}
Macro to change one of Gregorio\TeX’s distances.  This function will check to make sure the distance you are trying to change exists first.

\begin{argtable}
	\#1 & string & The name of the distance to be changed.  See \nameref{distances} below.\\
	\#2 & string & The distance in string format.  \textbf{Note:} You cannot use a length register for this argument.  You \emph{must} use a string because of the way that Gregorio\TeX\ handles spaces.\\
	\#3 & \texttt{fixed} & Distance will not scale when staff size is changed.\\
	& \texttt{scalable} & Distance will scale when staff size is changed.\\
	& \texttt{inherited} & Distance will inherit its value from another distance.  When this argument is used, then \#2 should be the name of another Gregorio\TeX\ distance.
\end{argtable}

\macroname{\textbackslash grechangenextscorelinedim}{\{\#1\}\{\#2\}\{\#3\}\{\#4\}}{gregoriotex-spaces.tex}
Changes one of Gregorio\TeX’s distances for a given line in the next included score.  This works with \texttt{spaceabovelines}, \texttt{spacebeneathtext}, and \texttt{spacelinestext}.

\begin{argtable}
	\#1 & list of integers & A comma-separated list of line numbers in the next
													 score to be adjusted.\\
	\#2 & string & The name of the distance to be changed.  See
								 \nameref{distances} below.\\
	\#3 & string & The distance in string format.  \textbf{Note:} You cannot use
								 a length register for this argument.  You \emph{must} use a
								 string because of the way that Gregorio\TeX\ handles spaces.\\
	\#4 & \texttt{fixed} & Distance will not scale when staff size is changed.\\
	& \texttt{scalable} & Distance will scale when staff size is changed.\\
	& \texttt{inherited} & Distance will inherit its value from another
												 distance.  When this argument is used, then \#3 should
												 be the name of another Gregorio\TeX\ distance.
\end{argtable}

\macroname{\textbackslash grescaledim}{\{\#1\}\{\#2\}}{gregoriotex-spaces.tex}
Macro to turn on or off scaling with the staff size for a particular distance.

\begin{argtable}
	\#1 & string & The name of the distance for which scaling is to changed.  See \nameref{distances} below.\\
	\#2 & \texttt{yes}/\texttt{true}/\texttt{on}/\texttt{scalable} & Choose just one of the given keywords.  Scale the distance when changing the size of the staff.\\
	& string not in list above & Do not scale the distance when changing the size of the staff.
\end{argtable}

\textbf{Nota bene:} This macro also can be used to change whether or not the staff line thickness scales with the staff size by specifying \texttt{stafflinefactor} for the first argument.

\macroname{\textbackslash grechangecount}{\{\#1\}\{\#2\}}{gregoriotex-spaces.tex}
Macro to change one of Gregorio\TeX’s counts or penalities (numeric values).

\begin{argtable}
	\#1 & string & The name of the count to be changed.  See \nameref{counts} and \nameref{penalties} below.\\
	\#2 & integer & The new value.\\
\end{argtable}

\macroname{\textbackslash grechangenextscorelinecount}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-spaces.tex}
Changes one of Gregorio\TeX’s counts or penalties for a given line in the next included score.

\begin{argtable}
	\#1 & list of integers & A comma-separated list of line numbers in the next
													 score to be adjusted.\\
	\#2 & string & The name of the count to be changed.  See \nameref{counts} and
								 \nameref{penalties} below.\\
	\#3 & integer & The new value.\\
\end{argtable}

\macroname{\textbackslash greloadspaceconf}{\{\#1\}}{gregoriotex-spaces.tex}
Macro to load a space configuration file.  Space configuration file names have the format \verb=gsp-identifier.tex= and must be in the same directory as your project or in your texmf directory.  See \verb=gsp-sample.tex= for an example file.

\begin{argtable}
	\#1 & string & The identifier of the space configuration file.
\end{argtable}

Example:\par\medskip
\begin{latexcode}
	% loads gregoriotex-gsp-default.tex, the default configuration file
	\greloadspaceconf{default}
	% loads a custom configuration called gsp-myspaces.tex
	\greloadspaceconf{myspaces}
\end{latexcode}

\macroname{\textbackslash greconffactor}{}{gregoriotex-gsp-default.tex}
A count which indicates the staff size that a space configuration file is designed for.  Each space configuration file must have this value set as Gregorio\TeX\ will compare it to the current staff size to determine if the configuration file being loaded needs to be rescaled.

\macroname{\textbackslash gresetlineheightexpansion}{\{\#1\}}{gregoriotex-main.tex}
Macro to configure line height expansion behavior when notes appear
above or below the staff lines.

\begin{argtable}
		\#1 & \texttt{variable} & Expand lines within a score independently
															of each other \\
				& \texttt{uniform}  & Expand all lines within a score uniformly
\end{argtable}

By default, Gregorio\TeX{} uses \texttt{variable} line expansion.  This
produces output similar to modern liturgical books.  However, this
feature imposes a slight performance impact and typically requires a
second pass (run of \texttt{lualatex}) to get the heights right.\bigskip

The older behavior of Gregorio\TeX{}, \texttt{uniform} line expansion,
does not have this performance impact.  However, the extra space it adds
below the staff lines may look out-of-place in a section where there are
no notes below the staff lines.\bigskip

This behavior may be switched as needed within a \TeX{} document and
affects all the scores which follow.  However, if \texttt{variable} line
expansion is enabled anywhere in the document, the second pass will be
necessary.

\begin{small}
\begin{framed}
		\textit{For experts only:}\bigskip

		It is possible to suppress the line height computation and just use
		whatever has been computed from the previous run.  If you are sure
		that the score line heights haven't changed from the previous run,
		define the \verb=\greskipheightcomputation= control sequence before
		including the Gregorio\TeX{} package.  This will save a little bit
		of time per run.
\end{framed}
\end{small}

\macroname{\textbackslash gresetledgerlineheuristic}{\{\#1\}}{gregoriotex-spaces.tex}
Macro which enables or disables ledger line heuristics.  Currently, ledger
line heuristics allow Gregorio to reduce the space between a note and a
horizontal episema that surround a line on which a ledger line may appear
when the ledger line \textit{does not} appear.

\begin{argtable}
		\#1 & \texttt{enable}  & Ledger line heuristics will be used in placing
														 the horizontal episema \\
				& \texttt{disable} & Ledger line heuristics will not be used in
														 placing the horizontal episema \\
\end{argtable}

Because of the complexity of computing distances exactly, the heuristic may
guess incorrectly, causing the horizontal episema to be placed incorrectly.
This may be overridden on a note-by-note basic by using the
\texttt{[hl:\textit{n}]} and \texttt{[ll:\textit{n}]} gabc directives.  The
\texttt{hl} directive sets an explicit high ledger line (above the staff),
and the \texttt{ll} directive sets an explicit low ledger line (below the
staff).  The \texttt{\textit{n}} should be set to indicate whether the
system should act as if the ledger line exists (\texttt{1}) or not
(\texttt{0}).

\macroname{\textbackslash gresetnoteadditionalspacelinestext}{\{\#1\}}{gregoriotex-main.tex}
Macro which determines how much additional space between the notes and the lyrics for really low notes.

\begin{argtable}
	\#1 & \texttt{automatic} & additional space between the notes and the lyrics is computed automatically (default)\\
	& \texttt{manual} & additional space between the notes and the lyrics is based on the user setting of \texttt{noteadditionalspacelinestext} (a spacing adjustable using \verb=\grechangedim=)
\end{argtable}

\subsubsection{Staff Lines}

\macroname{\textbackslash gresetlinecolor}{\{\#1\}}{gregoriotex.sty \textup{and} gregoriotex.tex}
Macro for changing the color of the staff lines.   The two most common colors you're going to want to use are \texttt{gregoriocolor} (see \nameref{colors}) and \texttt{black} (the default).

\begin{argtable}
	\#1 & color name & The color of the staff lines
\end{argtable}

\macroname{\textbackslash gresetlines}{\{\#1\}}{gregoriotex-main.tex}
Macro for setting whether the staff lines should be rendered or not.

\begin{argtable}
	\#1 & \texttt{visible} & The staff lines should be printed (default)\\
	& \texttt{invisible} & The staff lines should not be printed
\end{argtable}

\macroname{\textbackslash gresetlinesbehindpunctumcavum}{\{\#1\}}{gregoriotex-signs.tex}
Macro for setting whether the staff lines behind a punctum cavum should be shown or not.

\begin{argtable}
	\#1 & \texttt{visible} & The staff lines behind a punctum cavum should be printed (Plain \TeX\ default)\\
	& \texttt{invisible} & The staff lines behind a punctum cavum should not be printed (\LaTeX\ default)
\end{argtable}

\macroname{\textbackslash gresetlinesbehindalteration}{\{\#1\}}{gregoriotex-signs.tex}
Macro for setting whether the staff lines behind an alternation (\ie, an accidental) should be shown or not.

\begin{argtable}
	\#1 & \texttt{visible} & The staff lines behind an alteration should be printed (Plain \TeX\ default)\\
	& \texttt{invisible} & The staff lines behind an alteration should not be printed (\LaTeX\ default)
\end{argtable}

\macroname{\textbackslash gresetlinesbehinddottedbar}{\{\#1\}}{gregoriotex-signs.tex}
Macro for setting whether the staff lines behind a dotted bar should be shown or not.

\begin{argtable}
	\#1 & \texttt{visible} & The staff lines behind a dotted bar should be printed\\
	& \texttt{invisible} & The staff lines behind a dotted bar should not be printed (default)
\end{argtable}


\subsubsection{Score Font}
Gregorio\TeX\ currently supports 3 different fonts for the glyphs in a score (neumes, clefs, alterations, \etc): Greciliae (a customized version of Caeciliae by Fr.\ Matthew Spencer, OSJ), Gregorio, and Grana Padano (née Parmesan, developed for Lilypond by Juergen Reuter).

\macroname{\textbackslash gresetgregoriofont}{[\optional{\#1}]\{\#2\}}{gregoriotex-main.tex}
Set the font used for the neumes.  The optional argument \texttt{[\#1]}
may be used to specify an alternate font/rule set.  Currently, the only
available alternate font/rule set is \texttt{op} for Dominican neumes.

Note that the font will be looked up by name through luaotfload, see the documentation of luaotfload for what it implies.

\begin{argtable}
	\#1 & \textit{(omitted)} & Use the normal font and rule set (default).\\
	& \texttt{op} & Use the alternate Dominican font/rule set.\\
	\#2 & \texttt{greciliae} & Use the Greciliae font (default).\\
	& \texttt{gregorio} & Use the Gregorio font.\\
	& \texttt{granapadano} & Use the Grana Padano font.\\
\end{argtable}

\textbf{Nota Bene:} The Gregorio and Grana Padano fonts are not included by default in a basic installation.  To get them you need to download and install them from the \verb=supp-fonts-##.zip= file (where \#\# is the version number of your release).  See \url{https://github.com/gregorio-project/gregorio/releases} for the list of releases.

\macroname{\textbackslash gresetgregoriofontscaled}{[\optional{\#1}]\{\#2\}\{\#3\}}{gregoriotex-main.tex}

This function is the same as above, with a third argument to scale the font. The fonts shipped with Gregorio do not need to use this function, but some custom fonts do. Note that you cannot use this to scale glyphs up or down, as they would not be placed correctly on the staff.

The two first arguments are the same as \texttt{\textbackslash gresetgregoriofont}. The third argument is an integer representing the scaling factor, where the one used by \texttt{\textbackslash gresetgregoriofont} is 100000.

\macroname{\textbackslash greloadholehollowfonts}{\{\#1\}}{gregoriotex-main.tex}

If set to false, will not load the \texttt{hollow} and \texttt{hole} variants of the next font to load. Use it before loading third party fonts not having these variants (rare case).

\begin{argtable}
	\#1 & string & \texttt{true} or \texttt{false}.\\
\end{argtable}

\subsubsection{Glyph Alteration}
In addition to the normal glyphs loaded by the choice of font, Gregorio\TeX\ also supports several methods for fine tuning the choice of glyphs.  Using the below functions, you can choose from alternative glyphs which are already built into Gregorio\TeX\ or import custom glyphs you have designed yourself.

\macroname{\textbackslash grechangeglyph}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-main.tex}
Substitutes the given Gregorio\TeX\ score glyph with the specified glyph
from the specified font.

\begin{argtable}
	\#1 & string & The name of the Gregorio\TeX\ glyph to replace.\\
	\#2 & string & The name of the font to use.\\
	\#3 & number & The code point of the glyph to use.\\
	& \texttt{.}string & The name of the variant (appended to \#1) to use.\\
	& string & (any other string) The name of the glyph to use.
\end{argtable}

\medskip If \texttt{\#1} has a wildcard (a \texttt{*}) in it, then \texttt{\#3}
must be empty or start with a dot, and all glyphs matching \texttt{\#1} will be
replaced with corresponding glyphs whose names have \texttt{\#3} appended.

\medskip If \texttt{\#2} is \texttt{*}, then the substitution is assumed
to be available in all score fonts.

\medskip For example, to use the old glyphs (from Caeciliae) for the
strophicus, use the following:\par\medskip
\begin{latexcode}
	\grechangeglyph{Stropha}{greciliae}{.caeciliae}
	\grechangeglyph{StrophaAucta}{greciliae}{.caeciliae}
\end{latexcode}

\medskip To replace all torculus resupinus glyphs with their alternate
versions, use the following:\par\medskip
\begin{latexcode}
	\grechangeglyph{TorculusResupinus*}{*}{.alt}
\end{latexcode}

\textbf{Nota Bene:} Because the bar glyphs vary based on number of score lines,
substituting them is more complicated.  To cover all numbers of score lines,
you will need to substitute all of the glyphs for the same (like
\texttt{VirgulaTwo} through \texttt{VirgulaSix} for all available virgula
glyphs).  For example:

\medskip To replace all "dotted divisio maior" glyphs with their same-named
variants from the \texttt{gregorio} font, use the following:\par\medskip
\begin{latexcode}
	\grechangeglyph{DivisioMaiorDotted*}{gregorio}{}
\end{latexcode}

\macroname{\textbackslash greresetglyph}{\{\#1\}}{gregoriotex-main.tex}
Removes a Gregorio\TeX\ score glyph substitution, restoring it back to
its original form.

\begin{argtable}
	\#1 & string & The name of the Gregorio\TeX\ glyph to restore.\\
\end{argtable}

\medskip If \texttt{\#1} has a wildcard (a \texttt{*}) in it, then
all glyphs matching \texttt{\#1} will be restored.

\medskip For example, to restore the strophicus back to the new glyphs,
use the following:\par\medskip
\begin{latexcode}
	\greresetglyph{Stropha}
	\greresetglyph{StrophaAucta}
\end{latexcode}

\medskip To restore all torculus resupinus glyphs to their original
form, use the following:\par\medskip
\begin{latexcode}
	\greresetglyph{TorculusResupinus*}
\end{latexcode}

\macroname{\textbackslash grechangecavumglyph}{\{\#1\}\{\#2\}\{\#3\}[\optional{\#4}][\optional{\#5}]}{gregoriotex-main.tex}
Substitutes the given Gregorio\TeX\ score cavum glyphs with the specified glyphs
from the specified font.

\begin{argtable}
	\#1 & string & The name of the Gregorio\TeX\ glyph to replace.\\
	\#2 & string & The name of the font to use for the cavum glyph.\\
	\#3 & number & The code point of the cavum glyph to use.\\
	& \texttt{.}string & The name of the variant (appended to \#1) to use for the cavum glyph.\\
	& string & (any other string) The name of the cavum glyph to use.\\
	\#4 & string & The name of the font to use for the glyph to fill in the cavum hole.\\
	\#5 & number & The code point of the glyph to use to fill in the cavum hole.\\
	& \texttt{.}string & The name of the variant (appended to \#1) to use to fill in the the cavum hole.\\
	& string & (any other string) The name of the glyph to use to fill in the cavum hole.\\
\end{argtable}

\textbf{Nota Bene:} The usage of wildcards (\texttt{*}s) for \texttt{\#1},
\texttt{\#2}, and \texttt{\#4} is similar to \verb=\grechangeglyph=.

\macroname{\textbackslash greresetcavumglyph}{\{\#1\}}{gregoriotex-main.tex}
Removes a pair of Gregorio\TeX\ score cavum glyph substitution, restoring them
back to their original form.

\begin{argtable}
	\#1 & string & The name of the Gregorio\TeX\ cavum glyph to restore.\\
\end{argtable}

\textbf{Nota Bene:} The usage of wildcards (\texttt{*}s) for \texttt{\#1} is
similar to \verb=\greresetcavumglyph=.

\macroname{\textbackslash gredefsymbol}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-symbols.tex}
Defines (or redefines) a \TeX\ control sequence to be a non-score symbol.
If defined this way, the symbol will scale with the text font.

\begin{argtable}
	\#1 & string & The name of the \TeX\ control sequence (without leading backslash).\\
	\#2 & string & The name of the font to use.\\
	\#3 & number & The code point of the glyph to use.\\
	& string & The name of the glyph to use.
\end{argtable}

\macroname{\textbackslash gredefsizedsymbol}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-symbols.tex}
Defines (or redefines) a \TeX\ control sequence to be a non-score symbol
which requires a single numeric argument (in points) to which the symbol
will be scaled.

\begin{argtable}
	\#1 & string & The name of the \TeX\ control sequence (without leading backslash).\\
	\#2 & string & The name of the font to use.\\
	\#3 & number & The code point of the glyph to use.\\
	& string & The name of the glyph to use.
\end{argtable}

\macroname{\textbackslash gresethepisema}{\{\#1\}}{gregoriotex-signs.tex}
Determines whether Gregorio\TeX\ should join (bridge) horizontal episemata on adjacent notes.

\begin{argtable}
	\#1 & \texttt{bridge} & Adjacent horizontal episemata are joined together (default).\\
	& \texttt{break} & Adjacent horizontal episemata are not joined.
\end{argtable}

\macroname{\textbackslash gresetpunctumcavum}{\{\#1\}}{gregoriotex-signs.tex}
A shortcut for switching to the alternative punctum cavum and back.

\begin{argtable}
	\#1 & \texttt{alternate} & use the alternate punctum cavum\\
	& \texttt{normal} & use the normal punctum cavum
\end{argtable}

Using the alternate punctum cavum is the equivalent of issuing the following commands:

\begin{latexcode}
	\grechangeglyph{PunctumCavum}{greciliae}{.caeciliae}%
	\grechangeglyph{LineaPunctumCavum}{greciliae}{.caeciliae}%
	\grechangeglyph{PunctumCavumHole}{greciliae}{.caeciliae}%
	\grechangeglyph{LineaPunctumCavumHole}{greciliae}{.caeciliae}%
\end{latexcode}

\macroname{\textbackslash gresetglyphstyle}{\{\#1\}}{gregoriotex-chars.tex}
Gregorio\TeX\ supports several glyph styles which can be changed with this macro.  These style replace some non-note glyphs with alternatives.

\begin{argtable}
	\#1 & \texttt{default} & Use the default style\\
	& \texttt{medicaea} & Use a Medicaea style\\
	& \texttt{hufnagel} & Use the hufnagel style\\
	& \texttt{mensural} & Use the mensural style
\end{argtable}

%%%  Should there be a table here or in the appendix which shows the affected glyphs in each of the styles?


\subsubsection[Barred letters (A/, etc.)]{Barred letters (\Abar, etc.)}

\macroname{\textbackslash gresimpledefbarredsymbol}{\{\#1\}\{\#2\}}{gregoriotex-symbols.tex}
Redefines a \TeX\ control sequence to be a a barred symbol.

\begin{argtable}
	\#1 & character & must be \texttt{A}, \texttt{R}, or \texttt{V}.\\
	\#2 & dimension & how much the bar will be shifted left.\\
\end{argtable}

Gregorio\TeX\ does not have precomposed barred letters, instead, it has bars that you
can use to composed barred letters in your text font. This command is the most
simple version.

For example:

\medskip \begin{latexcode}
	\gresimpledefbarredsymbol{A}{0.3em}
\end{latexcode}

Will define \texttt{\textbackslash Abar} to be a A with a bar shifted right
of \texttt{0.3em} from the beginning of the glyph. This is the default definition
and fits well with the Linux Libertine font. If you use another font, you'll
certainly have to change this value by calling the \texttt{\textbackslash gresimpledefbarglyph} command.

\macroname{\textbackslash gredefbarredsymbol}{\{\#1\}\{\#2\}\{\#3\}\{\#4\}\{\#5\}\{\#6\}}{gregoriotex-symbols.tex}
Redefines a \TeX\ control sequence to be a barred symbol.

\begin{argtable}
	\#1 & string & the name of the command you want to define.\\
	\#2 & string & command to typeset the text.\\
	\#3 & string & symbol of the bar (must be defined through \texttt{gredefsizedsymbol}).\\
	\#4 & number & the size of greextra to use (in pt).\\
	\#5 & dimension & horizontal right shift of the bar.\\
	\#6 & dimension & vertical shift of the bar glyph.\\
\end{argtable}

This is a more complete version of the previous command, it allows you to define
barred letters with a different style. For example you can choose another bar
drawing, or take a bar more adapted to small font size.

For example:

\begin{footnotesize}
\begin{latexcode}
	\gredefbarredsymbol{RBarBold}{\textbf{R}}{greRBarSmall}{13}{1.7mm}{0.1mm}
\end{latexcode}
\end{footnotesize}

\gredefbarredsymbol{RBarBold}{\textbf{R}}{greRBarSmall}{13}{1.7mm}{0.1mm}
Will define \texttt{\textbackslash RBarBold} to be a bold \textbf{R} with
the bar made for small text (a bit bolder, named \texttt{RBarSmall} in greextra)
, at 12pt, shifted right of \texttt{1.7mm} from the beginning of the glyph, and lowered down
by \texttt{0.1mm}. The result is that \texttt{\textbackslash RBarBold} will typeset \RBarBold .

See Appendix \ref{subsec:greextra} for a list of bars and other
symbols present in the greextra font.

\macroname{\textbackslash grelatexsimpledefbarredsymbol}{\{\#1\}\{\#2\}\{\#3\}\{\#4\}\{\#5\}}{gregoriotex-symbols.tex}
Redefines a \TeX\ control sequence to be a barred symbol.

\bigskip\textbf{Only available in \LaTeX.}

\begin{argtable}
	\#1 & character & must be \texttt{A}, \texttt{R}, or \texttt{V}.\\
	\#2 & dimension & how much the bar will be shifted left when upright and medium weight.\\
	\#3 & dimension & how much the bar will be shifted left when italic/slanted and medium weight.\\
	\#4 & dimension & how much the bar will be shifted left when upright and bold.\\
	\#5 & dimension & how much the bar will be shifted left when italic/slanted and bold.\\
\end{argtable}

This is like \verb=\gresimpledefbarglyph=, but allows setting different shifts
for different font shapes and weights.  If you need something more elaborate,
you will need to redefine the bar macro(s) manually.  This macro is only
available in \LaTeX{} because it depends upon the \LaTeX{} font system.

\macroname{\textbackslash grebarredsymbol}{\{\#1\}\{\#2\}\{\#3\}\{\#4\}\{\#5\}}{gregoriotex-symbols.tex}
Generates a barred symbol.  This macro does not change any barred symbol
definitions.  Instead, it actually generates the code that would show the
barred symbol.

\begin{argtable}
	\#1 & string    & command to typeset the text.\\
	\#2 & string    & symbol of the bar (must be defined through \texttt{gredefsizedsymbol}).\\
	\#3 & number    & the size of greextra to use (in pt).\\
	\#4 & dimension & horizontal right shift of the bar.\\
	\#5 & dimension & vertical shift of the bar glyph.\\
\end{argtable}

\macroname{\textbackslash gothRbar}{}{gregoriotex-symbols.tex}
Prints \gothRbar.  Defined with \verb=\gredefsymbol=.

\macroname{\textbackslash gothVbar}{}{gregoriotex-symbols.tex}
Prints \gothVbar.  Defined with \verb=\gredefsymbol=.

\macroname{\textbackslash grealtcross}{}{gregoriotex-symbols.tex}
Prints \grealtcross.  Defined with \verb=\gredefsymbol=.

\macroname{\textbackslash grecross}{}{gregoriotex-symbols.tex}
Prints \grecross.  Defined with \verb=\gredefsymbol=.

\macroname{\textbackslash greheightstar}{}{gregoriotex-symbols.tex}
Prints \greheightstar.  Defined with \verb=\gredefsymbol=.

\macroname{\textbackslash gresixstar}{}{gregoriotex-symbols.tex}
Prints \gresixstar.  Defined with \verb=\gredefsymbol=.

\macroname{\textbackslash greseparator}{\{\#1\}\{\#2\}}{gregoriotex-symbols.tex}
A macro for invoking one of the five separators (fancy lines) which are contained in the greextra font.

\begin{argtable}
	\#1 & \texttt{1}--\texttt{5} & Choose the number of the line desired\\
	\#2 & integer & the point size at which to print the line\\
\end{argtable}

\macroname{\textbackslash greornamentation}{\{\#1\}\{\#2\}}{gregoriotex-symbols.tex}
A macro for invoking one of the ornamentation elements which are contained in the greextra font.

\begin{argtable}
	\#1 & \texttt{1}--\texttt{2} & Choose the number of the ornamentation desired\\
	\#2 & integer & the point size at which to print the line\\
\end{argtable}


\subsubsection{Special Characters}

% this is defined in gregoriotex-symbols.texx as having one argument, but the
% lua code generates a \gdef\<something> which then requires a second argument
\macroname{\textbackslash gresetspecial}{\{\#1\}\{\#2\}}{gregoriotex-symbols.tex}
Sets a special character.  Special characters are used from gabc within
\texttt{<sp>} and \texttt{</sp>}.

\begin{argtable}
	\#1 & string & The text between \texttt{<sp>} and \texttt{</sp>}.\\
	\#2 & \TeX\ code & The \TeX\ code to substitute when \texttt{<sp>\#1</sp>}
										 is used in gabc.\\
\end{argtable}

\textbf{Nota Bene:} If you need to use a character in \#1 that is made special
by \TeX{} (\ie, \textbackslash, \%, \etc), you should instead use
\verb=\string\nnn=, where \texttt{nnn} is a three-digit, zero-padded number
representing the ASCII code of the character (\ie, \textbackslash{} would be
\verb=\string\092=).

\macroname{\textbackslash greunsetspecial}{\{\#1\}}{gregoriotex-symbols.tex}
Un-sets a special character.  Using an unset special character will use its
text directly.

\begin{argtable}
	\#1 & string & The text between \texttt{<sp>} and \texttt{</sp>}.\\
\end{argtable}

\textbf{Nota Bene:} The same rules apply for \#1 as in \verb=\gresetspecial=.

\macroname{\textbackslash gretilde}{}{gregoriotex-main.tex}
Macro to print $\sim$.  This macro is set using the above for \texttt{<sp>$\sim$</sp>}.



\subsubsection{Styling}
Different elements of an include score have different styles applied.  These elements and their defaults are listed below:

\begin{adjustbox}{center}
\let\stylename\texttt
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\bigskip\rowcolors{1}{lightgray}{lightgray}
\begin{tabular}{lp{7cm plus .5cm}r}
	Element Name & Description & Default\\
	\hline
	\stylename{abovelinestext} & above line text (\texttt{<alt></alt>} in gabc, appears above the staff) & normal\\
	\stylename{additionalstafflines} & short lines behind notes above or below the staff & special\footnotemark[1]\\
	\stylename{annotation} & the annotation & none\\
	\stylename{commentary} & the commentary & {\footnotesize\it footnote-size italics} (\LaTeX)\\
	&& {\textit{italics}} (Plain \TeX)\\
	\stylename{elision} & elisions (\texttt{<e></e>} in gabc) & {\textit{\small small-size italics}} (\LaTeX)\\
											&& {\textit{italics}} (Plain \TeX)\\
	\stylename{firstsyllable} & the first syllable of the score excluding the score initial & none\\
	\stylename{firstsyllableinitial} & the first letter of the first syllable of a score which is not the score initial & none\\
	\stylename{firstword} & the first word of the first score excluding the score initial & none\\
	\stylename{highchoralsign} & high choral signs & none\\
	\stylename{initial} & Score initial (the first letter of the score, when offset from the rest of the text) & 40 pt font\\
	\stylename{lowchoralsign} & low choral signs & none\\
	\stylename{modedifferentia} & the rendered annotation from the \texttt{mode-differentia: ;} header in the gabc file & \parbox[t]{2.2cm}{\raggedleft\textbf{bold}}\\
	\stylename{modeline} & the rendered annotation from the \texttt{mode: ;} header in the gabc file & \parbox[t]{2.2cm}{\raggedleft\textsc{\textbf{bold small capitals}}} (\LaTeX)\\
	& & \textbf{bold} (Plain\TeX)\\
	\stylename{modemodifier} & the rendered annotation from the \texttt{mode-modifier: ;} header in the gabc file & \parbox[t]{2.2cm}{\raggedleft\textit{\textbf{bold italics}}}\\
	\stylename{nabc} & ancient notation & {\color{gregoriocolor}gregoriocolor}\\
	\stylename{normalstafflines} & Full length staff lines & none\\
	\stylename{translation} & Translation text (appears below lyrics) & {\it italics}\\
\end{tabular}
\end{adjustbox}

\footnotemark[1]\textit{Special:} By default, \texttt{additionalstafflines} inherits its properties from \texttt{normalstafflines}.  To decouple these environments, you must manually change \texttt{additionalstafflines} using \texttt{\textbackslash grechangestyle}.
\renewcommand{\thefootnote}{\arabic{footnote}}\breakabletrue

\macroname{\textbackslash grechangestyle}{\{\#1\}\{\#2\}[\optional{\#3}]}{gregoriotex.sty \textup{and} gregoriotex.tex}
Command to change styling of a score element.

\begin{argtable}
	\#1 & string & element whose styling is to be changed (see list above for options)\\
	\#2 & \TeX\ code & the code necessary to turn on the styling\\
	\#3 & \TeX\ code & Optional.  The code necessary to turn off the styling (\eg, if the code to turn on the styling contains a \verb=\begin{environment}= then the code to turn it off must have the matching \verb=\end{environment}=.
\end{argtable}

Examples:\par\medskip
\begin{latexcode}
	% This one works for both PlainTeX and LaTeX this would make
	% the translations bold and italic
	\grechangestyle{translation}{\it\bf}

	% This one is LaTeX only, and would make the above lines
	% text small and italic
	\grechangestyle{abovelinestext}{\begin{small}\begin{itshape}}%
		[\end{itshape}\end{small}]

	% This would make the initial print in 36pt font.
	\grechangestyle{initial}{\fontsize{36}{36}\selectfont}
\end{latexcode}

\bigskip
Each element will be typeset within an isolated group to prevent styling commands from leaking from one element to the next.  As a result, if a styling command has an ``on-switch'' but no ``off-switch'' (like \verb=\it= or \verb=\bf= in the first example above) it is not necessary to encapsulate them within \verb=\begingroup= and \verb=\endgroup=.  As a result, the third argument is only necessary for styling commands which come in pairs (like the environments in the second example).

\subsubsection{Text Elements}
While the gabc headers provide support for some of the text elements commonly found on chant scores, Gregorio\TeX\ provides the following functions to allow you to enter and control those elements with a greater degree of precision than the gabc headers.

\macroname{\textbackslash greannotation}{[\optional{\#1}]\{\#2\}}{gregoriotex-main.tex}
Macro to add annotations (the text which appears above the initial) to a score.  While a single call of the function does not support multiple lines, successive calls to the function will be added to the annotation as a new line below what is already there.

\begin{argtable}
	\#1 & \texttt{c} & When adding a new line, align the center of the new line with the center of the existing lines\\
	& \texttt{l} & When adding a new line, align the left side of the new line with the left side of the existing lines\\
	& \texttt{r} & When adding a new line, align the right side of the new line with the right side of the existing lines\\
	\#2 & string & the text of the annotation
\end{argtable}

\textbf{Nota Bene:} The first argument does not affect the alignment of lines already in the annotation, only the way the new line aligns with the existing lines as a whole.

\macroname{\textbackslash grecommentary}{[\optional{\#1}]\{\#2\}}{gregoriotex-main.tex}
Macro to add commentary (the text flush right at the top, usually a scripture reference) to a score.  While a single call of this function does not support multiple lines, successive calls to the function will add a new line to the commentary directly below the previous.

\begin{argtable}
	\#1 & distance & Optional.  Additional distance to be placed between the commentary and the top staff line for the next score only.\\
	\#2 & string & The text of the commentary.\\
\end{argtable}

\textbf{Nota Bene:} If your commentary is multi-lined, then the optional argument of the last line, and only the last line, will be taken into account.  Further, pay attention to the fact that the optional argument is \emph{additional} distance, \ie, it will be added to \texttt{commentaryraise} to determine the distance from the baseline of the commentary to the top line of the staff.

\macroname{\textbackslash greillumination}{\{\#1\}}{gregoriotex-main.tex}
Macro to add an illuminated initial.

\begin{argtable}
	\#1 & \TeX\ code & the code necessary to make the illuminated initial appear\\
\end{argtable}

\textbf{Nota Bene:} Usually the argument of this command should be an \verb=\includegraphics= command, but you may use what ever you want as the illuminated initial.

\macroname{\textbackslash gresetinitiallines}{\{\#1\}}{gregoriotex-syllable.tex}
Sets the number of lines the score initial requires.

\begin{argtable}
	\#1 & number & The number of lines required by the initial.  If \texttt{0}, the score will have no separated initial.\\
\end{argtable}

\textbf{Nota Bene:} As currently implemented, you cannot set an initial which is larger than 2 lines and in order to do so you must set manual line breaks in the gabc for the first two lines.

\macroname{\textbackslash gresetmodenumbersystem}{\{\#1\}}{gregoriotex-main.tex}
Sets the number system used for the mode number.

\begin{argtable}
	\#1 & \texttt{roman-minuscule} & Use lower-case Roman numerals (the default in \LaTeX, good for small capitals).\\
			& \texttt{roman-majuscule} & Use upper-case Roman numerals (the default in Plain\TeX).\\
			& \texttt{arabic} & Use Arabic numerals.\\
\end{argtable}

\macroname{\textbackslash gresetlyrics}{\{\#1\}}{gregoriotex-syllable.tex}
Sets the visibility of the lyrics.

\begin{argtable}
	\#1 & \texttt{visible} & Lyrics are visible (default).\\
	& \texttt{invisible} & Lyrics are not visible.\\
\end{argtable}

\macroname{\textbackslash gresettranslation}{\{\#1\}}{gregoriotex-main.tex}
Sets the visibility of the translations.

\begin{argtable}
	\#1 & \texttt{visible} & Translations are visible (default).\\
	& \texttt{invisible} & Translations are not visible.\\
\end{argtable}

\macroname{\textbackslash gresetabovelinestext}{\{\#1\}}{gregoriotex-main.tex}
Sets the visibility of the above lines text.

\begin{argtable}
	\#1 & \texttt{visible} & Above lines text are visible (default).\\
	& \texttt{invisible} & Above lines text are not visible.\\
\end{argtable}


\subsubsection{Text Alignment}
Gregorio\TeX\ allows you to manipulate the global alignment behavior of some text elements using the following commands.

\macroname{\textbackslash gresetlyriccentering}{\{\#1\}}{gregoriotex-syllable.tex}
Macro to set how the text of the lyrics aligns with the alignment point of its respective neumes.  The alignment point of the neumes is determined as follows:

\begin{itemize}
\item If the first glyph is only one note, or is a normal pes, or is composed of three or more notes, the alignment point is the middle of the first note.
\item If the first glyph is composed of two notes (other than a normal pes), the alignment point is the middle of the glyph.
\item In the case of a porrectus, the alignment point is the middle of an imaginary square punctum beginning at the same point as the porrectus.
\end{itemize}

\begin{argtable}
	\#1 & \texttt{vowel} & The center of the vowel in the syllable will align with the alignment point of the neumes\\
	& \texttt{syllable} & The center of the syllable will align with the alignment point of the neumes\\
	& \texttt{firstletter} & The center of the first letter/character of the syllable will align with the alignment point of the neumes\\
\end{argtable}

\textbf{Nota Bene:} What constitutes the ``vowel'' of the syllable is determined by the language the lyric text is written in, as specified by the use of the \texttt{language} header in the gabc file.  Out of the box, Gregorio\TeX\ explicitly supports Latin, English, Church Slavonic and Hungarian.  Polish, Czech, and Slovak are supported as aliases for Church Slavonic.  Furthermore the rules for Latin have a high degree of overlap with many Romance languages, allowing them to fall back on the Latin rules with acceptable results.

You can also define your own languages in \texttt{gregorio-vowels.dat} (see \nameref{customvowels} for details).  If you do define a language, please consider sharing your work by submitting it to the project (see CONTRIBUTING.md for instructions).

Finally, in cases where you want some sort of exceptional alignment, you can force Gregorio to consider a particular part of the syllable to be the ``vowel'' by enclosing it in curly braces (``\{'' and ``\}'') in your gabc file.  Curly braces only affect alignment when using vowel centering.  Syllable centering will always use the entire syllable, and firstletter centering will always use the first character of the syllable --- regardless of curly braces in the gabc file.

\macroname{\textbackslash gresetgabcforcecenters}{\{\#1\}}{gregoriotex-syllable.tex}
Macro to determine whether a forced center (\ie, one specified by curly braces (``\{'' and ``\}'') in your gabc file) should influence the alignment of that syllable when \texttt{syllable} and \texttt{firstletter} alignments are in effect.

\begin{argtable}
	\#1 & \texttt{allow} & Forced centers in gabc are allowed to influence the syllable alignment (default).\\
	& \texttt{prohibit} & Forced centers in gabc do not influence the syllable alignment.\\
\end{argtable}

\macroname{\textbackslash gresettranslationcentering}{\{\#1\}}{gregoriotex-main.tex}
Macro to specify how the translation text should be aligned with it respective syllable text.

\begin{argtable}
	\#1 & \texttt{left} & The translation text is left aligned with its respective syllable text.\\
	& \texttt{center} & The translation text is centered under its respective syllable.
\end{argtable}

\macroname{\textbackslash gresetannotationby}{\{\#1\}}{gregoriotex-main.tex}
Macro to specify which line of the annotation should be used to determine its starting placement (i.e. before \texttt{annotationraise} is applied).

\begin{argtable}
	\#1 & \texttt{topline} & Annotation placement is determined by the first line (default)\\
	& \texttt{bottomline} & annotation placement is determined by the last line\\
\end{argtable}

\macroname{\textbackslash gresetannotationvalign}{\{\#1\}}{gregoriotex-main.tex}
Macro to specify which part of the control line in the annotation should be aligned with the top line of the staff before \texttt{annotationraise} is applied.

\begin{argtable}
	\#1 & \texttt{top} & The top of the annotation control line will align with the top line of the staff\\
	& \texttt{baseline} & The baseline of the control line is used (default)\\
	& \texttt{bottom} & The bottom of the control line is used\\
\end{argtable}

\textbf{Nota Bene:} These variable refer to the actual contents of the line and not to the ``hypothetical'' limits for the font.  As a result if the top of an annotation containing only short letters will be different from one which contains tall ones even if both use the same font.  Likewise, if the annotation contains no descenders, then baseline and bottom will be the same.  If this is a problem, then the use of struts within the annotation can be used to control the line height (distance from baseline to top) and depth (distance from baseline to bottom).

\macroname{\textbackslash gresetsyllablerewriting}{\{\#1\}}{gregoriotex-syllable.tex}
Sets whether the last part of a non-final syllable of a word is moved to the
next syllable when there is no hyphen.  The ``last part'' of a syllable is
the part that comes after the part that is centered under the first note of
the syllable.  This feature may allow Lua\TeX{} to find better opportunities
for ligaturing based on \TeX{} and font settings.

\begin{argtable}
	\#1 & \texttt{auto} & Gregorio\TeX{} will move the last part of a syllable
												to the next syllable in a word when there is no
												hyphen (default).\\
			& \texttt{off}  & Gregorio\TeX{} will not attempt to rewrite any
												syllables.\\
\end{argtable}

\macroname{\textbackslash gresetprotrusionfactor}{\{\#1\}\{\#2\}}{gregoriotex-spaces.tex}
Sets a global protrusion factor.  Depending on the first argument, these
protrusion factors will be used for various characters as well as for
\verb=<pr>= tags with no specified protrusion factor.  A protrusion factor of 0
means no protrusion and 1 means full protrusion.  Any floating-point value from
0 to 1 is allowed.  All of these global protrusion factors may be set in
a spacing configuration file (gsp-*.tex) or in the project \TeX\ file.

\begin{argtable}
	\#1 & \texttt{,}         & Sets the automatic protrusion factor for a comma at
														 the end of a syllable.  Default is
														 \GreProtrusionFactor{comma}.\\
			& \texttt{;}         & Sets the automatic protrusion factor for a
														 semicolon at the end of a syllable.  Default is
														 \GreProtrusionFactor{semicolon}.\\
			& \texttt{:}         & Sets the automatic protrusion factor for a colon at
														 the end of a syllable.  Default is
														 \GreProtrusionFactor{colon}.\\
			& \texttt{.}         & Sets the automatic protrusion factor for a period
														 at the end of a syllable.  Default is
														 \GreProtrusionFactor{period}.\\
			& \texttt{eolhyphen} & Sets the protrusion factor for a hyphen at
														 the end of a line.  Default is
														 \GreProtrusionFactor{eolhyphen}.  This protrusion
														 factor only applies to hyphens inserted by the Lua
														 pass), so use it with caution.\\
			& \texttt{default}   & Sets the default protrusion factor for a
														 \verb=<pr>= tag in gabc.  Default is
														 \GreProtrusionFactor{default}.\\
	\#2 & factor             & The desired protrusion factor, a floating point
														 value from 0 (no protrusion) to 1 (full
														 protrusion).  See defaults above.\\
\end{argtable}

\subsubsection{End of Line Behavior}
While Gregorio\TeX\ will automatically wrap scores to fit your page, there are several ways to fine tune that line breaking behavior with the following commands.

\macroname{\textbackslash gresetbreakbeforeeuouae}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether an automatic linebreak before a EUOUAE area is justified or not.

\begin{argtable}
	\#1 & \texttt{justified} & Automatic line breaks before EUOUAE areas should be justified (default)\\
	& \texttt{ragged} & Automatic line breaks before EUOUAE areas should be ragged\\
\end{argtable}

\textbf{Important:} When set to \texttt{ragged}, Gregorio\TeX{} will require a
second pass (run of \texttt{lualatex} or \texttt{luatex}) to typeset the line
endings correctly.  When an additional pass is required, Gregorio\TeX{} will
emit the following warning:\par\medskip

\begin{scriptsize}
\begin{latexcode}
Module gregoriotex warning: Line heights or variable brace lengths may have changed. Rerun to fix.
\end{latexcode}
\end{scriptsize}

\macroname{\textbackslash gresetbreakineuouae}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether line breaks are allowed inside a EUOUAE area (delimited by \texttt{<eu></eu>} tags in gabc).

\begin{argtable}
	\#1 & \texttt{allow} & Line breaks are allowed\\
	& \texttt{prohibit} & Line breaks are prohibited, the entire EUOUAE area should appear on one line
\end{argtable}

\macroname{\textbackslash gresetbreakintranslation}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether line breaks are allowed inside a translation.

\begin{argtable}
	\#1 & \texttt{allow} & Line breaks are allowed\\
	& \texttt{prohibit} & Line breaks are prohibited, the entire translation should appear on one line
\end{argtable}

\macroname{\textbackslash gresetcustosalteration}{\{\#1\}}{gregoriotex-signs.tex}
Macro for setting whether an alteration (flat, sharp, or natural) should be
rendered before a custos or not.

\begin{argtable}
	\#1 & \texttt{visible} & The custos alteration should be printed (default)\\
			& \texttt{invisible} & The custos alteration should not be printed
\end{argtable}

\macroname{\textbackslash greseteolcustos}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether Gregorio\TeX\ should automatically place the custos at a line break.

\begin{argtable}
	\#1 & \texttt{auto} & Custos will be automatically placed at each line break\\
	& \texttt{manual} & Custos will only be placed at line breaks if they are specified in the gabc (\eg \texttt{(g+z)})
\end{argtable}

\textbf{Nota Bene:} This command only effects the custos that appears at the end of a line.  Custos which are placed at a key change are unaffected.  Further, if custos are specified in the gabc file manually and Gregorio\TeX\ is set to place custos automatically, you will get two custos at the line breaks.

\macroname{\textbackslash greseteolcustosbeforeeuouae}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether Gregorio\TeX\ should automatically place the custos at a line break before a EUOUAE.  Since the EUOUAE block is typically not a continuation of the melody but rather a reminder of the end of the tone that follows, this is set to \texttt{suppressed} (no custos) by default.

\begin{argtable}
	\#1 & \texttt{suppressed} & Custos will not automatically be placed at a line break before a EUOUAE block (the default)\\
	& \texttt{auto} & Custos will behave according to \verb=greseteolcustos= at a line break before a EUOUAE block\\
\end{argtable}

\textbf{Nota Bene:} If \verb=\greseteolcustos= is set to \texttt{manual}, this setting is effectively ignored.

\macroname{\textbackslash greseteolshifts}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether Gregorio\TeX\ should apply a small shift at the end of each line which allows lyrics to stretch under the final custos.

\begin{argtable}
	\#1 & \texttt{enable} & The shifts are applied (default)\\
	& \texttt{disable} & The shifts are not applied.
\end{argtable}

\macroname{\textbackslash gresetbolshifts}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether Gregorio\TeX\ should apply a small shift at the beginning of each line so that lines are aligned on the notes rather than the syllable text.

\begin{argtable}
	\#1 & \texttt{enable} & The shifts are applied (default)\\
	& \texttt{disable} & The shifts are not applied.
\end{argtable}

\macroname{\textbackslash grebolshiftcleftype}{\{\#1\}}{gregoriotex-spaces.tex}
Macro to determine how notes should be left aligned in the case where clefs of different widths appear in the same score.

\begin{argtable}
	\#1 & \texttt{largest} & The notes are aligned as if all clefs had the width of the largest clef (default)\\
	& \texttt{current} & The notes are aligned on the current clef, which leads to unaligned notes. This was the default of Gregorio < \texttt{5.0}.
\end{argtable}

\macroname{\textbackslash grelocalbolshiftcleftype}{\{\#1\}}{gregoriotex-spaces.tex}
Equivalent of \verb=\grebolshiftcleftype= but valid only until the next end of a score, and with more options. This can be used before a score or even inside a \verb=<v>verbatim</v>= in gabc for corner cases like different alignment on a score taking two pages.

\begin{argtable}
	\#1 & \texttt{largest} & The notes are aligned as if all clefs had the width of the largest clef (default)\\
	& \texttt{current} & The notes are aligned on the current clef, which leads to unaligned notes\\
	& \texttt{f} & Force left alignment of notes as if all clef were f clef\\
	& \texttt{c} & Idem with c clef\\
	& \texttt{fb} & Idem with flatted f clef\\
	& \texttt{cb} & Idem with flatted c clef\\
\end{argtable}

\macroname{\textbackslash gresetlastline}{\{\#1\}}{gregoriotex-main.tex}
Macro to determine whether the last line of the score should be justified or not.

\begin{argtable}
	\#1 & \texttt{justified} & Set the last line justified with the rest of the score\\
	& \texttt{ragged} & Set the last line ragged (default)
\end{argtable}

\macroname{\textbackslash gresetunbreakablesyllablenotes}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-syllable.tex}
Configures how notes should be kept together on line breaks.

\begin{argtable}
	\#1 & integer & The minimum number of notes in the syllable before the
									syllable may be broken across lines.  Defaults to
									\getgrecount{unbreakabletotalnotes}.\\
	\#2 & integer & The minimum number of notes at the start of a syllable that
									must be kept together when the syllable is broken across
									lines.  Defaults to \getgrecount{unbreakableinitialnotes}.\\
	\#3 & integer & The minimum number of notes at the end of a syllable that
									must be kept together when the syllable is broken across
									lines.  Defaults to \getgrecount{unbreakablefinalnotes}.\\
\end{argtable}


\subsubsection{Bar spacing}

\macroname{\textbackslash gresetshiftaftermora}{\{\#1\}}{gregoriotex-signs.tex}
Macro to change the behaviour for separation between notes of two syllables when the first ends with a punctum mora. The argument changes the cases in which punctum mora are ignored in space computation:

\begin{argtable}
	\#1 & \texttt{always} & punctum mora are always ignored (default)\\
	& \texttt{notesonly} & punctum mora are ignored before notes, not bars\\
	& \texttt{barsonly} & punctum mora are ignored before bars, not notes\\
	& \texttt{notextonly} & punctum mora are ignored only before bars inside syllables, or bars having their own syllable without text\\
	& \texttt{insideonly} & punctum mora are ignored only before bars inside syllables\\
	& \texttt{never} & punctum mora are never ignored\\
\end{argtable}

When a punctum mora is ignored, the bar will also be shifted by \texttt{moraadjustmentbar} (zero by default), see its description in the \nameref{distances} section.

\macroname{\textbackslash gresetbarspacing}{\{\#1\}}{gregoriotex-syllable.tex}
Macro to activate the new bar spacing algorithm.  The new algorithm attempts to place the bar line exactly midway between its surrounding notes.  Any text associated with the bar is placed midway between its surrounding text.  Since this might result in the bar line and the text being widely separated, there are also a limits to the distance between their respective centers: \texttt{maxbaroffsettextleft} and \texttt{maxbaroffsettextright} (when text center is respectively on the left or on the right of bar center).

\begin{argtable}
	\#1 & \texttt{new} & Activates the new spacing algorithm (Default)\\
	& \texttt{old} & Activates the old behavior\\
\end{argtable}

\subsubsection{Sign printing}

\macroname{\textbackslash gresetnotes}{\{\#1\}}{gregoriotex-syllable.tex}
Sets the visibility of the notes.

\begin{argtable}
	\#1 & \texttt{visible} & Notes are visible (default).\\
	& \texttt{invisible} & Notes are not visible.\\
\end{argtable}

\textbf{Nota Bene:} If the notes are set to be invisible, then bar lines, rythmic signs, and the like will also be invisible.  However, the staff lines and clefs will still show up (since their visibility is controlled by other settings).

\macroname{\textbackslash gresetnabc}{\{\#1\}\{\#2\}}{gregoriotex-nabc.tex}
Sets the visibility of a nabc voice.

\begin{argtable}
	\#1 & integer & The nabc voice number.\\
	\#2 & \texttt{visible} & Notes are visible (default).\\
	& \texttt{invisible} & Notes are not visible.\\
\end{argtable}

\macroname{\textbackslash greprintsigns}{\{\#1\}\{\#2\}}{gregoriotex-signs.tex}
Macro to prevent rythmic signs from printing (all signs are printed by default):

\begin{argtable}
	\#1 & \texttt{vepisema} & sets the printing of vertical episema\\
	& \texttt{hepisema} & sets the printing of horizontal episema\\
	& \texttt{mora} & sets the printing of punctum mora and auctum duplex\\
	& \texttt{all} & set the printing of all of these\\
	\#2 & \texttt{enable} & enable the printing\\
	& \texttt{disable} & disable the printing\\
\end{argtable}

Note that punctum mora and auctum duplex have an influence on spacings, so removing them will have an impact on that matter.

\subsubsection{Hyphenation}

\macroname{\textbackslash gresethyphen}{\{\#1\}}{gregoriotex-main.tex}
Tells Gregorio\TeX\ how to place a hyphen between syllables in polysyllabic words in a score.

\begin{argtable}
	\#1 & \texttt{force} & Hyphens will appear between all syllables in polysyllabic words.\\
	& \texttt{auto} & Hyphens will appear based on the setting of \texttt{maximumspacewithoutdash} (default)
\end{argtable}

\macroname{\textbackslash gresetemptyfirstsyllablehyphen}{\{\#1\}}{gregoriotex-syllable.tex}
Tells Gregorio\TeX\ how to place a hyphen after an empty first syllable (\ie, when the first syllable consists only of the big initial).

\begin{argtable}
	\#1 & \texttt{force} & A hyphen will appear after an empty first syllable. (default)\\
	& \texttt{auto} & A hyphen will appear after an empty first syllable based on the setting of \texttt{maximumspacewithoutdash}
\end{argtable}

\macroname{\textbackslash greseteolhyphen}{\{\#1\}}{gregoriotex-main.tex}
Marco to determine how much space the hyphen at the end of a line occupies for the purposes of spacing calculations (the visible appearance of the hyphen is unchanged).

\begin{argtable}
	\#1 & \texttt{normal} & The hyphen occupies its normal space\\
	& \texttt{zero} & The hyphen is considered to take up no space
\end{argtable}

\subsubsection{Clef Visibility}

\macroname{\textbackslash gresetclef}{\{\#1\}}{gregoriotex-signs.tex}
Macro to tell Gregorio\TeX\ whether the clefs should be printed or not.

\begin{argtable}
	\#1 & \texttt{visible} & Clefs will be printed (default)\\
	& \texttt{invisible} & Clefs will not be printed
\end{argtable}


\subsubsection{Clivis Alignment}
Since the center of the clivis is different from most neumes, Gregorio\TeX\ supports several behaviors for determining how to align it with its lyrics.

\macroname{\textbackslash gresetclivisalignment}{\{\#1\}}{gregoriotex-syllable.tex}
Macro to determine the method used for aligning the clivis with its lyrics.

\begin{argtable}
	\#1 & \texttt{always} & Align on the real center of the clivis\\
	& \texttt{never} & align on the center of the first punctum in the clivis\\
	& \texttt{special} & align on the real center of the clivis except when (1) notes would go left of text or (2) consonants after vowels are larger than \verb=\gre@dimen@clivisalignmentmin= (default)
\end{argtable}



\subsubsection{Braces}

\macroname{\textbackslash gresetbracerendering}{[\optional{\#1}]\{\#2\}}{gregoriotex-signs.tex}
Macro to tell Gregorio\TeX{} whether to use \MP{} or fonts to render
braces.  \MP{} braces, the default, are tailored to better maintain
optical line weight when stretched.  \MP{} braces are designed to
harmonize (and thus match best) with greciliae, but they still look good
with the other score fonts.

\begin{argtable}
	\#1 & \textit{(omitted)} & change all braces\\
			& \texttt{brace} & change round braces that appear over the staff\\
			& \texttt{underbrace} & change round braces that appear under the staff\\
			& \texttt{curlybrace} & change curly braces\\
			& \texttt{barbrace} & change round braces that appear over divisio bars\\
	\#2 & \texttt{metapost} & \MP{} will be used to render braces\\
			& \texttt{font} & The score font will be used to render braces\\
\end{argtable}

\macroname{\textbackslash grebarbracewidth}{}{gregoriotex-signs.tex}
Returns the em-relative width of a bar brace when braces are rendered by
\MP{} (as opposed to fonts).  The value is scaled by the Gregorio\TeX\ score
size factor and thus is a score-relative value with a precise (but
obscure) mathematical meaning.  Suffice it to say that larger numbers
make the bar brace wider and smaller numbers make the brace narrower.
This must be a positive number, defaults to \texttt{.58879}, and
harmonizes with the greciliae font.  This macro must be redefined should
a different value be desired.


\subsubsection{Headers}

\macroname{\textbackslash gresetheadercapture}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-main.tex}
Macro to tell Gregorio\TeX{} to capture a given header of the gabc file, passing it to a
specified \TeX{} macro.  Passing an empty \#2 will cancel capture of the given header.

\begin{argtable}
	\#1 & string & The name of the gabc header\\
	\#2 & string & The name of the macro to use (without the leading backslash)
								 or empty to stop capturing the given header\\
	\#3 & string & a comma-separated list of options\\
\end{argtable}

The options are:

\begin{tabular}{ll}
	\texttt{name}   & The header name should also be passed to the macro\\
	\texttt{string} & The header value should be passed to the macro as a string\\
\end{tabular}

If the \texttt{name} option is not supplied, the macro is called with one
argument: the value of the header.

If the \texttt{name} option is supplied, the macro is called with two
arguments: the name and the value of the header (in that order).

If the \texttt{string} option is supplied, the value will be passed with
catcode 12 associated with all non-space characters (and catcode 10 for all spaces).
If not, the value will be evaluated as regular \TeX{} input.

Other than the headers that define macros, which are not passed to \TeX{},
the headers will be processed in the order they were presented in the gabc
file.  Headers will be processed in the \TeX{} state at the point of the
\verb=\gregorioscore= call.  This means, for example, that should the
capturing macro produce something, it will be typeset within the same
paragraph as the \verb=\gregorioscore= call.

As an example, you can use

\verb=\gresetheadercapture{commentary}{grecommentary}{string}=

\noindent to capture the
\texttt{commentary} header of gabc files and feed it to \verb=\grecommentary=,
thus automatically printing the content of the header above the score.

\macroname{\textbackslash grebeforeheaders}{\{\#1\}}{gregoriotex-main.tex}
Specifies \TeX{} code processed before the processing of the headers of a score.
Defaults to nothing.  If this is called multiple times, the most recent call
will define the behavior at the next set of headers.

\begin{argtable}
		\#1 & \TeX\ code & The code to process before a set of headers.\\
\end{argtable}

\macroname{\textbackslash greafterheaders}{\{\#1\}}{gregoriotex-main.tex}
Specifies \TeX{} code processed after the processing of the headers of a score.
Defaults to nothing.  If this is called multiple times, the most recent call
will define the behavior at the next set of headers.

\begin{argtable}
		\#1 & \TeX\ code & The code to process after a set of headers.\\
\end{argtable}


\subsubsection{Ancient Notation}
For a full description of how to make use of the ancient notation capabilities of Gregorio and Gregorio\TeX, look at the GregorioNabcRef documentation.  The commands listed here allow the manipulation of settings related to that notation.

\macroname{\textbackslash gresetnabcfont}{\{\#1\}\{\#2\}}{gregoriotex-nabc.tex}
Macro to set the font to be used for the ancient notation.

\begin{argtable}
	\#1 & string & the name of the font, either \texttt{gregall}, \texttt{grelaon}, or \texttt{gresgmodern}\\
	\#2 & integer & point size at which the font should be loaded\\
\end{argtable}

\subsection{Counts}\label{counts}

Each of the following counts controls some aspect of the configuration of the Gregorio\TeX\ score.  They are changed using \verb=\grechangecount=, documented above.

\begin{gcount}{additionaltopspacethreshold}
The threshold above which we start accounting notes above lines for additional
vertical space. For instance with a threshold of \texttt{2} and four line
staves, notes with a pitch of \texttt{k} and \texttt{l} will not interfere with
the space above lines.  Set it to a high value if you don't want high notes to
interfere with space above lines.
\end{gcount}

\begin{gcount}{additionaltopspacealtthreshold}
Same as \texttt{additionaltopspacethreshold} but setting the threshold for
notes taken into account with above lines text vertical placement.
\end{gcount}

\begin{gcount}{additionaltopspacenabcthreshold}
Same as \texttt{additionaltopspacethreshold} but setting the threshold for
notes taken into account with above lines nabc neume vertical placement
baseline.
\end{gcount}

\begin{gcount}{noteadditionalspacelinestextthreshold}
The number of low notes which will add space between the lines and the lyrics.  For instance, with a threshold of
\texttt{2}, every note below \texttt{c} will add space for each pitch needed below \texttt{c}, accounting for the various signs.
\end{gcount}

\subsection{Distances}\label{distances}

Each of the following distances controls some aspect of the spacing of the Gregorio\TeX\ score.  They are changed using \verb=\grechangedim=, documented above.  If the distance permits a rubber value, then the default value will indicate the stretch and shrink (even if they are zero by default).  Distances whose default value does not include a stretch or shrink may not take a rubber value.

While it may seem strange that many of these distances are defined to 5 decimal places in centimeters (much smaller than most people can see) this is a legacy of how these distances were originally defined in small points.  Since most people don’t know what small points are, the distances were converted to a unit more familiar to most people, but no rounding was applied to the conversions so that scores wouldn’t change their appearance as a result of the conversion.  Users should feel under no obligation to maintain this level of precision when adjusting them to suit their own tastes.

\textbf{Nota Bene:} Because of the way Gregorio\TeX\ handles distances, these cannot be manipulated as if they were normal \TeX\ dimensions or skips.  As a result they should only be changed using the command defined by Gregorio\TeX\ for this purpose.

\begin{gdimension}{additionallineswidth}
The additional width of the additional lines (\ie, the value added to the width of the glyph with which they're associated to get the width of the line).
\end{gdimension}

\begin{gdimension}{alterationspace}
Space between an alteration (flat or natural) and the next glyph.
\end{gdimension}

\begin{gdimension}{beforealterationspace}
When beginning of line shifts (bolshifts) are enabled, minimum space between a clef at the beginning of the line and a leading alteration glyph.  This distance should be larger than \texttt{clefflatspace} so that a flatted clef can be distinguished from a flat which is part of the first glyph on a line, but also smaller than \texttt{spaceafterlineclef}, the distance from the clef to the first notes.
\end{gdimension}

\begin{gdimension}{beforelowchoralsignspace}
Space before a low choral sign.
\end{gdimension}

\begin{gdimension}{clefflatspace}
Space between a clef and a flat (for clefs with flat).
\end{gdimension}

\begin{gdimension}{interglyphspace}
Space between glyphs in the same element.
\end{gdimension}

\begin{gdimension}{zerowidthspace}
Null space.
\end{gdimension}

\begin{gdimension}{halfspace}
Half-space between elements.
\end{gdimension}

\begin{gdimension}{interelementspace}
Space between elements.
\end{gdimension}

\begin{gdimension}{largerspace}
Larger space between elements.
\end{gdimension}

\begin{gdimension}{glyphspace}
Space between elements which has the size of a note.
\end{gdimension}

\begin{gdimension}{spacebeforeeolcustos}
Space before custos at the end of a line.
\end{gdimension}

\begin{gdimension}{spacebeforeinlinecustos}
Space before custos within a line.
\end{gdimension}

\begin{gdimension}{spacebeforesigns}
Space before punctum mora and augmentum duplex.
\end{gdimension}

\begin{gdimension}{moraadjustment}
When a syllable (bar or not) is shifted left because of a preceding punctum
mora, this space is also added. Use it to make the syllable a bit further from
the punctum mora if you want.
\end{gdimension}

\begin{gdimension}{moraadjustmentbar}
Same as previous one but specific to cases where puntum mora precedes a bar.
\end{gdimension}

\begin{gdimension}{spaceaftersigns}
Space after punctum mora and augmentum duplex.
\end{gdimension}

\begin{gdimension}{spaceafterlineclef}
Space after a clef at the beginning of a line.
\end{gdimension}

\begin{gdimension}{intersyllablespacenotes}
Minimum space between notes of different syllables.
\end{gdimension}

\begin{gdimension}{intersyllablespacestretchhyphen}
Stretching added in the case where the text of two syllables of the same word are
separated with an automatic hyphen.
\end{gdimension}

\begin{gdimension}{interwordspacenotes}
Minimum space between notes of syllables from different words.
\end{gdimension}

\begin{gdimension}{interwordspacetext}
Minimum space between texts of different words. Please keep the same \texttt{plus} and \texttt{minus} as \texttt{interwordspacenotes}.
\end{gdimension}

\begin{gdimension}{interwordspacenotes@alteration}
Same as \texttt{interwordspacenotes} for the case where the second syllable starts with an alteration.
\end{gdimension}

\begin{gdimension}{intersyllablespacenotes@alteration}
Same as \texttt{intersyllablespacenotes} for the case where the second syllable starts with an alteration.
\end{gdimension}

\begin{gdimension}{interwordspacenotes@euouae}
Same as \texttt{interwordspacenotes} for \texttt{euouae} blocks.
\end{gdimension}

\begin{gdimension}{interwordspacetext@euouae}
Same as \texttt{interwordspacetext} for \texttt{euouae} blocks.
\end{gdimension}

\begin{gdimension}{bitrivirspace}
Space between notes of a bivirga or trivirga.
\end{gdimension}

\begin{gdimension}{bitristrospace}
Space between notes of a bistropha or tristrophae.
\end{gdimension}

\begin{gdimension}{punctuminclinatumshift}
Space between two descending puncta inclinata.
\end{gdimension}

\begin{gdimension}{punctuminclinatumunisonshift}
Space between two unison puncta inclinata.
\end{gdimension}

\begin{gdimension}{beforepunctainclinatashift}
Space before puncta inclinata.
\end{gdimension}

\begin{gdimension}{punctuminclinatumanddebilisshift}
Space between a punctum inclinatum and a punctum inclinatum deminutus,
descending.
\end{gdimension}

\begin{gdimension}{punctuminclinatumdebilisshift}
Space between two punctum inclinatum deminutus.
\end{gdimension}

\begin{gdimension}{punctuminclinatumbigshift}
Space between descending puncta inclinata, larger ambitus (range=3rd).
\end{gdimension}

\begin{gdimension}{punctuminclinatummaxshift}
Space between descending puncta inclinata, larger ambitus (range=4th or 5th).
\end{gdimension}

\begin{gdimension}{descendingpunctuminclinatumascendingshift}
Space between descending puncta inclinata shapes in an ascent of pitch.
\end{gdimension}

\begin{gdimension}{ascendingpunctuminclinatumshift}
Space between two ascending puncta inclinata.
\end{gdimension}

\begin{gdimension}{ascendingpunctuminclinatumanddebilisshift}
Space between a punctum inclinatum and a punctum inclinatum deminutus,
ascending.
\end{gdimension}

\begin{gdimension}{ascendingpunctuminclinatumbigshift}
Space between ascending puncta inclinata, larger ambitus (range=3rd).
\end{gdimension}

\begin{gdimension}{ascendingpunctuminclinatummaxshift}
Space between ascending puncta inclinata, larger ambitus (range=4th or 5th).
\end{gdimension}

\begin{gdimension}{ascendingpunctuminclinatumdescendingshift}
Space between ascending puncta inclinata shapes in a descent of pitch.
\end{gdimension}

\begin{gdimension}{descendinginclinatumtonobarshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph one pitch
below.
\end{gdimension}

\begin{gdimension}{descendinginclinatumtonobarbigshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph two pitches
below.
\end{gdimension}

\begin{gdimension}{descendinginclinatumtonobarmaxshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph three or four
pitches below.
\end{gdimension}

\begin{gdimension}{ascendinginclinatumtonobarshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph one pitch
above.
\end{gdimension}

\begin{gdimension}{ascendinginclinatumtonobarbigshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph two pitches
above.
\end{gdimension}

\begin{gdimension}{ascendinginclinatumtonobarmaxshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph three or four
pitches above.
\end{gdimension}

\begin{gdimension}{ascendinginclinatumtonobarmaxshift}
Space between a punctum inclinatum and a no-bar (stemless) glyph three or four
pitches above.
\end{gdimension}

\begin{gdimension}{uprightpunctuminclinatumshift}
Space after after a non-punctum inclinatum and before the upright punctum inclinatum.
\end{gdimension}

\begin{gdimension}{maximumspacewithoutdash}
Maximal space between two syllables for which we consider a dash is not needed.
\end{gdimension}

\begin{gdimension}{afterclefnospace}
An extensible space for the beginning of lines.
\end{gdimension}

\begin{gdimension}{additionalcustoslineswidth}
Width of the additional lines, used only for the custos.  The width is the one for the custos at end of lines, the line for custos in the middle of a score is the same multiplied by 2.
\end{gdimension}

\begin{gdimension}{afterinitialshift}
Space between the initial and the beginning of the score.
\end{gdimension}

\begin{gdimension}{beforeinitialshift}
Space between the initial and the beginning of the score.
\end{gdimension}

\begin{gdimension}{minimalspaceatlinebeginning}
Minimal space in front of the lyrics at the beginning of a line when \texttt{bolshift}s are enabled.
\end{gdimension}

\begin{gdimension}{manualinitialwidth}
Space to force the initial width to.  Ignored when 0.
\end{gdimension}

\begin{gdimension}{minimalinitialwidth}
Minimum width of the initial.  Ignored when \texttt{manualinitialwidth} is non-zero.
\end{gdimension}

\begin{gdimension}{annotationseparation}
This space is the one between lines in the annotation (text above the initial).

\textbf{Nota Bene:} This is the absolute space.  If the lower line contains only short letters then it will get moved up so only this space shows (not the space above the letters on a normal line plus this space).  You should use struts to control the line height of the lower line if this is a problem.
\end{gdimension}

\begin{gdimension}{annotationraise}
Amount to raise (positive) or lower (negative) the annotation from its normal position (set with \verb=\gresetannotationby= and \verb=\gresetannotationvalign=).
\end{gdimension}

\begin{gdimension}{commentaryseparation}
This space is the one between lines in the commentary (text above the first staff line on the right).

\textbf{Nota Bene:} This is the absolute space.  If the lower line contains only short letters then it will get moved up so only this space shows (not the space above the letters on a normal line plus this space).  You should use struts to control the line height of the lower line if this is a problem.
\end{gdimension}

\begin{gdimension}{commentaryraise}
Distance from the commentary to the top line of the staff.
\end{gdimension}

\begin{gdimension}{noclefspace}
Space at the beginning of the lines if there is no clef.
\end{gdimension}

\begin{gdimension}{choralsigndownshift}
The distance to shift choral signs down.  The following choral signs are shifted down:

\begin{itemize}
	\item Low choral signs that are not lower than the note
	\item High choral signs which are in a space
	\item Low choral signs that are lower than the note which are in a space
\end{itemize}
\end{gdimension}

\begin{gdimension}{choralsignupshift}
The distance to shift choral signs up.  The following choral signs are shifted up:

\begin{itemize}
	\item High choral signs which are on a line
	\item Low choral signs that are lower than the note which are on a line
\end{itemize}
\end{gdimension}

\begin{gdimension}{translationheight}
The space for the translation.
\end{gdimension}

\begin{gdimension}{spaceabovelines}
The space above the lines.
\end{gdimension}

\begin{gdimension}{spacelinestext}
The space between the lines and the bottom of the text.
\end{gdimension}

\begin{gdimension}{spacebeneathtext}
The space beneath the text.
\end{gdimension}

\begin{gdimension}{abovelinestextraise}
Height of the text above the note line.
\end{gdimension}

\begin{gdimension}{abovelinestextheight}
Height that is added at the top of the lines if there is text above the lines (it must be bigger than the text for it to be taken into consideration).
\end{gdimension}

\begin{gdimension}{braceshift}
An additional shift you can give to the brace above the staff.
\end{gdimension}

\begin{gdimension}{curlybraceaccentusshift}
A shift you can give to the accentus above the curly brace.
\end{gdimension}

\begin{gdimension}{nabcinterelementspace}
Space between elements in ancient notation.
\end{gdimension}

\begin{gdimension}{nabclargerspace}
Larger space between elements in ancient notation.
\end{gdimension}

\begin{gdimension}{clivisalignmentmin}
When \verb=\gre@clivisalignment= is 2, this distance is the maximum length of the consonants after vowels for which the clivis will be aligned on its center.
\end{gdimension}

\begin{gdimension}{clefchangespace}
Space around a clef change.
\end{gdimension}

\begin{gdimension}{initialraise}
Distance the initial will be raised above its default baseline.  The default baseline for the initial coincides with the baseline for the text below the staff.
\end{gdimension}

\begin{gdimension}{overslurshift}
Distance an over-the-notes slur will be raised above the baseline of a note at the same height.
\end{gdimension}

\begin{gdimension}{underslurshift}
Distance an under-the-notes slur will be raised above the baseline of a note at the same height.
\end{gdimension}

\begin{gdimension}{divisiofinalissep}
Space separating the two bars of a divisio finalis.
\end{gdimension}

\begin{gdimension}{overhepisemalowshift}
Distance to place a a horizontal episema over a note in a low position in the space.
\end{gdimension}

\begin{gdimension}{overhepisemahighshift}
Distance to place a horizontal episema over a note in a high position in the space.
\end{gdimension}

\begin{gdimension}{underhepisemalowshift}
Distance to place a horizontal episema under a note in a low position in the space.
\end{gdimension}

\begin{gdimension}{underhepisemahighshift}
Distance to place a horizontal episema under a note in a high position in the space.
\end{gdimension}

\begin{gdimension}{hepisemamiddleshift}
Distance to place a horizontal episema in the middle of a space.
\end{gdimension}

\begin{gdimension}{vepisemalowshift}
Distance to place a vertical episema in a low position in the space.
\end{gdimension}

\begin{gdimension}{vepisemahighshift}
Distance to place a vertical episema in a high position in the space.
\end{gdimension}

\begin{gdimension}{linepunctummorashift}
Vertical distance to place a punctum mora for a note on a line.
\end{gdimension}

\begin{gdimension}{spacepunctummorashift}
Vertical distance to place a punctum mora for a note in a space.
\end{gdimension}

\begin{gdimension}{spaceamonepespunctummorashift}
Vertical distance to place a punctum mora for the second note (in a space) of a pes with ambitus one.
\end{gdimension}

\begin{gdimension}{lineporrectuspunctummorashift}
Vertical distance to place a punctum mora for the second note in a porrectus (or similar figure), on a line
\end{gdimension}

\begin{gdimension}{spaceporrectuspunctummorashift}
Vertical distance to place a punctum mora for the second note in a porrectus (or similar figure), in a space
\end{gdimension}

\begin{gdimension}{raresignshift}
Distance to place a ``rare'' sign above the top space in a score.
\end{gdimension}

\begin{gdimension}{bracketupshift}
Distance to shift a bracket up when the lowest note in the brackets is on a
line or below the staff.
\end{gdimension}

\begin{gdimension}{bracketdownshift}
Distance to shift a bracket down when the lowest note in the brackets is
neither on a line nor below the staff.
\end{gdimension}

\begin{gdimension}{parskip}
The effective \verb=\parskip= inside of a score.
\end{gdimension}

\begin{gdimension}{lineskip}
The effective \verb=\lineskip= inside of a score.
\end{gdimension}

\begin{gdimension}{baselineskip}
The effective \verb=\baselineskip= inside of a score.
\end{gdimension}

\begin{gdimension}{lineskiplimit}
The effective \verb=\lineskiplimit= inside of a score.
\end{gdimension}

\begin{gdimension}{shortspaceafterlineclef}
Space after a clef at the beginning of a line, when the clef and first note are vertically distant.
\end{gdimension}

\subsubsection{Bar distances}

\begin{gdimension}{bar@finalfinalis}
This space is added before the final divisio final of a score (old bar spacing algorithm only).
\end{gdimension}

Spaces around bars when they are typeset inside a syllable. The \verb=@short=
suffix for virgula and divisio minima indicates the space used when the notes
surrounding the bar are strictly lower than \texttt{g} (in a four-line score).
For divisio minimis, the \verb=@short= suffix is for notes lower than
\texttt{h}.  When applied to ``high'' positions (on the ledger line above
the staff), the \verb=@short= distances will be used for up to two pitches
higher.

\begin{gdimension}{bar@virgula}
\end{gdimension}

\begin{gdimension}{bar@virgula@short}
\end{gdimension}

\begin{gdimension}{bar@virgulaparen}
\end{gdimension}

\begin{gdimension}{bar@virgulaparen@short}
\end{gdimension}

\begin{gdimension}{bar@minimis}
\end{gdimension}

\begin{gdimension}{bar@minimis@short}
\end{gdimension}

\begin{gdimension}{bar@minima}
\end{gdimension}

\begin{gdimension}{bar@minima@short}
\end{gdimension}

\begin{gdimension}{bar@minimaparen}
\end{gdimension}

\begin{gdimension}{bar@minimaparen@short}
\end{gdimension}

\begin{gdimension}{bar@minor}
\end{gdimension}

\begin{gdimension}{bar@dominican}
\end{gdimension}

\begin{gdimension}{bar@maior}
\end{gdimension}

\begin{gdimension}{bar@finalis}
\end{gdimension}

Spaces around bars in standalone syllables, when these have text (new bar spacing algorithm only):

\begin{gdimension}{bar@virgula@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@virgula@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@virgulaparen@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@virgulaparen@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@minima@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@minima@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@minimaparen@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@minimaparen@standalone@text@short}
\end{gdimension}

\begin{gdimension}{bar@minor@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@dominican@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@maior@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@finalis@standalone@text}
\end{gdimension}

\begin{gdimension}{bar@finalfinalis@standalone@text}
\end{gdimension}

Spaces around bars in standalone syllables, when these have no text (new bar spacing algorithm only):

\begin{gdimension}{bar@virgula@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@virgula@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@virgulaparen@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@virgulaparen@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@minimis@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@minima@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@minima@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@minimaparen@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@minimaparen@standalone@notext@short}
\end{gdimension}

\begin{gdimension}{bar@minor@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@dominican@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@maior@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@finalis@standalone@notext}
\end{gdimension}

\begin{gdimension}{bar@finalfinalis@standalone@notext}
\end{gdimension}

\begin{gdimension}{spacearoundclefbars}
Additional space that will appear around bars that are preceded by a custos and followed by a key.
\end{gdimension}

\begin{gdimension}{bar@rubber}
A rubber value applied on both sides of all bars in standalone syllables, in new bar spacing algorithm only.

\textbf{Nota Bene:} This distance should always have a base value of 0pt.
\end{gdimension}

\begin{gdimension}{interwordspacetext@bars}
Minimum space between texts of different words when one of the syllable contains only a bar (new bar spacing algorithm only).
\end{gdimension}

\begin{gdimension}{interwordspacetext@bars@euouae}
Same as \texttt{interwordspacetext@bars} for \texttt{euouae} blocks (so quite rare).
\end{gdimension}

\begin{gdimension}{interwordspacetext@bars@notext}
Minimum space between texts of adjacent words when they are separated by a bar syllable which has no text associated with it (new bar spacing algorithm only).
\end{gdimension}

\begin{gdimension}{interwordspacetext@bars@notext@euouae}
Same as \texttt{interwordspacetext@bars@notext} for \texttt{euouae} blocks (so quite rare).
\end{gdimension}

\begin{gdimension}{textbartextspace}
Space between the text of previous syllable and the text associated with the bar (old bar spacing algorithm only).
\end{gdimension}

\begin{gdimension}{notebarspace}
Minimal space between a note and a bar.
\end{gdimension}

\begin{gdimension}{maxbaroffsettextleft}
Maximum distance by which the center of a bar and the center of its associated text can be separated, when the center of the text goes left of the center of the bar (new bar spacing algorithm only).
\end{gdimension}

\begin{gdimension}{maxbaroffsettextright}
Same as \texttt{maxbaroffsettextleft} but when the center of the text goes right of the center of the bar.
\end{gdimension}

\begin{gdimension}{maxbaroffsettextleft@nobar}
Maximum distance by which the center of a “no-bar” (\ie something like \texttt{*()} in gabc) and the center of its associated text can be separated, when the center of the text goes left of the center of the no-bar (new bar spacing algorithm only).
\end{gdimension}

\begin{gdimension}{maxbaroffsettextright@nobar}
Same as \texttt{maxbaroffsettextleft@nobar} but when the center of the text goes right of the center of the no-bar.
\end{gdimension}

\begin{gdimension}{maxbaroffsettextleft@eol}
Maximum distance by which the center of a bar and the center of its associated text can be separated, when the center of the text goes left of the center of the bar and the bar syllable contains a manual line break (new bar spacing algorithm only).
\end{gdimension}

\begin{gdimension}{maxbaroffsettextright@eol}
Same as \texttt{maxbaroffsettextleft@eol} but when the center of the text goes right of the center of the bar.
\end{gdimension}

\begin{gdimension}{alterationadjustmentbar}
In the case of an alteration after a bar, the alteration will go a bit left of this value. This can be compared to \texttt{moraadjustmentbar}.
\end{gdimension}

\subsection{Penalties}\label{penalties}
Penalties are used by \TeX\ to determine where line and page breaks should occur.  Gregorio\TeX\ modifies or defines a few of its own to help with that process in scores.  With the exception of \texttt{emergencystretch} (which should be changed using \verb=\grechangedim=) these should be changed using \verb=\grechangecount=, described above.

\begin{gcount}{brokenpenalty}
The vertical penalty inserted after a break on a clef change.
\end{gcount}

\begin{gcount}{clubpenalty}
The club penalty (determines how important it is to prevent orphans from occurring).
\end{gcount}

\begin{gcount}{widowpenalty}
The widow penalty (determines how important it is to prevent widows from occurring).
\end{gcount}

\macroname{emergencystretch}{}{gregoriotex-gsp-default.tex}
The value of the last ditch stretch for overfull boxes.  This should be set using \verb=\grechangedim=.

Default: \verb=\emergencystretch=

\begin{gcount}{endafterbarpenalty}
The end after bar penalty.
\end{gcount}

\begin{gcount}{endafterbaraltpenalty}{}{gregoriotex-gsp-default.tex}
The alternate end after bar penalty (used when there is no text under the bar).
\end{gcount}

\begin{gcount}{endofelementpenalty}{}{gregoriotex-gsp-default.tex}
The end of element penalty.
\end{gcount}

\begin{gcount}{endofsyllablepenalty}{}{gregoriotex-gsp-default.tex}
The end of element penalty.
\end{gcount}

\begin{gcount}{endofwordpenalty}{}{gregoriotex-gsp-default.tex}
The end of element penalty.
\end{gcount}

\begin{gcount}{hyphenpenalty}{}{gregoriotex-gsp-default.tex}
The hyphen penalty.
\end{gcount}

\begin{gcount}{nobreakpenalty}{}{gregoriotex-gsp-default.tex}
Penalty to prevent a line break.
\end{gcount}

\begin{gcount}{newlinepenalty}
Penalty to force a line break.
\end{gcount}

\begin{gcount}{finalpenalty}
The penalty applied after the final element of a score.
\end{gcount}

\macroname{looseness}{}{gregoriotex-gsp-default.tex}
The \TeX\ looseness within a score.

Default: \verb=\looseness=

\begin{gcount}{tolerance}
The \TeX\ tolerance within a score.  See \url{https://en.wikibooks.org/wiki/TeX/tolerance} for an explanation of what tolerance is.
\end{gcount}

\macroname{pretolerance}{}{gregoriotex-gsp-default.tex}
The \TeX\ pretolerance within a score.  See \url{https://en.wikibooks.org/wiki/TeX/pretolerance} for an explanation of what pretolerance is.

Default: $-1$ (Lua\TeX\ versions prior to 0.80) or \verb=\pretolerance= (versions after, and including, 0.80)]

\textit{Nota bene:} For more details on why this is necessary see the comments in gregoriotex-gsp-default.tex.





\subsection{Colors}\label{colors}
All colors can be redefined using \verb=\definecolor=.  See the
\verb=xcolor= (\LaTeX) or \verb=color= (Plain\TeX) package for documentation.

Example:\par\medskip
\begin{latexcode}
	\definecolor{gregoriocolor}{RGB}{229,53,44}
\end{latexcode}

\macroname{grebackgroundcolor}{}{gregoriotex.sty}
The color Gregorio\TeX\ uses to block out elements which have been printed,
but shouldn't show (\eg, the staff line going through the interior of
a punctum cavum).  The default is white.

\macroname{gregoriocolor}{}{gregoriotex.sty}
A red similar to that found in liturgical documents.  This is the color that Gregorio\TeX\ uses for text formatted with \texttt{<c></c>} tags in gabc.

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "GregorioRef"
%%% End: