% !TEX root = GregorioRef.tex
% !TEX program = LuaLaTeX+se
%
% Copyright (C) 2006-2025 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{Gregorio\TeX{} Controls}

These functions are the ones used by Gregorio\TeX{} internally as it
process the commands listed above.  They should not appear in any user
document and are listed here for programmer documentation purposes
only.

Sometimes it is necessary to temporarily change some register or macro for the purpose of some particular operation and then restore it to its previous value.  In those case we define a \verb=\gre@saved@<moment>...= register or macro associated with it (\eg \verb=\gre@dimen@constantglyphraise= is saved just before a discretionary to \verb=\gre@saved@prediscretionary@dimen@constantglyphraise= and restored from it afterwards).  These registers/macros are not listed in this documentation.

\macroname{\textbackslash gre@error}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Prints an error to the \TeX\ output log.

\begin{argtable}
	\#1 & string & error message\\
\end{argtable}


\macroname{\textbackslash gre@warning}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Prints a warning to the \TeX\ output log.

\begin{argtable}
	\#1 & string & warning message\\
\end{argtable}

\macroname{\textbackslash gre@metapost}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Executes \MP{} commands using luamplib.

\begin{argtable}
	\#1 & \MP{} commands & The \MP{} commands to execute.
\end{argtable}

