-
Notifications
You must be signed in to change notification settings - Fork 43
/
GregorioRef.tex
265 lines (219 loc) · 8.16 KB
/
GregorioRef.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
% !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/>.
%
\documentclass[12pt,a4paper]{article}
\usepackage[titletoc,toc,title]{appendix}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont[
BoldFont=LinLibertineOZ,
BoldItalicFont=LinLibertineOZI,
SmallCapsFont=LinLibertineO,
SmallCapsFeatures={Letters=SmallCaps},
]{LinuxLibertineO}
\setsansfont[Extension=.otf,
BoldFont=LinBiolinum_RB,
ItalicFont=LinBiolinum_RI,
BoldItalicFont=LinBiolinum_RB,% fake
SmallCapsFont=LinBiolinum_R,
SmallCapsFeatures={Letters=SmallCaps},
]{LinBiolinum_R}
\setmonofont[Extension=.otf,
ItalicFont=Inconsolatazi4-Regular,
BoldFont=Inconsolatazi4-Bold,
BoldItalicFont=Inconsolatazi4-Bold,
AutoFakeSlant,
ItalicFeatures={FakeSlant},
BoldItalicFeatures={FakeSlant}
]{Inconsolatazi4-Regular}
\usepackage{enumitem}
\usepackage{xspace}
\usepackage{multicol}
\usepackage{units}
\usepackage{framed}
\usepackage{url}
\usepackage{tabulary}
\usepackage{tabularx}
\usepackage{xparse}
\usepackage{makeidx}
\makeindex
\usepackage[table]{xcolor}
\definecolor{lightgray}{gray}{0.9}
\definecolor{green}{HTML}{0c700c}
\definecolor{myred}{HTML}{FF3333}
\usepackage{adjustbox} % must be after xcolor
\usepackage{minted} % must be after xcolor
\makeatletter
\@ifpackagelater{minted}{2013/12/21}{%
\newminted{latex}{autogobble,bgcolor=lightgray}%
}{%
\newminted{latex}{gobble=2,bgcolor=lightgray}%
}%
\makeatother
%\newminted{gabc}{bgcolor=lightgray} % can this be done?
\newenvironment{gabccode}{\tt}{}
\usepackage[allowdeprecated=false]{gregoriotex}
\usepackage{carolmin}
\usepackage{mflogo}
\usepackage{hyperref}
\hypersetup{colorlinks, citecolor=black, filecolor=black, linkcolor=green, urlcolor=green}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{pdflscape}
\usepackage{hhline}
\usepackage{listings}
\usepackage{lstautogobble}
\directlua{dofile('GregorioRef.lua')}
\newcommand*{\eg}{e.g.\@\xspace}
\newcommand*{\nb}{n.b.\@\xspace}
\newcommand*{\ie}{i.e.\@\xspace}
\newcommand*{\etc}{etc.\@\xspace}
\newcommand{\pmac}[1]{\textbackslash{}#1}
\newif\ifbreakable
\let\oldsubsection\subsection
\def\subsection{\filbreak\breakablefalse\oldsubsection}
\let\oldsubsubsection\subsubsection
\def\subsubsection{\filbreak\breakablefalse\oldsubsubsection}
\newcommand{\macroname}[3]{%
\vspace{3.25ex plus 1ex minus .2ex}%
\ifbreakable%
\filbreak%
\else%
\global\breakabletrue%
\fi%
\makebox[\linewidth]{\ttfamily\bfseries #1#2%
\hspace{\fill}\normalfont\itshape #3}%
\vspace{1.5ex plus .2ex}%
\index{#1}}
%\addcontentsline{toc}{subsubsection}{#1}}
\newcommand{\optional}[1]{{\itshape #1}}
\lstset{backgroundcolor=\color{lightgray},
basicstyle=\small\ttfamily,
numbers=left,
numberstyle=\footnotesize,
stepnumber=1,
numbersep=5pt}
% for the character tables
\font\greciliae = {name:greciliae} at 1000000 sp\relax
\font\greciliaeHollow = {name:greciliae-hollow} at 1000000 sp\relax
\font\greciliaeOp = {name:greciliae-op} at 1000000 sp\relax
\font\greciliaeOpHollow = {name:greciliae-op-hollow} at 1000000 sp\relax
\font\greextra = {name:greextra} at 12 pt\relax
\newcommand{\excluded}[1]{{\tiny\itshape #1}}
\newenvironment{argtable}{%
\bigskip\rowcolors{1}{lightgray}{lightgray}
\tabularx{\textwidth}{clX}
Arg & Value & Description \\
\hline}%
{\endtabularx\bigskip}
\makeatletter%
\NewDocumentEnvironment{gdimension}{m}{\macroname{#1}{}{gregoriotex-gsp-default.tex}}{%
\gre@rubberpermit{#1}%
\ifgre@rubber%
Default: \directlua{GregorioRef.emit_dimension("\luaescapestring{\csname gre@space@skip@#1\endcsname}")}
\else%
Default: \directlua{GregorioRef.emit_dimension("\luaescapestring{\csname gre@space@dimen@#1\endcsname}")}
\fi%
}
\NewDocumentEnvironment{gcount}{m}{\macroname{#1}{}{gregoriotex-gsp-default.tex}}{%
Default: \expandafter$\expandafter\the\csname gre@space@count@#1\endcsname$
}
\newcommand{\writemode}[3]{%
\gre@style@modeline #1\endgre@style@modeline %
\gre@style@modemodifier #2\endgre@style@modemodifier %
\gre@style@modedifferentia #3\endgre@style@modedifferentia %
}
\newcommand{\getgrecount}[1]{%
\the\csname gre@count@#1\endcsname%
}
\makeatother
\newcommand{\pitchchar}{\textit{p\kern-.25em{}c}}%
\newcommand{\Pitchchar}{\textit{P\kern-.25em{}c}}%
\setlength{\parindent}{0mm} % Default is 15pt
\gresetspecial{\string\126\string\126}{\textasciitilde{}}%
\begin{document}
\begin{titlepage}
\begin{center}
\Huge
\textcolor{myred}{Gregorio} and \textcolor{myred}{Gregorio\TeX}:
Tools for gregorian score engraving.
\vspace{1cm}
\large Version \textbf{6.0.0}, 13 March 2021 %% PARSE_VERSION_DATE
\vspace{1.5cm}
\end{center}
\gresetlinecolor{gregoriocolor}
\grechangestyle{lowchoralsign}{\cminfamily\small}%
\grechangestyle{highchoralsign}{\cminfamily\small}%
\def\GreStar{\greheightstar}%
\greannotation{\scriptsize Comm.}%
\greannotation{\scriptsize VII}%
\begingroup%
\color{black!60}%
\setmainfont[SmallCapsFont=AlegreyaSC]{Alegreya}%
\newlength{\mini}%
\setlength{\mini}{\hsize}%
\addtolength{\mini}{-4cm}%
\setlength{\fboxsep}{5mm}%
\hfill\fbox{\parbox{\mini}{\gregorioscore[f]{factus}}}\hfill%
\endgroup
\begin{center}
\vspace{1.5cm}%
\href{http://gregorio-project.github.io/}{Homepage}
Source code available on
\href{http://github.com/gregorio-project/gregorio}{GitHub}.
\end{center}
\vspace{2cm}
\end{titlepage}
\cleardoublepage
\tableofcontents
\setlength{\parskip}{\bigskipamount}
\cleardoublepage
\section{Gregorio\TeX{} Macros}
The following sections document the macros available in the Gregorio\TeX{} package. The format is as follows:
\macroname{MacroName}{\{Args\}}{Source File}
Description of macro.
\begin{argtable}
Arg \# & Data type & Description of argument\\
Arg \# & \texttt{keyword} & Description of the setting the keyword corresponds to
\end{argtable}
The source file where the macro is defined is included for developers
who wish to consult it.
Some of the macros intended for inclusion in the main.tex file by the user
include usage examples.
Macros are divided into three groups:
\begin{description}
\item[User Commands] These macros are meant to be used by your average user in their \TeX\ files in order to fine tune the appearance of their scores. They should have names which consist solely of lowercase letters and be prefixed with the \texttt{gre}. Where the name clearly identifies the function as belonging to Gregorio\TeX, the prefix may be omitted.
\item[Gregorio Controls] These macros are written by the command line tool to gtex files and should not appear outside of gtex files. They should have names which are in CamelCase and be prefixed with \texttt{Gre}.
\item[Gregorio\TeX\ internals] These macros are used by Gregorio\TeX\ to process and typeset a score and should not appear in a user's document anywhere (not even in gtex files). They should have names which are all lowercase and be prefixed with \makeatletter\texttt{gre@}\makeatother.
\end{description}
\include{Command_Index_User}
\include{Command_Index_gregorio}
\include{Command_Index_internal}
\include{Gabc}
\begin{appendices}
%Turn off the \filbreak stuff to prevent it from messing up the long tables in the appendicies
\let\subsection\oldsubsection
\let\subsubsection\oldsubsubsection
\renewcommand\thetable{\thesection\arabic{table}}
\renewcommand\thefigure{\thesection\arabic{figure}}
\include{Appendix_Font_Tables}
\end{appendices}
\addcontentsline{toc}{section}{Index}
\printindex
\end{document}