Debian Codegraph @

texmf-dist/doc/luatex/gregoriotex/GregorioRef.tex

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