\macroname{\textbackslash gre@deprecated}{\#1\#2}{gregoriotex-common.tex}
Macro that handles deprecation messages. By default, deprecated macros
are allowed and a warning is printed. If the package option
\texttt{deprecated=false} is set, then deprecated macros raise a
package error, halting \TeX.

\begin{argtable}
	\#1 & string & name of the deprecated macro\\
	\#2 & string & name of the correct macro to use\\
\end{argtable}

\macroname{\textbackslash gre@obsolete}{\#1\#2}{gregoriotex-common.tex}
Macro that handles obsolescence errors.

\begin{argtable}
	\#1 & string & name of the obsolete macro\\
	\#2 & string & name of the correct macro to use\\
\end{argtable}

\macroname{\textbackslash gre@allowdeprecated@asboolean}{}{gregoriotex-main.tex}
Macro that evaluates \texttt{true} or \texttt{false} depending on whether
deprecated usage is allowed.  This is used to pass the value of
\verb=\ifgre@allowdeprecated= to Lua.

\macroname{\textbackslash gre@loadgregoriofont}{}{gregoriotex-main.tex}
Loads the chosen font for the neumes at the correct size.

\macroname{\textbackslash gre@maketable}{\#1}{gregoriotex-main.tex}
Helper to convert a \TeX\ list into a Lua table.  Used to pass \verb=\gre@input@path= to Lua.

\macroname{\textbackslash gre@input@path}{}{gregoriotex-main.tex}
Macro holding the list of directories to be searched for scores.  \verb=\input@path= gets aliased to this list when inside \verb=\gregorioscore=.

\macroname{\textbackslash gre@calculate@constantglyphraise}{}{gregoriotex-spaces.tex}
Macro to calculate \verb=\gre@constantglyphraise=

\macroname{\textbackslash gre@addtranslationspace}{}{gregoriotex-spaces.tex}
Macro to tell Gregorio to set space for the translation.

\macroname{\textbackslash gre@removetranslationspace}{}{gregoriotexspaces.tex}
Macro to tell Gregorio to remove the space allocated to the translation.

\macroname{\textbackslash gre@calculate@additionalspaces}{\#1\#2\#3\#4}{gregoriotex-spaces.tex}
Macro which calculates \verb=\gre@additionalbottomspace= and\\
\verb=\gre@additionaltopspace=

\begin{argtable}
	\#1 & integer & the height number of the top pitch, including signs\\
	\#2 & integer & the height number of the bottom pitch, including signs\\
	\#3 & \texttt{0} & there is no translation line\\
	& \texttt{1} & there is a translation line\\
	\#4 & \texttt{0} & there is no above lines text\\
	& \texttt{1} & there is above lines text
 \end{argtable}

\macroname{\textbackslash gre@calculate@textaligncenter}{\#1\#2\#3\#4}{gregoriotex-spaces.tex}
Macro for calculating \verb=\gre@textaligncenter=.

\begin{argtable}
	\#1 & string & The carry-over letters from the previous syllable that should be moved to the current.\\
	\#2 & string & The first part of the syllable (any preceding consonants in Latin).\\
	\#3 & string & The middle part of the syllable (the vowel in Latin, the whole syllable in English).\\
	\#4 & \texttt{0} & Calculation is being performed for the current syllable.\\
	& \texttt{1} & Calculation is being performed for the next syllable.\\
\end{argtable}

\macroname{\textbackslash gre@calculate@annotationtrueraise}{}{gregoriotex-spaces.tex}
Macro to calculate \verb=\gre@dimen@annotationtrueraise=.

\macroname{\textbackslash gre@calculate@commentarytrueraise}{}{gregoriotex-spaces.tex}
Macro to calculate \verb=\gre@dimen@commentarytrueraise=.

\macroname{\textbackslash gre@calculate@textlower}{}{gregoriotex-spaces.tex}
Calculates the value of \texttt{textlower}.  Default is \texttt{spacebeneathtext}.

\macroname{\textbackslash gre@calculate@linewidth}{}{gregoriotex-spaces.tex}
Calculates the line width.  Default is the width of the printable space (\verb=\hsize=).

\macroname{\textbackslash gre@calculate@stafflinewidth}{}{gregoriotex-spaces.tex}
Calculates the width of the staff lines.  Default is \texttt{linewidth}.

\macroname{\textbackslash gre@calculate@stafflineheight}{}{gregoriotex-spaces.tex}
Calculates the height (thickness) of the staff lines.  Dependent on \texttt{stafflineheightfactor} and \texttt{gre@factor}.

\macroname{\textbackslash gre@calculate@interstafflinespace}{}{gregoriotex-spaces.tex}
Calculates the distance between the staff lines.  Dependent on \texttt{stafflineheight} and \texttt{gre@factor}

\macroname{\textbackslash gre@calculate@stafflinediff}{}{gregoriotex-spaces.tex}
Calculates a correction factor for when the staff lines are not their default thickness.  Dependent on \texttt{stafflineheight} and \texttt{gre@factor}.

\macroname{\textbackslash gre@calculate@staffheight}{}{gregoriotex-spaces.tex}
Calculates the total height of the staff.  Dependent on \texttt{stafflineheight} and \texttt{interstafflinespace}.

\macroname{\textbackslash gre@calculate@constantglyphraise}{}{gregoriotex-spaces.tex}
Calculates the baseline correction for the glyphs.  Dependent on \texttt{gre@factor}, \texttt{additionalbottomspace}, \texttt{spacebeneathtext}, \texttt{spacelinestext}, \texttt{interstafflinespace}, \texttt{stafflineheight}, \texttt{currenttranslationheight}, and \texttt{stafflinediff}.

\macroname{\textbackslash gre@computespaces}{}{gregoriotex-spaces.tex}
Aggregates all of the global distance calculations and calls them in the order needed to respect dependencies.

\macroname{\textbackslash gre@calculate@glyphraisevalue}{\#1\#2\#3}{gregoriotex-spaces.tex}
Calculates the raise value for a glyph (glyphraisevalue) based on where it is to be placed and what kind of a glyph it is.  This is a time of use calculation.

\begin{argtable}
	\#1 & integer & The number for where the glyph is located.  \texttt{a} in gabc is \texttt{1}, \texttt{b} is \texttt{2}, \etc\\
	\#2 & \texttt{0} & no modification\\
	& \texttt{1} & puts the value on the interline just above if it is on a line\\
	& \texttt{2} & puts the value on the interline just beneath if it is on a line\\
	& \texttt{3} & case of the vertical episema, which is not placed at the same place if the corresponding note is on a line or not\\
	& \texttt{4} & case of the punctum mora, for the same reason\\
	& \texttt{5} & case of the horizontal episema under a note, that must be placed a bit lower if the note is on a line\\
	& \texttt{6} & case of the signs above (accentus, \etc)\\
	& \texttt{8} & case of the punctum mora of the first note of a podatus or the 2nd note of a porrectus, \etc\\
	& \texttt{9} & case of the horizontal episema, that must be placed a bit lower if the note is on a line\\
	& \texttt{10} & case of the low choral sign\\
	& \texttt{11} & case of the high choral sign\\
	& \texttt{12} & case of the low choral sign which is lower than the note\\
	& \texttt{13} & case of the brace above the bars\\
	& \texttt{14} & case of the punctum mora in a space with a note on the line below it\\
	& \texttt{15} & case of the over-the-notes slur\\
	& \texttt{16} & case of the under-the-notes slur\\
	& \texttt{17} & case of the bracket\\
	\#3 & \texttt{0} & for horizontal episema cases, use automatic positioning within the space\\
	& \texttt{1} & for horizontal episema cases, position in the middle of the space\\
	& \texttt{2} & for horizontal episema cases, position low within the space as if the episema is over the note\\
	& \texttt{3} & for horizontal episema cases, position high within the space as if the episema is under the note\\
	& \texttt{4} & for horizontal episema cases, position low within the space as if the episema is over the note\\
	& \texttt{5} & for horizontal episema cases, position high within the space as if the episema is under the note\\
\end{argtable}

\macroname{\textbackslash gre@stafflinefactor}{}{gregoriotex-spaces.tex}
A number indicating the thickness of the staff lines.

\macroname{\textbackslash gre@calculate@textaligncenter}{\#1\#2\#3}{gregoriotex-spaces.tex}
Macro to calculate the distance from the beginning of the text of a syllable to its alignment point (the center of the vowel for Latin centering, the center of the syllable for English centering).  This is a time of use calculation.

\begin{argtable}
	\#1 & string & the first part of the syllable\\
	\#2 & string & the middle part of the syllable\\
	\#3 & \texttt{0} & perform this calculation for the current syllable\\
	& \texttt{1} & perform this calculation for the next syllable
\end{argtable}

\macroname{\textbackslash gre@calculate@enddifference}{\#1\#2\#3\#4\#5}{gregoriotex-spaces.tex}
Calculates the difference between the end of the notes and the end of the syllable text.  Also stores the value for the previous syllable if needed.  This is a time of use calculation.

\begin{argtable}
	\#1 & length & the total width of the notes\\
	\#2 & length & the total width of the syllable text\\
	\#3 & length & the alignment distance for the text (\texttt{textaligncenter})\\
	\#4 & length & the alignment distance for the notes (\texttt{notesaligncenter})\\
	\#5 & \texttt{0} & do not save the value for the previous syllable before calculating the new value\\
	& \texttt{1} & save the value for the previous syllable before calculating the new value
\end{argtable}

The formula used is \verb=#1 - #2 + #3 - #4= or (more sensibly) \verb=(#1 - #4) - (#2 - #3)=.  This is also equivalent to \verb=-#4 - \gre@dimen@begindifference + #3=, a fact we take advantage of when calculating the end difference for a bar syllable under the new bar spacing algorithm.

\macroname{\textbackslash gre@changeonedimenfactor}{\#1\#2\#3}{gregoriotex-spaces.tex}
Change the scale of a single distance from one factor to another.

\begin{argtable}
	\#1 & string & name of the distance to be scaled.  See \Nameref{distances}.\\
	\#2 & integer & the factor the distance is currently in\\
	\#3 & integer & the factor the distance is to be put into\\
\end{argtable}

\macroname{\textbackslash gre@changedimenfactor}{\#1\#2}{gregoriotex-spaces.tex}
Rescales all the distances (and \texttt{stafflinefactor}) which are supposed to scale with a change in staff size.

\begin{argtable}
	\#1 & integer & the factor the distances are currently in\\
	\#2 & integer & the factor the distances are to be put into\\
\end{argtable}

\macroname{\textbackslash gre@calculate@nextbegindifference}{\#1\#2\#3\#4\#5\#6}{gregoriotex-spaces.tex}
Macro to calculate \texttt{nextbegindifference}.

\begin{argtable}
	\#1 & string & the carry-over letters for the next syllable\\
	\#2 & string & the first letters of the next syllable\\
	\#3 & string & the middle letters of the next syllable (the vowel in Latin, the whole syllable in English)\\
	\#4 & string & the end letters of the next syllable\\
	\#5 & integer & the type of notes alignment.  See \Nameref{notesalign}.\\
	\#6 & integer & the type of alteration.  See \Nameref{alterationtype}.\\
\end{argtable}

\macroname{\textbackslash gre@strip@pt}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Strips the units from a distance.  Under \LaTeX{}, this is an alias to \verb=\strip@pt=.

\begin{argtable}
	\#1 & control sequence & should be the control sequence for the the distance register (including the leading backslash)\\
\end{argtable}

\macroname{\textbackslash gre@rem@pt}{\#1}{gregoriotex.tex}
Strips the units from a distance.  Used internally by \verb=\gre@strip@pt=.  Under \LaTeX{}, this is not defined.

\begin{argtable}
	\#1 & distance & should be in the form ``[0-9]+.[0-9]+pt’’. (\ie the result of applying \verb=\the= to a distance register)\\
\end{argtable}

\macroname{\textbackslash gre@count@temp@...}{}{gregoriotex-spaces.tex}
Temporary count used in calculations.  There are currently three of these.

\macroname{\textbackslash gre@convertto}{\#1\#2}{gregoriotex-spaces.tex}
Macro which converts a distance into a particular set of units.  Result is placed in \verb=\gre@converted= as a string.

\begin{argtable}
	\#1 & string & two letter abbreviation for the units.  Should recognize all legal \TeX\ units.\\
	\#2 & distance & Distance to be converted.
\end{argtable}

\macroname{\textbackslash gre@converted}{}{gregoriotex-spaces.tex}
Macro holding result of last call to \verb=\gre@convertto=.

\macroname{\textbackslash gre@consistentunits}{\#1\#2}{gregoriotex-spaces.tex}
This function takes a distance and formats it as a string so that its units conform to the pattern set by a string representation of a distance.  Result is placed in \verb=\gre@stringdist=.

\begin{argtable}
	\#1 & string & the standard whose format is to be matched.\\
	\#2 & distance & the distance to be adjusted.
\end{argtable}

\macroname{\textbackslash gre@stringdist}{}{gregoriotex-spaces.tex}
Macro holding result of last call to \verb=\gre@consistentunits=.

\macroname{\textbackslash gre@gregorioscore}{\#1}{gregoriotex-main.tex}
Macro that handles \verb=\gregorioscore= calls when they do not have an
optional argument.

\begin{argtable}
	\#1 & string & Relative or absolute path to the score.\\
\end{argtable}

\macroname{\textbackslash gre@gregorioscore@option}{[\#1]\#2}{gregoriotex-main.tex}
Macro that handles \verb=\gregorioscore= calls when they have an optional
argument.

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

\macroname{\textbackslash gre@writemode}{\#1\#2\#3}{gregoriotex-main.tex}
Macro that writes its arguments with \verb=\greannotation=.  This
macro is typically called by \verb=\GreMode= in the gtex file.

\begin{argtable}
	\#1 & \TeX\ code & Mode text to place above the initial of a score in the \texttt{modeline} style.\\
	\#2 & \TeX\ code & Arbitrary code to typeset, in the \texttt{modemodifier} style, after the mode text.\\
	\#3 & \TeX\ code & Arbitrary code to typeset, in the \texttt{modedifferentia} style, after \#2.\\
\end{argtable}

\macroname{\textbackslash gre@setallbracerendering}{\#1}{gregoriotex-signs.tex}
Macro used by \verb=\gresetbracerendering= to change all braces.

\begin{argtable}
	\#1 & \texttt{metapost} & \MP{} will be used to render braces\\
			& \texttt{font} & The score font will be used to render braces\\
\end{argtable}

\macroname{\textbackslash gre@setbracerendering}{[\#1]\#2}{gregoriotex-signs.tex}
Macro used by \verb=\gresetbracerendering= to change a single type of brace.

\begin{argtable}
	\#1 & \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 gre@@setbracerendering}{\#1\#2}{gregoriotex-signs.tex}
Secondary macro used by \verb=\gre@setallbracerendering= and
\verb=\gre@setbracerendering= to change a single type of brace.  As a
secondary macro, it doesn't check its first argument.

\begin{argtable}
	\#1 & \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 gre@brace@common}{\#1\#2\#3\#4\#5\#6\#7}{gregoriotex-signs.tex}
Common macro used internally to render braces.

\begin{argtable}
	\#1 & length  & The width of the brace.\\
	\#2 & length  & A vertical shift.\\
	\#3 & length  & A horizontal shift.\\
	\#4 & \texttt{0} & Don’t shift before starting the brace.\\
	& \texttt{1} & Shift back a punctum’s width before starting the brace.\\
	\#5 & \texttt{0} & No accentus above the brace.\\
	& \texttt{1} & Typeset an accentus above the brace.\\
	\#6 & integer & The height number for the brace.\\
	\#7 & csname  & The control sequence name representing the brace.
\end{argtable}

\macroname{\textbackslash gre@render@barbrace}{}{gregoriotex-signs.tex}
Draws a divisio brace.

\macroname{\textbackslash grebracemetapostpreamble}{\#1}{gregoriotex-signs.tex}
Returns the \MP{} preamble for braces.  The control sequence name does
not have the \texttt{@} symbol because this macro is used within \MP{}.

\begin{argtable}
	\#1 & string & the width of the brace; if \texttt{*}, use the bar brace width.
\end{argtable}

\macroname{\textbackslash gre@draw@curlybrace}{\#1}{gregoriotex-signs.tex}
Draws a curly over-brace using \MP{}.

\begin{argtable}
	\#1 & length & the width of the brace.
\end{argtable}

\macroname{\textbackslash gre@draw@brace}{\#1}{gregoriotex-signs.tex}
Draws a round over-brace using \MP{}.

\begin{argtable}
	\#1 & string & the width of the brace; if \texttt{*}, use the bar brace width.
\end{argtable}

\macroname{\textbackslash gre@draw@fontbrace}{\#1\#2}{gregoriotex-signs.tex}
Draws a brace using the score font.

\begin{argtable}
	\#1 & string & the width of the brace.\\
	\#2 & \TeX\ code & \TeX\ code that renders the brace using the score font.\\
\end{argtable}

\macroname{\textbackslash gre@draw@underbrace}{\#1}{gregoriotex-signs.tex}
Draws a round under-brace using \MP{}.

\begin{argtable}
	\#1 & length & the width of the brace.
\end{argtable}

\macroname{\textbackslash gre@draw@roundbrace}{\#1\#2\#3}{gregoriotex-signs.tex}
Draws a round over- or under-brace using \MP{}.

\begin{argtable}
	\#1 & length         & the width of the brace.\\
	\#2 & number         & the height of the bounding box in em-relative units.\\
	\#3 & \MP{} commands & \MP{} commands to draw the brace outline.
\end{argtable}

\macroname{\textbackslash gre@draw@slur}{\#1\#2\#3}{gregoriotex-signs.tex}
Draws a slur using \MP{}.

\begin{argtable}
	\#1 & length      & the x-dimension of the slur.\\
	\#2 & length      & the y-dimension of the slur.\\
	\#3 & \texttt{-1} & draw an under-the-notes slur.\\
			& \texttt{1}  & draw an over-the-notes slur.\\
\end{argtable}


\macroname{\textbackslash gre@iflatex}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Evaluates to \verb=#1= if running under \LaTeX{}.

\begin{argtable}
	\#1 & \TeX{} code & the \TeX{} code to use if running under \LaTeX{}.
\end{argtable}

\macroname{\textbackslash gre@ifnotlatex}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Evaluates to \verb=#1= if not running under \LaTeX{}.

\begin{argtable}
	\#1 & \TeX{} code & the \TeX{} code to use if not running under \LaTeX{}.
\end{argtable}

\macroname{\textbackslash gre@latex@barredsymbol}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Internal method used by \verb=\grelatexsimpledefarredsymbol= to simplify
the cascading of conditionals used to implement that macro.

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

\begin{argtable}
	\#1 & string      & the value of \verb=\f@series/\f@shape= to match.\\
	\#2 & \TeX{} code & the \TeX{} for the base symbol (\ie, \texttt{A}, \texttt{R}, or \texttt{V}).\\
	\#3 & string      & the control sequence name created by \verb=\gredefsizedsymbol= to use for the bar.\\
	\#4 & dimension   & the amount to shift the bar to the left from the end of the base symbol.
\end{argtable}

\macroname{\textbackslash gre@additionalbottomcustoslineend}{}{gregoriotex-signs.tex}
Macro to place a bottom custos with an additional line (positions \texttt{a} and \texttt{b}) at the end of a line.

\macroname{\textbackslash gre@additionalbottomcustoslinemiddle}{}{gregoriotex-signs.tex}
Macro to place a bottom custos with an additional line (positions \texttt{a} and \texttt{b}) in the middle of a line.

\macroname{\textbackslash gre@additionaltopcustoslineend}{}{gregoriotex-signs.tex}
Macro to place a top custos with an additional line (positions \texttt{l} and \texttt{m}) at the end of a line.

\macroname{\textbackslash gre@additionaltopcustoslinemiddle}{}{gregoriotex-signs.tex}
Macro to place a top custos with an additional line (positions \texttt{l} and \texttt{m}) in the middle of a line.

\macroname{\textbackslash gre@pickcustos}{\#1}{gregoriotex-signs.tex}
Macro to pick the appropriate custos character.

\begin{argtable}
	\#1 & integer & height of the custos character to be placed\\
\end{argtable}

\macroname{\textbackslash gre@nextcustospitch}{}{gregoriotex-signs.tex}
Macro that saves the next custos pitch (height).

\macroname{\textbackslash gre@nextcustosalteration}{}{gregoriotex-signs.tex}
Macro that saves the next custos alteration.

\macroname{\textbackslash gre@custosalteration}{\#1\#2}{gregoriotex-signs.tex}
Typesets the alteration for a custos, if enabled.

\begin{argtable}
	\#1 & integer & The pitch (height number) of the custos.\\
	\#2 & \texttt{Flat} & The custos should have a flat.\\
			& \texttt{Natural} & The custos should have a natural.\\
			& \texttt{Sharp} & The custos should have a sharp.\\
			& \textit{empty} & The custos should not have an alteration.\\
\end{argtable}

\macroname{\textbackslash gre@noinitial}{}{gregoriotex-main.tex}
Macro called when no initial is being set.

\macroname{\textbackslash gre@setinitial}{\#1}{gregoriotex-main.tex}
Macro to set the initial in the score.

\macroname{\textbackslash gre@addspaceabove}{}{gregoriotex-main.tex}
Macro to increase the space above the lines to account for above lines text.

\macroname{\textbackslash gre@removespaceabove}{}{gregoriotex-main.tex}
Macro to decrease the space above the lines as there is no longer any above lines text.

\macroname{\textbackslash gre@alteration}{\#1\#2\#3\#4\#5\#6}{gregoriotex-signs.tex}
Macro to typeset an alteration.

\begin{argtable}
	\#1 & integer & height of the alteration\\
	\#2 & integer & alteration type (see Section \ref{alterationtype})\\
	\#3 & \texttt{1} & the alteration is part of the clef\\
	& \texttt{0} & the alteration is not part of the clef\\
	\#4 & \TeX\ code & signs to typeset before the glyph (typically additional bars, as they must be ``behind'' the glyph)\\
	\#5 & \TeX\ code & signs to typeset after the glyph (almost all signs)\\
	\#6 & string & the line, byte offset, and column address for textedit links when point-and-click is enabled\\
\end{argtable}

\macroname{\textbackslash gre@alteration@isvisible}{\#1\#2}{gregoriotex-signs.tex}
Test whether an alteration should be visible or not.

\begin{argtable}
	\#1 & integer & 0 for current alteration, 1 for next alteration\\
	\#2 & integer & alteration type (see Section \ref{alterationtype})\\
\end{argtable}

\macroname{\textbackslash gre@alteration@visible}{\#1\#2\#3\#4\#5\#6}{gregoriotex-signs.tex}
The special case of \verb|gre@alteration| for when the alteration is visible.

\macroname{\textbackslash gre@alteration@char}{}{gregoriotex-signs.tex}
\vspace*{-10ex}%
\macroname{\textbackslash gre@alteration@type}{}{gregoriotex-signs.tex}
Used internally by \verb|\gre@alteration@visible|.

\macroname{\textbackslash gre@clef}{}{gregoriotex-signs.tex}
Macro holding the current clef type.

\macroname{\textbackslash gre@clefheight}{}{gregoriotex-signs.tex}
Macro holding the current clef line.

\macroname{\textbackslash gre@clefflatheight}{}{gregoriotex-signs.tex}
Macro to hold the height of the current flat for the clef (\texttt{3} if no flat).

\macroname{\textbackslash gre@cleftwo}{}{gregoriotex-signs.tex}
Macro holding the current secondary clef type.

\macroname{\textbackslash gre@cleftwoheight}{}{gregoriotex-signs.tex}
Macro holding the current secondary clef line (or 0 for no secondary clef).

\macroname{\textbackslash gre@cleftwoflatheight}{}{gregoriotex-signs.tex}
Macro to hold the height of the current flat for the secondary clef (\texttt{3} if no flat).

\macroname{\textbackslash gre@updatelinesclef}{}{gregoriotex-signs.tex}
Macro redrawing a key from \verb=\gre@clefnum=, useful for vertical space changes.

\macroname{\textbackslash gre@currenttextabovelines}{}{gregoriotex-main.tex}
Macro for storing the text which needs to be placed above the lines.

\macroname{\textbackslash gre@typesettextabovelines}{\#1\#2}{gregoriotex-main.tex}
Macro for typesetting the text or nabc neumes above the lines.

\begin{argtable}
	\#1 & string & Text to be typeset\\
	\#2 & \texttt{0} & Use alt text above the lines vertical spacing\\
	& \texttt{1} & Use nabc neumes above the lines vertical spacing\\
\end{argtable}

\macroname{\textbackslash gre@dotranslationcenterend}{}{gregoriotex-main.tex}
Macro to typeset a centered translation.

\macroname{\textbackslash gre@generatelines}{}{gregoriotex-main.tex}
Macro to (re)populate the box containing the lines.

\macroname{\textbackslash gre@lastoflinecount}{}{gregoriotex-main.tex}
Count to track where on the line we are.  Values are \texttt{0} (we are not near the end of a line), \texttt{1} (we’re at the last syllable of the line), and \texttt{2} (we just set the last syllable of the line and so are at the first syllable of a new line).

\macroname{\textbackslash gre@newlinecommon}{\#1\#2}{gregoriotex-main.tex}
The macro which needs to be called each time a new lines is started.

\begin{argtable}
	\#1 & \texttt{0} & Justifying the line being ended\\
	& \texttt{1} & Do not justify the line being ended\\
	\#2 & \texttt{0} & Take care of eolshift\\
	& \texttt{1} & Do not adjust end of line (when already done by the new spacing algorithm)\\
\end{argtable}

\macroname{\textbackslash gre@endafterbar}{\#1}{gregoriotex-main.tex}
Macro to call after ending a bar.

\begin{argtable}
	\#1 & \texttt{0} & We are at the end of a line\\
	& \texttt{1} & We not at the end of a line\\
\end{argtable}

\macroname{\textbackslash gre@endofsyllable}{\#1\#2\#3}{gregoriotex-syllable.tex}
Macro called at end of a syllable, adds a penalty and a space.

\begin{argtable}
	\#1 & \texttt{0} & to only add the penalty\\
	& \texttt{1} & adds both penalty and space\\
	\#2 & \texttt{0} & if end of syllable\\
	& \texttt{1} & if end of word\\
	\#3 & \texttt{1} & if next syllable is a bar\\
	& \texttt{0} & otherwise\\
\end{argtable}

\macroname{\textbackslash gre@endofglyphcommon}{}{gregoriotex-syllable.tex}
Macro called at the end of every glyph.  Checks to see if glyph being ended is the last of the score and does some clean-up if it is.

\macroname{\textbackslash gre@setfirstsyllabletext}{\#1\#2\#3\#4\#5\#6}{gregoriotex-syllable.tex}
Internal macro to set the first syllable text after all parts are known.

\begin{argtable}
	\#1 & \TeX\ code & First part of the syllable (before the vowel)\\
	\#2 & \TeX\ code & Middle part of the syllable (the vowel)\\
	\#3 & \TeX\ code & Last part of the syllable (after the vowel)\\
	\#4 & \TeX\ code & First letter of the syllable\\
	\#5 & \TeX\ code & Everything after the first letter of the syllable\\
	\#6 & \TeX\ code & Macros to run after the text is emitted\\
\end{argtable}

\macroname{\textbackslash gre@opening@syllabletext}{}{gregoriotex-syllable.tex}
Macro that stores the computed \TeX\ code for rendering the text of the first syllable.

\macroname{\textbackslash gre@factor}{}{gregoriotex-main.tex}
Count which stores the current staff size.

Default: 17 (approximately the size found in graduals)

\macroname{\textbackslash gre@fillhole}{\#1\#2}{gregoriotex-signs.tex}
Macro to fill the hole in a glyph so that staff lines do not show through a hole in it.

\begin{argtable}
	\#1 & Gregorio\TeX\ char & character to use to fill the hole\\
	\#1 & \texttt{0} & the hole is being filled for an alteration\\
	\#1 & \texttt{1} & the hole is being filled for a cavum glyph\\
\end{argtable}

\macroname{\textbackslash gre@calculate@notesaligncenter}{\#1}{gregoriotex-syllable.tex}
Macro to find the alignment center for a group of notes.  The value is the distance from the left edge of the group to the alignment point and is stored in \verb=\gre@dimen@notesaligncenter=.

\begin{argtable}
	\#1 & Note alignment type & See \ref{notesalign}\\
\end{argtable}

\macroname{\textbackslash gre@calculate@nextnotesaligncenter}{\#1\#2}{gregoriotex-syllable.tex}
Same as previous, but for the next syllable.

\begin{argtable}
	\#1 & Note alignment type & See \ref{notesalign}\\
	\#1 & Alteration type & See \ref{alterationtype}\\
\end{argtable}

\macroname{\textbackslash gre@calculate@simplenotesaligncenter}{\#1\#2}{gregoriotex-syllable.tex}
Workhorse function behind \verb=\gre@calculate@notesaligncenter= and\\ \verb=\gre@calculate@nextnotesaligncenter=.

\begin{argtable}
	\#1 & Note alignment type & See \ref{notesalign}\\
	\#2 & \texttt{0} & this is for the current syllable\\
	& \texttt{1} & this is for the next syllable\\
\end{argtable}

\macroname{\textbackslash gre@gregoriofontname}{}{gregoriotex-main.tex}
Macro which stores the name of the currently selected font for the neumes.

\macroname{\textbackslash gre@handleclivisspecialalignment}{\#1\#2\#3}{gregoriotex-syllable.tex}
Macro for aligning clivis syllables according to the flag \verb=\gre@clivisalignment=.

\begin{argtable}
	\#1 & Gregorio\TeX\ glyph & Glyph to use when aligning clivis on its center\\
	\#2 & Gregorio\TeX\ glyph & Glyph to use when aligning clivis on the center of the first punctum\\
	\#3 &  \texttt{0} & this is for the current syllable\\
	& \texttt{1} & this is for the next syllable\\
\end{argtable}

\macroname{\textbackslash gre@hepisorline}{\#1\#2\#3\#4\#5\#6\#7}{gregoriotex-signs.tex}
Macro to typeset a horizontal line (either an additional staff line or an episema).

{\small
\begin{argtable}
	\#1 & character & The letter of the height of the episema (not the height of the note it corresponds to).\\
	\#2 & \texttt{0} & go back to the beginning of the previous glyph; this starts the episema at the beginning of the previous glyph\\
	& \texttt{1} & stay at the end of the glyph; doesn’t make much sense to use this\\
	& \texttt{2} & go back the width of \#1; this starts the episema at the glyph from the end that starts at \#1’s width from the end\\
	& \texttt{3} & go back to the beginning of the previous glyph and then forward the width of \#1; this starts the episema at the glyph from the start that starts just after \#1’s width from the start\\
	& \texttt{4} & go back to the beginning of the previous glyph and then forward the width of \#1, then back the width of \#2; this ends the episema at the end of \#1\\
	\#3 & integer &the ambitus for a two note episema at the diagonal stroke of a porrectus, porrectus flexus, orculus resupinus, or torculus resupinus flexus\\
	\#4 & \texttt{0} & an horizontal episema\\
	& \texttt{1} & an horizontal episema under a note\\
	& \texttt{2} & a line at the top\\
	& \texttt{3} & a line at the bottom\\
	\#5 & \texttt{f} & a normal episema\\
	& \texttt{l} & a small episema aligned left\\
	& \texttt{c} & a small episema aligned center\\
	& \texttt{r} & for a small episema aligned right\\
	\#6 & string & a positive or negative ``nudge'' (dimension) for the vertical position of the horizontal episema\\
	\#7 & \texttt{0} & for horizontal episema cases, use automatic positioning within the space\\
	& \texttt{1} & for horizontal episema cases, position in the middle of the space\\
	& \texttt{2} & for horizontal episema cases, position low within the space as if the episema is over the note\\
	& \texttt{3} & for horizontal episema cases, position high within the space as if the episema is under the note\\
	& \texttt{4} & for horizontal episema cases, position low within the space as if the episema is over the note\\
	& \texttt{5} & for horizontal episema cases, position high within the space as if the episema is under the note\\
\end{argtable}
}

\macroname{\textbackslash gre@hepisorlineaux}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Macro that will help in the typesetting of a horizontal episema and additional lines.

\begin{argtable}
	\#1 & Gregorio\TeX\ glyph & an offset glyph (see \#3, below)\\
	\#2 & Gregorio\TeX\ glyph & the episema glyph\\
	\#3 & \texttt{0} & go back to the beginning of the previous glyph; this starts the episema at the beginning of the previous glyph\\
	& \texttt{1} & stay at the end of the glyph; doesn’t make much sense to use this\\
	& \texttt{2} & go back the width of \#1; this starts the episema at the glyph from the end that starts at \#1’s width from the end\\
	& \texttt{3} & go back to the beginning of the previous glyph and then forward the width of \#1; this starts the episema at the glyph from the start that starts just after \#1’s width from the start\\
	\#4 & \texttt{0} & an horizontal episema\\
	& \texttt{1} & an horizontal episema under a note\\
	& \texttt{2} & a line at the top\\
	& \texttt{3} & a line at the bottom\\
\end{argtable}

\macroname{\textbackslash gre@vepisemaorrare}{\#1\#2\#3\#4\#5}{gregoriotex-signs.tex}
Macro to typeset a vertical episema or a rare accent (like accentus, circulus, etc.).  This function must be called after a call to \verb=\GreGlyph=.

\begin{argtable}
	\#1 & character & the letter of the height of the episema (not the height of the note it corresponds to.\\
	\#2 & string & See \Nameref{NoteOffset}.\\
	\#3 & Gregorio\TeX\ glyph & the sign glyph\\
	\#4 & \texttt{1} & vertical episema\\
	& \texttt{2} & rare sign\\
	& \texttt{3} & choral sign\\
	& \texttt{4} & brace above the bar\\
	\#5 & string & the choral sign, if relevant\\
\end{argtable}

\macroname{\textbackslash gre@vepisemaorrareaux}{\#1\#2\#3\#4\#5\#6\#7}{gregoriotex-signs.tex}
Macro to help typesetting vertical episema.

\begin{argtable}
	\#1 & Gregorio\TeX\ glyph & is an offset glyph (see \#3 below)\\
	\#2 & Gregorio\TeX glyph & the glyph upon which the sign is to be centered\\
	\#3 & \texttt{0} & go back to the beginning of the previous glyph and then forward half the width of \#2; this puts the sign at the beginning of the previous glyph, whose first note is the size of \#2\\
	& \texttt{1} & go back half the width of \#2; this puts the sign at the end of the previous glyph, whose last note is the size of \#2\\
	& \texttt{2} & go back the width of \#1 and then forward half the width of \#2; this puts the sign at the glyph from the end that starts at \#1’s width from the end\\
	& \texttt{3} & go back to the beginning of the previous glyph and then forward the width of \#1 and then back half the width of \#2; this puts the sign at the glyph from the start that ends at \#1’s width from the start\\
	\#4 & dimension & a shift that we want to get applied, useful for punctum inclinatum for example\\
	\#5 & integer & is the glyph number\\
	\#6 & \texttt{1} & vertical episema\\
	& \texttt{2} & rare sign\\
	& \texttt{3} & choral sign\\
	& \texttt{4} & brace above the bar\\
	\#7 & string & the choral sign if relevant\\
\end{argtable}

\macroname{\textbackslash gre@newglyphcommon}{}{gregoriotex-syllable.tex}
Macro called before each glyph.

\macroname{\textbackslash greoldcatcode}{}{gregoriotex.tex}
Macro to store the catcode for ``@'' so that we can use said symbol in function names under Plain \TeX\ and then restore the original catcode after the package is done loading.

\macroname{\textbackslash gre@prephepisemaledgerlineheuristics}{}{gregoriotex-spaces.tex}
Prepares the system to accept ledger line heuristics for the horizontal episema.

\macroname{\textbackslash gre@resetledgerlineheuristics}{}{gregoriotex-spaces.tex}
Resets the ledger line heuristic flags.

\macroname{\textbackslash gre@setstylefont}{}{gregoriotex-main.tex}
Macro for opening up greextra font.

\macroname{\textbackslash gre@syllablenotes}{\#1}{gregoriotex-syllable.tex}
Macro for populating \verb=\gre@box@syllablenotes=.

\begin{argtable}
	\#1 & string & The contents to be placed in the box\\
\end{argtable}

\macroname{\textbackslash gre@symbolfontsize}{}{gregoriotex-symbols.tex}
The font size at which symbols are to be loaded.

\macroname{\textbackslash gre@textnormal}{\#1}{gregoriotex-syllable.tex}
Macro which applies the default text format.

\macroname{\textbackslash gre@save@clef}{\#1\#2\#3\#4\#5\#6}{gregoriotex-signs.tex}
Saves clef information for use in \verb=gre@updatelinesclef=.

\begin{argtable}
	\#1 & character & the type of the clef: c or f\\
	\#2 & integer & the line of the clef (1 is the lowest)\\
	\#3 & integer & if \texttt{3}, it means that we must not put a flat after the clef, otherwise it’s the height of the flat\\
	\#4 & character & the type of the secondary clef: c or f\\
	\#5 & integer & the line of the secondary clef (1 is the lowest, 0 for no secondary clef)\\
	\#6 & integer & if \texttt{3}, it means that we must not put a flat after the secondary clef, otherwise it’s the height of the flat\\
\end{argtable}

\macroname{\textbackslash gre@typeclef}{\#1\#2\#3\#4\#5\#6\#7\#8\#9}{gregoriotex-signs.tex}
Macro which typesets the clef.

\begin{argtable}
	\#1 & character & the type of the clef: c or f\\
	\#2 & integer & the line of the clef (1 is the lowest)\\
	\#3 & \texttt{0} & no need to use small clef characters (inside a line)\\
	& \texttt{1} & we must use small clef characters (inside a line)\\
	\#4 & \texttt{0} & no extra space is needed after the clef\\
	& \texttt{1} & we must type a normal space after the clef\\
	& \texttt{2} & we must type a short space after the clef\\
	\#5 & integer & if \texttt{3}, it means that we must not put a flat after the clef, otherwise it’s the height of the flat\\
	\#6 & character & the type of the secondary clef: c or f\\
	\#7 & integer & the line of the secondary clef (1 is the lowest, 0 for no secondary clef)\\
	\#8 & integer & if \texttt{3}, it means that we must not put a flat after the secondary clef, otherwise it’s the height of the flat\\
\end{argtable}

\macroname{\textbackslash gre@boxclef}{\#1\#2\#3\#4\#5\#6\#7\#8\#9}{gregoriotex-signs.tex}
Macro filling \verb=\gre@box@temp@width= with a clef. The arguments are the same as \verb=gre@typeclef=.


\macroname{\textbackslash gre@typesingleclef}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Macro which typesets a single clef.

\begin{argtable}
	\#1 & character & the type of the clef: c or f\\
	\#2 & integer & the line of the clef (1 is the lowest)\\
	\#3 & \texttt{0} & no need to use small clef characters (inside a line)\\
	& \texttt{1} & we must use small clef characters (inside a line)\\
	\#4 & integer & if \texttt{3}, it means that we must not put a flat after the clef, otherwise it’s the height of the flat\\
\end{argtable}

\macroname{\textbackslash gre@updateleftbox}{}{gregoriotex-main.tex}
Macro to update the box printed a the left end of every line (the one which holds the staff lines).

\macroname{\textbackslash gre@useautoeolcustos}{}{gregoriotex-main.tex}
Macro which enables automatic custos at the end of lines.

\macroname{\textbackslash gre@usestylecommon}{}{gregoriotex-signs.tex}
Macro which specifies the alternate glyphs which are common to all of the styles.

\macroname{\textbackslash gre@widthof}{\#1}{gregoriotex-main.tex}
Macro for calculating the width of its argument and storing it in \verb=\gre@dimen@temp@three=.

\macroname{\textbackslash gre@writebar}{\#1\#2\#3\#4\#5}{gregoriotex-signs.tex}
Macro to write a bar.

\begin{argtable}
	\#1 & \texttt{0} & virgula\\
	& \texttt{1} & minima\\
	& \texttt{2} & minor\\
	& \texttt{3} & major\\
	& \texttt{4} & finalis\\
	& \texttt{5} & the last finalis\\
	& \texttt{6}--\texttt{13} & Dominican bars\\
	& \texttt{14} & virgula on ledger line above the staff\\
	& \texttt{15} & minima on ledger line above the staff\\
	& \texttt{16} & dotted major\\
	& \texttt{17} & minimis (eighth bar)\\
	& \texttt{18} & minimis (eighth bar) on ledger line above the staff\\
	& \texttt{19} & parenthesized virgula\\
	& \texttt{20} & parenthesized minima\\
	& \texttt{21} & parenthesized virgula on ledger line above the staff\\
	& \texttt{22} & parenthesized minima on ledger line above the staff\\
	\#2 & \texttt{0} & in a syllable containing only this bar\\
	& \texttt{1} & in a syllable containing other notes\\
	\#3 & \texttt{0} & if there is no text underneath the bar\\
	& \texttt{1} & if there is text underneath the bar\\
	\#4 & \TeX\ code & macros that may happen before the skip after the bar (typically GreVEpisema)\\
	\#5 & \texttt{0} & The notes around the bar are vertically close to the bar.\\
	& \texttt{1} & The notes around the bar are far, \verb=@short= versions of spaces will be used.\\
\end{argtable}

\macroname{\textbackslash gre@@arg}{}{gregoriotex-syllable.tex}
A dummy macro which is used to store a macro which takes an argument so that it can be used in a \verb=\ifx= comparison.  The value of the argument is provided at the time this macro is created.

\macroname{\textbackslash gre@nothing}{}{gregoriotex-main.tex}
A dummy macro which has not contents.  Used for \verb=\ifx= comparisons.

\macroname{\textbackslash gre@annotation}{[\#1]\#2}{gregoriotex-main.tex}
Workhorse function behind \verb=\greannotation=.

\begin{argtable}
	\#1 & \texttt{c} & center align the new line with the existing annotation content\\
	& \texttt{l} & left align the new line with the existing annotation content\\
	& \texttt{r} & right align the new line with the existing annotation content\\
	\#2 & string & the new annotation content\\
\end{argtable}

\macroname{\textbackslash gre@commentary}{[\#1]\#2}{gregoriotex-main.tex}
Workhorse function behind \verb=\grecommentary=.

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

\macroname{\textbackslash gre@printcommentary}{}{gregoriotex-main.tex}
Computes the true ``raise'' and prints the commentary contained in
\verb=\gre@box@commentary=.

\macroname{\textbackslash gre@atletter}{}{gregoriotex-main.tex}
A Lua\TeX\ catcode table which makes sure that Lua\TeX\ treats `@‘ corectly.

\macroname{\textbackslash gre@baseunit}{}{gregoriotex-spaces.tex}
The units attached to base dimension in a string distance.  These units are extracted as part of coercing one distance to have the same units as another\\ (\verb=\gre@consistentunits=).

\macroname{\textbackslash gre@stretchunit}{}{gregoriotex-spaces.tex}
The units attached to stretch dimension in a string distance.  These units are extracted as part of coercing one distance to have the same units as another (\verb=\gre@consistentunits=).

\macroname{\textbackslash gre@shrinkunit}{}{gregoriotex-spaces.tex}
The units attached to shrink dimension in a string distance.  These units are extracted as part of coercing one distance to have the same units as another (\verb=\gre@consistentunits=).

\macroname{\textbackslash gre@bug}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Macro for raising a bug error when some calculation goes awry and comes up with a non-sensical result.  Generally will be found in Lua code, not \TeX\ code.

\macroname{\textbackslash gre@changestyle}{\#1\#2[\#3]}{gregoriotex.sty \textup{and} gregoriotex.tex}
Workhorse function behind \verb=\grechangestyle=.  Necessary because the internals of the definition are slightly different in \LaTeX\ and Plain \TeX.

\macroname{\textbackslash gre@bolshiftcleftypeglobal}{}{gregoriotex-spaces.tex}
Takes on the value \texttt{1}, \texttt{2}, or \texttt{3} depending on whether
to calculate the beginning-of-line shift based on the largest, current, or
forced clef width (\ie, directly use the value stored in
\verb=\gre@dimen@clefwidth@bol=), respectively.  This is the ``global'' value,
used to initialize \verb=\gre@bolshiftcleftypelocal= at the start of a score.

\macroname{\textbackslash gre@bolshiftcleftypelocal}{}{gregoriotex-spaces.tex}
Takes on the value \texttt{1}, \texttt{2}, or \texttt{3} depending on whether
to calculate the beginning-of-line shift based on the largest, current, or
forced clef width (\ie, directly use the value stored in
\verb=\gre@dimen@clefwidth@bol=), respectively.  This is the ``local'' value,
used in the actual computation.

\macroname{\textbackslash gre@update@clefwidth@largest}{\#1}{gregoriotex-spaces.tex}
Updates the ``largest'' clef width, used when \verb=\gre@bolshiftcleftypelocal=
is \texttt{1}.

\begin{argtable}
	\#1 & distance & The new value to use for the ``largest'' clef width.\\
\end{argtable}

\macroname{\textbackslash gre@update@clefwidth@current}{\#1}{gregoriotex-spaces.tex}
Updates the ``current'' clef width, used when \verb=\gre@bolshiftcleftypelocal=
is \texttt{2}.

\begin{argtable}
	\#1 & distance & The new value to use for the ``current'' clef width.\\
\end{argtable}

\macroname{\textbackslash gre@update@clefwidth@forced}{\#1}{gregoriotex-spaces.tex}
Updates the ``forced'' clef width, used when \verb=\gre@bolshiftcleftypelocal=
is \texttt{3}.

\begin{argtable}
	\#1 & distance & The new value to use for the ``forced'' clef width.\\
\end{argtable}

\macroname{\textbackslash gre@calculate@bolshift}{\#1\#2}{gregoriotex-spaces.tex}
Macro used in \verb=\GreSyllable=. Sets \verb=\gre@skip@bolshift= to the left kern that should appear at the beginning of a line in case of a forced linebreak.  The goal of this left kern is to have all lines aligned on notes.  This shift is applied to the right before every syllable and then to the left after placing an empty box.  At the beginning of the line the shift to the right is ignored by \TeX\ as leading white space, but the shift left is not because of the presence of the “character” of the empty box.

\begin{argtable}
	\#1 & dimension & \verb=begindifference= of the syllable\\
\end{argtable}

\macroname{\textbackslash gre@calculate@eolshift}{\#1}{gregoriotex-spaces.tex}
Macro used in \verb=\GreSyllable=. Sets \verb=\gre@dimen@eolshift= to the left kern that
should appear before an end of line. The improvement is tiny: when
text go further than notes in the last syllable of a line, the idea
is to allow text to go a bit further right, under the custos.  This shift is applied to the left after every syllable and then to the right after setting the line break penalty.  If the line break occurs after this syllable, it will occur between the two shifts, pushing the shift right to the beginning of the next line where \TeX\ will ignore it as leading white space.

\begin{argtable}
	\#1 & dimension & The \verb=enddifference= of the corresponding syllable\\
\end{argtable}

\macroname{\textbackslash gre@calculate@syllablefinalskip}{\#1\#2}{gregoriotex-spaces.tex}
Macro computing the skip at the end of the syllable.

\begin{argtable}
	\#1 & \texttt{0} & if end of syllable\\
	& \texttt{1} & if end of word\\
	\#2 & \texttt{0} & if next syllable is normal\\
	& \texttt{1} & if it’s a bar\\
\end{argtable}

\macroname{\textbackslash gre@convert}{}{gregoriotex-spaces.tex}
Macro to hold the original distance which is to be scaled by \verb=\gre@changeonedimenfactor=

\macroname{\textbackslash gre@debug}{}{gregoriotex.sty \textup{and} gregoriotex.tex}
Macro to hold the list of debug messages which should be designated as printing.  Contains comma-separated values from \Nameref{DebugCategory}, set via the \texttt{debug} package keyword parameter.

\macroname{\textbackslash gre@debugmsg}{\#1\#2}{gregoriotex-common.tex}
Macro to print debugging messages.

\begin{argtable}
	\#1 & string & The category of the message (used in conjunction with \verb=\gre@debug= to determine whether to print the message or not; see \Nameref{DebugCategory}\\
	\#2 & string & The debug message\\
\end{argtable}

\macroname{\textbackslash gre@trace}{\#1}{gregoriotex-common.tex}
Macro to mark the beginning of a function in the log with a GreTrace message.

\begin{argtable}
	\#1 & string & name and argument list of the function being identified.
\end{argtable}

\macroname{\textbackslash gre@trace@end}{\#1}{gregoriotex-common.tex}
Macro to mark the end of a function in the log with a GreTrace message.

\macroname{\textbackslash gre@trace@prefix}{gregoriotex-common.tex}
Macro to hold the prefix of GreTrace messages (value is manipulated to control indentation and indicate nesting).

\macroname{\textbackslash gre@declarefileversion}{\#1\#2}{gregoriotex-main.tex}
Macro which checks for version consistency between Gregorio\TeX\ files.

\begin{argtable}
	\#1 & string & name of the current file\\
	\#2 & string & version of the current file\\
\end{argtable}

\macroname{\textbackslash gre@def@char@he}{\#1\#2}{gregoriotex-chars.tex}
Macro for defining the various types of horizontal episema.

\begin{argtable}
	\#1 & string & name of the horizontal episema to be defined\\
	\#2 & string & Camel case name of horizontal episema to be defined\\
\end{argtable}

\macroname{\textbackslash gre@def@char@he@porr}{\#1\#2}{gregoriotex-chars.tex}
Macro for defining the various types of horizontal episema porrectus.

\begin{argtable}
	\#1 & string & name of the horizontal episema porrectus to be defined\\
	\#2 & string & Camel case name of horizontal episema porrectus to be defined\\
\end{argtable}

\macroname{\textbackslash gre@get@spaceskip}{\#1}{gregoriotex-signs.tex}
Loads \verb=\gre@skip@temp@four= with the appropriate rubber length given the
desired case.

\begin{argtable}
	\#1 & \texttt{0} & Default space.\\
	& \texttt{1} & Zero-width space.\\
	& \texttt{2} & Space between flat or natural and a note.\\
	& \texttt{3} & Space between two puncta inclinata, descending.\\
	& \texttt{4} & Space between bivirga or trivirga.\\
	& \texttt{5} & space between bistropha or tristropha.\\
	& \texttt{6} & Space after a punctum mora XXX: not used yet, not so sure it is a good idea\ldots\\
	& \texttt{7} & Space between a punctum inclinatum and a punctum inclinatum debilis, descending.\\
	& \texttt{8} & Space between two puncta inclinata debilis.\\
	& \texttt{9} & Space before a punctum (or something else) and a punctum inclinatum.\\
	& \texttt{10} & Space between puncta inclinata (also debilis for now), larger ambitus (range=3rd), descending.\\
	& \texttt{11} & Space between puncta inclinata (also debilis for now), larger ambitus (range=4th or 5th), descending.\\
	& \texttt{12} & Space between two puncta inclinata, ascending. \\
	& \texttt{13} & Space between a punctum inclinatum and a punctum inclinatum debilis, ascending. \\
	& \texttt{14} & Space between puncta inclinata (also debilis for now), larger ambitus (range=3rd), ascending. \\
	& \texttt{15} & Space between puncta inclinata (also debilis for now), larger ambitus (range=4th or 5th), ascending. \\
	& \texttt{16} & Space between a punctum inclinatum and a ``no-bar'' glyph one pitch below. \\
	& \texttt{17} & Space between a punctum inclinatum and a ``no-bar'' glyph two pitches below. \\
	& \texttt{18} & Space between a punctum inclinatum and a ``no-bar'' glyph three or four pitches below \\
	& \texttt{19} & Space between a punctum inclinatum and a ``no-bar'' glyph one pitch above. \\
	& \texttt{20} & Space between a punctum inclinatum and a ``no-bar'' glyph two pitches above. \\
	& \texttt{21} & Space between a punctum inclinatum and a ``no-bar'' glyph three or four pitches above \\
	& \texttt{22} & Half-space. \\
	& \texttt{23} & Space between two puncta inclinata on a unison. \\
	& \texttt{24} & Space before a right-leaning puncta inclinatum when the pitch is ascending (up to 4 pitches away). \\
	& \texttt{25} & Space before a left-leaning puncta inclinatum when the pitch is descending (up to 4 pitches away). \\
	& \texttt{26} & Space after after a non-punctum inclinatum and before the upright punctum inclinatum. \\
\end{argtable}

\macroname{\textbackslash gre@nabcfontname}{}{gregoriotex-main.tex}
Macro which stores the name of the currently selected font for \texttt{nabc}.

\macroname{\textbackslash gre@nabcfontsize}{}{gregoriotex-main.tex}
Macro which stores the size of the currently selected font for \texttt{nabc}.

\macroname{\textbackslash gre@endsyllablepart}{}{gregoriotex-syllable.tex}
Macro which stores the end part of the current syllable (that which comes after the alignment part).

\macroname{\textbackslash gre@firstsyllablepart}{}{gregoriotex-syllable.tex}
Macro which stores the first part of the current syllable (that which comes before the alignment part).

\macroname{\textbackslash gre@middlesyllablepart}{}{gregoriotex-syllable.tex}
Macro which stores the middle part of the current syllable (the part which aligns with the notes).

\macroname{\textbackslash gre@nextendsyllablepart}{}{gregoriotex-syllable.tex}
Macro which stores the end part of the next syllable (that which comes after the alignment part).

\macroname{\textbackslash gre@nextfirstsyllablepart}{}{gregoriotex-syllable.tex}
Macro which stores the first part of the next syllable (that which comes before the alignment part).

\macroname{\textbackslash gre@nextmiddlesyllablepart}{}{gregoriotex-syllable.tex}
Macro which stores the middle part of the next syllable (the part which aligns with the notes).

\macroname{\textbackslash gre@fixdebug}{}{gregoriotex-common.tex}
Fixes the raw \verb=\gre@debug= value for use with \verb=\gre@debugmsg=.

\macroname{\textbackslash gre@fixedtextformat}{\#1}{gregoriotex-syllable.tex}
A macro which applies formatting that needs to apply to the whole syllable (rather than the parts individually) for the current syllable.  Necessary to preserve ligatures across parts within a syllable.

\begin{argtable}
	\#1 & string & The syllable (usually built as \texttt{\small\pmac{gre@firstsyllablepart}\linebreak[1]\pmac{gre@middlesyllablepart}\linebreak[1]\pmac{gre@endsyllablepart}})\\
\end{argtable}

\macroname{\textbackslash gre@fixednexttextformat}{\#1}{gregoriotex-syllable.tex}
A macro which applies formatting that needs to apply to the whole syllable (rather than the parts individually) for the next syllable.  Necessary to preserve ligatures across parts within a syllable.

\begin{argtable}
	\#1 & string & The syllable (usually built as \texttt{\small\pmac{gre@nextfirstsyllablepart}\linebreak[1]\pmac{gre@nextmiddlesyllablepart}\linebreak[1]\pmac{gre@nextendsyllablepart}})\\
\end{argtable}

\macroname{\textbackslash gre@if@rewritesyllable}{\#1\#2}{gregoriotex-syllable.tex}
Performs \#1 if the syllable should be rewritten, else \#2.

\begin{argtable}
	\#1 & \TeX\ code & Code to perform when rewriting the syllable\\
	\#2 & \TeX\ code & Code to perform when \emph{not} rewriting the syllable\\
\end{argtable}

\macroname{\textbackslash gre@push@endsyllable}{\#1}{gregoriotex-syllable.tex}
Sets the save aliases to push the end-syllable part of the current syllable to the next syllable if necessary.

\begin{argtable}
	\#1 & link target & line:char:column for the link to use for the pushed syllable part\\
\end{argtable}

\macroname{\textbackslash gre@emit@syllabletext}{\#1}{gregoriotex-syllable.tex}
Emits the text for the syllable, prepending the carry-over syllable part if necessary and consolidating the fixed text styles if possible.

\begin{argtable}
	\#1 & \TeX\ code & Code that emits the syllable text\\
\end{argtable}

\macroname{\textbackslash gre@emit@endsyllablepart}{}{gregoriotex-syllable.tex}
Emits the text for the end syllable part if it \emph{is not} to be moved to the next syllable.

\macroname{\textbackslash gre@emit@endsyllablepartfornextsyllable}{}{gregoriotex-syllable.tex}
Emits the text for the end syllable part if it \emph{is} to be moved to the next syllable.  This is used when projecting the next syllable text while processing some syllable.

\macroname{\textbackslash gre@syllable@args}{}{gregoriotex-syllable.tex}
Saves the arguments to \verb=\GreSyllable=.  Needed so that \verb=\GreSyllable= can look forward to see if the next token is \verb=\GreBarSyllable=.

\macroname{\textbackslash gre@syllable@expand}{}{gregoriotex-syllable.tex}
Calls \verb=\gre@syllable@act=, passing the arguments saved in \verb=gre@syllable@args=.  Needed so that \verb=\GreSyllable= can look forward to see if the next token is \verb=\GreBarSyllable=.

\macroname{\textbackslash gre@syllable@act}{\#1\#2\#3\#4\#5\#6\#7\#8\#9}{gregoriotex-syllable.tex}
Typesets the syllable.  Same arguments as \verb=\GreSyllable=.  See the description of that macro for more information.  Needed so that \verb=\GreSyllable= can look forward to see if the next token is \verb=\GreBarSyllable=.

\macroname{\textbackslash gre@gabcname}{}{gregoriotex-main.tex}
Macro which holds the point-and-click file name.

\macroname{\textbackslash gre@gregoriotexluaversion}{}{gregoriotex-main.tex}
Macro to hold the version number of \emph{gregoriotex.lua} so that it can be checked for consistency.

\macroname{\textbackslash gre@gregoriotexversion}{}{gregoriotex-main.tex}
Macro to hold the version number of Gregorio\TeX\ so that it can be checked for consistency.

\macroname{\textbackslash gre@leftfill}{}{gregoriotex-main.tex}
Macro set to \verb=\hfil= or \verb=\relax= depending on alignment choices.

\macroname{\textbackslash gre@lyriccentering}{}{gregoriotex-syllable.tex}
Macro set to \verb=0= for full-syllable centering, \verb=1= for vowel centering (the default), or \verb=2= for first-letter centering.

\macroname{\textbackslash gre@rightfill}{}{gregoriotex-main.tex}
Macro set to \verb=\hfil= or \verb=\relax= depending on alignment choices.

\macroname{\textbackslash gre@mark@abovelinestext}{}{gregoriotex-main.tex}
Macro to set the point-and-click position for above lines text.

\macroname{\textbackslash gre@mark@translation}{}{gregoriotex-main.tex}
Macro to set the point-and-click position for translations.

\macroname{\textbackslash gre@pitch@[a-n,p]}{}{gregoriotex-main.tex}
Macros which map gabc pitch letters (the final part of the macro name) to the numerical value that Gregorio\TeX\ uses in processing note placement.

\macroname{\textbackslash gre@pitch@adjust@top}{}{gregoriotex-main.tex}
If any note appears above this pitch, the space above the lines must be adjusted to account for it.

\macroname{\textbackslash gre@pitch@adjust@bottom}{}{gregoriotex-main.tex}
If any note appears below this pitch, the space below the lines must be adjusted to account for it.

\macroname{\textbackslash gre@pitch@abovestaff}{}{gregoriotex-main.tex}
The pitch above the staff.

\macroname{\textbackslash gre@pitch@belowstaff}{}{gregoriotex-main.tex}
The pitch below the staff.

\macroname{\textbackslash gre@pitch@ledger@above}{}{gregoriotex-main.tex}
The pitch of the ledger line above the staff.

\macroname{\textbackslash gre@pitch@ledger@below}{}{gregoriotex-main.tex}
The pitch of the ledger line below the staff.

\macroname{\textbackslash gre@pitch@barvepisema}{}{gregoriotex-main.tex}
The pitch of the bar episema.

\macroname{\textbackslash gre@pitch@underbrace}{}{gregoriotex-main.tex}
The pitch of the under-the-staff brace.

\macroname{\textbackslash gre@pitch@overbrace}{}{gregoriotex-main.tex}
The pitch of the over-the-staff brace.

\macroname{\textbackslash gre@pitch@overbraceglyph}{}{gregoriotex-main.tex}
The pitch of the over-the-staff brace glyph.

\macroname{\textbackslash gre@pitch@bar}{}{gregoriotex-main.tex}
The pitch of the bar glyph.

\macroname{\textbackslash gre@pitch@raresign}{}{gregoriotex-main.tex}
The pitch of a rare sign (semicirculus, \etc).

\macroname{\textbackslash gre@pitch@dummy}{}{gregoriotex-main.tex}
A meaningless (don't-care) pitch.

\macroname{\textbackslash gre@pitch@nominal}{}{gregoriotex-main.tex}
A pitch guaranteed to be in the staff.

\macroname{\textbackslash gre@pitch@cleftop}{}{gregoriotex-spaces.tex}
The pitch of the highest point of the current clef.

\macroname{\textbackslash gre@pitch@clefbottom}{}{gregoriotex-spaces.tex}
The pitch of the lowest point of the current clef.

\macroname{\textbackslash gre@save@clefextrema}{\#1\#2}{gregoriotex-signs.tex}
Computes the pitches of the lowest and highest points of a clef and saves them
into \verb=\gre@pitch@cleftop= and \verb=\gre@pitch@clefbottom=.

\begin{argtable}
	\#1 & integer & the line of the primary clef (1 is the bottom line)\\
	\#2 & integer & the line of the secondary clef (1 is the bottom line, 0 means
									no secondary clef)\\
\end{argtable}

\macroname{\textbackslash gre@pointandclick}{\#1\#2}{gregoriotex-main.tex}
Macro to generate the point-and-click links.

\begin{argtable}
	\#1 & \TeX\ code & the entity which is to contain the link\\
	\#2 & link target & line:char:column for the link\\
\end{argtable}

\macroname{\textbackslash gre@prefix}{}{gregoriotex-spaces.tex}
Either \texttt{skip} or \texttt{dimen} according to the distance being set or changed at the given moment.

\macroname{\textbackslash gre@prefixII}{}{gregoriotex-spaces.tex}
Same as \verb=\gre@prefix=.  Used when we were dealing with two distances simultaneously.

\macroname{\textbackslash gre@rubberpermit}{\#1}{gregoriotex-spaces.tex}
Determines whether the given distance is allowed to take a rubber length.

\begin{argtable}
	\#1 & string & the name of the distance to check\\
\end{argtable}

\macroname{\textbackslash gre@setgregoriofont}{[\#1]\#2}{gregoriotex-main.tex}
Workhorse function behind \verb=\gresetgregoriofont=.

\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}

\macroname{\textbackslash gre@syllable@end}{\#1\#2\#3\#4}{gregoriotex-syllable.tex}
Macro to make a few checks and call the right macros between \verb=\endbeforebar=, \verb=\endofword=, \verb=\endofsyllable=.

\begin{argtable}
	\#1 & integer & the type of notes alignment of next syllable, from \#7 of \verb=\GreSyllable=.  See \Nameref{notesalign}.\\
	\#2 & integer & the type of alteration of next syllable, from \#7 of \verb=\GreSyllable=.  See \Nameref{alterationtype}.\\
	\#3 & string & next syllable text\\
	\#4 & \texttt{0} & this syllable is not the end of a word\\
	& \texttt{1} & this syllable is the end of a word\\
\end{argtable}

\macroname{\textbackslash gre@typeout}{\#1}{gregoriotex.sty \textup{and} gregoriotex.tex}
Macro which points to \verb=\typeout= in \LaTeX\ or \verb=\message= in Plain \TeX.

\macroname{\textbackslash gre@unsetfixedtextformat}{}{gregoriotex-syllable.tex}
Macro which changes \verb=\gre@fixedtextformat= back to normal text.

\macroname{\textbackslash gre@unsetfixednexttextformat}{}{gregoriotex-syllable.tex}
Macro which changes \verb=\gre@fixednexttextformat= back to normal text.

\macroname{\textbackslash gregoriotex@symbols@loaded}{}{gregoriotex-symbols.tex}
Empty macro which is used to determine if the symbols have been loaded and prevent loading them again if they have.

\macroname{\textbackslash gre@hskip}{}{gregoriotex-signs.tex}
Alias for \verb=\hskip= or \verb=\kern=.  We use this rather than those functions directly so that the same element can appear in discretionaries where \verb=\kern= is allowed but \verb=\hskip= is not by simply changing the assignment of this macro when we enter one.

\macroname{\textbackslash gre@localleftbox}{}{gregoriotex-main.tex}
Alias for \verb=\luatexlocalleftbox= or \verb=\localleftbox=, depending on \LaTeX\ version.

\macroname{\textbackslash gre@localrightbox}{}{gregoriotex-main.tex}
Alias for \verb=\luatexlocalrightbox= or \verb=\localrightbox=, depending on \LaTeX\ version.

\macroname{\textbackslash gre@resizebox}{}{gregoriotex-main.tex}
Alias for \verb=\resizebox=.

\macroname{\textbackslash gre@dimension}{}{gregoriotex-spaces.tex}
Workhorse function for setting distances in \verb=\grecreatedim= and \verb=\grechangedim=.

\macroname{\textbackslash gre@changedimforline}{\#1\#2\#3}{gregoriotex-spaces.tex}
Saves the current value of the dimension and then changes it.  The arguments
are the same as \verb=\grechangedim=.  Used to temporarily change the dimension
for a given line, which is restored at the next beginning of the next line.

\macroname{\textbackslash gre@changecountforline}{\#1\#2}{gregoriotex-spaces.tex}
Saves the current value of the count and then changes it.  The arguments
are the same as \verb=\grechangeocount=.  Used to temporarily change the count
for a given line, which is restored at the next beginning of the next line.

\macroname{\textbackslash gre@setstafflines}{\#1}{gregoriotex-main.tex}
Sets the number of staff lines.

\begin{argtable}
	\#1 & integer & The number of staff lines\\
\end{argtable}

\macroname{\textbackslash gre@romannumeral@majuscule}{\#1}{gregoriotex-main.tex}
Typesets its numeric argument as an upper-case Roman numeral.

\begin{argtable}
	\#1 & integer & The number to typeset\\
\end{argtable}

\macroname{\textbackslash gre@romannumeral@minuscule}{\#1}{gregoriotex-main.tex}
Typesets its numeric argument as a lower-case Roman numeral.

\begin{argtable}
	\#1 & integer & The number to typeset\\
\end{argtable}

\macroname{\textbackslash gre@bar@space@suffix}{\#1\#2\#3}{gregoriotex-symbols.tex}
Macro used to select the corresct suffix of the \verb=bar@x= spaces.

\begin{argtable}
	\#1 & \texttt{0} & emits nothing\\
	& \texttt{1} & emits \verb=@standalone=\\
	\#2 & \texttt{0} & emits \verb=@notext= (only if standalone)\\
	& \texttt{1} & emits \verb=@text= (only if standalone)\\
	\#3 & \texttt{0} & emits nothing\\
	& \texttt{1} & emits \verb=@short=\\
\end{argtable}

\macroname{\textbackslash gre@drawadditionalline}{\#1\#2\#3\#4\#5\#6}{gregoriotex-signs.tex}
Workhorse function behind \verb=\GreDrawAdditionalLine=.

\begin{argtable}
	\#1 & \texttt{0} & Draw an over-the-staff ledger line. \\
			& \texttt{1} & Draw an under-the-staff ledger line. \\
	\#2 & distance   & The length of the line, with TeX units, excluding any left or right distances coming from the rest of the arguments. \\
	\#3 & \texttt{0} & Start the line at this point. \\
			& \texttt{1} & Start the line to the left of this point by \verb=gre@dimen@additionallineswidth=. \\
			& \texttt{2} & Start the line to the left of this point by \#4. \\
	\#4 & distance   & The distance to move left before starting the line if \#3 is \texttt{2}. \\
	\#5 & \texttt{0} & End the line exactly \#2 to the right of this point. \\
			& \texttt{1} & End the line \verb=gre@dimen@additionallineswidth= to the right of \#2 from this point. \\
			& \texttt{2} & End the line \#6 to the right of \#2 from this point. \\
	\#6 & distance   & The distance to end the line after \#2 from this point if \#3 is \texttt{2}. \\
\end{argtable}

\macroname{\textbackslash gre@get@unkern@aftermora}{}{gregoriotex-signs.tex}
Calculates the amount of shift needed to take into account the presence of a punctum mora at the end of a syllable according to the setting in \verb=\gre@count@shiftaftermora=.

\macroname{\textbackslash gre@unkern@bar@aftermora}{}{gregoriotex-signs.tex}
Macro which kerns between a punctum mora and a bar according to the setting in \verb=\gre@count@shiftaftermora=.

\macroname{\textbackslash gre@setgregoriofontscaled}{[\#1]\#2\#3}{gregoriotex-main.tex}
Workhorse behind \verb=\gresetgregoriofontscaled=.

\begin{argtable}
	\#1 & \textit{(omitted)} & Use the normal font and rule set.\\
	& \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.\\
	\#3 & integer & the scaling factor\\
\end{argtable}

\macroname{\textbackslash gre@calculate@barposition}{\#1\#2}{gregoriotex-spaces.tex}
Macro for calculating the position of the elements of a bar syllable using the new bar positioning algorithm.

\begin{argtable}
	\#1 & 0 & bar is not the end of a word\\
	& 1 & bar is the end of a word\\
	\#2 & integer & alteration type of the first glyph in the next syllable.  See \Nameref{alterationtype}\\
\end{argtable}

\macroname{\textbackslash gre@newlinearg}{}{gregoriotex-syllable.tex}
Macro for storing the argument for \verb=\gre@newlinecommon= when the line break must be delayed (i.e. in the new bar spacing algorithm).

\macroname{\textbackslash gre@newlinecommondelayed}{}{gregoriotex-syllable.tex}
Macro used in place of \verb=\gre@newlinecommon= when the line break must be delayed.

\macroname{\textbackslash gre@punctum@mora}{\#1\#2\#3\#4}{gregoriotex-signs.tex}
Macro to typeset a punctum mora.

\begin{argtable}
	\#1 & pitch & height of the punctum mora (one of the \verb=\gre@pitch@...= macros.\\
	\#2 & 0 & general case\\
	& 1 & make the punctum mora zero-width\\
	& 2 & shift the width of one punctum to the left\\
	& 3 & same as 2 but with ambitus of one\\
	\#3 & 1 & punctum mora in the note before the last note of a podatus, porrectus, or torculus resupinus\\
	& 0 & other cases\\
	\#4 & 1 & punctum inclinatum\\
	& 0 & other cases\\
\end{argtable}

\macroname{\textbackslash gre@changecavumhole}{\#1[\#2][\#3]}{gregoriotex-main.tex}
Macro used by \verb=\grechangecavumglyph= to handle the optional arguments.

\macroname{\textbackslash gre@alterationadjustment}{\#1}{gregoriotex-spaces.tex}
Macro to make adjustments to \verb=nextbegindifference= in order to account for an alteration at the begining of the next syllable.

\macroname{\textbackslash gre@punctummoraadjustment}{}{gregoriotex-spaces.tex}
Macro to make adjustments to cursor position and \verb=previousenddifference= based on the presence of a punctum mora at the end of the last syllable.

\macroname{\textbackslash gre@num@min}{\#1\#2}{gregoriotex-spaces.tex}
Puts the lower of its two integer arguments into \verb=\gre@count@temp@one=.

\begin{argtable}
	\#1 & integer & the first value to compare\\
	\#2 & integer & the second value to compare\\
\end{argtable}

\macroname{\textbackslash gre@num@max}{\#1\#2}{gregoriotex-spaces.tex}
Puts the greater of its two integer arguments into \verb=\gre@count@temp@one=.

\begin{argtable}
	\#1 & integer & the first value to compare\\
	\#2 & integer & the second value to compare\\
\end{argtable}

\macroname{\textbackslash gre@evaluatenextsyllable}{\#1}{gregoriotex-syllable.tex}
Evaluates its first argument as an advance computation against the next syllable.  Twiddles the \verb=ifgre@evaluatingnextsyllable= flag around evaluation of the macro argument.

\macroname{\textbackslash gre@save@additionalspaces}{}{gregoriotex-spaces.tex}
Macro to save the additional vertical spaces associated with the line (\texttt{additionalbottomspace}, \texttt{additionaltopspace}, \texttt{additionaltopspacealt}, \texttt{additionaltopspacenabc}, \texttt{currenttranslationheight}, \texttt{textlower}, \texttt{currentabovelinestextheight}, and \texttt{constantglyphraise}) so that they can be restored later.

\macroname{\textbackslash gre@restore@additionalspaces}{}{gregoriotex-spaces.tex}
Macro to restore the additional vertical spaces associated with the line from their saved values.

\macroname{\textbackslash gre@clearsyllable}{\#1}{gregoriotex-spaces.tex}
Prevents the current syllable from overlapping with the previous syllable.

\begin{argtable}
	\#1 & bar  & the current syllable is a bar syllable.\\
			& note & the current syllable is a note syllable.\\
\end{argtable}

\macroname{\textbackslash gre@read@temp}{}{gregoriotex-main.tex}
File handle used to mark auto-compiled gabc files as dependencies for tools
like latexmk.

\macroname{\textbackslash gre@arg@oftwo@first}{\#1\#2}{gregoriotex-syllable.tex}
Evaluates to the first of its arguments.

\begin{argtable}
	\#1 & any & the first argument\\
	\#2 & any & the second argument\\
\end{argtable}

\macroname{\textbackslash gre@arg@oftwo@second}{\#1\#2}{gregoriotex-syllable.tex}
Evaluates to the second of its arguments.

\begin{argtable}
	\#1 & any & the first argument\\
	\#2 & any & the second argument\\
\end{argtable}

\macroname{\textbackslash gre@parsecommas}{\#1\#2}{gregoriotex-common.tex}
Runs a command for each string in a comma-separated list of strings.

\begin{argtable}
	\#1 & string & a comma-separated list of strings\\
	\#2 & control sequence & a command that takes one argument\\
\end{argtable}

\macroname{\textbackslash gre@parsecommas@options}{}{gregoriotex-common.tex}
Internal to \verb|\gre@parsecommas|.

\macroname{\textbackslash gre@makeparshape}{}{gregoriotex-main.tex}
Sets the shape of the paragraph shape using \verb|\parshape|.

\begin{argtable}
	\#1 & integer & How many lines are indented \\
	\#2 & dimen & The amount of the indentation \\
\end{argtable}  

\macroname{\textbackslash gre@parshape@dims}{}{gregoriotex-main.tex}
Used inside \verb|\gre@makeparshape| to hold the \verb=\parshape= information needed to shape the score around the initial.

\subsection{Auxiliary File}
Gregorio\TeX\ creates its own auxiliary file (extension \texttt{gaux}) which it uses to store information between successive typesetting runs.  This allows for such features as the dynamic interline spacing.  The following functions are used to interact with that auxiliary file.

\macroname{\textbackslash gre@gaux}{}{gregoriotex-main.tex}
The handle for the auxiliary file.

\macroname{\textbackslash gre@open@gaux}{}{gregoriotex-main.tex}
Macro for opening the auxiliary file.

\macroname{\textbackslash gre@close@gaux}{}{gregoriotex-main.tex}
Macro for closing the auxiliary file.

\macroname{\textbackslash gre@write@gaux}{\#1}{gregoriotex-main.tex}
Macro for writing the auxiliary file.

\begin{argtable}
	\#1 & string & contents to be written to the auxiliary file\\
\end{argtable}


\subsection{Fonts}
Gregorio\TeX\ loads a number of fonts which are referred to by the following macros.

\macroname{\textbackslash gre@font@music}{}{gregoriotex-main.tex}
The font for the neumes and other principle score elements.

\macroname{\textbackslash gre@font@music@hollow}{}{gregoriotex-main.tex}
The font for cavum neumes.

\macroname{\textbackslash gre@font@music@hole}{}{gregoriotex-main.tex}
The font for cavum neume holes.

\macroname{\textbackslash gre@font@style}{}{gregoriotex-main.tex}
The font for some of the extra characters, such as the bar for barred letters.

\macroname{\textbackslash gre@font@nabc}{}{gregoriotex-nabc.tex}
The font for ancient notation.

\macroname{\textbackslash gre@font@initial}{}{gregoriotex.tex}
The font for the default initial format in Plain \TeX.

\macroname{\textbackslash gre@fontfactor@...}{}{gregoriotex-main.tex}
Macro holding the factor at which the font is loaded.  There is one of these macros for each chant font which has been loaded with the ending of the macro name being the name of the chant font (gregorio, granapadano, \etc).


\subsection{Character Reference Aliases}
To make referencing and changing them easier, Gregorio\TeX\ stores reference information for certain characters using the following macros.

\macroname{\textbackslash gre@fontchar@abovebarbrace}{}{gregoriotex-chars.tex}
The above bar brace.

\macroname{\textbackslash gre@fontchar@flat}{}{gregoriotex-chars.tex}
The flat character.

\macroname{\textbackslash gre@fontchar@flathole}{}{gregoriotex-chars.tex}
The flat hole character (\ie, the character needed to prevent lines from showing through the center of the flat).

\macroname{\textbackslash gre@fontchar@flatparen}{}{gregoriotex-chars.tex}
The parenthesized flat character.

\macroname{\textbackslash gre@fontchar@flatparenhole}{}{gregoriotex-chars.tex}
The parenthesized flat hole character (\ie, the character needed to prevent lines from showing through the center of the flat).

\macroname{\textbackslash gre@fontchar@natural}{}{gregoriotex-chars.tex}
The natural character.

\macroname{\textbackslash gre@fontchar@naturalhole}{}{gregoriotex-chars.tex}
The natural hole character (\ie, the character needed to prevent lines from showing through the center of the natural).

\macroname{\textbackslash gre@fontchar@naturalparen}{}{gregoriotex-chars.tex}
The parenthesized natural character.

\macroname{\textbackslash gre@fontchar@naturalparenhole}{}{gregoriotex-chars.tex}
The parenthesized natural hole character (\ie, the character needed to prevent lines from showing through the center of the natural).

\macroname{\textbackslash gre@fontchar@sharp}{}{gregoriotex-chars.tex}
The sharp character.

\macroname{\textbackslash gre@fontchar@sharphole}{}{gregoriotex-chars.tex}
The sharp hole character (\ie, the character needed to prevent lines from showing through the center of the sharp).

\macroname{\textbackslash gre@fontchar@sharpparen}{}{gregoriotex-chars.tex}
The parenthesized sharp character.

\macroname{\textbackslash gre@fontchar@sharpparenhole}{}{gregoriotex-chars.tex}
The parenthesized sharp hole character (\ie, the character needed to prevent lines from showing through the center of the sharp).

\macroname{\textbackslash gre@fontchar@incclef}{}{gregoriotex-chars.tex}
The \texttt{c}-clef which appears in the middle of a line.

\macroname{\textbackslash gre@fontchar@infclef}{}{gregoriotex-chars.tex}
The \texttt{f}-clef which appears in the middle of a line.

\macroname{\textbackslash gre@fontchar@cclef}{}{gregoriotex-chars.tex}
The \texttt{c}-clef which appears at the beginning of a line.

\macroname{\textbackslash gre@fontchar@fclef}{}{gregoriotex-chars.tex}
The \texttt{f}-clef which appears at the beginning of a line.

\macroname{\textbackslash gre@fontchar@punctum}{}{gregoriotex-chars.tex}
The punctum character.

\macroname{\textbackslash gre@fontchar@punctummora}{}{gregoriotex-chars.tex}
The punctum mora character.

\macroname{\textbackslash gre@fontchar@underbrace}{}{gregoriotex-signs.tex}
The under brace character.

\macroname{\textbackslash gre@fontchar@verticalepisema}{}{gregoriotex-chars.tex}
The vertical episema character.

\macroname{\textbackslash gre@fontchar@brace}{}{gregoriotex-signs.tex}
The (rounded) brace character.

\macroname{\textbackslash gre@fontchar@curlybrace}{}{gregoriotex-signs.tex}
The curly brace character.

\macroname{\textbackslash gre@fontchar@custosbottomlong}{}{gregoriotex-chars.tex}
The custos character with a long upwards directed vigra.

\macroname{\textbackslash gre@fontchar@custosbottommiddle}{}{gregoriotex-chars.tex}
The custos character with a middle upwards directed vigra.

\macroname{\textbackslash gre@fontchar@custosbottomshort}{}{gregoriotex-chars.tex}
The custos character with a short upwards directed vigra.

\macroname{\textbackslash gre@fontchar@custostoplong}{}{gregoriotex-chars.tex}
The custos character with a long downwards directed vigra.

\macroname{\textbackslash gre@fontchar@custostopmiddle}{}{gregoriotex-chars.tex}
The custos character with a middle downwards directed vigra.

\macroname{\textbackslash gre@fontchar@custostopshort}{}{gregoriotex-chars.tex}
The custos character with a short downwards directed vigra.

\macroname{\textbackslash gre@fontchar@divisiofinalis}{}{gregoriotex-signs.tex}
The divisio finalis.

\macroname{\textbackslash gre@fontchar@divisiomaior}{}{gregoriotex-signs.tex}
The divisio maior.

\macroname{\textbackslash gre@char@normalhyphen}{}{gregoriotex-main.tex}
A normal hyphen in the text font.

\macroname{\textbackslash gre@char@zerohyph}{}{gregoriotex-main.tex}
Macro to typeset a zero-width hyphen (the hyphen is visible, it is only
treated as if it had 0 width when calculating spaces).  Used for fine tuning spacing
(especially at line endings).

\macroname{\textbackslash gre@char@fuse@debilis}{}{gregoriotex-chars.tex}
A fused character consisting of a leading punctum initio debilis (of ambitus one) and a regular punctum.

\macroname{\textbackslash gre@char@fuse@oriscus@one}{}{gregoriotex-chars.tex}
A fused character consisting of a leading oriscus (of ambitus one) and a regular punctum.

\macroname{\textbackslash gre@char@fuse@oriscus@two}{}{gregoriotex-chars.tex}
A fused character consisting of a leading oriscus (of ambitus two) and a regular punctum.

\macroname{\textbackslash gre@char@fuse@punctum@one}{}{gregoriotex-chars.tex}
A fused character consisting of a leading punctum (of ambitus one) and a regular punctum.

\macroname{\textbackslash gre@char@fuse@punctum@two}{}{gregoriotex-chars.tex}
A fused character consisting of a leading punctum (of ambitus two) and a regular punctum.

\macroname{\textbackslash gre@char@fuse@quilisma@one}{}{gregoriotex-chars.tex}
A fused character consisting of a leading quilisma (of ambitus one) and a regular punctum.

\macroname{\textbackslash gre@char@fuse@quilisma@two}{}{gregoriotex-chars.tex}
A fused character consisting of a leading quilisma (of ambitus two) and a regular punctum.

\macroname{\textbackslash gre@char@he@...}{\#1}{gregoriotex-chars.tex}
A class of macros for the horizontal episema which populates the \verb=\gre@box@hep= box.

\macroname{\textbackslash gre@char@bar@virgula}{}{gregoriotex-main.tex}
Alias that will hold the character for the virgula for the current number of
lines for the staff.

\macroname{\textbackslash gre@char@bar@virgulahigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the high virgula for the current number
of lines for the staff.

\macroname{\textbackslash gre@char@bar@virgulaparen}{}{gregoriotex-main.tex}
Alias that will hold the character for the parenthesized virgula for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@virgulaparenhigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the parenthesized high virgula for the
current number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominimis}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio ``minimis'' (eighth bar) for
the current number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominimishigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the high divisio ``minimis'' (eighth bar)
for the current number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominima}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio minima for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominimahigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the high divisio minima for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominimaparen}{}{gregoriotex-main.tex}
Alias that will hold the character for the parenthesized divisio minima for the
current number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominimaparenhigh}{}{gregoriotex-main.tex}
Alias that will hold the character for the parenthesized high divisio minima for
the current number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiominor}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio minor for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiomaior}{}{gregoriotex-main.tex}
Alias that will hold the character for the divisio maior for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiomaiordotted}{}{gregoriotex-main.tex}
Alias that will hold the character for the dotted divisio maior for the current
number of lines for the staff.

\macroname{\textbackslash gre@char@bar@divisiomaiordottedbacking}{}{gregoriotex-main.tex}
Alias that will hold the character for the dotted divisio maior backing for the
current number of lines for the staff.

\macroname{\textbackslash gre@nabccharno}{\#1\#2\#3}{gregoriotex-nabc.tex}
Prints the nabc glyphs for the given nabc string.

\begin{argtable}
	\#1 & string & nabc code representing the character\\
	\#2 & string & name of nabc font to use\\
	\#3 & integer & scaling factor\\
\end{argtable}


\subsection{Flags}

Flags are either boolean (defined with \verb=\newif=), Lua\TeX\ attributes, or counts (defined with \verb=\newcount=).  They store settings and/or the current state of something so that Gregorio\TeX\ can typeset things in the desired manner.

All distances in \nameref{distances} and \texttt{stafflinefactor} have a boolean associated with them, of the form \verb=\ifgre@scale@*=.  This boolean
indicates if the distance should scale when the staff size changes (true)
or not (false).

\macroname{\textbackslash ifgre@annotationbottomline}{}{gregoriotex-main.tex}
Boolean used to indicate if the bottom line of the annotation should be used as the control line for its initial vertical alignment.

\macroname{\textbackslash gre@count@annotationvalign}{}{gregoriotex-main.tex}
Count used to indicate which part of the annotation control line should be initially aligned with the top line of the staff.  Values: \texttt{0}, top; \texttt{1}, baseline; or \texttt{2}, bottom.

\macroname{\textbackslash ifgre@forcehyphen}{}{gregoriotex-main.tex}
Boolean used to indicate if hyphens should be forced between all syllables in a polysyllabic word.

\macroname{\textbackslash ifgre@checklength}{}{gregoriotex-spaces.tex}
Boolean used in \verb=\gresetdim= to indicate if we are attempting to set a rubber length.

\macroname{\textbackslash ifgre@rubber}{}{gregoriotex-spaces.tex}
Boolean used in \verb=\gre@changeonedimenfactor= to indicate if we are dealing with one of the distances which can accept a rubber length.

\macroname{\textbackslash ifgre@stretch}{}{gregoriotex-spaces.tex}
Boolean used in \verb=\gre@changeonedimenfactor= as we test for the presence of a stretch.

\macroname{\textbackslash ifgre@shrink}{}{gregoriotex-spaces.tex}
Boolean used in \verb=\gre@changeonedimenfactor= as we test for the presence of a shrink.

\macroname{\textbackslash ifgre@translationcentering}{}{gregoriotex-main.tex}
Boolean used to specify whether the translation text should be centered below its respective syllable.

\macroname{\textbackslash ifgre@showlines}{}{gregoriotex-main.tex}
Boolean used to specify whether the staff lines should be shown or not.

\macroname{\textbackslash ifgre@hidepclines}{}{gregoriotex-signs.tex}
Boolean used to specify whether the staff lines behind a punctum cavum should be hidden.

\macroname{\textbackslash ifgre@hidealtlines}{}{gregoriotex-signs.tex}
Boolean used to specify whether the staff lines behind an alteration should be hidden.

\macroname{\textbackslash ifgre@hidedottedbarlines}{}{gregoriotex-signs.tex}
Boolean used to specify whether the staff lines behind a dotted bar should be hidden.

\macroname{\textbackslash ifgre@hepisemabridge}{}{gregoriotex-signs.tex}
Boolean used to specify whether adjacent horizontal episemata should be joined together.

\macroname{\textbackslash ifgre@metapost@brace}{}{gregoriotex-signs.tex}
Boolean used to specify whether round over-the-staff braces should be drawn by
\MP{} as opposed to rendered via the score font.

\macroname{\textbackslash ifgre@metapost@underbrace}{}{gregoriotex-signs.tex}
Boolean used to specify whether round under-the-staff braces should be drawn by
\MP{} as opposed to rendered via the score font.

\macroname{\textbackslash ifgre@metapost@curlybrace}{}{gregoriotex-signs.tex}
Boolean used to specify whether curly braces should be drawn by \MP{} as
opposed to rendered via the score font.

\macroname{\textbackslash ifgre@metapost@barbrace}{}{gregoriotex-signs.tex}
Boolean used to specify whether divisio braces should be drawn by \MP{} as
opposed to rendered via the score font.

\macroname{\textbackslash ifgre@boxing}{}{gregoriotex-syllable.tex}
Boolean to track whether we’re placing the contents of syllable notes into their box or actually printing that box (helps prevent spurious spaces from occurring when the box is being filled but not printed).

\macroname{\textbackslash ifgre@mustdotranslationcenterend}{}{gregoriotex-main.tex}
Boolean to track whether we must do translation centering.

\macroname{\textbackslash ifgre@beginningofscore}{}{gregoriotex-main.tex}
Boolean to mark the first syllable of the score (set to true until we start work on the first syllable, false afterwards).

\macroname{\textbackslash ifgre@endofscore}{}{gregoriotex-syllable.tex}
Boolean to mark the last syllable of the score.

\macroname{\textbackslash ifgre@firstglyph}{}{gregoriotex-syllable.tex}
Boolean that tells us if the current glyph is the first glyph or not.

\macroname{\textbackslash ifgre@rewritesyllables}{}{gregoriotex-syllable.tex}
Boolean that enables moving the last part of a syllable to the next if there is no hyphen.

\macroname{\textbackslash gre@attr@dash}{}{gregoriotex-main.tex}
A Lua\TeX\ attribute which indicates whether a syllable takes a dash if it ends a line.

\macroname{\textbackslash gre@attr@center}{}{gregoriotex-main.tex}
A Lua\TeX\ attribute which indicates the type of translation centering.

\macroname{\textbackslash gre@attr@glyph@id}{}{gregoriotex-main.tex}
A Lua\TeX\ attribute which identifies the glyph we are at.  Used for dynamic line spacing.

\macroname{\textbackslash gre@attr@glyph@top}{}{gregoriotex-main.tex}
A Lua\TeX\ attribute which identifies the high point of the glyph.  Used for dynamic line spacing.

\macroname{\textbackslash gre@attr@glyph@bottom}{}{gregoriotex-main.tex}
A Lua\TeX\ attribute which identifies the low point of the glyph.  Used for dynamic line spacing.

\macroname{\textbackslash gre@attr@syllable@id}{}{gregoriotex-main.tex}
A Lua\TeX\ attribute which identifies one syllable from the next.  Used to position the text after the center of a syllable on the next syllable if the text flows properly, in order to improve ligaturing.

\macroname{\textbackslash gre@clivisalignment}{}{gregoriotex-syllable.tex}
Count to indicate how the clivis is to be aligned with its respective syllable text.  Values: \texttt{0}) always align clivis on its center; \texttt{1}) align clivis on first punctum; \texttt{2}) align clivis on its center, except if notes would go left of text or consonants after vowels are larger than \verb=\gre@dimen@clivisalignmentmin=.

\macroname{\textbackslash gre@insidediscretionary}{}{gregoriotex-signs.tex}
Macro which indicates whether we are currently inside a discretionary (\texttt{1}) or not (\texttt{0}).  Cannot be converted to a \TeX\ boolean because it’s value needs to be passed to Lua.

\macroname{\textbackslash ifgre@in@custos}{}{gregoriotex-signs.tex}
Boolean which indicates whether typesetting is currently in the context of a custos.

\macroname{\textbackslash ifgre@isonaline}{}{gregoriotex-syllable.tex}
Boolean which indicates whether the current note is on a line or not (used to adjust the height of some symbols so they won’t print on a line).

\macroname{\textbackslash ifgre@lastendswithmora}{}{gregoriotex-syllable.tex}
Boolean which indicates if the previous syllable ends with a punctum mora (set glyph by glyph, do not rely on it when typesetting glyph).

\macroname{\textbackslash ifgre@thisendswithmora}{}{gregoriotex-syllable.tex}
Same as previous one but for current syllable.

\macroname{\textbackslash ifgre@ledgerline@above}{}{gregoriotex-spaces.tex}
Boolean which indicates whether the system should act as if there is a ledger line above the staff.

\macroname{\textbackslash ifgre@ledgerline@below}{}{gregoriotex-spaces.tex}
Boolean which indicates whether the system should act as if there is a ledger line below the staff.

\macroname{\textbackslash gre@nlbstate}{}{gregoriotex-main.tex}
Macro which indicates if we are in a no line break area due to translation centering (\texttt{1}), an explicit no line break designation in the gabc (\texttt{2}), or not at all (\texttt{0}).

\macroname{\textbackslash gre@nlbinitialstate}{}{gregoriotex-main.tex}
Macro to store \verb=\gre@nlbstate= as we initialize or end a no line break area so that we can manipulate said flag as part of the process.

\macroname{\textbackslash ifgre@useledgerlineheuristic}{}{gregoriotex-spaces.tex}
Boolean which specifies whether ledger line heuristics will be used or not.

\macroname{\textbackslash ifgre@usestylefont}{}{gregoriotex-main.tex}
Boolean which specifies whether the style font should be loaded or not.

\macroname{\textbackslash ifgre@loadholehollowfonts}{}{gregoriotex-main.tex}
Boolean which specifies whether the hole and hollow fonts should be loaded or not.

\macroname{\textbackslash ifgre@keeprightbox}{}{gregoriotex-signs.tex}
Boolean which specifies if we have to keep the localrightbox until the end.

\macroname{\textbackslash gre@compilegabc}{}{gregoriotex-main.tex}
Macro which specifies the default compilation behavior: never compile (\texttt{0}), auto compile (\texttt{1}), or always compile (\texttt{2}).

\macroname{\textbackslash ifgre@nabcfontloaded}{}{gregoriotex-nabc.tex}
Boolean which indicates whether the \texttt{nabc} font has been loaded.

\macroname{\textbackslash gre@generate@pointandclick}{}{gregoriotex-syllable.tex}
Count which indicates whether the point-and-click functionality should be implemented (\texttt{1}) or not (\texttt{0}).  Not a boolean because it needs to be readable by Lua.

\macroname{\textbackslash gre@variableheightexpansion}{}{gregoriotex-main.tex}
Count to indicated if the spacing between lines should be variable (\texttt{1}) or fixed (\texttt{0}).  Not a boolean because it needs to be readable by Lua.

\macroname{\textbackslash ifgre@usecustosalteration}{}{gregoriotex-signs.tex}
Boolean which indicates whether alterations should be printed for custodes.

\macroname{\textbackslash ifgre@blockeolcustos}{}{gregoriotex-main.tex}
Boolean which indicates whether the custos at the end of the line should be blocked.

\macroname{\textbackslash ifgre@blockeolcustosbeforeeuouae}{}{gregoriotex-main.tex}
Boolean which indicates whether the custos at the end of the line should be blocked if a EUOUAE block immediately follows.
\macroname{\textbackslash ifgre@blockeolcustos}{}{gregoriotex-main.tex}
Boolean which indicates whether the custos at the end of the line should be blocked.


\macroname{\textbackslash ifgre@raggedbreakbeforeeuouae}{}{gregoriotex-main.tex}
Boolean which indicates whether an automatic line break immediately before a EUOUAE block should be ragged.

\macroname{\textbackslash ifgre@breakintranslation}{}{gregoriotex-main.tex}
Boolean which indicates if line breaks are allowed inside a translation.

\macroname{\textbackslash ifgre@bolshiftsenabled}{}{gregoriotex-main.tex}
Boolean which indicates if the left shift for the first syllables of lines is enabled.

\macroname{\textbackslash ifgre@eolshiftsenabled}{}{gregoriotex-main.tex}
Boolean which indicates if the left shift for the last syllables of lines is enabled.

\macroname{\textbackslash ifgre@euouae@implies@nlba}{}{gregoriotex-main.tex}
Boolean which indicates if line breaks are prohibited in an \texttt{euouae} area.

\macroname{\textbackslash ifgre@in@euouae}{}{gregoriotex-main.tex}
Boolean which indicates that we are in an \texttt{euouae} area.

\macroname{\textbackslash ifgre@justifylastline}{}{gregoriotex-main.tex}
Boolean which indicates that the last line of the score should be justified.

\macroname{\textbackslash ifgre@showclef}{}{gregoriotex-main.tex}
Boolean which indicates that the clef should be visible.

\macroname{\textbackslash ifgre@forceemptyfirstsyllablehyphen}{}{gregoriotex-syllable.tex}
Boolean which indicates that a hyphen after an empty first syllable should be forced.

\macroname{\textbackslash ifgre@showhyphenafterthissyllable}{}{gregoriotex-syllable.tex}
Boolean set and used by \verb=\GreSyllable= to decide if a hyphen should be shown after the syllable.

\macroname{\textbackslash ifgre@possibleluahyphenafterthissyllable}{}{gregoriotex-syllable.tex}
Boolean set by \verb=\GreSyllable= indicating if the Lua pass may add an hyphen after the syllable, used by \verb=\gre@calculate@eolshift= for protrusion calculation.

\macroname{\textbackslash ifgre@scale@stafflinefactor}{}{gregoriotex-spaces.tex}
Boolean indicating whether the stafflinefactor should scale with changes of \texttt{grefactor}, or not.

\macroname{\textbackslash gre@count@shiftaftermora}{}{gregoriotex-signs.tex}
Count indicating when the presence of a punctum mora at the end of a syllable should affect the spacing with the next syllable.

\macroname{\textbackslash gre@count@lastglyphiscavum}{}{gregoriotex-spaces.tex}
Count indicating if the last glyph has a cavum (this includes flats, naturals, punctum cavum, etc.), when staff line shouldn't appear underneath this empty part. Can be:
\begin{itemize}
\item 0: previous and current glyph are not cavum
\item 1: current glyph is (set when line is hidden, at the end of the glyph)
\item 2: previous glyph is (set at beginning of glyph)
\end{itemize}

\macroname{\textbackslash ifgre@allowdeprecated}{}{gregoriotex.sty \textup{and} gregoriotex.tex}
Boolean which controls whether deprecated functions raise a warning (true) or an error (false).

\macroname{\textbackslash ifgre@newbarspacing}{}{gregoriotex-syllable.tex}
Boolean which controls whether the new bar spacing algorithm is activated.

\macroname{\textbackslash ifgre@disablehepisema}{}{gregoriotex-signs.tex}
Boolean to disable the printing of horizontal episemata.

\macroname{\textbackslash ifgre@disablemora}{}{gregoriotex-signs.tex}
Boolean to disable the printing of punctum morae.

\macroname{\textbackslash ifgre@disablevepisema}{}{gregoriotex-signs.tex}
Boolean to disable the printing of vertical episemata.

\macroname{\textbackslash gre@lasteuouaeindex}{}{gregoriotex-main.tex}
Count which keeps track of the most recent euouae area.

\macroname{\textbackslash ifgre@firstin@euouae}{}{gregoriotex-main.tex}
Boolean indicating we're dealing with the first syllable in an euouae area.

\macroname{\textbackslash ifgre@gabcforcecenters}{}{gregoriotex-syllable.tex}
Boolean for determining whether forced centers in gabc are allowed to determine syllable alignment in \texttt{syllable} and \texttt{firstletter} alignment modes.

\macroname{\textbackslash ifgre@forcedcentering}{}{gregoriotex-syllable.tex}
Boolean indicating that the current syllable had a forced center in the gabc which is to be respected.

\macroname{\textbackslash ifgre@nextforcedcentering}{}{gregoriotex-syllable.tex}
Boolean indicating that the next syllable had a forced center in the gabc which is to be respected.

\macroname{\textbackslash ifgre@unbreakableendofelement}{}{gregoriotex-main.tex}
Boolean used by \verb=\GreEndOfElement= to store whether the line may be broken at that point.

\macroname{\textbackslash gre@unbreakableendofelement@unison}{}{gregoriotex-main.tex}
Alias that sets \verb=\ifgre@unbreakableendofelement= according to the
\verb=\setunisonbreakbehavior= preference.

\macroname{\textbackslash gre@count@syllablenotes}{}{gregoriotex-syllable.tex}
Count containing the number of notes in the syllable.

\macroname{\textbackslash gre@count@unbreakabletotalnotes}{}{gregoriotex-syllable.tex}
Count containing the minimum number of notes in the syllable before the syllable
may be broken across lines.

\macroname{\textbackslash gre@count@unbreakableinitialnotes}{}{gregoriotex-syllable.tex}
Count containing the minimum number of notes at the start of a syllable that
must be kept together when the syllable is broken across lines.

\macroname{\textbackslash gre@count@unbreakablefinalnotes}{}{gregoriotex-syllable.tex}
Count containing the minimum number of notes at the end of a syllable that must
be kept together when the syllable is broken across lines.

\macroname{\textbackslash ifgre@shownotes}{}{gregoriotex-syllable.tex}
Boolean indicating whether the notes should be shown.

\macroname{\textbackslash ifgre@nabcvoice@i@visible}{}{gregoriotex-nabc.tex}
Boolean indicating whether the first nabc voice should be shown.

\macroname{\textbackslash ifgre@showlyrics}{}{gregoriotex-syllable.tex}
Boolean indicating whether the lyrics should be shown.

\macroname{\textbackslash ifgre@showtranslation}{}{gregoriotex-main.tex}
Boolean indicating whether the translation should be shown.

\macroname{\textbackslash ifgre@showabovelinestext}{}{gregoriotex-main.tex}
Boolean indicating whether the above lines text should be shown.

\macroname{\textbackslash gre@count@initiallines}{}{gregoriotex-syllable.tex}
Number of lines the initial takes up.

\macroname{\textbackslash gre@count@initialanchor}{}{gregoriotex-main.tex}

What part of the initial is aligned to \verb|\gre@count@initialposition|:
0 = top of initial (\texttt{top}); 1 = baseline of initial (\texttt{baseline}); 2 = bottom of initial (\texttt{bottom}).

\macroname{\textbackslash gre@count@initialposition}{}{gregoriotex-main.tex}

The position where the initial appears. 
0 = top of first line (\texttt{firsttop}), that is, the top staff-line; 1 = baseline of first line (\texttt{firstbaseline}); 2 = baseline of last indented line (\texttt{lastbaseline}); 3 = bottom of last indented line (\texttt{lastbottom}).

\macroname{\textbackslash ifgre@rewritethissyllable}{}{gregoriotex-syllable.tex}
Boolean indicating that a syllable should be rewritten to improve ligature rendering.

\macroname{\textbackslash ifgre@textcleared}{}{gregoriotex-syllable.tex}
Boolean indicating that the text of this syllable should not overlap any previous syllable.

\macroname{\textbackslash ifgre@evaluatingnextsyllable}{}{gregoriotex-syllable.tex}
Boolean indicating that some aspect of the next syllable is being evaluated in advance.

\macroname{\textbackslash ifgre@noteadditionalspacelinestext}{}{gregoriotex-main.tex}
Boolean indicating that the additional space needed between the notes and the lyrics due to really low notes should follow the user setting of noteadditionalspacelinestext (as opposed to being calculated automatically, the default).

\macroname{\textbackslash gre@count@stafflines}{}{gregoriotex-main.tex}
Count containing the number of staff lines.

\macroname{\textbackslash ifgre@alteration@effect@note}{}{gregoriotex-signs.tex}
Boolean indicating that soft alterations should last until they apply to a single note (i.e. all soft alterations will be printed).

\macroname{\textbackslash gre@attr@alteration@id}{}{gregoriotex-main.tex}
Unique identifier of an alteration, numbered consecutively starting from 1. If an
alteration is set twice, once for measurement and once for printing,
they have the same id (unlike glyph ids).

\macroname{\textbackslash gre@attr@alteration@pitch}{}{gregoriotex-main.tex}
\vspace*{-10ex}%
\macroname{\textbackslash gre@attrid@alteration@pitch}{}{gregoriotex-main.tex}
\vspace*{-10ex}%
\macroname{\textbackslash gre@attr@alteration@type}{}{gregoriotex-main.tex}
\vspace*{-10ex}%
\macroname{\textbackslash gre@attrid@alteration@type}{}{gregoriotex-main.tex}
The pitch and type of an alteration. For alteration types, please see Section~\ref{alterationtype}. The control sequences with \verb|attr| in their name are attributes, while those with \verb|attrid| in their names are attribute numbers (for use with \verb|\hbox attr|).

\macroname{\textbackslash ifgre@alteration@isvisible}{}{gregoriotex-signs.tex}
Flag returned by \verb|gre@alteration@isvisible|.

\macroname{\textbackslash ifgre@alteration@effect@line}{}{gregoriotex-signs.tex}
Boolean indicating that soft alterations should last until the end of line.

\macroname{\textbackslash gre@count@parsecommas@cur}{}{gregoriotex-common.tex}
Internal to \verb|\gre@parsecommas|.

\macroname{\textbackslash gre@alteration@effect@process}{}{gregoriotex-signs.tex}
Internal to \verb|\gresetalterationeffect|.

\macroname{\textbackslash gre@nextalteration}{}{gregoriotex-syllable.tex}
\vspace*{-10ex}%
\macroname{\textbackslash gre@nextalignment}{}{gregoriotex-syllable.tex}
Internal to \verb|\gre@syllable@act|.

\macroname{\textbackslash gre@attr@part}{}{gregoriotex-main.tex}
\vspace*{-10ex}%
\macroname{\textbackslash gre@attrid@part}{}{gregoriotex-main.tex}
An attribute to mark various parts of the score. \verb|gre@attr@part| is the attribute, while \verb|gre@attrid@part| is the attribute number (to be used with \verb|\hbox attr|).
1 = commentary, 2 = stafflines, 3 = initial.

\subsection{Boxes}

Boxes are used to store elements of the score before they are printed for the purposes of reusing them and/or measuring them in order to determine their appropriate placement.

\macroname{\textbackslash gre@box@hep}{}{gregoriotex-chars.tex}
Box for horizontal episemi.

\macroname{\textbackslash gre@box@temp@width}{}{gregoriotex-main.tex}
Box for holding an element in order to determine its width.

\macroname{\textbackslash gre@box@initial}{}{gregoriotex-main.tex}
Box which holds the initial of the score.

\macroname{\textbackslash gre@box@annotation}{}{gregoriotex-main.tex}
Box holding the annotation which goes above the initial.

\macroname{\textbackslash gre@box@commentary}{}{gregoriotex-main.tex}
Box holding the commentary which goes above the first staff line on the right.

\macroname{\textbackslash gre@box@add}{}{gregoriotex-main.tex}
Box used for the new line to be added to the box being built (used in multi-line commentaries and annotations).

\macroname{\textbackslash gre@box@old}{}{gregoriotex-main.tex}
Box used for the existing lines in the box being build when a new line is being added (used in multi-line commentaries and annotations).

\macroname{\textbackslash gre@box@lines}{}{gregoriotex-main.tex}
Box holding the staff lines.

\macroname{\textbackslash gre@box@temp@sign}{}{gregoriotex-signs.tex}
Box to hold a sign so we can measure it for placement.

\macroname{\textbackslash gre@box@temp@clef}{}{gregoriotex-signs.tex}
Box for holding (and measuring) the clef when stacking non-overlapping clefs.

\macroname{\textbackslash gre@box@temp@cleftwo}{}{gregoriotex-signs.tex}
Box for holding (and measuring) the secondary clef when stacking non-overlapping clefs.

\macroname{\textbackslash gre@box@syllablenotes}{}{gregoriotex-syllable.tex}
Box holding the notes associated with a syllable.

\macroname{\textbackslash gre@box@syllabletext}{}{gregoriotex-syllable.tex}
Box holding the text associated with a syllable.

\macroname{\textbackslash gre@box@hep}{}{gregoriotex-chars.tex}
Box holding the horizontal episema.


\subsection{Protrusion factors}


\macroname{\textbackslash gre@protrusionfactor@...}{}{gregoriotex-spaces.tex}
Macros that store the protrusion factors created by
\verb=\gresetprotrusionfactor=.


\subsection{Distances}

\macroname{\textbackslash gre@createdim}{\{\#1\}\{\#2\}\{\#3\}}{gregoriotex-spaces.tex}
Macro to create one of Gregorio\TeX’s distances.  Used to initialize distances in \textit{gregoriotex-gsp-default.tex}.

\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}



All of the distances listed in \nameref{distances} have an internal associated
with them, of the form of \verb=\gre@space@*@*=, which stores the value of the
distance (in string representation).  The first wildcard is either
\texttt{skip} or \texttt{dimen} according to the distance type, while the
second is the name of the distance.

These additional distances are calculated by Gregorio based on the values for the user customizable distances and what may be going on in the score at the time of their use.

\macroname{\textbackslash gre@dimen@morawidth}{}{gregoriotex-spaces.tex}
Width of a punctum mora (reinitialized at each score, lazily recomputed).

\macroname{\textbackslash gre@dimen@clefwidth@current}{}{gregoriotex-spaces.tex}
Width of the current clef.

\macroname{\textbackslash gre@dimen@clefwidth@largest}{}{gregoriotex-spaces.tex}
Width of the largest clef in the score.

\macroname{\textbackslash gre@dimen@clefwidth@bol}{}{gregoriotex-spaces.tex}
Width of the clef used to compute bolshift.

\macroname{\textbackslash gre@dimen@constantglyphraise}{}{gregoriotex-spaces.tex}
Dimension representing the space between the 0 of the gregorian fonts and the effective 0 of the TeX score.

\macroname{\textbackslash gre@dimen@currenttranslationheight}{}{gregoriotex-spaces.tex}
Dimension representing the space for the translation beneath the text.

\macroname{\textbackslash gre@dimen@stafflinewidth}{}{gregoriotex-spaces.tex}
Dimension representing the width of a line of staff.  Can vary, for
example, at the first line.

\macroname{\textbackslash gre@dimen@linewidth}{}{gregoriotex-spaces.tex}
Dimension representing the width of the score (including initial).

\macroname{\textbackslash gre@dimen@additionalbottomspace}{}{gregoriotex-spaces.tex}
Dimension representing extra space below the staff needed for low notes.

\macroname{\textbackslash gre@dimen@additionaltopspace}{}{gregoriotex-spaces.tex}
Dimension representing extra space above the staff needed for high notes.

\macroname{\textbackslash gre@dimen@additionaltopspacealt}{}{gregoriotex-spaces.tex}
Dimension representing extra space above the staff needed for above lines text.

\macroname{\textbackslash gre@dimen@additionaltopspacenabc}{}{gregoriotex-spaces.tex}
Dimension representing extra space above the staff needed for nabc notation.

\macroname{\textbackslash gre@dimen@textlower}{}{gregoriotex-spaces.tex}
Dimension representing the height of the separation between the 0th
line (which is invisible except for notes in the a or b position) and
the bottom of the text.

\macroname{\textbackslash gre@dimen@textaligncenter}{}{gregoriotex-spaces.tex}
Dimension representing the width from the beginning of the letters in
a syllable to the middle of the middle letters.  Used for lining up
neumes and syllables.

\macroname{\textbackslash gre@dimen@initialwidth}{}{gregoriotex-spaces.tex}
Dimension representing the width of the initial (and the space after).

\macroname{\textbackslash gre@dimen@currentabovelinestextheight}{}{gregoriotex-spaces.tex}
Dimension representing the space allocated above the lines for text.

\macroname{\textbackslash gre@dimen@staffheight}{}{gregoriotex-spaces.tex}
The total height of the staff including the width of the lines and the spaces between them.

\macroname{\textbackslash gre@dimen@stafflinediff}{}{gregoriotex-spaces.tex}
Distance representing the difference between the actual size of the staff lines and the ``standard’’ size.

\macroname{\textbackslash gre@dimen@stafflineheight}{}{gregoriotex-spaces.tex}
The height of the staff line.

\macroname{\textbackslash gre@dimen@interstafflinespace}{}{gregoriotex-spaces.tex}
The space between the lines.

\macroname{\textbackslash gre@dimen@glyphraisevalue}{}{gregoriotex-spaces.tex}
The value that a particular glyph must be raised to be set in the correct position.

\macroname{\textbackslash gre@dimen@enddifference}{}{gregoriotex-spaces.tex}
Distance from the end of the notes to the end of the text for the previous syllable.  Positive values when notes go further than text, negative in the other case.  This means that \verb=\kern\gre@dimen@enddifference= will take you from the end of the text to the end of the notes.

For regular syllables and bar syllables using the old bar spacing algorithm this is calculated using \verb=\gre@calculate@enddifference=.  For bar syllables using the new bar spacing algorithm the calculation is \texttt{\small-\pmac{wd}\pmac{gre@box@syllabletext} - \pmac{gre@dimen@begindifference} + \pmac{wd}\pmac{gre@box@syllablenotes}}

\macroname{\textbackslash gre@dimen@previousenddifference}{}{gregoriotex-spaces.tex}
Stored value of enddifference prior to the current one.

\macroname{\textbackslash gre@dimen@adjustedpreviousenddifference}{}{gregoriotex-spaces.tex}
Stored value of enddifference prior to the current one after adjusting for the possibility of a punctum mora at the end of the last syllable (and the setting of \verb=\gre@count@aftermorashift=.

\macroname{\textbackslash gre@skip@nextbegindifference}{}{gregoriotex-spaces.tex}
The difference between the start of the notes and the start of the text for the next syllable.  Positive when when text begins first, negative in other case.

\macroname{\textbackslash gre@skip@adjustednextbegindifference}{}{gregoriotex-spaces.tex}
Only used in new bar spacing algorithm. It is \verb=grebegindifference= adjusted with \verb=alterationadjustmentbar= if relevant.

\macroname{\textbackslash gre@dimen@begindifference}{}{gregoriotex-spaces.tex}
The difference between the start of the notes and the start of the text for the current syllable.  Positive when when text begins first, negative in other case.  This means that \verb=\kern\gre@dimen@begindifference= will take you from the start of the notes to the start of the text.

For regular syllables and bar syllables using the old bar spacing algorithm this is calculated as \texttt{\small\pmac{gre@dimen@notesaligncenter} - \pmac{gre@dimen@textaligncenter}}.  For bar syllables using the new bar spacing algorithm the calculation is \linebreak\texttt{\small-\pmac{wd}\pmac{gre@box@syllablenotes}/2 - \pmac{gre@dimen@bar@shift} - \pmac{gre@skip@bar@allocation} - \pmac{gre@dimen@adjustedpreviousenddifference} + \pmac{gre@skip@text@allocation} + \pmac{gre@dimen@text@shift} - \pmac{wd}\pmac{gre@box@syllabletext}/2}.

\macroname{\textbackslash gre@dimen@lastglyphwidth}{}{gregoriotex-spaces.tex}
The width of the last glyph.

\macroname{\textbackslash gre@dimen@notesaligncenter}{}{gregoriotex-spaces.tex}
Distance from beginning of notes to their point of alignment.

\macroname{\textbackslash gre@dimen@temp@...}{}{gregoriotex-spaces.tex}
Temporary dimensions used in calculations.  There are currently five of these.

\macroname{\textbackslash gre@skip@temp@...}{}{gregoriotex-spaces.tex}
Temporary skips used in calculations.  There are currently four of these.

\macroname{\textbackslash gre@dimen@eolshift}{}{gregoriotex-spaces.tex}
The left kern that should appear before an end of line.

\macroname{\textbackslash gre@dimen@bolshift}{}{gregoriotex-spaces.tex}
The left kern that should appear at the beginning of line in case of a forced line break.

\macroname{\textbackslash gre@dimen@bolextra}{}{gregoriotex-spaces.tex}
An extra space that is added to \verb=\gre@dimen@bolshift= when the first glyph is a flat or a natural.

\macroname{\textbackslash gre@dimen@annotationtrueraise}{}{gregoriotex-spaces.tex}
The distance from the baseline of the initial to the baseline of the annotation.

\macroname{\textbackslash gre@dimen@commentarytrueraise}{}{gregoriotex-spaces.tex}
The distance from the baseline of the initial to the baseline of the commentary.

\macroname{\textbackslash gre@skip@minTextDistance}{}{gregoriotex-spaces.tex}
Minimum distance between text.

\macroname{\textbackslash gre@skip@minNotesDistance}{}{gregoriotex-spaces.tex}
Minimum distance between notes.

\macroname{\textbackslash gre@dimen@curTextDistance}{}{gregoriotex-spaces.tex}
Current distance between text.

\macroname{\textbackslash gre@dimen@curNotesDistance}{}{gregoriotex-spaces.tex}
Current distance between notes.

\macroname{\textbackslash gre@skip@minShiftText}{}{gregoriotex-spaces.tex}
Minimum shift required for the text.

\macroname{\textbackslash gre@skip@minShiftNotes}{}{gregoriotex-spaces.tex}
Minimum shift required for the notes.

\macroname{\textbackslash gre@scaledist}{}{gregoriotex-spaces.tex}
Working alias for \verb=\gre@skip@temp@one= or \verb=\gre@dimen@temp@one=, as appropriate, used when rescaling a distance due to a change in \verb=\gre@factor=.

\macroname{\textbackslash gre@skip@syllablefinalskip}{}{gregoriotex-spaces.tex}
The final distance to skip at the end of a syllable.

\macroname{\textbackslash greslurheight}{}{gregoriotex-signs.tex}
Stores the computed height of a variable-length slur.  The control sequence name
does not have the \texttt{@} symbol because this dimension is used within \MP{}.

\macroname{\textbackslash gre@dimen@bar@shift}{}{gregoriotex-spaces.tex}
Shift of the bar away from its center position to account for the offset limits in the new bar spacing algorithm.

\macroname{\textbackslash gre@dimen@text@shift}{}{gregoriotex-spaces.tex}
Shift of the text away from its center position to account for the offset limits in the new bar spacing algorithm.

\macroname{\textbackslash gre@skip@bar@allocation}{}{gregoriotex-spaces.tex}
Space allocated to the bar in the new bar spacing algorithm.

\macroname{\textbackslash gre@skip@bar@requirement}{}{gregoriotex-spaces.tex}
Space required by the bar in the new bar spacing algorithm.

\macroname{\textbackslash gre@skip@text@allocation}{}{gregoriotex-spaces.tex}
Space allocated to the text in the new bar spacing algorithm.

\macroname{\textbackslash gre@skip@text@requirement}{}{gregoriotex-spaces.tex}
Space required by the text in the new bar spacing algorithm.

\macroname{\textbackslash gre@skip@bar@lastskip}{}{gregoriotex-signs.tex}
Skip after the most recent bar.

\macroname{\textbackslash gre@skip@punctummorashift}{}{gregoriotex-spaces.tex}
Displacement of whole syllable to account for the presence of a punctum mora at the end of the previous syllable.

\macroname{\textbackslash gre@skip@alterationshift}{}{gregoriotex-spaces.tex}
Displacement of whole syllable to account for the presence of an alteration at the beginning of the next syllable.

\macroname{\textbackslash gre@dimen@stafflinethicknessbase}{}{gregoriotex-main.tex}%
\vspace*{-10ex}%
\macroname{\textbackslash gre@dimen@glyphraisebase}{}{gregoriotex-main.tex}%
\vspace*{-10ex}%
\macroname{\textbackslash gre@dimen@interstafflinedistancebase}{}{gregoriotex-main.tex}%
\vspace*{-10ex}%
\macroname{\textbackslash gre@dimen@inclinatumonlinemoravshiftbase}{}{gregoriotex-main.tex}%
\vspace*{-10ex}%
\macroname{\textbackslash gre@dimen@inclinatumonlinemorahshiftbase}{}{gregoriotex-main.tex}%
\vspace*{-10ex}%
\macroname{\textbackslash gre@dimen@inclinatumofflinemorahshiftbase}{}{gregoriotex-main.tex}%
These distances are used to calibrate a font for use with Gregorio\TeX.  Currently all of our fonts are made in house and thus use the same values for these distances, but font designers might find it useful to adjust these values to make their font compatible with Gregorio\TeX.


\subsection{Penalties}
These are the macros that Gregorio\TeX\ uses to manipulate the penalties in order to control line and page breaks within a score without affect the surrounding text.

\macroname{\textbackslash gre@penalty}{\#1}{gregoriotex-signs.tex}
Top level function that aliases \verb=\gre@truepenalty= or \verb=\gre@falsepenalty= according to whether penalties should be in play or not.

\begin{argtable}
	\#1 & integer & The penalty to be applied or gobbled\\
\end{argtable}

\macroname{\textbackslash gre@truepenalty}{\#1}{gregoriotex-signs.tex}
Alias for \verb=\penalty=.

\begin{argtable}
	\#1 & integer & The penalty to be applied\\
\end{argtable}

\macroname{\textbackslash gre@falsepenalty}{\#1}{gregoriotex-signs.tex}
Macro to gobble (suppress) its argument.

\begin{argtable}
	\#1 & integer & The penalty to be gobbled\\
\end{argtable}

\macroname{\textbackslash gre@cancelpenalties}{}{gregoriotex-spaces.tex}
Macro called at the beginning of the score to swap text penalties for score penalties.

\macroname{\textbackslash gre@restorepenalties}{}{gregoriotex-spaces.tex}
Macro called at the end of the score to restore the text penalties.

\subsection{Backwards compatibility}
Depending on version of Lua\TeX / \LaTeX, some primitives have different names
We define the following local aliases to account for this eventuality.

\macroname{\textbackslash gre@localleftbox}{}{gregoriotex-main.tex}
Current primitive: \verb=\localleftbox=
Legacy primitive: \verb=\luatexlocalleftbox=

\macroname{\textbackslash gre@localrightbox}{}{gregoriotex-main.tex}
Current primitive: \verb=\localrightbox=
Legacy primitive: \verb=\luatexlocalrightbox=

\macroname{\textbackslash gre@startlink}{}{gregoriotex-main.tex}
Current primitive: \verb=\pdfextension startlink=
Legacy primitive: \verb=\pdfstartlink=

\macroname{\textbackslash gre@endlink}{}{gregoriotex-main.tex}
Current primitive: \verb=\pdfextension endlink=
Legacy primitive: \verb=\pdfendlink=

\macroname{\textbackslash gre@savepos}{}{gregoriotex-main.tex}
Current primitive: \verb=\savepos=
Legacy primitive: \verb=\pdfsavepos=

\macroname{\textbackslash gre@lastxpos}{}{gregoriotex-main.tex}
Current primitive: \verb=\lastxpos=
Legacy primitive: \verb=\pdflastxpos=

\macroname{\textbackslash gre@lastypos}{}{gregoriotex-main.tex}
Current primitive: \verb=\lastypos=
Legacy primitive: \verb=\pdflastypos=


\subsection{\LaTeX/Plain \TeX\ compatibility}
While every effort has been made to use only primitives which are compatible with both \LaTeX\ and Plain \TeX, it is sometimes necessary to use primitives which are defined for one but not the other (usually its \LaTeX\ that has what we need built in).  In these cases we have to provide an equivalent macro to the \TeX\ version which is lacking.

\macroname{\textbackslash MessageBreak}{}{gregoriotex.tex}
Creates a line break in typeout, warning, bug, and error messages.  Copied from \LaTeX\ source.

\macroname{\textbackslash protect}{}{gregoriotex.tex}
Prints the name of the macro, rather than its contents in typeout, warning, bug, and error messages.  Copied from \LaTeX\ source.

\macroname{\textbackslash f@size}{}{gregoriotex.tex}
Macro which stores the current font size.


\section{Special arguments}

These arguments are used by multiple functions and take a lot of space
to describe so we describe them once here and refer to this section
rather than have multiple definitions.

\subsection{Note Alignment Type}\label{notesalign}
\rowcolors{1}{lightgray}{lightgray}
\begin{tabulary}{\textwidth}{cL}
	\multicolumn{2}{c}{Integer with the following possibilities:} \\
	\hline
	\texttt{0} & one-note glyph or more than two notes glyph except porrectus : here we must put the aligncenter in the middle of the first note\\
	\texttt{1} & two notes glyph (podatus is considered as a one-note glyph) : here we put the aligncenter in the middle of the glyph\\
	\texttt{2} & porrectus : has a special align center\\
	\texttt{3} & initio-debilis : same as 1 but the first note is much smaller\\
	\texttt{4} & case of a glyph starting with a quilisma\\
	\texttt{5} & case of a glyph starting with an oriscus\\
	\texttt{6} & case of a punctum inclinatum\\
	\texttt{7} & case of a stropha\\
	\texttt{8} & flexus with an ambitus of one\\
	\texttt{9} & flexus deminutus\\
	\texttt{10} & virgula\\
	\texttt{11} & divisio minima/minimis\\
	\texttt{12} & divisio minor\\
	\texttt{13} & divisio maior\\
	\texttt{14} & dominican bar\\
	\texttt{15} & parenthesized virgula\\
	\texttt{16} & parenthesized divisio minima\\
	\texttt{17} & divisio finalis\\
	\texttt{18} & no note
 \end{tabulary}

\subsection{Alteration Type}\label{alterationtype}
\rowcolors{1}{lightgray}{lightgray}
\begin{tabulary}{\textwidth}{cL}
	\multicolumn{2}{c}{Integer with the following possibilities:} \\
	\hline
	\texttt{0} & no alteration\\
	\texttt{1} & flat\\
	\texttt{2} & natural\\
	\texttt{3} & sharp\\
	\texttt{4} & parenthesized flat\\
	\texttt{5} & parenthesized natural\\
	\texttt{6} & parenthesized sharp \\
	\texttt{7} & soft flat\\
	\texttt{8} & soft natural\\
	\texttt{9} & soft sharp\\
 \end{tabulary}

\subsection{Note Offset Specifier}\label{NoteOffset}
\definecolor{shadecolor}{named}{lightgray}%
\begin{shaded*}%
\vspace{-1.4\baselineskip}
\begin{center}String with the following possibilities:\end{center}
\vspace{-0.8\baselineskip}
\hrule
\vspace{-0.8\baselineskip}
\begin{description}
	\item[FinalPunctum] Last note, which is a standard punctum (works with pes).
	\item[FinalDeminutus] Same, but the last note is a deminutus.
	\item[PenultBeforePunctumWide] The note before the last note, which is a standard punctum.
	\item[PenultBeforeDeminutus] Idem, but the note is the note preceding a deminutus.
	\item[AntepenultBeforePunctum] The note before the note before the last note (for porrectus flexus).
	\item[AntepenultBeforeDeminutus] Idem, but when the two last notes are a deminutus.
	\item[InitialPunctum] The first note, if it is a standard punctum.
	\item[InitioDebilis] The first note, if it is an initio debilis.
	\item[PorrNonAuctusInitialWide] first note of a non-auctus porrectus with a second ambitus of at least two.
	\item[PorrNonAuctusInitialOne] first note of a non-auctus porrectus with a second ambitus of one
	\item[PorrAuctusInitialAny] first note of an auctus porrectus, regardless of second ambitus
	\item[FinalInclinatum] punctum inclinatum as last note
	\item[FinalInclinatumDeminutus] punctum inclinatum deminutus as last note
	\item[FinalStropha] stropha as last note
	\item[FinalQuilisma] quilisma as last note
	\item[FinalOriscus] oriscus as last note
	\item[PenultBeforePunctumOne] second-to-last note, with a second ambitus of one, when last note is a standard punctum (like the second note of ghg)
	\item[FinalUpperPunctum] “upper smaller punctum” as last note (concerning simple podatus, podatus, and torculus resupinus)
	\item[InitialOriscus] oriscus as first note, disconnected from next note
	\item[InitialQuilisma] quilisma as first note, disconnected from next note
	\item[TorcResNonAuctusSecondWideWide] second note of a non-auctus torculus resupinus starting with a punctum, with a first and second ambitus of at least two
	\item[TorcResNonAuctusSecondOneWide] second note of a non-auctus torculus resupinus starting with a punctum, with a first ambitus of one and a second ambitus of at least two
	\item[TorcResDebilisNonAuctusSecondAnyWide] second note of a non-auctus torculus resupinus initio debilis with any first ambitus and a second ambitus of at least two
	\item[FinalLineaPunctum] linea punctum (cavum) as last note
	\item[BarStandard] standard bar
	\item[BarParen] parenthesized bar
	\item[BarVirgula] virgula
	\item[BarVirgulaParen] parenthesized virgula
	\item[BarDivisioFinalis] divisio finalis
	\item[TorcResQuilismaNonAuctusSecondWideWide] second note of a non-auctus torculus resupinus starting with a quilisma, with a first and second ambitus of at least two
	\item[TorcResOriscusNonAuctusSecondWideWide] second note of a non-auctus torculus resupinus starting with an oriscus, with a first and second ambitus of at least two
	\item[TorcResQuilismaNonAuctusSecondOneWide] second note of a non-auctus torculus resupinus starting with a quilisma, with a first ambitus of one and and second ambitus of at least two
	\item[TorcResOriscusNonAuctusSecondOneWide] second note of a non-auctus torculus resupinus starting with an oriscus, with a first ambitus of one and and second ambitus of at least two
	\item[TorcResNonAuctusSecondWideOne] second note of a non-auctus torculus resupinus starting with a punctum, with a first ambitus of at least two and a second ambitus of one
	\item[TorcResDebilisNonAuctusSecondAnyOne] second note of a non-auctus torculus resupinus initio debilis with any first ambitus and a second ambitus of one
	\item[TorcResQuilismaNonAuctusSecondWideOne] second note of a non-auctus torculus resupinus starting with a quilisma, with a first ambitus of at least two and a second ambitus of one
	\item[TorcResOriscusNonAuctusSecondWideOne] second note of a non-auctus torculus resupinus starting with an oriscus, with a first ambitus of at least two and a second ambitus of one
	\item[TorcResNonAuctusSecondOneOne] second note of a non-auctus torculus resupinus starting with a punctum, with a first and second ambitus of one
	\item[TorcResQuilismaNonAuctusSecondOneOne] second note of a non-auctus torculus resupinus starting with a quilisma, with a first and second ambitus of one
	\item[TorcResOriscusNonAuctusSecondOneOne] second note of a non-auctus torculus resupinus starting with an oriscus, with a first and second ambitus of one
	\item[TorcResAuctusSecondWideAny] second note of an auctus torculus resupinus starting with a punctum, with a first ambitus of at least two and any second ambitus
	\item[TorcResDebilisAuctusSecondAnyAny] second note of an auctus torculus resupinus initio debilis with any first and second ambitus
	\item[TorcResQuilismaAuctusSecondWideAny] second note of an auctus torculus resupinus starting with a quilisma, with a first ambitus of at least two and any second ambitus
	\item[TorcResOriscusAuctusSecondWideAny] second note of an auctus torculus resupinus starting with an oriscus, with a first ambitus of at least two and any second ambitus
	\item[TorcResAuctusSecondOneAny] second note of an auctus torculus resupinus starting with a punctum, with a first ambitus of one and any second ambitus
	\item[TorcResQuilismaAuctusSecondOneAny] second note of an auctus torculus resupinus starting with a quilisma, with a first ambitus of one and any second ambitus
	\item[TorcResOriscusAuctusSecondOneAny] second note of an auctus torculus resupinus starting with an oriscus, with a first ambitus of one and any second ambitus
	\item[ConnectedPenultBeforePunctumWide] second-to-last note connected to prior note, with a second ambitus of at least two, when last note is a standard punctum (like the second note of \textit{gig})
	\item[ConnectedPenultBeforePunctumOne] second-to-last note connected to prior note, with a second ambitus of one, when last note is a standard punctum (like the second note of \textit{gih})
	\item[InitialConnectedPunctum] standard punctum as first note, connected to next higher note
	\item[InitialConnectedVirga] “virga” as first note, connected to next lower note
	\item[InitialConnectedQuilisma] quilisma as first note, connected to next higher note
	\item[InitialConnectedOriscus] oriscus as first note, connected to next higher note
	\item[FinalConnectedPunctum] punctum as last note, connected to prior higher note
	\item[FinalConnectedAuctus] auctus as last note, connected to prior lower note
	\item[FinalVirgaAuctus] virga aucta as last note
	\item[FinalConnectedVirga] “virga” as last note, connected to prior lower note
	\item[InitialVirga] “virga” as first note, disconnected from next note
\end{description}
\end{shaded*}

\subsection{Debug Category}\label{DebugCategory}
\definecolor{shadecolor}{named}{lightgray}%
\begin{shaded*}%
\vspace{-1.4\baselineskip}
\begin{center}String with the following possibilities:\end{center}
\vspace{-0.8\baselineskip}
\hrule
\vspace{-0.8\baselineskip}
\begin{description}
	\item[annotation] Annotation-related (text above the score initial) messages.
	\item[barspacing] Bar spacing computations.
	\item[bolshift] Beginning-of-line shift computations.
	\item[clear] Syllable clearing messages.  Generated when handling the \texttt{<clear>} gabc directive.
	\item[changeglyph] Glyph changes.  Generated when glyph substitutions are made.
	\item[commentary] Commentary-related messages.
	\item[compile] Auto-compile messages.  Generating when handing \verb=\gregorioscore=
	\item[custos] Custos-related messages.  Generating when computing and handling custodes.
	\item[eolshift] End-of-line shift computations.
	\item[general] Non-specific messages.
	\item[hyphen] Hyphen-related messages.  Generated when computing and handling automatic hyphens.
	\item[ifdim] Dimension comparisons.
	\item[initial] Score-initial-related messages.
	\item[lineheight] Line height events.  Generated when line heights are computed or exercised.
	\item[linesglue] Messages about line glue.  Generated during line break processing in Lua.
	\item[mapfont] Font mapping messages.  Generated when analyzing score fonts.
	\item[offsetcase] Offset case messages.  Generated when the offset cases (for \Nameref{NoteOffset}) are generated in Lua.
	\item[spacing] Random spacing-related messages.
	\item[syllablerewriting] Syllable rewrite messages.  Generated when rewriting syllables for better kerning and ligaturing.
	\item[syllablespacing] Syllable spacing computations.
	\item[trace] Messages to trace the calling of functions.
\end{description}
\end{shaded*}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: “GregorioRef”
%%% End:
