summaryrefslogtreecommitdiff
path: root/support/gregoriotex/tex/luatex
diff options
context:
space:
mode:
Diffstat (limited to 'support/gregoriotex/tex/luatex')
-rw-r--r--support/gregoriotex/tex/luatex/gregorio-vowels.dat2
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-chars.tex15
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-common.tex25
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-gsp-default.tex (renamed from support/gregoriotex/tex/luatex/gsp-default.tex)319
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-main.tex259
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-nabc.lua4
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-nabc.tex4
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-signs.lua36
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-signs.tex191
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-spaces.tex289
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-syllable.tex227
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-symbols.lua4
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex-symbols.tex4
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex.lua76
-rw-r--r--support/gregoriotex/tex/luatex/gregoriotex.tex7
15 files changed, 898 insertions, 564 deletions
diff --git a/support/gregoriotex/tex/luatex/gregorio-vowels.dat b/support/gregoriotex/tex/luatex/gregorio-vowels.dat
index f02943994c..0e0dacc52c 100644
--- a/support/gregoriotex/tex/luatex/gregorio-vowels.dat
+++ b/support/gregoriotex/tex/luatex/gregorio-vowels.dat
@@ -1,5 +1,5 @@
# Vowel rule file for Gregorio
-# Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+# Copyright (C) 2015-2021 The Gregorio Project (see CONTRIBUTORS.md)
#
# This file is part of Gregorio.
#
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-chars.tex b/support/gregoriotex/tex/luatex/gregoriotex-chars.tex
index 5b0c83ee4e..99c577d7a0 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-chars.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-chars.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -17,7 +17,7 @@
% You should have received a copy of the GNU General Public License
% along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
-\gre@declarefileversion{gregoriotex-chars.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-chars.tex}{6.0.0-beta1}% GREGORIO_VERSION
\def\gre@char@fuse@punctum@one{\GreFuseTwo{\GreCPLeadingPunctumOne}{\GreCPPunctum}}%
\def\gre@char@fuse@quilisma@one{\GreFuseTwo{\GreCPLeadingQuilismaOne}{\GreCPPunctum}}%
@@ -83,15 +83,26 @@
\gre@def@char@he{flat}{Flat}%
\gre@def@char@he{sharp}{Sharp}%
\gre@def@char@he{natural}{Natural}%
+\gre@def@char@he{flatparen}{FlatParen}%
+\gre@def@char@he{sharpparen}{SharpParen}%
+\gre@def@char@he{naturalparen}{NaturalParen}%
\gre@def@char@he{barstandard}{BarStandard}%
+\gre@def@char@he{barparen}{BarParen}%
\gre@def@char@he{barvirgula}{BarVirgula}%
+\gre@def@char@he{barvirgulaparen}{BarVirgulaParen}%
\def\gre@fontchar@flat{\gre@font@music\GreCPFlat}%
\def\gre@fontchar@flathole{\gre@font@music\GreCPFlatHole}%
+\def\gre@fontchar@flatparen{\gre@font@music\GreCPFlatParen}%
+\def\gre@fontchar@flatparenhole{\gre@font@music\GreCPFlatParenHole}%
\def\gre@fontchar@natural{\gre@font@music\GreCPNatural}%
\def\gre@fontchar@naturalhole{\gre@font@music\GreCPNaturalHole}%
+\def\gre@fontchar@naturalparen{\gre@font@music\GreCPNaturalParen}%
+\def\gre@fontchar@naturalparenhole{\gre@font@music\GreCPNaturalParenHole}%
\def\gre@fontchar@sharp{\gre@font@music\GreCPSharp}%
\def\gre@fontchar@sharphole{\gre@font@music\GreCPSharpHole}%
+\def\gre@fontchar@sharpparen{\gre@font@music\GreCPSharpParen}%
+\def\gre@fontchar@sharpparenhole{\gre@font@music\GreCPSharpParenHole}%
\def\gre@fontchar@cclef{\gre@font@music\GreCPCClef}%
\def\gre@fontchar@fclef{\gre@font@music\GreCPFClef}%
\def\gre@fontchar@incclef{\gre@font@music\GreCPCClefChange}%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-common.tex b/support/gregoriotex/tex/luatex/gregoriotex-common.tex
index 3e63e95ab4..4801ea8c65 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-common.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-common.tex
@@ -1,6 +1,6 @@
%GregorioTeX common file (stuff needed by both gregoriotex and gregoriosyms)
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -17,8 +17,11 @@
% You should have received a copy of the GNU General Public License
% along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
-\gre@declarefileversion{gregoriotex-commonx.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-common.tex}{6.0.0-beta1}% GREGORIO_VERSION
+\ifnum\luatexversion<76%
+ \gre@error{Error: this document must be compiled with LuaTeX (lualatex) 0.76 or later}%
+\fi%
%%%%%%%%%
%% Debugging
@@ -68,15 +71,27 @@
% #2 - the correct macro to use
\def\gre@deprecated#1#2{%
\ifgre@allowdeprecated%
- \gre@warning{#1\space is deprecated.\MessageBreak Use #2\space instead}%
+ \ifx&#2&%
+ \gre@warning{#1\space is deprecated and marked for removal}%
+ \else%
+ \gre@warning{#1\space is deprecated.\MessageBreak Use #2\space instead}%
+ \fi%
\else%
- \gre@error{#1\space is deprecated.\MessageBreak Use #2\space instead}%
+ \ifx&#2&%
+ \gre@error{#1\space is deprecated and marked for removal}%
+ \else%
+ \gre@error{#1\space is deprecated.\MessageBreak Use #2\space instead}%
+ \fi%
\fi%
\relax%
}%
\def\gre@obsolete#1#2{%
- \gre@error{#1\space is obsolete.\MessageBreak Use #2\space instead}%
+ \ifx&#2&%
+ \gre@error{#1\space is obsolete and no longer has any effect}%
+ \else%
+ \gre@error{#1\space is obsolete.\MessageBreak Use #2\space instead}%
+ \fi%
\relax%
}%
diff --git a/support/gregoriotex/tex/luatex/gsp-default.tex b/support/gregoriotex/tex/luatex/gregoriotex-gsp-default.tex
index 53f8f380d5..a5e8952bd7 100644
--- a/support/gregoriotex/tex/luatex/gsp-default.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-gsp-default.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2010-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2010-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -19,6 +19,10 @@
% this file contains definitions of spaces and penalties
+% version check
+\gre@declarefileversion{gregoriotex-gsp-default.tex}{6.0.0-beta1}% GREGORIO_VERSION
+
+
%% First, the penalties
% penalty to force a break on a new line
@@ -59,7 +63,7 @@
\else %
\grechangecount{pretolerance}{\the\pretolerance}%
\fi %
-\grecreatedim{emergencystretch}{\the\emergencystretch}{scalable}%
+\gre@createdim{emergencystretch}{\the\emergencystretch}{scalable}%
% By default, we don't care if a line of score is alone on the page,
% if you think it is bad, you can modify the two following values. Assigning
% 10000 to them will prevent all orphaned lines (this will certainly improve
@@ -92,119 +96,122 @@
%% If you’re creating your own space configuration file, you may set this to some other value, should you so desire.
\greconffactor=17%
+%How thick the lines should be. When set equal to \greconffactor (above) the staff lines will be their default thickness. Larger numbers result in thicker lines.
+\grechangestafflinethickness{17}%
+
% the additional width of the additional lines (compared to the width of the glyph they're associated with)
-\grecreatedim{additionallineswidth}{0.14584 cm}{scalable}%
+\gre@createdim{additionallineswidth}{0.14584 cm}{scalable}%
% width of the additional lines, used only for the custos (maybe should depend on the width of the custos...)
% the width is the one for the custos at end of lines, the line for custos in the middle of a score is the same
% multiplied by 2.
-\grecreatedim{additionalcustoslineswidth}{0.09114 cm}{scalable}%
+\gre@createdim{additionalcustoslineswidth}{0.09114 cm}{scalable}%
% null space
-\grecreatedim{zerowidthspace}{0 cm}{scalable}%
+\gre@createdim{zerowidthspace}{0 cm}{scalable}%
% space between glyphs in the same element
-\grecreatedim{interglyphspace}{0.06927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{interglyphspace}{0.06927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between an alteration (flat or natural) and the next glyph
-\grecreatedim{alterationspace}{0.07747 cm}{scalable}%
+\gre@createdim{alterationspace}{0.07747 cm}{scalable}%
% space between a clef and a flat (for clefs with flat)
-\grecreatedim{clefflatspace}{0.05469 cm plus 0.00638 cm minus 0.00638 cm}{scalable}%
+\gre@createdim{clefflatspace}{0.05469 cm plus 0.00638 cm minus 0.00638 cm}{scalable}%
% space before a choral sign
-\grecreatedim{beforelowchoralsignspace}{0.04556 cm plus 0.00638 cm minus 0.00638 cm}{scalable}%
+\gre@createdim{beforelowchoralsignspace}{0.04556 cm plus 0.00638 cm minus 0.00638 cm}{scalable}%
% when bolshifts are enabled, minimal space between a clef at the beginning of the line and a leading alteration glyph (should be larger than clefflatspace so that a flatted clef can be distinguished from a flat which is part of the first glyph on a line, but also smaller than spaceafterlineclef, the distance from the clef to the first notes)
-\grecreatedim{beforealterationspace}{0.1 cm}{scalable}%
+\gre@createdim{beforealterationspace}{0.1 cm}{scalable}%
% half-space between elements
-\grecreatedim{halfspace}{0.03463 cm plus 0.00091 cm minus 0.00182 cm}{scalable}%
+\gre@createdim{halfspace}{0.03463 cm plus 0.00091 cm minus 0.00182 cm}{scalable}%
% space between elements
-\grecreatedim{interelementspace}{0.06927 cm plus 0.00182 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{interelementspace}{0.06927 cm plus 0.00182 cm minus 0.00363 cm}{scalable}%
% larger space between elements
-\grecreatedim{largerspace}{0.10938 cm plus 0.01822 cm minus 0.00911 cm}{scalable}%
+\gre@createdim{largerspace}{0.10938 cm plus 0.01822 cm minus 0.00911 cm}{scalable}%
% space between elements in ancient notation
-\grecreatedim{nabcinterelementspace}{0.06927 cm plus 0.00182 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{nabcinterelementspace}{0.06927 cm plus 0.00182 cm minus 0.00363 cm}{scalable}%
% larger space between elements in ancient notation
-\grecreatedim{nabclargerspace}{0.10938 cm plus 0.01822 cm minus 0.00911 cm}{scalable}%
+\gre@createdim{nabclargerspace}{0.10938 cm plus 0.01822 cm minus 0.00911 cm}{scalable}%
% space between elements which has the size of a note
-\grecreatedim{glyphspace}{0.21877 cm plus 0.01822 cm minus 0.01822 cm}{scalable}%
+\gre@createdim{glyphspace}{0.21877 cm plus 0.01822 cm minus 0.01822 cm}{scalable}%
% space before in-line custos
-\grecreatedim{spacebeforeinlinecustos}{0.10938 cm plus 0.01822 cm minus 0.00911 cm}{scalable}%
+\gre@createdim{spacebeforeinlinecustos}{0.10938 cm plus 0.01822 cm minus 0.00911 cm}{scalable}%
% space before end-of-line custos
-\grecreatedim{spacebeforeeolcustos}{0.23 cm plus 0 cm minus 0 cm}{scalable}%
+\gre@createdim{spacebeforeeolcustos}{0.23 cm plus 0 cm minus 0 cm}{scalable}%
% space before punctum mora and augmentum duplex
-\grecreatedim{spacebeforesigns}{0.050 cm plus 0.004 cm minus 0.004 cm}{scalable}%
+\gre@createdim{spacebeforesigns}{0.050 cm plus 0.004 cm minus 0.004 cm}{scalable}%
% when a syllable is shifted left because of a preceding punctum mora, moraadjustmentbar is
% also added. Use it to make the syllable a bit further from the punctum mora if you want.
% This version is the general case.
-\grecreatedim{moraadjustment}{0.050 cm}{scalable}%
+\gre@createdim{moraadjustment}{0.050 cm}{scalable}%
% This version is for when punctum mora is before a bar.
-\grecreatedim{moraadjustmentbar}{0.050 cm}{scalable}%
+\gre@createdim{moraadjustmentbar}{0.050 cm}{scalable}%
% space after punctum mora and augmentum duplex
-\grecreatedim{spaceaftersigns}{0.08203 cm plus 0.0082 cm minus 0.0082 cm}{scalable}%
+\gre@createdim{spaceaftersigns}{0.08203 cm plus 0.0082 cm minus 0.0082 cm}{scalable}%
% space after a clef at the beginning of a line
-\grecreatedim{spaceafterlineclef}{0.23 cm plus 0 cm minus 0.01367 cm}{scalable}%
+\gre@createdim{spaceafterlineclef}{0.23 cm plus 0 cm minus 0.01367 cm}{scalable}%
% space after a clef at the beginning of a line, when the clef and first note are vertically distant
-\grecreatedim{shortspaceafterlineclef}{0.18 cm plus 0 cm minus 0.01367 cm}{scalable}%
+\gre@createdim{shortspaceafterlineclef}{0.18 cm plus 0 cm minus 0.01367 cm}{scalable}%
% minimal space between notes of different words
-\grecreatedim{interwordspacenotes}{0.29 cm plus 0.05 cm minus 0.05 cm}{scalable}%
+\gre@createdim{interwordspacenotes}{0.29 cm plus 0.05 cm minus 0.05 cm}{scalable}%
% minimal space between notes of the same syllable.
-\grecreatedim{intersyllablespacenotes}{0.24 cm}{scalable}%
+\gre@createdim{intersyllablespacenotes}{0.24 cm}{scalable}%
% stretching added in the case where the text of two syllables of the same word are
% separated with an automatic hyphen
-\grecreatedim{intersyllablespacestretchhyphen}{0cm plus 0.05cm}{scalable}%
+\gre@createdim{intersyllablespacestretchhyphen}{0cm plus 0.05cm}{scalable}%
% minimal space between letters of different words.
-\grecreatedim{interwordspacetext}{0.17 cm plus 0.05 cm minus 0.05 cm}{scalable}%
+\gre@createdim{interwordspacetext}{0.17 cm plus 0.05 cm minus 0.05 cm}{scalable}%
% Versions of interword spaces for euouae blocks
-\grecreatedim{interwordspacenotes@euouae}{0.23 cm plus 0.1 cm minus 0.05 cm}{scalable}%
-\grecreatedim{interwordspacetext@euouae}{0.21 cm plus 0.1 cm minus 0.05 cm}{scalable}%
+\gre@createdim{interwordspacenotes@euouae}{0.23 cm plus 0.1 cm minus 0.05 cm}{scalable}%
+\gre@createdim{interwordspacetext@euouae}{0.21 cm plus 0.1 cm minus 0.05 cm}{scalable}%
% versions of note spaces when the first note of the second syllable is an alteration
% those are used in euouae blocks
-\grecreatedim{interwordspacenotes@alteration}{0.1 cm plus 0.07 cm minus 0.01 cm}{scalable}%
-\grecreatedim{intersyllablespacenotes@alteration}{0.1 cm}{scalable}%
+\gre@createdim{interwordspacenotes@alteration}{0.1 cm plus 0.07 cm minus 0.01 cm}{scalable}%
+\gre@createdim{intersyllablespacenotes@alteration}{0.1 cm}{scalable}%
% space between notes of a bivirga or trivirga
-\grecreatedim{bitrivirspace}{0.06927 cm plus 0.00182 cm minus 0.00546 cm}{scalable}%
+\gre@createdim{bitrivirspace}{0.06927 cm plus 0.00182 cm minus 0.00546 cm}{scalable}%
% space between notes of a bistropha or tristrophae
-\grecreatedim{bitristrospace}{0.06927 cm plus 0.00182 cm minus 0.00546 cm}{scalable}%
+\gre@createdim{bitristrospace}{0.06927 cm plus 0.00182 cm minus 0.00546 cm}{scalable}%
%
%%%%%%%%%%%%%%%%%%%%
% puncta inclinata %
%%%%%%%%%%%%%%%%%%%%
%
% space between two descending punctum inclinatum
-\grecreatedim{punctuminclinatumshift}{-0.03918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{punctuminclinatumshift}{-0.03918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between two descending or ascending punctum inclinatum at the unison
-\grecreatedim{punctuminclinatumunisonshift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
+\gre@createdim{punctuminclinatumunisonshift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
% space before descending puncta inclinata
-\grecreatedim{beforepunctainclinatashift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
+\gre@createdim{beforepunctainclinatashift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
% space between a descending punctum inclinatum and a punctum inclinatum deminutus
-\grecreatedim{punctuminclinatumanddebilisshift}{-0.02278 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{punctuminclinatumanddebilisshift}{-0.02278 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between two punctum inclinatum deminutus
-\grecreatedim{punctuminclinatumdebilisshift}{-0.00728 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{punctuminclinatumdebilisshift}{-0.00728 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between descending puncta inclinata, larger ambitus (range=3rd)
-\grecreatedim{punctuminclinatumbigshift}{0.07565 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{punctuminclinatumbigshift}{0.07565 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between descending puncta inclinata, larger ambitus (range=4th or 5th)
-\grecreatedim{punctuminclinatummaxshift}{0.17865 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{punctuminclinatummaxshift}{0.17865 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between two ascending punctum inclinatum
-\grecreatedim{ascendingpunctuminclinatumshift}{-0.03918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{ascendingpunctuminclinatumshift}{-0.03918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between a punctum inclinatum and a punctum inclinatum deminutus, ascending
-\grecreatedim{ascendingpunctuminclinatumanddebilisshift}{-0.02278 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{ascendingpunctuminclinatumanddebilisshift}{-0.02278 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between ascending puncta inclinata, larger ambitus (range=3rd)
-\grecreatedim{ascendingpunctuminclinatumbigshift}{0.07565 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{ascendingpunctuminclinatumbigshift}{0.07565 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between ascending puncta inclinata, larger ambitus (range=4th or 5th)
-\grecreatedim{ascendingpunctuminclinatummaxshift}{0.17865 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{ascendingpunctuminclinatummaxshift}{0.17865 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between a punctum inclinatum and a no-bar glyph one pitch below
-\grecreatedim{descendinginclinatumtonobarshift}{-0.00073 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{descendinginclinatumtonobarshift}{-0.00073 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between a punctum inclinatum and a no-bar glyph two pitches below
-\grecreatedim{descendinginclinatumtonobarbigshift}{0.10927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{descendinginclinatumtonobarbigshift}{0.10927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between a punctum inclinatum and a no-bar glyph three or four pitches below
-\grecreatedim{descendinginclinatumtonobarmaxshift}{0.23927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{descendinginclinatumtonobarmaxshift}{0.23927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between a punctum inclinatum and a no-bar glyph one pitch above
-\grecreatedim{ascendinginclinatumtonobarshift}{-0.02473 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{ascendinginclinatumtonobarshift}{-0.02473 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between a punctum inclinatum and a no-bar glyph two pitches above
-\grecreatedim{ascendinginclinatumtonobarbigshift}{0.04427 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{ascendinginclinatumtonobarbigshift}{0.04427 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between a punctum inclinatum and a no-bar glyph three or four pitches above
-\grecreatedim{ascendinginclinatumtonobarmaxshift}{0.12927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
+\gre@createdim{ascendinginclinatumtonobarmaxshift}{0.12927 cm plus 0.00363 cm minus 0.00363 cm}{scalable}%
% space between two descending punctum inclinatum glyphs in an ascent
-\grecreatedim{descendingpunctuminclinatumascendingshift}{-0.07918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{descendingpunctuminclinatumascendingshift}{-0.07918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between two ascending punctum inclinatum glyphs in an descent
-\grecreatedim{ascendingpunctuminclinatumdescendingshift}{-0.07918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{ascendingpunctuminclinatumdescendingshift}{-0.07918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
% space between two unison punctum inclinatum glyphs (at the unison)
-\grecreatedim{unisonpunctuminclinatumshift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
+\gre@createdim{uprightpunctuminclinatumshift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
%
%%%%%%%%
@@ -213,118 +220,130 @@
%
% bars inside syllables
%
-\grecreatedim{bar@virgula}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
% short versions are when the notes are very low (virgula, minima, and minimis only)
-\grecreatedim{bar@virgula@short}{0.13 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@minimis}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@minimis@short}{0.12 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@minima}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@minima@short}{0.12 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@minor}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@virgula}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@virgula@short}{0.13 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@virgulaparen}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@virgulaparen@short}{0.13 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minimis}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minimis@short}{0.12 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minima}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minima@short}{0.12 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minimaparen}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minimaparen@short}{0.12 cm plus 0.05 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@minor}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
% dominican bars
-\grecreatedim{bar@dominican}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@maior}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
-\grecreatedim{bar@finalis}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@dominican}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@maior}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
+\gre@createdim{bar@finalis}{0.1823 cm plus 0.22787 cm minus 0.00469 cm}{scalable}%
% space added before the final divisio finalis (old bar spacing algorithm only)
-\grecreatedim{bar@finalfinalis}{0.29169 cm plus 0.07292 cm minus 0.27345 cm}{scalable}%
+\gre@createdim{bar@finalfinalis}{0.29169 cm plus 0.07292 cm minus 0.27345 cm}{scalable}%
%
% bars having their own syllable, with text associated (new bar spacing algorithm only)
% plus or minus here will trigger some problems
%
-\grecreatedim{bar@virgula@standalone@text}{0.2323 cm}{scalable}%
-\grecreatedim{bar@virgula@standalone@text@short}{0.19 cm}{scalable}%
-\grecreatedim{bar@minimis@standalone@text}{0.2323 cm}{scalable}%
-\grecreatedim{bar@minimis@standalone@text@short}{0.19 cm}{scalable}%
-\grecreatedim{bar@minima@standalone@text}{0.2323 cm}{scalable}%
-\grecreatedim{bar@minima@standalone@text@short}{0.19 cm}{scalable}%
-\grecreatedim{bar@minor@standalone@text}{0.2323 cm}{scalable}%
-\grecreatedim{bar@dominican@standalone@text}{0.2323 cm}{scalable}%
-\grecreatedim{bar@maior@standalone@text}{0.2323 cm}{scalable}%
-\grecreatedim{bar@finalis@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@virgula@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@virgula@standalone@text@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@minimis@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@minimis@standalone@text@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@virgulaparen@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@virgulaparen@standalone@text@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@minima@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@minima@standalone@text@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@minor@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@dominican@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@maior@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@finalis@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@minimaparen@standalone@text}{0.2323 cm}{scalable}%
+\gre@createdim{bar@minimaparen@standalone@text@short}{0.19 cm}{scalable}%
% actual space before divisio finalis, not additional one
-\grecreatedim{bar@finalfinalis@standalone@text}{0.29169 cm}{scalable}%
+\gre@createdim{bar@finalfinalis@standalone@text}{0.29169 cm}{scalable}%
%
% bars having their own syllable, with no text associated (new bar spacing algorithm only)
%
-\grecreatedim{bar@virgula@standalone@notext}{0.2 cm}{scalable}%
-\grecreatedim{bar@virgula@standalone@notext@short}{0.19 cm}{scalable}%
-\grecreatedim{bar@minimis@standalone@notext}{0.2 cm}{scalable}%
-\grecreatedim{bar@minimis@standalone@notext@short}{0.19 cm}{scalable}%
-\grecreatedim{bar@minima@standalone@notext}{0.2 cm}{scalable}%
-\grecreatedim{bar@minima@standalone@notext@short}{0.19 cm}{scalable}%
-\grecreatedim{bar@minor@standalone@notext}{0.2323 cm}{scalable}%
-\grecreatedim{bar@dominican@standalone@notext}{0.2323 cm}{scalable}%
-\grecreatedim{bar@maior@standalone@notext}{0.2323 cm}{scalable}%
-\grecreatedim{bar@finalis@standalone@notext}{0.2323 cm}{scalable}%
-\grecreatedim{bar@finalfinalis@standalone@notext}{0.29169 cm}{scalable}%
+\gre@createdim{bar@virgula@standalone@notext}{0.2 cm}{scalable}%
+\gre@createdim{bar@virgula@standalone@notext@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@minimis@standalone@notext}{0.2 cm}{scalable}%
+\gre@createdim{bar@minimis@standalone@notext@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@virgulaparen@standalone@notext}{0.2 cm}{scalable}%
+\gre@createdim{bar@virgulaparen@standalone@notext@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@minima@standalone@notext}{0.2 cm}{scalable}%
+\gre@createdim{bar@minima@standalone@notext@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@minor@standalone@notext}{0.2323 cm}{scalable}%
+\gre@createdim{bar@dominican@standalone@notext}{0.2323 cm}{scalable}%
+\gre@createdim{bar@maior@standalone@notext}{0.2323 cm}{scalable}%
+\gre@createdim{bar@finalis@standalone@notext}{0.2323 cm}{scalable}%
+\gre@createdim{bar@minimaparen@standalone@notext}{0.2 cm}{scalable}%
+\gre@createdim{bar@minimaparen@standalone@notext@short}{0.19 cm}{scalable}%
+\gre@createdim{bar@finalfinalis@standalone@notext}{0.29169 cm}{scalable}%
%
% minimal space between letters of different syllable texts for text around bars
% (new bar spacing algorithm only)
-\grecreatedim{interwordspacetext@bars}{0.18 cm}{scalable}%
+\gre@createdim{interwordspacetext@bars}{0.18 cm}{scalable}%
% minimal space between letters of different syllable texts for text around bars,
% euouae context
-\grecreatedim{interwordspacetext@bars@euouae}{0.18 cm}{scalable}%
-\grecreatedim{interwordspacetext@bars@notext}{0.19 cm}{scalable}%
+\gre@createdim{interwordspacetext@bars@euouae}{0.18 cm}{scalable}%
+\gre@createdim{interwordspacetext@bars@notext}{0.19 cm}{scalable}%
% minimal space between letters of different syllable texts for text around bars,
% euouae context
-\grecreatedim{interwordspacetext@bars@notext@euouae}{0.18 cm}{scalable}%
+\gre@createdim{interwordspacetext@bars@notext@euouae}{0.18 cm}{scalable}%
% rubber length that will be added around bars in new bar spacing algorithm
-\grecreatedim{bar@rubber}{0 cm plus 0.025 cm minus 0.025 cm}{scalable}%
+\gre@createdim{bar@rubber}{0 cm plus 0.025 cm minus 0.025 cm}{scalable}%
% in the case of an alteration after a bar, the alteration will "protrude" left of this value
% think of it as some kind of moraadjustmentbar
-\grecreatedim{alterationadjustmentbar}{0.07 cm}{scalable}%
+\gre@createdim{alterationadjustmentbar}{0.07 cm}{scalable}%
% additional space that will appear around bars that are preceded by a custos and followed by a key.
-\grecreatedim{spacearoundclefbars}{0.03645 cm plus 0.00455 cm minus 0.0009 cm}{scalable}%
+\gre@createdim{spacearoundclefbars}{0.03645 cm plus 0.00455 cm minus 0.0009 cm}{scalable}%
% space between the text of previous syllable and text associated with a bar (old bar spacing algorithm only)
-\grecreatedim{textbartextspace}{0.24611 cm plus 0.13672 cm minus 0.04921 cm}{scalable}%
+\gre@createdim{textbartextspace}{0.24611 cm plus 0.13672 cm minus 0.04921 cm}{scalable}%
% minimal space between a note and a bar (old algorithm only)
-\grecreatedim{notebarspace}{0.31903 cm plus 0.27345 cm minus 0.02824 cm}{scalable}%
+\gre@createdim{notebarspace}{0.31903 cm plus 0.27345 cm minus 0.02824 cm}{scalable}%
% Maximum offset between a bar and its associated text when the text goes left of the bar (new bar spacing algorithm only)
-\grecreatedim{maxbaroffsettextleft}{0.3 cm}{scalable}%
+\gre@createdim{maxbaroffsettextleft}{0.3 cm}{scalable}%
% Same as maxbaroffsettextleft when text goes right of the bar
-\grecreatedim{maxbaroffsettextright}{0.15 cm}{scalable}%
+\gre@createdim{maxbaroffsettextright}{0.15 cm}{scalable}%
% Maximum offset between a no-bar (i.e. something like `text()` in gabc) and its associated text when the text goes left of the no-bar (new bar spacing algorithm only)
-\grecreatedim{maxbaroffsettextleft@nobar}{12 cm}{scalable}%
+\gre@createdim{maxbaroffsettextleft@nobar}{12 cm}{scalable}%
% Same as maxbaroffsettextleft@nobar when text goes right of the no-bar
-\grecreatedim{maxbaroffsettextright@nobar}{12 cm}{scalable}%
+\gre@createdim{maxbaroffsettextright@nobar}{12 cm}{scalable}%
% Space between the two bars of a divisio finalis
% Maximum offset between a bar and its associated text when the text goes left of the bar and the bar terminates a line (i.e. something line `text(::z)` in gabc) (new bar spacing algorithm only)
-\grecreatedim{maxbaroffsettextleft@eol}{0.0 cm}{scalable}%
+\gre@createdim{maxbaroffsettextleft@eol}{0.0 cm}{scalable}%
% Same as maxbaroffsettextleft@eol when text goes right of the bar
-\grecreatedim{maxbaroffsettextright@eol}{0 cm}{scalable}%
-\grecreatedim{divisiofinalissep}{0.1094 cm}{scalable}%
+\gre@createdim{maxbaroffsettextright@eol}{0 cm}{scalable}%
+\gre@createdim{divisiofinalissep}{0.1094 cm}{scalable}%
%
%
% maximal space between two syllables for which we consider a dash is not needed
-\grecreatedim{maximumspacewithoutdash}{0 cm}{scalable}%
+\gre@createdim{maximumspacewithoutdash}{0 cm}{scalable}%
% an extensible space for the beginning of lines
-\grecreatedim{afterclefnospace}{0 cm plus 0.27345 cm minus 0 cm}{scalable}%
+\gre@createdim{afterclefnospace}{0 cm plus 0.27345 cm minus 0 cm}{scalable}%
% space between the initial and the beginning of the score
-\grecreatedim{afterinitialshift}{0.2 cm}{scalable}%
+\gre@createdim{afterinitialshift}{0.2 cm}{scalable}%
% space before the initial
-\grecreatedim{beforeinitialshift}{0.2 cm}{scalable}%
+\gre@createdim{beforeinitialshift}{0.2 cm}{scalable}%
% when bolshifts are enabled, minimum space between beginning of line and first syllable text
-\grecreatedim{minimalspaceatlinebeginning}{0.05 cm}{scalable}%
+\gre@createdim{minimalspaceatlinebeginning}{0.05 cm}{scalable}%
% space to force the initial width to. Ignored when 0.
-\grecreatedim{manualinitialwidth}{0 cm}{scalable}%
+\gre@createdim{manualinitialwidth}{0 cm}{scalable}%
% minimum width of the initial. Ignored when manualinitialwidth is non-zero.
-\grecreatedim{minimalinitialwidth}{0 cm}{scalable}%
+\gre@createdim{minimalinitialwidth}{0 cm}{scalable}%
% distance to move the initial up by
-\grecreatedim{initialraise}{0 cm}{scalable}%
+\gre@createdim{initialraise}{0 cm}{scalable}%
% Space between lines in the annotation
-\grecreatedim{annotationseparation}{0.05 cm}{scalable}%
+\gre@createdim{annotationseparation}{0.05 cm}{scalable}%
% Amount to raise (positive) or lower (negative) the annotations from the default position
-\grecreatedim{annotationraise}{-0.2 cm}{scalable}%
+\gre@createdim{annotationraise}{-0.2 cm}{scalable}%
% Space between lines in the commentary
-\grecreatedim{commentaryseparation}{0.05 cm}{scalable}%
+\gre@createdim{commentaryseparation}{0.05 cm}{scalable}%
% Amount to raise (positive) or lower (negative) the commentary from the default position (base line of bottom commentary aligned with top line of staff)
-\grecreatedim{commentaryraise}{0.2 cm}{scalable}%
+\gre@createdim{commentaryraise}{0.2 cm}{scalable}%
% space at the beginning of the lines if there is no clef
-\grecreatedim{noclefspace}{0.1 cm}{scalable}%
+\gre@createdim{noclefspace}{0.1 cm}{scalable}%
% space around a clef change
-\grecreatedim{clefchangespace}{0.27345 cm plus 0.14584 cm minus 0.01367 cm}{scalable}%
+\gre@createdim{clefchangespace}{0.27345 cm plus 0.14584 cm minus 0.01367 cm}{scalable}%
% When \gre@clivisalignment is 2, this distance is the maximum length of the consonants after vowels for which the clivis will be aligned on its center.
-\grecreatedim{clivisalignmentmin}{0.3 cm}{scalable}%
+\gre@createdim{clivisalignmentmin}{0.3 cm}{scalable}%
%%%%%%%%%%%%%%%%%%
% vertical spaces
@@ -335,15 +354,15 @@
% it's on a line or in a space
% (b) high choral signs and low choral signs that are lower than the note which
% are in a space
-\grecreatedim{choralsigndownshift}{0.00911 cm}{scalable}%
+\gre@createdim{choralsigndownshift}{0.00911 cm}{scalable}%
% the amount to shift up:
% (a) high choral signs and low choral signs that are lower than the note which
% are on a line
-\grecreatedim{choralsignupshift}{0.04556 cm}{scalable}%
+\gre@createdim{choralsignupshift}{0.04556 cm}{scalable}%
% the space for the translation
-\grecreatedim{translationheight}{0.5 cm}{scalable}%
+\gre@createdim{translationheight}{0.5 cm}{scalable}%
%the space above the lines
-\grecreatedim{spaceabovelines}{0 cm}{scalable}%
+\gre@createdim{spaceabovelines}{0 cm}{scalable}%
% this counter is the threshold above which we start accounting notes above
% lines for additional space above lines. For instance with a threshold of
% 2 and a staff of 4 lines, notes with a pitch of k and l will not interfere
@@ -354,64 +373,64 @@
% same, for notes taken into account for nabc vertical position
\grechangecount{additionaltopspacenabcthreshold}{4}%
%the space between the lines and the bottom of the text
-\grecreatedim{spacelinestext}{0.60617 cm}{scalable}%
+\gre@createdim{spacelinestext}{3.48471ex}{fixed}%
%the per-note additional space between lines and the bottom of the text
-\grecreatedim{noteadditionalspacelinestext}{0.14413 cm}{scalable}%
+\gre@createdim{noteadditionalspacelinestext}{0.14413 cm}{scalable}%
% this counter is the number of low notes which will add on the
% noteadditionalspacelinestext. For instance, with a threshold of 2, every
% note below c will add noteadditionalspacelinestext space for each pitch needed
% below c, accounting for the various signs.
\grechangecount{noteadditionalspacelinestextthreshold}{2}%
%the space beneath the text
-\grecreatedim{spacebeneathtext}{0 cm}{scalable}%
+\gre@createdim{spacebeneathtext}{0 cm}{scalable}%
% height of the text above the note line
-\grecreatedim{abovelinestextraise}{-0.1 cm}{scalable}%
+\gre@createdim{abovelinestextraise}{-0.1 cm}{scalable}%
% height that is added at the top of the lines if there is text above the lines (it must be bigger than the text for it to be taken into consideration)
-\grecreatedim{abovelinestextheight}{0.3 cm}{scalable}%
+\gre@createdim{abovelinestextheight}{0.3 cm}{scalable}%
% an additional shift you can give to the brace above the bars if you don't like it
-\grecreatedim{braceshift}{0 cm}{scalable}%
+\gre@createdim{braceshift}{0 cm}{scalable}%
% a shift you can give to the accentus above the curly brace
-\grecreatedim{curlybraceaccentusshift}{-0.05 cm}{scalable}%
+\gre@createdim{curlybraceaccentusshift}{-0.05 cm}{scalable}%
% the amount to shift the over slur up
-\grecreatedim{overslurshift}{0.05000 cm}{scalable}%
+\gre@createdim{overslurshift}{0.05000 cm}{scalable}%
% the amount to shift the under slur up
-\grecreatedim{underslurshift}{0.01000 cm}{scalable}%
+\gre@createdim{underslurshift}{0.01000 cm}{scalable}%
% shift for a horizontal episema over a note in a low position in the space
-\grecreatedim{overhepisemalowshift}{0.02287 cm}{scalable}%
+\gre@createdim{overhepisemalowshift}{0.02287 cm}{scalable}%
% shift for a horizontal episema over a note in a high position in the space
-\grecreatedim{overhepisemahighshift}{0.10066 cm}{scalable}%
+\gre@createdim{overhepisemahighshift}{0.10066 cm}{scalable}%
% shift for a horizontal episema under a note in a low position in the space
-\grecreatedim{underhepisemalowshift}{0.02763 cm}{scalable}%
+\gre@createdim{underhepisemalowshift}{0.02763 cm}{scalable}%
% shift for a horizontal episema under a note in a high position in the space
-\grecreatedim{underhepisemahighshift}{0.10981 cm}{scalable}%
+\gre@createdim{underhepisemahighshift}{0.10981 cm}{scalable}%
% shift for a horizontal episema in the middle of a space
-\grecreatedim{hepisemamiddleshift}{0.07206 cm}{scalable}%
+\gre@createdim{hepisemamiddleshift}{0.07206 cm}{scalable}%
% shift for a vertical episema in a low position in the space
-\grecreatedim{vepisemalowshift}{-0.01262 cm}{scalable}%
+\gre@createdim{vepisemalowshift}{-0.01262 cm}{scalable}%
% shift for a vertical episema in a high position in the space
-\grecreatedim{vepisemahighshift}{0.06634 cm}{scalable}%
+\gre@createdim{vepisemahighshift}{0.06634 cm}{scalable}%
% shift for a punctum mora for a note on a line
-\grecreatedim{linepunctummorashift}{-0.06314 cm}{scalable}%
+\gre@createdim{linepunctummorashift}{-0.06314 cm}{scalable}%
% shift for a punctum mora for a note in a space
-\grecreatedim{spacepunctummorashift}{-0.02013 cm}{scalable}%
+\gre@createdim{spacepunctummorashift}{-0.02013 cm}{scalable}%
% shift for a punctum mora for the second note (in a space) of a pes with ambitus one
-\grecreatedim{spaceamonepespunctummorashift}{0.00183 cm}{scalable}%
+\gre@createdim{spaceamonepespunctummorashift}{0.00183 cm}{scalable}%
% shift for a punctum mora for the second note in a porrectus, on a line
-\grecreatedim{lineporrectuspunctummorashift}{0.04575 cm}{scalable}%
+\gre@createdim{lineporrectuspunctummorashift}{0.04575 cm}{scalable}%
% shift for a punctum mora for the second note in a porrectus, in a space
-\grecreatedim{spaceporrectuspunctummorashift}{0.00000 cm}{scalable}%
+\gre@createdim{spaceporrectuspunctummorashift}{0.00000 cm}{scalable}%
% shift for a rare sign
-\grecreatedim{raresignshift}{0.18302 cm}{scalable}%
+\gre@createdim{raresignshift}{0.18302 cm}{scalable}%
% up-shift for a bracket
-\grecreatedim{bracketupshift}{0.03000 cm}{scalable}%
+\gre@createdim{bracketupshift}{0.03000 cm}{scalable}%
% down-shift for a bracket
-\grecreatedim{bracketdownshift}{0.04000 cm}{scalable}%
+\gre@createdim{bracketdownshift}{0.04000 cm}{scalable}%
%
%%%%%%%%%%
%% Line spacings
%%%%%%%%%%
-\grecreatedim{parskip}{1pt plus 1pt}{scalable}%
-\grecreatedim{lineskip}{0pt plus 1pt}{scalable}%
-\grecreatedim{baselineskip}{55pt plus 5pt minus 5pt}{scalable}%
-\grecreatedim{lineskiplimit}{0pt}{scalable}%
+\gre@createdim{parskip}{1pt plus 1pt}{scalable}%
+\gre@createdim{lineskip}{0pt plus 1pt}{scalable}%
+\gre@createdim{baselineskip}{55pt plus 5pt minus 5pt}{scalable}%
+\gre@createdim{lineskiplimit}{0pt}{scalable}%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-main.tex b/support/gregoriotex/tex/luatex/gregoriotex-main.tex
index 95b463c90c..c7f0f93506 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-main.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-main.tex
@@ -1,6 +1,6 @@
%GregorioTeX main file.
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -21,17 +21,7 @@
% The version of gregorio. All gregoriotex*.tex files must have the same.
% All gtex files must also have the same version.
-\xdef\gre@gregoriotexversion{5.2.1}% GREGORIO_VERSION - VersionManager.py
-
-\ifluatex%
- \ifnum\luatexversion<76%
- \gre@error{Error: this document must be compiled with LuaTeX (lualatex) 0.76 or later}%
- \fi%
-\else%
- \gre@error{Error: this document must be compiled with LuaTeX (lualatex)}%
-\fi%
-
-
+\xdef\gre@gregoriotexversion{6.0.0-beta1}% GREGORIO_VERSION - VersionManager.py
% first some macros to allow checks for version:
% Tests that all gregoriotex files are of the same version.
@@ -631,16 +621,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% macros for the score reference (unused)
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\def\grescorereference#1{% OBSOLETE
- \gre@error{\protect\grescorereference\space is obsolete.\MessageBreak It does nothing; stop using it.}%
- \relax %
-}%
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for the typesetting the things above the initial
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -750,14 +730,28 @@
% - typeset the text above the lines if relevant, and making sure we execute it only once
% - not do anything else
+\newif\ifgre@showabovelinestext%
+\gre@showabovelinestexttrue%
+
+\def\gresetabovelinestext#1{%
+ \IfStrEqCase{#1}{%
+ {visible}{\gre@showabovelinestexttrue}%
+ {invisible}{\gre@showabovelinestextfalse}%
+ }[% all other cases
+ \gre@error{Unknown option, "#1" for \protect\gresetabovelinestext\MessageBreak Possible options are: 'visible' and 'invisible'}%
+ ]%
+}%
+
\xdef\gre@currenttextabovelines{}%
\def\GreSetTextAboveLines#1{%
- \gdef\gre@currenttextabovelines{%
- \gre@typesettextabovelines{#1}{0}%
- \gdef\gre@currenttextabovelines{}%
- \relax %
- }%
+ \ifgre@showabovelinestext%
+ \gdef\gre@currenttextabovelines{%
+ \gre@typesettextabovelines{#1}{0}%
+ \gdef\gre@currenttextabovelines{}%
+ \relax %
+ }%
+ \fi%
}%
% typesets the text or nabc neumes above the line
@@ -1037,37 +1031,55 @@
]%
}%
+\newif\ifgre@showtranslation%
+\gre@showtranslationtrue%
+
+\def\gresettranslation#1{%
+ \IfStrEqCase{#1}{%
+ {visible}{\gre@showtranslationtrue}%
+ {invisible}{\gre@showtranslationfalse}%
+ }[% all other cases
+ \gre@error{Unknown option, "#1" for \protect\gresettranslation\MessageBreak Possible options are: 'visible' and 'invisible'}%
+ ]%
+}%
+
\def\GreWriteTranslation#1{%
- \ifgre@translationcentering %
- \setbox\gre@box@temp@width=\hbox{#1}%
- \gre@dimen@temp@five=\dimexpr((\wd\gre@box@syllabletext - \wd\gre@box@temp@width) / 2)\relax%
- \gre@mark@translation %
- \kern\gre@dimen@temp@five %
- \raise\gre@space@dimen@spacebeneathtext\hbox to 0pt{\vbox to 0pt{\vss\hbox to 0pt{\gre@style@translation#1\endgre@style@translation\hss}}}%
- \kern-\gre@dimen@temp@five %
- \else %
- \gre@mark@translation %
- \raise\gre@space@dimen@spacebeneathtext\hbox to 0pt{\vbox to 0pt{\vss\hbox to 0pt{\gre@style@translation#1\endgre@style@translation\hss}}}%
- \fi %
+ \ifgre@showtranslation%
+ \ifgre@translationcentering %
+ \setbox\gre@box@temp@width=\hbox{#1}%
+ \gre@dimen@temp@five=\dimexpr((\wd\gre@box@syllabletext - \wd\gre@box@temp@width) / 2)\relax%
+ \gre@mark@translation %
+ \kern\gre@dimen@temp@five %
+ \raise\gre@space@dimen@spacebeneathtext\hbox to 0pt{\vbox to 0pt{\vss\hbox to 0pt{\gre@style@translation#1\endgre@style@translation\hss}}}%
+ \kern-\gre@dimen@temp@five %
+ \else %
+ \gre@mark@translation %
+ \raise\gre@space@dimen@spacebeneathtext\hbox to 0pt{\vbox to 0pt{\vss\hbox to 0pt{\gre@style@translation#1\endgre@style@translation\hss}}}%
+ \fi %
+ \fi%
}%
\def\GreWriteTranslationWithCenterBeginning#1{%
- \ifgre@breakintranslation\else%
- \GreBeginNLBArea{0}{1}%
- \fi %
- \gre@attr@center=1\relax %
- \gre@mark@translation %
- \raise\gre@space@dimen@spacebeneathtext\hbox to 0pt{\kern 0pt\vbox to 0pt{\vss\hbox to 0pt{\gre@style@translation#1\endgre@style@translation\hss}}\kern 0pt}%
- \unsetluatexattribute{\gre@attr@center}%
- \relax %
+ \ifgre@showtranslation%
+ \ifgre@breakintranslation\else%
+ \GreBeginNLBArea{0}{1}%
+ \fi %
+ \gre@attr@center=1\relax %
+ \gre@mark@translation %
+ \raise\gre@space@dimen@spacebeneathtext\hbox to 0pt{\kern 0pt\vbox to 0pt{\vss\hbox to 0pt{\gre@style@translation#1\endgre@style@translation\hss}}\kern 0pt}%
+ \unsetluatexattribute{\gre@attr@center}%
+ \relax %
+ \fi%
}%
\newif\ifgre@mustdotranslationcenterend%
\gre@mustdotranslationcenterendfalse%
\def\GreTranslationCenterEnd{%
- \gre@mustdotranslationcenterendtrue%
- \relax %
+ \ifgre@showtranslation%
+ \gre@mustdotranslationcenterendtrue%
+ \relax %
+ \fi%
}%
\def\gre@dotranslationcenterend{%
@@ -1114,6 +1126,19 @@
]%
}%
+\newif\ifgre@noteadditionalspacelinestext%
+\def\gresetnoteadditionalspacelinestext#1{%
+ \IfStrEqCase{#1}{%
+ {automatic}%
+ {\gre@noteadditionalspacelinestextfalse}%
+ {manual}%
+ {\gre@noteadditionalspacelinestexttrue}%
+ }[% all other cases
+ \gre@error{Unrecognized option "#1" for \protect\gresetnoteadditionalspacelinestext\MessageBreak Possible options are: 'automatic' and 'manual'}%
+ ]%
+}%
+\gresetnoteadditionalspacelinestext{automatic}%default setting
+
% gre@attr@dash (see its definition in gregorio-syllable) is 0 when we are in a score, and unset when we are not
\newif\ifgre@beginningofscore%
@@ -1136,10 +1161,14 @@
\let\gre@pitch@overbrace\gre@pitch@i %
\let\gre@char@bar@virgula\GreCPVirgulaTwo %
\let\gre@char@bar@virgulahigh\GreCPVirgulaThree %
+ \let\gre@char@bar@virgulaparen\GreCPVirgulaParenTwo %
+ \let\gre@char@bar@virgulaparenhigh\GreCPVirgulaParenThree %
\let\gre@char@bar@divisiominimis\GreCPDivisioMinimisTwo %
\let\gre@char@bar@divisiominimishigh\GreCPDivisioMinimisThree %
\let\gre@char@bar@divisiominima\GreCPDivisioMinimaTwo %
\let\gre@char@bar@divisiominimahigh\GreCPDivisioMinimaThree %
+ \let\gre@char@bar@divisiominimaparen\GreCPDivisioMinimaParenTwo %
+ \let\gre@char@bar@divisiominimaparenhigh\GreCPDivisioMinimaParenThree %
\let\gre@char@bar@divisiominor\GreCPDivisioMinorTwo %
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorTwo %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedTwo %
@@ -1155,10 +1184,14 @@
\let\gre@pitch@overbrace\gre@pitch@k %
\let\gre@char@bar@virgula\GreCPVirgulaThree %
\let\gre@char@bar@virgulahigh\GreCPVirgulaFour %
+ \let\gre@char@bar@virgulaparen\GreCPVirgulaParenThree %
+ \let\gre@char@bar@virgulaparenhigh\GreCPVirgulaParenFour %
\let\gre@char@bar@divisiominimis\GreCPDivisioMinimisThree %
\let\gre@char@bar@divisiominimishigh\GreCPDivisioMinimisFour %
\let\gre@char@bar@divisiominima\GreCPDivisioMinimaThree %
\let\gre@char@bar@divisiominimahigh\GreCPDivisioMinimaFour %
+ \let\gre@char@bar@divisiominimaparen\GreCPDivisioMinimaParenThree %
+ \let\gre@char@bar@divisiominimaparenhigh\GreCPDivisioMinimaParenFour %
\let\gre@char@bar@divisiominor\GreCPDivisioMinorThree %
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorThree %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedThree %
@@ -1174,10 +1207,14 @@
\let\gre@pitch@overbrace\gre@pitch@m %
\let\gre@char@bar@virgula\GreCPVirgulaFour %
\let\gre@char@bar@virgulahigh\GreCPVirgulaFive %
+ \let\gre@char@bar@virgulaparen\GreCPVirgulaParenFour %
+ \let\gre@char@bar@virgulaparenhigh\GreCPVirgulaParenFive %
\let\gre@char@bar@divisiominimis\GreCPDivisioMinimisFour %
\let\gre@char@bar@divisiominimishigh\GreCPDivisioMinimisFive %
\let\gre@char@bar@divisiominima\GreCPDivisioMinimaFour %
\let\gre@char@bar@divisiominimahigh\GreCPDivisioMinimaFive %
+ \let\gre@char@bar@divisiominimaparen\GreCPDivisioMinimaParenFour %
+ \let\gre@char@bar@divisiominimaparenhigh\GreCPDivisioMinimaParenFive %
\let\gre@char@bar@divisiominor\GreCPDivisioMinorFour %
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorFour %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedFour %
@@ -1193,10 +1230,14 @@
\let\gre@pitch@overbrace\gre@pitch@p %
\let\gre@char@bar@virgula\GreCPVirgulaFive %
\let\gre@char@bar@virgulahigh\GreCPVirgulaSix %
+ \let\gre@char@bar@virgulaparen\GreCPVirgulaParenFive %
+ \let\gre@char@bar@virgulaparenhigh\GreCPVirgulaParenSix %
\let\gre@char@bar@divisiominimis\GreCPDivisioMinimisFive %
\let\gre@char@bar@divisiominimishigh\GreCPDivisioMinimisSix %
\let\gre@char@bar@divisiominima\GreCPDivisioMinimaFive %
\let\gre@char@bar@divisiominimahigh\GreCPDivisioMinimaSix %
+ \let\gre@char@bar@divisiominimaparen\GreCPDivisioMinimaParenFive %
+ \let\gre@char@bar@divisiominimaparenhigh\GreCPDivisioMinimaParenSix %
\let\gre@char@bar@divisiominor\GreCPDivisioMinorFive %
\let\gre@char@bar@divisiomaior\GreCPDivisioMaiorFive %
\let\gre@char@bar@divisiomaiordotted\GreCPDivisioMaiorDottedFive %
@@ -1242,8 +1283,6 @@
\gre@computespaces%
\gre@cancelpenalties %
\gre@attr@dash=0\relax %
- \xdef\gre@exhyphencharsave{\the\exhyphenchar}%
- \exhyphenchar=-1\relax %
\gre@generatelines %
\noindent%
\gre@calculate@additionalspaces{#2}{#3}{#4}{#5}%
@@ -1294,7 +1333,6 @@
\gre@removetranslationspace %
\gre@normalinitial %
\gre@restorepenalties %
- \exhyphenchar=\gre@exhyphencharsave %
\gre@dimen@temp@one=0pt\relax%
\gre@dimen@temp@two=0pt\relax%
\gre@dimen@temp@three=0pt\relax%
@@ -1547,6 +1585,10 @@
%% 20: space between a punctum inclinatum and a "no-bar" glyph two pitches above
%% 21: space between a punctum inclinatum and a "no-bar" glyph three or four pitches above
%% 22: half-space
+%% 23: Space between two puncta inclinata on a unison
+%% 24: Space before a right-leaning puncta inclinatum when the pitch is ascending (up to 4 pitches away)
+%% 25: Space before a left-leaning puncta inclinatum when the pitch is descending (up to 4 pitches away)
+%% 26: Space after after a non-punctum inclinatum and before the upright punctum inclinatum
\def\gre@get@spaceskip#1{%
\gre@trace{gre@get@spaceskip{#1}}%
\ifcase#1%
@@ -1602,7 +1644,7 @@
\or% case 25
\gre@skip@temp@four = \gre@space@skip@ascendingpunctuminclinatumdescendingshift\relax%
\or% case 26
- \gre@skip@temp@four = \gre@space@skip@unisonpunctuminclinatumshift\relax%
+ \gre@skip@temp@four = \gre@space@skip@uprightpunctuminclinatumshift\relax%
\else%
\gre@error{Unrecognized spaceskip #1}%
\fi%
@@ -1625,13 +1667,13 @@
% 2: no line break area due to <nlba> tag
\xdef\gre@nlbstate{0}%
-\newcount\gre@nobreakpenaltysave%
-\newcount\gre@endofwordpenaltysave%
-\newcount\gre@endofsyllablepenaltysave%
-\newcount\gre@endafterbarpenaltysave%
-\newcount\gre@endafterbaraltpenaltysave%
-\newcount\gre@endofelementpenaltysave%
-%\newcount\gre@hyphenpenaltysave% in gregoriotex-spaces.tex
+\newcount\gre@saved@prenlba@nobreakpenalty%
+\newcount\gre@saved@prenlba@endofwordpenalty%
+\newcount\gre@saved@prenlba@endofsyllablepenalty%
+\newcount\gre@saved@prenlba@endafterbarpenalty%
+\newcount\gre@saved@prenlba@endafterbaraltpenalty%
+\newcount\gre@saved@prenlba@endofelementpenalty%
+\newcount\gre@saved@prenlba@hyphenpenalty%
% first argument is if if the nlba is starting in neumes or not
% second argument is if it is called from translation centering or not
\def\GreBeginNLBArea#1#2{%
@@ -1648,20 +1690,25 @@
\fi %
\fi %
\ifnum\gre@nlbinitialstate=0\relax %
- \global\gre@nobreakpenaltysave=\gre@space@count@nobreakpenalty\relax %
- \global\gre@endofwordpenaltysave=\gre@space@count@endofwordpenalty\relax %
- \global\gre@endofsyllablepenaltysave=\gre@space@count@endofsyllablepenalty\relax %
- \global\gre@endafterbarpenaltysave=\gre@space@count@endafterbarpenalty\relax %
- \global\gre@endafterbaraltpenaltysave=\gre@space@count@endafterbaraltpenalty\relax %
- \global\gre@endofelementpenaltysave=\gre@space@count@endofelementpenalty\relax %
- \global\gre@hyphenpenaltysave=\gre@space@count@hyphenpenalty\relax %
- %
+ \global\gre@saved@prenlba@nobreakpenalty=\gre@space@count@nobreakpenalty\relax %
\global\gre@space@count@nobreakpenalty=10001\relax %
+ %
+ \global\gre@saved@prenlba@endofwordpenalty=\gre@space@count@endofwordpenalty\relax %
\global\gre@space@count@endofwordpenalty=10001\relax %
+ %
+ \global\gre@saved@prenlba@endofsyllablepenalty=\gre@space@count@endofsyllablepenalty\relax %
\global\gre@space@count@endofsyllablepenalty=10001\relax %
+ %
+ \global\gre@saved@prenlba@endafterbarpenalty=\gre@space@count@endafterbarpenalty\relax %
\global\gre@space@count@endafterbarpenalty=10001\relax %
+ %
+ \global\gre@saved@prenlba@endafterbaraltpenalty=\gre@space@count@endafterbaraltpenalty\relax %
\global\gre@space@count@endafterbaraltpenalty=10001\relax %
+ %
+ \global\gre@saved@prenlba@endofelementpenalty=\gre@space@count@endofelementpenalty\relax %
\global\gre@space@count@endofelementpenalty=10001\relax %
+ %
+ \global\gre@saved@prenlba@hyphenpenalty=\gre@space@count@hyphenpenalty\relax %
\global\gre@space@count@hyphenpenalty=10001\relax %
\fi %
}%
@@ -1682,13 +1729,13 @@
% if gre@nlbstate is not 0, then nothing should happend
\ifnum\gre@nlbstate=0\relax %
\ifnum\gre@nlbinitialstate=0\else %
- \global\gre@space@count@nobreakpenalty=\gre@nobreakpenaltysave\relax %
- \global\gre@space@count@endofwordpenalty=\gre@endofwordpenaltysave\relax %
- \global\gre@space@count@endofsyllablepenalty=\gre@endofsyllablepenaltysave\relax %
- \global\gre@space@count@endafterbarpenalty=\gre@endafterbarpenaltysave\relax %
- \global\gre@space@count@endafterbaraltpenalty=\gre@endafterbaraltpenaltysave\relax %
- \global\gre@space@count@endofelementpenalty=\gre@endofelementpenaltysave\relax %
- \global\gre@space@count@hyphenpenalty=\gre@hyphenpenaltysave\relax %
+ \global\gre@space@count@nobreakpenalty=\gre@saved@prenlba@nobreakpenalty\relax %
+ \global\gre@space@count@endofwordpenalty=\gre@saved@prenlba@endofwordpenalty\relax %
+ \global\gre@space@count@endofsyllablepenalty=\gre@saved@prenlba@endofsyllablepenalty\relax %
+ \global\gre@space@count@endafterbarpenalty=\gre@saved@prenlba@endafterbarpenalty\relax %
+ \global\gre@space@count@endafterbaraltpenalty=\gre@saved@prenlba@endafterbaraltpenalty\relax %
+ \global\gre@space@count@endofelementpenalty=\gre@saved@prenlba@endofelementpenalty\relax %
+ \global\gre@space@count@hyphenpenalty=\gre@saved@prenlba@hyphenpenalty\relax %
\ifcase #1\relax % 0
\gre@penalty{\the\gre@space@count@endofelementpenalty}%
\or % 1
@@ -1769,25 +1816,34 @@
\gre@trace@end%
}%
+%% font calibration distances
+\newdimen\gre@dimen@stafflinethicknessbase%
+\newdimen\gre@dimen@glyphraisebase%
+\newdimen\gre@dimen@interstafflinedistancebase%
+\newdimen\gre@dimen@inclinatumonlinemoravshiftbase%
+\newdimen\gre@dimen@inclinatumonlinemorahshiftbase%
+\newdimen\gre@dimen@inclinatumofflinemorahshiftbase%
+
\def\gre@setgregoriofontscaled[#1]#2#3{%
\gre@trace{gre@setgregoriofontscaled[#1]{#2}{#3}}%
- \IfStrEq{#2}{parmesan}{%%% OBSOLETE
- \gre@obsolete{'parmesan' font}{'granapadano' font}%%% OBSOLETE
- }{%%% OBSOLETE
- % keep this section
- \if\relax\detokenize{#1}\relax %
- \xdef\gre@gregoriofontname{#2}%
- \expandafter\xdef\csname gre@fontfactor@#2\endcsname{#3}%
- \gre@loadgregoriofont%
- \gdef\GreCPVirgaReversaAscendensOnDLine##1{##1}%
- \else %
- \xdef\gre@gregoriofontname{#2-#1}%
- \expandafter\xdef\csname gre@fontfactor@#2-#1\endcsname{#3}%
- \gre@loadgregoriofont%
- \gdef\GreCPVirgaReversaAscendensOnDLine##1{\GreCPVirgaReversaLongqueueAscendens}%
- \fi %
- }%%% OBSOLETE
- \relax %
+ \if\relax\detokenize{#1}\relax %
+ \xdef\gre@gregoriofontname{#2}%
+ \expandafter\xdef\csname gre@fontfactor@#2\endcsname{#3}%
+ \gre@loadgregoriofont%
+ \gdef\GreCPVirgaReversaAscendensOnDLine##1{##1}%
+ \else %
+ \xdef\gre@gregoriofontname{#2-#1}%
+ \expandafter\xdef\csname gre@fontfactor@#2-#1\endcsname{#3}%
+ \gre@loadgregoriofont%
+ \gdef\GreCPVirgaReversaAscendensOnDLine##1{\GreCPVirgaReversaLongqueueAscendens}%
+ \fi %
+ % currently all fonts use the same calibration distances
+ \gre@dimen@stafflinethicknessbase=1500sp\relax %
+ \gre@dimen@glyphraisebase=-22000sp\relax%
+ \gre@dimen@interstafflinedistancebase=30000sp\relax%
+ \gre@dimen@inclinatumonlinemoravshiftbase=4500sp\relax%
+ \gre@dimen@inclinatumonlinemorahshiftbase=3700sp\relax%
+ \gre@dimen@inclinatumofflinemorahshiftbase=2500sp\relax%
\gre@trace@end%
}%
@@ -1840,7 +1896,6 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\grechangestyle#1#2{%
- \IfStrEq{#1}{biginitial}{\gre@obsolete{biginitial style}{initial style}}{}%%% OBSOLETE
\@ifnextchar[{\gre@changestyle{#1}{#2}}{\gre@changestyle{#1}{#2}[\relax]}%
}%
@@ -1877,6 +1932,20 @@
%% score including
%%%%%%%%%%%%%%%%%%%
+
+\def\gre@maketable#1{\ifx\relax#1\else,"#1"\expandafter\gre@maketable\fi}
+
+\def\gresetgregpath#1{%
+ \def\gre@input@path{#1}%
+ \directlua{
+ gre_input_path = {""\expandafter\gre@maketable\gre@input@path\relax}
+ }
+}
+
+\ifx\gre@input@path\@undefined
+ \let\gre@input@path\input@path
+\fi
+
% Flag to track compilation behavior
% 0 = never compile (default)
% 1 = auto compile (compile outdated scores and those lacking a compiled version)
@@ -1910,6 +1979,8 @@
% This forces gregoriotex to recompile the gabc file.
\def\gre@gregorioscore#1{%
+ \begingroup%
+ \let\input@path\gre@input@path%
\ifcase\gre@compilegabc% case 0, never compile
\gre@debugmsg{compile}{Refusing to compile #1}%
\input #1%
@@ -1921,6 +1992,7 @@
\directlua{gregoriotex.include_score([[#1]], true, \gre@allowdeprecated@asboolean)}%
\fi%
\relax%
+ \endgroup%
}%
% The internal macro called when \gregorioscore is called with the optional argument. Behavior is determined by the value of the argument:
@@ -1928,6 +2000,8 @@
% a - perform the checks to see if the score needs to be recompiled and do so only if necessary
% f - force the compilation of the score before including it
\def\gre@gregorioscore@option[#1]#2{%
+ \begingroup%
+ \let\input@path\gre@input@path%
\ifx #1n\relax%
\gre@debugmsg{compile}{Override not compiling #2}%
\input #2%
@@ -1945,6 +2019,7 @@
\fi%
\fi%
\relax%
+ \endgroup%
}%
% The main macro used by the user to input scores into the document.
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-nabc.lua b/support/gregoriotex/tex/luatex/gregoriotex-nabc.lua
index 8eb1b3e155..deeaf3ba34 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-nabc.lua
+++ b/support/gregoriotex/tex/luatex/gregoriotex-nabc.lua
@@ -1,6 +1,6 @@
--GregorioTeX Nabc Lua file.
--
---Copyright (C) 2014-2019 The Gregorio Project (see CONTRIBUTORS.md)
+--Copyright (C) 2014-2021 The Gregorio Project (see CONTRIBUTORS.md)
--
--This file is part of Gregorio.
--
@@ -20,7 +20,7 @@
-- this file contains lua functions used by GregorioTeX St. Gall ancient
-- neume support when called with LuaTeX.
--- GREGORIO_VERSION 5.2.1
+-- GREGORIO_VERSION 6.0.0-beta1
local catcode_at_letter = luatexbase.catcodetables['gre@atletter']
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-nabc.tex b/support/gregoriotex/tex/luatex/gregoriotex-nabc.tex
index 11949b5a7c..fa76832c43 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-nabc.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-nabc.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2014-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2014-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -19,7 +19,7 @@
% this file contains macros for St. Gall ancient neume support
-\gre@declarefileversion{gregoriotex-nabc.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-nabc.tex}{6.0.0-beta1}% GREGORIO_VERSION
\xdef\gre@nabcfontname{gregall}%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-signs.lua b/support/gregoriotex/tex/luatex/gregoriotex-signs.lua
index c52a25b113..25a2f85cbe 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-signs.lua
+++ b/support/gregoriotex/tex/luatex/gregoriotex-signs.lua
@@ -1,6 +1,6 @@
--GregorioTeX Signs Lua support file.
--
---Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+--Copyright (C) 2015-2021 The Gregorio Project (see CONTRIBUTORS.md)
--
--This file is part of Gregorio.
--
@@ -19,7 +19,7 @@
-- this file contains lua functions to support signs used by GregorioTeX.
--- GREGORIO_VERSION 5.2.1
+-- GREGORIO_VERSION 6.0.0-beta1
local err = gregoriotex.module.err
local warn = gregoriotex.module.warn
@@ -211,6 +211,18 @@ local offset_cases = {
case = 'BarDivisioFinalis',
v = [[\gre@vepisemaorrareaux{0}{\gre@fontchar@divisiofinalis}{1}{0}{#2}{#3}{#4}]],
},
+ -- parenthesized bar
+ {
+ case = 'BarParen',
+ v = [[\gre@vepisemaorrareaux{0}{\gre@char@bar@divisiominimaparen}{1}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\gre@char@bar@divisiominimaparen}{\gre@char@he@barparen{#4}}{2}{#3}]],
+ },
+ -- parenthesized virgula
+ {
+ case = 'BarVirgulaParen',
+ v = [[\gre@vepisemaorrareaux{0}{\gre@char@bar@virgulaparen}{1}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\gre@char@bar@virgulaparen}{\gre@char@he@barvirgulaparen{#4}}{2}{#3}]],
+ },
-- second note of a non-auctus torculus resupinus starting with a quilisma,
-- with a first and second ambitus of at least two
{
@@ -452,9 +464,27 @@ local offset_cases = {
-- natural
{
case = 'Natural',
- v = [[\gre@vepisemaorrareaux{0}{\GreCPNatual}{1}{0}{#2}{#3}{#4}]],
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPNatural}{1}{0}{#2}{#3}{#4}]],
h = [[\gre@hepisorlineaux{\GreCPNatural}{\gre@char@he@natural{#4}}{2}{#3}]],
},
+ -- parenthesized flat
+ {
+ case = 'FlatParen',
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPFlatParen}{1}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\GreCPFlatParen}{\gre@char@he@flatparen{#4}}{2}{#3}]],
+ },
+ -- parenthesized sharp
+ {
+ case = 'SharpParen',
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPSharpParen}{1}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\GreCPSharpParen}{\gre@char@he@sharpparen{#4}}{2}{#3}]],
+ },
+ -- parenthesized natural
+ {
+ case = 'NaturalParen',
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPNaturalParen}{1}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\GreCPNaturalParen}{\gre@char@he@naturalparen{#4}}{2}{#3}]],
+ },
}
local function emit_offset_macros()
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-signs.tex b/support/gregoriotex/tex/luatex/gregoriotex-signs.tex
index b5f68ebbcd..addcba3178 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-signs.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-signs.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -22,7 +22,7 @@
\def\grebarbracewidth{.58879}%
-\gre@declarefileversion{gregoriotex-signs.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-signs.tex}{6.0.0-beta1}% GREGORIO_VERSION
\def\gre@usestylecommon{%
\gre@trace{gre@usestylecommon}%
@@ -238,8 +238,8 @@
\gre@trace@end%
}
-\def\gre@saveclefextrema#1#2{%
- \gre@trace{gre@saveclefextrema{#1}{#2}}%
+\def\gre@save@clefextrema#1#2{%
+ \gre@trace{gre@save@clefextrema{#1}{#2}}%
% compute the clef extrema
\ifcase#1\or % first@1
\global\let\gre@pitch@cleftop\gre@pitch@e %
@@ -308,7 +308,7 @@
\def\GreInitialClefPosition#1#2{%
\gre@trace{GreInitialClefPosition{#1}{#2}}%
\ifgre@showclef %
- \gre@saveclefextrema{#1}{#2}%
+ \gre@save@clefextrema{#1}{#2}%
\fi %
\gre@trace@end%
}%
@@ -325,7 +325,7 @@
%% #8: if 3, it means that we must not put a flat after the secondary clef, otherwise it's the height of the flat
\def\gre@typeclef#1#2#3#4#5#6#7#8{%
\gre@trace{gre@typeclef{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}%
- \gre@saveclefextrema{#2}{#7}%
+ \gre@save@clefextrema{#2}{#7}%
\gre@boxclef{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}%
\ifcase#3%
\gre@update@clefwidth@current{\wd\gre@box@temp@width}%
@@ -1210,12 +1210,12 @@
% here we shift a bit left in the case where we have a punctum inclinatum on a line
\ifnum#4=1\relax %
\ifgre@isonaline %
- \gre@dimen@temp@three=\dimexpr(3700sp * \gre@factor)\relax %
+ \gre@dimen@temp@three=\dimexpr(\gre@dimen@inclinatumonlinemorahshiftbase * \gre@factor)\relax %
\kern-\gre@dimen@temp@three %
- \gre@dimen@temp@three=\dimexpr(4500sp * \gre@factor)\relax%
+ \gre@dimen@temp@three=\dimexpr(\gre@dimen@inclinatumonlinemoravshiftbase * \gre@factor)\relax%
\advance\gre@dimen@glyphraisevalue by -\gre@dimen@temp@three %
\else %
- \gre@dimen@temp@three=\dimexpr(2500sp * \gre@factor)\relax %
+ \gre@dimen@temp@three=\dimexpr(\gre@dimen@inclinatumofflinemorahshiftbase * \gre@factor)\relax %
\advance\gre@dimen@glyphraisevalue by -\gre@dimen@temp@three %
\fi %
\fi %
@@ -1538,6 +1538,7 @@
\setbox\gre@box@temp@sign=\hbox{\gre@font@music#2}%
% we set tempwidth to half a punctum malus half the sign width, so that the centers are aligned
\gre@dimen@temp@two=\wd\gre@box@temp@sign %
+ \gre@debugmsg{general}{gre@dimen@temp@two = \the\gre@dimen@temp@two}%
\ifcase#4%
%case of hepisema
\raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
@@ -1840,6 +1841,34 @@
\gre@trace@end%
}%
+\def\GreInVirgulaParen#1#2#3{%
+ \gre@trace{GreInVirgulaParen{#1}{#2}{#3}}%
+ \gre@writebar{19}{1}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
+\def\GreVirgulaParen#1#2#3{%
+ \gre@trace{GreVirgulaParen{#1}{#2}{#3}}%
+ \gre@writebar{19}{0}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
+\def\GreInVirgulaParenHigh#1#2#3{%
+ \gre@trace{GreInVirgulaParenHigh{#1}{#2}{#3}}%
+ \gre@writebar{21}{1}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
+\def\GreVirgulaParenHigh#1#2#3{%
+ \gre@trace{GreVirgulaParenHigh{#1}{#2}{#3}}%
+ \gre@writebar{21}{0}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
\def\GreInDivisioMinimis#1#2#3{%
\gre@trace{GreInDivisioMinimis{#1}{#2}{#3}}%
\gre@writebar{17}{1}{#1}{#2}{#3}%
@@ -1896,6 +1925,34 @@
\gre@trace@end%
}%
+\def\GreInDivisioMinimaParen#1#2#3{%
+ \gre@trace{GreInDivisioMinimaParen{#1}{#2}{#3}}%
+ \gre@writebar{20}{1}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
+\def\GreDivisioMinimaParen#1#2#3{%
+ \gre@trace{GreDivisioMinimaParen{#1}{#2}{#3}}%
+ \gre@writebar{20}{0}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
+\def\GreInDivisioMinimaParenHigh#1#2#3{%
+ \gre@trace{GreInDivisioMinimaHigh{#1}{#2}{#3}}%
+ \gre@writebar{22}{1}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
+\def\GreDivisioMinimaParenHigh#1#2#3{%
+ \gre@trace{GreDivisioMinimaHigh{#1}{#2}{#3}}%
+ \gre@writebar{22}{0}{#1}{#2}{#3}%
+ \relax%
+ \gre@trace@end%
+}%
+
\def\GreInDivisioMinor#1#2{%
\gre@trace{GreInDivisioMinor{#1}{#2}}%
\gre@writebar{2}{1}{#1}{#2}{0}%
@@ -2100,7 +2157,15 @@
\newskip\gre@skip@bar@lastskip% skip after last bar
%a macro to write a bar
-%% 1: the type of the bar : 0 for virgula, 1 for minima 2 for minor, 3 for major, 4 for finalis and 5 for the last finalis, 6 to 13 for dominican bars, 14 for high virgula, 15 for high minima, 16 for dotted maior, 17 for minimis, 18 for high minimis
+%% 1: the type of the bar : 0 for virgula, 1 for minima, 2 for minor,
+%% 3 for major, 4 for finalis, 5 for the last finalis,
+%% 6 to 13 for dominican bars, 14 for high virgula,
+%% 15 for high minima, 16 for dotted maior,
+%% 17 for minimis, 18 for high minimis,
+%% 19 for parenthesized virgula,
+%% 20 for parenthesized minima,
+%% 21 for high parenthesized virgula,
+%% 22 for high parenthesized minima,
%% 2: is 0 if it is in a syllable containing only this bar, 1 otherwise
%% 3: is 0 if there's no text under the bar or 1 if there is text under the bar
%% 4: macros that may happen before the skip after the bar (typically GreVEpisema)
@@ -2428,6 +2493,66 @@
\gre@skip@temp@four = \csname gre@space@skip@bar@minimis\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
\gre@hskip\gre@skip@temp@four %
\fi %
+ \or % 19 : parenthesized virgula
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@virgulaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@virgulaparen}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\gre@char@bar@virgulaparen}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@virgulaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 20 : parenthesized minima
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minimaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@divisiominimaparen}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\gre@char@bar@divisiominimaparen}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minimaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 21 : parenthesized high virgula
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@virgulaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \GreGlyphHeights{\gre@pitch@ledger@above}{\gre@pitch@ledger@above}%
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@virgulaparenhigh}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\gre@char@bar@virgulaparenhigh}%
+ \GreAdditionalLine{\GreOCaseBarVirgulaParen}{0}{2}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@virgulaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 22 : parenthesized high minima
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minimaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \GreGlyphHeights{\gre@pitch@ledger@above}{\gre@pitch@ledger@above}%
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@divisiominimaparenhigh}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\gre@char@bar@divisiominimaparenhigh}%
+ \GreAdditionalLine{\GreOCaseBarParen}{0}{2}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minimaparen\gre@bar@space@suffix{#2}{#3}{#5}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
\fi %
\global\gre@skip@bar@lastskip=\gre@skip@temp@four %
\gre@debugmsg{spacing}{Width of bar just printed: \the\wd\gre@box@temp@width}%
@@ -2470,7 +2595,7 @@
%macro to end a line with a divisio finalis
\def\GreFinalDivisioFinalis#1{%
\gre@trace{GreFinalDivisioFinalis{#1}}%
- \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
+ \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{{16}{0}}{}{%
\ifgre@newbarspacing\else %
\gre@hskip\gre@space@skip@bar@finalfinalis %
\GreNoBreak %
@@ -2486,7 +2611,7 @@
%macro to end a line with a divisio maior
\def\GreFinalDivisioMaior#1{%
\gre@trace{GreFinalDivisioMaior{#1}}%
- \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
+ \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{{16}{0}}{}{%
\GreLastOfScore %
\GreDivisioMaior{0}{}%
#1%
@@ -2551,16 +2676,13 @@
\gre@trace{gre@fillhole{#1}{#2}}%
\ifgre@boxing\else %
\global\gre@count@lastglyphiscavum=1\relax %
- \setbox\gre@box@temp@sign=\hbox{#1}%
+ \setbox\gre@box@temp@sign=\hbox to 0pt {%
+ {\color{grebackgroundcolor}#1}%
+ \rule{0pt}{0pt}% this trick prevents the color from leaking out of this box
+ \hss}%
+ \luacolorProcessBox\gre@box@temp@sign%
\ifcase#2\raise \gre@dimen@glyphraisevalue\fi%
- \hbox to 0pt{%
- {%
- \color{grebackgroundcolor}%
- \copy\gre@box@temp@sign %
- }%
- %\pdfliteral{}% this is a ugly hack for old versions of LuaTeX to work
- \hss %
- }%
+ \copy\gre@box@temp@sign%
\GreNoBreak %
\fi %
\relax %
@@ -2631,6 +2753,15 @@
\gre@trace@end%
}%
+% Same as the one before, but for parenthesized flats.
+
+\def\GreFlatParen#1#2#3#4#5{%
+ \gre@trace{GreFlatParen{#1}{#2}{#3}{#4}{#5}}%
+ \gre@alteration{#1}{\gre@fontchar@flatparen}{\gre@fontchar@flatparenhole}{#2}{#3}{#4}{#5}%
+ \relax%
+ \gre@trace@end%
+}%
+
% Same as the one before, but for naturals.
\def\GreNatural#1#2#3#4#5{%
@@ -2640,6 +2771,15 @@
\gre@trace@end%
}%
+% Same as the one before, but for parenthesized naturals.
+
+\def\GreNaturalParen#1#2#3#4#5{%
+ \gre@trace{GreNaturalParen{#1}{#2}{#3}{#4}{#5}}%
+ \gre@alteration{#1}{\gre@fontchar@naturalparen}{\gre@fontchar@naturalparenhole}{#2}{#3}{#4}{#5}%
+ \relax%
+ \gre@trace@end%
+}%
+
% Same as the one before, but for sharps.
\def\GreSharp#1#2#3#4#5{%
@@ -2649,6 +2789,15 @@
\gre@trace@end%
}%
+% Same as the one before, but for sharps.
+
+\def\GreSharpParen#1#2#3#4#5{%
+ \gre@trace{GreSharpParem{#1}{#2}{#3}{#4}{#5}}%
+ \gre@alteration{#1}{\gre@fontchar@sharpparen}{\gre@fontchar@sharpparenhole}{#2}{#3}{#4}{#5}%
+ \relax%
+ \gre@trace@end%
+}%
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for typesetting punctum cavum
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-spaces.tex b/support/gregoriotex/tex/luatex/gregoriotex-spaces.tex
index c9a0df14f6..a0fcc077b9 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-spaces.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-spaces.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -19,7 +19,7 @@
% this file contains definitions of spaces
-\gre@declarefileversion{gregoriotex-spaces.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-spaces.tex}{6.0.0-beta1}% GREGORIO_VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for tuning penalties
@@ -35,77 +35,95 @@
-\newcount\gre@hyphenpenaltysave%
-\newcount\gre@exhyphenpenaltysave%
-\newcount\gre@doublehyphendemeritssave%
-\newcount\gre@finalhyphendemeritssave%
-\newcount\gre@brokenpenaltysave%
-\newcount\gre@loosenesssave%
-\newcount\gre@tolerancesave%
-\newcount\gre@pretolerancesave%
-\newskip\gre@emergencystretchsave%
-\newcount\gre@widowpenaltysave%
-\newcount\gre@clubpenaltysave%
-\newskip\gre@saved@parskip%
-\newskip\gre@saved@lineskip%
-\newskip\gre@saved@baselineskip%
-\newskip\gre@saved@lineskiplimit%
+\newcount\gre@saved@prescore@hyphenpenalty%
+\newcount\gre@saved@prescore@exhyphenpenalty%
+\newcount\gre@saved@prescore@exhyphenchar%
+\newcount\gre@saved@prescore@doublehyphendemerits%
+\newcount\gre@saved@prescore@finalhyphendemerits%
+\newcount\gre@saved@prescore@brokenpenalty%
+\newcount\gre@saved@prescore@looseness%
+\newcount\gre@saved@prescore@tolerance%
+\newcount\gre@saved@prescore@pretolerance%
+\newskip\gre@saved@prescore@emergencystretch%
+\newcount\gre@saved@prescore@widowpenalty%
+\newcount\gre@saved@prescore@clubpenalty%
+\newskip\gre@saved@prescore@parskip%
+\newskip\gre@saved@prescore@lineskip%
+\newskip\gre@saved@prescore@baselineskip%
+\newskip\gre@saved@prescore@lineskiplimit%
%% The following macros cancel some useless penalties, and reinstates them
%% at the end of a score
\def\gre@cancelpenalties{%
\gre@trace{gre@cancelpenalties}%
- \global\gre@hyphenpenaltysave=\hyphenpenalty\relax %
- \global\gre@exhyphenpenaltysave=\exhyphenpenalty\relax %
- \global\gre@doublehyphendemeritssave=\doublehyphendemerits\relax %
- \global\gre@finalhyphendemeritssave=\finalhyphendemerits\relax %
- \global\gre@brokenpenaltysave=\brokenpenalty\relax %
- \global\gre@loosenesssave=\looseness\relax %
- \global\gre@tolerancesave=\tolerance\relax %
- \global\gre@pretolerancesave=\pretolerance\relax %
- \global\gre@emergencystretchsave=\emergencystretch\relax %
- \global\gre@widowpenaltysave=\widowpenalty\relax %
- \global\gre@clubpenaltysave=\clubpenalty\relax %
- %
- \global\gre@saved@parskip=\parskip%
- \global\gre@saved@lineskip=\lineskip%
- \global\gre@saved@baselineskip=\baselineskip%
- \global\gre@saved@lineskiplimit=\lineskiplimit%
+ \global\gre@saved@prescore@hyphenpenalty=\hyphenpenalty\relax %
\hyphenpenalty=\gre@space@count@hyphenpenalty %
+ %
+ \global\gre@saved@prescore@exhyphenpenalty=\exhyphenpenalty\relax %
\exhyphenpenalty=\gre@space@count@hyphenpenalty %
+ %
+ \global\gre@saved@prescore@exhyphenchar=\exhyphenchar\relax %
+ \exhyphenchar=-1\relax%
+ %
+ \global\gre@saved@prescore@doublehyphendemerits=\doublehyphendemerits\relax %
\doublehyphendemerits=0\relax %
+ %
+ \global\gre@saved@prescore@finalhyphendemerits=\finalhyphendemerits\relax %
\finalhyphendemerits=0\relax %
+ %
+ \global\gre@saved@prescore@brokenpenalty=\brokenpenalty\relax %
\brokenpenalty=\gre@space@count@brokenpenalty %
+ %
+ \global\gre@saved@prescore@looseness=\looseness\relax %
\looseness=\gre@space@count@looseness %
+ %
+ \global\gre@saved@prescore@tolerance=\tolerance\relax %
\tolerance=\gre@space@count@tolerance %
+ %
+ \global\gre@saved@prescore@pretolerance=\pretolerance\relax %
\pretolerance=\gre@space@count@pretolerance %
+ %
+ \global\gre@saved@prescore@emergencystretch=\emergencystretch\relax %
\emergencystretch=\gre@space@skip@emergencystretch\relax %
+ %
+ \global\gre@saved@prescore@widowpenalty=\widowpenalty\relax %
\widowpenalty=\gre@space@count@widowpenalty %
+ %
+ \global\gre@saved@prescore@clubpenalty=\clubpenalty\relax %
\clubpenalty=\gre@space@count@clubpenalty %
+ %
+ \global\gre@saved@prescore@parskip=\parskip%
\parskip=\gre@space@skip@parskip%
+ %
+ \global\gre@saved@prescore@lineskip=\lineskip%
\lineskip=\gre@space@skip@lineskip%
+ %
+ \global\gre@saved@prescore@baselineskip=\baselineskip%
\baselineskip=\gre@space@skip@baselineskip%
+ %
+ \global\gre@saved@prescore@lineskiplimit=\lineskiplimit%
\lineskiplimit=\gre@space@skip@lineskiplimit%
\gre@trace@end%
}%
\def\gre@restorepenalties{%
\gre@trace{gre@restorepenalties}%
- \hyphenpenalty=\gre@hyphenpenaltysave %
- \exhyphenpenalty=\gre@exhyphenpenaltysave %
- \doublehyphendemerits=\gre@doublehyphendemeritssave %
- \finalhyphendemerits=\gre@finalhyphendemeritssave %
- \brokenpenalty=\gre@brokenpenaltysave %
- \looseness=\gre@loosenesssave %
- \tolerance=\gre@tolerancesave %
- \pretolerance=\gre@pretolerancesave %
- \emergencystretch=\gre@emergencystretchsave %
- \widowpenalty=\gre@widowpenaltysave %
- \clubpenalty=\gre@clubpenaltysave %
- \parskip=\gre@saved@parskip%
- \lineskip=\gre@saved@lineskip%
- \baselineskip=\gre@saved@baselineskip%
- \lineskiplimit=\gre@saved@lineskiplimit%
+ \hyphenpenalty=\gre@saved@prescore@hyphenpenalty %
+ \exhyphenpenalty=\gre@saved@prescore@exhyphenpenalty %
+ \exhyphenchar=\gre@saved@prescore@exhyphenchar %
+ \doublehyphendemerits=\gre@saved@prescore@doublehyphendemerits %
+ \finalhyphendemerits=\gre@saved@prescore@finalhyphendemerits %
+ \brokenpenalty=\gre@saved@prescore@brokenpenalty %
+ \looseness=\gre@saved@prescore@looseness %
+ \tolerance=\gre@saved@prescore@tolerance %
+ \pretolerance=\gre@saved@prescore@pretolerance %
+ \emergencystretch=\gre@saved@prescore@emergencystretch %
+ \widowpenalty=\gre@saved@prescore@widowpenalty %
+ \clubpenalty=\gre@saved@prescore@clubpenalty %
+ \parskip=\gre@saved@prescore@parskip%
+ \lineskip=\gre@saved@prescore@lineskip%
+ \baselineskip=\gre@saved@prescore@baselineskip%
+ \lineskiplimit=\gre@saved@prescore@lineskiplimit%
\gre@trace@end%
}%
@@ -114,7 +132,7 @@
%% macros for the typesetting of spaces
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Independent default distances are defined in gsp-default.tex. The distances defined here are calculated from those distances.
+% Independent default distances are defined in gregoriotex-gsp-default.tex. The distances defined here are calculated from those distances.
%%%%%%%%%%%%%%%%%
%% Global distances
@@ -148,35 +166,29 @@
% Messing with the staff line thickness directly is messy, so we provide the following interface to make life easier on the user:
% stafflineheight is the height of a staff line
-% = 1500 * stafflinefactor
+% = gre@dimen@stafflinethicknessbase * stafflinefactor
\newdimen\gre@dimen@stafflineheight\relax%
\def\gre@calculate@stafflineheight{%
\gre@trace{gre@calculate@stafflineheight}%
- \global\gre@dimen@stafflineheight=\dimexpr(1500 sp * \gre@stafflinefactor)\relax %
+ \global\gre@dimen@stafflineheight=\dimexpr(\gre@dimen@stafflinethicknessbase * \gre@stafflinefactor)\relax %
\gre@trace@end%
}%
% interstafflinespace is the space between two lines of staff
-% = (30000 - (stafflineheight/gre@factor - 1500)) * gre@factor = 31500 * gre@factor - stafflineheight
+% = (gre@dimen@interstafflinedistancebase + gre@dimen@stafflinethicknessbase) * gre@factor - gre@dimen@stafflinethicknessbase * gre@stafflinefactor
\newdimen\gre@dimen@interstafflinespace\relax%
\def\gre@calculate@interstafflinespace{%
\gre@trace{gre@calculate@interstafflinespace}%
- \global\gre@dimen@interstafflinespace=\dimexpr((31500sp * \gre@factor) %
- - \gre@dimen@stafflineheight)\relax%
+ \global\gre@dimen@interstafflinespace=\dimexpr((\gre@dimen@interstafflinedistancebase + \gre@dimen@stafflinethicknessbase) * \gre@factor - \gre@dimen@stafflinethicknessbase * \gre@stafflinefactor)\relax%
\gre@trace@end%
}%
% a distance to help place glyphs when the lines are not their default thickness
-% = (stafflineheight/gre@factor - 1500sp)/2 * gre@factor
+% = gre@dimen@stafflinethicknessbase * (gre@stafflinefactor - gre@factor) / 2
\newdimen\gre@dimen@stafflinediff\relax%
\def\gre@calculate@stafflinediff{%
\gre@trace{gre@calculate@stafflinediff}%
- \global\gre@dimen@stafflinediff = \dimexpr(%
- ( ( ( \gre@dimen@stafflineheight %
- / \gre@factor)%
- - 1500sp)%
- / 2)%
- * \gre@factor)\relax%
+ \global\gre@dimen@stafflinediff = \dimexpr( \gre@dimen@stafflinethicknessbase * (\gre@stafflinefactor - \gre@factor) / 2 )\relax%
\gre@trace@end%
}%
@@ -187,7 +199,7 @@
\newif\ifgre@scale@stafflinefactor%
\gre@scale@stafflinefactortrue
-% a macro for setting the thickness of the staff lines. This changes the stafflinefactor and then adjusts the spaces that are affected by the thicker staff lines.
+% a macro for setting the thickness of the staff lines. The changes to stafflinefactor will be automatically picked up when the staff lines are redrawn
\def\grechangestafflinethickness#1{%
\xdef\gre@stafflinefactor{#1}%
\relax %
@@ -199,7 +211,7 @@
% to calculate that, we take the bottom of the third line : it is at 200 in the fonts, and it must be at grespacelinestext + grespacebeneathtext + 2*greinterstafflinespace + 2*grestafflineheight + translationheight
\def\gre@calculate@constantglyphraise{%
\gre@trace{gre@calculate@constantglyphraise}%
- \global\gre@dimen@constantglyphraise = \dimexpr((-22000 sp * \gre@factor) %
+ \global\gre@dimen@constantglyphraise = \dimexpr((\gre@dimen@glyphraisebase * \gre@factor) %
+ \gre@dimen@additionalbottomspace %
+ \gre@space@dimen@spacebeneathtext %
+ \gre@space@dimen@spacelinestext %
@@ -563,10 +575,9 @@
\hbox to \gre@dimen@temp@four{#2\hss}%
}%
-\def\gresethyphenprotrusion#1{% DEPRECATED for removal in 5.1
- \gre@deprecated{\protect\gresethyphenprotrusion{percentage}}{\protect\gresetprotrusionfactor{eolhyphen}{factor}}% DEPRECATED for removal in 5.1
- \gresetprotrusionfactor{eolhyphen}{\directlua{tex.print(string.format(string.char(37)..'g', #1 / 100.0))}}% DEPRECATED for removal in 5.1
-}% DEPRECATED for removal in 5.1
+\def\gresethyphenprotrusion#1{% OBSOLETE
+ \gre@obsolete{\protect\gresethyphenprotrusion{percentage}}{\protect\gresetprotrusionfactor{eolhyphen}{factor}}% OBSOLETE
+}% OBSOLETE
% dimen keeping the shift computed with next function
\newdimen\gre@dimen@eolshift
@@ -794,7 +805,7 @@
\fi%
\fi%
\global\advance\gre@count@temp@three by -8 %
- \global\gre@dimen@glyphraisevalue = \dimexpr(15750 sp * \gre@factor * \gre@count@temp@three)\relax %
+ \global\gre@dimen@glyphraisevalue = \dimexpr(((\gre@dimen@interstafflinedistancebase + \gre@dimen@stafflinethicknessbase) / 2 ) * \gre@factor * \gre@count@temp@three)\relax %
\ifcase#2 %
\or\or\or%3: if it is a vertical episema on a line, we shift it a bit higher, so that it's more beautiful
\ifgre@isonaline%
@@ -898,16 +909,6 @@
% the one taken into account for above lines nabc height
\newdimen\gre@dimen@additionaltopspacenabc\relax%
-% backup demensions for the previous
-\newdimen\gre@saved@dimen@additionalbottomspace\relax%
-\newdimen\gre@saved@dimen@additionaltopspace\relax%
-\newdimen\gre@saved@dimen@additionaltopspacealt\relax%
-\newdimen\gre@saved@dimen@additionaltopspacenabc\relax%
-\newdimen\gre@saved@dimen@currenttranslationheight\relax%
-\newdimen\gre@saved@dimen@textlower\relax%
-\newdimen\gre@saved@dimen@currentabovelinestextheight\relax%
-\newdimen\gre@saved@dimen@constantglyphraise\relax%
-
\newcount\gre@space@count@additionaltopspacethreshold\relax%
\gre@space@count@additionaltopspacethreshold=2
@@ -939,29 +940,40 @@
\gre@trace@end%
}%
+% some backup demensions for use around discretionaries
+\newdimen\gre@saved@prediscretionary@dimen@additionalbottomspace\relax%
+\newdimen\gre@saved@prediscretionary@dimen@additionaltopspace\relax%
+\newdimen\gre@saved@prediscretionary@dimen@additionaltopspacealt\relax%
+\newdimen\gre@saved@prediscretionary@dimen@additionaltopspacenabc\relax%
+\newdimen\gre@saved@prediscretionary@dimen@currenttranslationheight\relax%
+\newdimen\gre@saved@prediscretionary@dimen@textlower\relax%
+\newdimen\gre@saved@prediscretionary@dimen@currentabovelinestextheight\relax%
+\newdimen\gre@saved@prediscretionary@dimen@constantglyphraise\relax%
+
+
\def\gre@save@additionalspaces{%
\gre@trace{gre@save@additionalspaces}%
- \global\gre@saved@dimen@additionalbottomspace=\gre@dimen@additionalbottomspace\relax%
- \global\gre@saved@dimen@additionaltopspace=\gre@dimen@additionaltopspace\relax%
- \global\gre@saved@dimen@additionaltopspacealt=\gre@dimen@additionaltopspacealt\relax%
- \global\gre@saved@dimen@additionaltopspacenabc=\gre@dimen@additionaltopspacenabc\relax%
- \global\gre@saved@dimen@currenttranslationheight=\gre@dimen@currenttranslationheight\relax%
- \global\gre@saved@dimen@textlower=\gre@dimen@textlower\relax%
- \global\gre@saved@dimen@currentabovelinestextheight=\gre@dimen@currentabovelinestextheight\relax%
- \global\gre@saved@dimen@constantglyphraise=\gre@dimen@constantglyphraise\relax%
+ \global\gre@saved@prediscretionary@dimen@additionalbottomspace=\gre@dimen@additionalbottomspace\relax%
+ \global\gre@saved@prediscretionary@dimen@additionaltopspace=\gre@dimen@additionaltopspace\relax%
+ \global\gre@saved@prediscretionary@dimen@additionaltopspacealt=\gre@dimen@additionaltopspacealt\relax%
+ \global\gre@saved@prediscretionary@dimen@additionaltopspacenabc=\gre@dimen@additionaltopspacenabc\relax%
+ \global\gre@saved@prediscretionary@dimen@currenttranslationheight=\gre@dimen@currenttranslationheight\relax%
+ \global\gre@saved@prediscretionary@dimen@textlower=\gre@dimen@textlower\relax%
+ \global\gre@saved@prediscretionary@dimen@currentabovelinestextheight=\gre@dimen@currentabovelinestextheight\relax%
+ \global\gre@saved@prediscretionary@dimen@constantglyphraise=\gre@dimen@constantglyphraise\relax%
\gre@trace@end%
}%
\def\gre@restore@additionalspaces{%
\gre@trace{gre@restore@additionalspaces}%
- \global\gre@dimen@additionalbottomspace=\gre@saved@dimen@additionalbottomspace\relax%
- \global\gre@dimen@additionaltopspace=\gre@saved@dimen@additionaltopspace\relax%
- \global\gre@dimen@additionaltopspacealt=\gre@saved@dimen@additionaltopspacealt\relax%
- \global\gre@dimen@additionaltopspacenabc=\gre@saved@dimen@additionaltopspacenabc\relax%
- \global\gre@dimen@currenttranslationheight=\gre@saved@dimen@currenttranslationheight\relax%
- \global\gre@dimen@textlower=\gre@saved@dimen@textlower\relax%
- \global\gre@dimen@currentabovelinestextheight=\gre@saved@dimen@currentabovelinestextheight\relax%
- \global\gre@dimen@constantglyphraise=\gre@saved@dimen@constantglyphraise\relax%
+ \global\gre@dimen@additionalbottomspace=\gre@saved@prediscretionary@dimen@additionalbottomspace\relax%
+ \global\gre@dimen@additionaltopspace=\gre@saved@prediscretionary@dimen@additionaltopspace\relax%
+ \global\gre@dimen@additionaltopspacealt=\gre@saved@prediscretionary@dimen@additionaltopspacealt\relax%
+ \global\gre@dimen@additionaltopspacenabc=\gre@saved@prediscretionary@dimen@additionaltopspacenabc\relax%
+ \global\gre@dimen@currenttranslationheight=\gre@saved@prediscretionary@dimen@currenttranslationheight\relax%
+ \global\gre@dimen@textlower=\gre@saved@prediscretionary@dimen@textlower\relax%
+ \global\gre@dimen@currentabovelinestextheight=\gre@saved@prediscretionary@dimen@currentabovelinestextheight\relax%
+ \global\gre@dimen@constantglyphraise=\gre@saved@prediscretionary@dimen@constantglyphraise\relax%
\gre@trace@end%
}%
@@ -977,28 +989,32 @@
\gre@num@max{#1}{\gre@pitch@cleftop}%
\gre@count@temp@one=\numexpr(\gre@count@temp@one - \gre@pitch@adjust@top - \gre@space@count@additionaltopspacethreshold)\relax %
\ifnum\gre@count@temp@one>0\relax %
- \global\gre@dimen@additionaltopspace=\dimexpr(15750 sp * \gre@count@temp@one * \gre@factor)\relax %
+ \global\gre@dimen@additionaltopspace=\dimexpr(((\gre@dimen@interstafflinedistancebase + \gre@dimen@stafflinethicknessbase) / 2 ) * \gre@count@temp@one * \gre@factor)\relax %
\else %
\global\gre@dimen@additionaltopspace=0 sp%
\fi %
\gre@num@max{#1}{\gre@pitch@cleftop}%
\gre@count@temp@one=\numexpr(\gre@count@temp@one - \gre@pitch@adjust@top - \gre@space@count@additionaltopspacealtthreshold)\relax %
\ifnum\gre@count@temp@one>0\relax %
- \global\gre@dimen@additionaltopspacealt=\dimexpr(15750 sp * \gre@count@temp@one * \gre@factor)\relax %
+ \global\gre@dimen@additionaltopspacealt=\dimexpr(((\gre@dimen@interstafflinedistancebase + \gre@dimen@stafflinethicknessbase) / 2 ) * \gre@count@temp@one * \gre@factor)\relax %
\else %
\global\gre@dimen@additionaltopspacealt=0 sp%
\fi %
\gre@num@max{#1}{\gre@pitch@cleftop}%
\gre@count@temp@one=\numexpr(\gre@count@temp@one - \gre@pitch@adjust@top - \gre@space@count@additionaltopspacenabcthreshold)\relax %
\ifnum\gre@count@temp@one>0\relax %
- \global\gre@dimen@additionaltopspacenabc=\dimexpr(15750 sp * \gre@count@temp@one * \gre@factor)\relax %
+ \global\gre@dimen@additionaltopspacenabc=\dimexpr(((\gre@dimen@interstafflinedistancebase + \gre@dimen@stafflinethicknessbase) / 2 ) * \gre@count@temp@one * \gre@factor)\relax %
\else %
\global\gre@dimen@additionaltopspacenabc=0 sp%
\fi %
\gre@num@min{#2}{\gre@pitch@clefbottom}%
\gre@count@temp@one=\numexpr(\gre@pitch@adjust@bottom - \gre@count@temp@one)\relax %
\ifnum\gre@count@temp@one>0\relax %
- \global\gre@dimen@additionalbottomspace=\dimexpr(\gre@space@dimen@noteadditionalspacelinestext * \gre@count@temp@one)\relax %
+ \ifgre@noteadditionalspacelinestext%
+ \global\gre@dimen@additionalbottomspace=\dimexpr(\gre@space@dimen@noteadditionalspacelinestext * \gre@count@temp@one)\relax%
+ \else%
+ \global\gre@dimen@additionalbottomspace=\dimexpr(((\gre@dimen@interstafflinedistancebase + \gre@dimen@stafflinethicknessbase) / 2 ) * \gre@factor * \gre@count@temp@one)\relax%
+ \fi%
\else %
\global\gre@dimen@additionalbottomspace=0 sp%
\fi %
@@ -1028,7 +1044,7 @@
\def\gre@calculate@textaligncenter#1#2#3#4{%
\gre@trace{gre@calculate@textaligncenter{#1}{#2}{#3}{#4}}%
\ifnum#4=0\relax%
- \gre@widthof{\gre@save@fixedtextformat{#1}\gre@fixedtextformat{#2#3}}%
+ \gre@widthof{\gre@saved@syllable@fixedtextformat{#1}\gre@fixedtextformat{#2#3}}%
\else %
\gre@widthof{\gre@fixedtextformat{#1}\gre@fixednexttextformat{#2#3}}%
\fi %
@@ -1100,8 +1116,9 @@
%% 3 : the middle letters of the next syllable
%% 4 : the end letters of the next syllable
%% 5 : the type of notes alignment
-\def\gre@calculate@nextbegindifference#1#2#3#4#5{%
- \gre@trace{gre@calculate@nextbegindifference{#1}{#2}{#3}{#4}{#5}}%
+%% 6 : alteration type (see gre@calculate@nextnotesaligncenter)
+\def\gre@calculate@nextbegindifference#1#2#3#4#5#6{%
+ \gre@trace{gre@calculate@nextbegindifference{#1}{#2}{#3}{#4}{#5}{#6}}%
\ifnum\gre@lastoflinecount=1\relax %
\global\gre@skip@nextbegindifference=0pt\relax%
\else %
@@ -1112,7 +1129,7 @@
\global\gre@skip@nextbegindifference=-\gre@dimen@textaligncenter\relax%
% caution: calculate@nextnotesaligncenter needs a properly set \gre@dimen@textaligncenter
% (corresponding to the text align center of the next syllable)
- \gre@calculate@nextnotesaligncenter{#5}% idem
+ \gre@calculate@nextnotesaligncenter{#5}{#6}% idem
\global\advance\gre@skip@nextbegindifference by \the\gre@dimen@notesaligncenter\relax%
\global\gre@dimen@textaligncenter=\gre@dimen@temp@two %
\global\gre@dimen@notesaligncenter=\gre@dimen@temp@four %
@@ -1176,7 +1193,7 @@
%
%In the new algorithm the bar and the text are set independently of each other based purely on the positions of the corresponding element in the previous and next syllable
% #1 is #4 from \GreBarSyllable (1 if bar is end of word, 0 if not)
-% #2 is #7 from \GreBarSyllable (alignment type of first next glyph)
+% #2 is #7:2 from \GreBarSyllable (alteration type of first next glyph)
\def\gre@calculate@barposition#1#2{%
\gre@trace{gre@calculate@barposition{#1}{#2}}%
% we start by finding the distance between the text and notes of the previous and the next syllable (as if this syllable didn't exist, for the moment)
@@ -1384,7 +1401,7 @@
\global\gre@skip@adjustednextbegindifference=\gre@skip@nextbegindifference %
% gre@skip@alterationshift is 0 or the punctum mora shift
\global\gre@skip@alterationshift=0pt\relax %
- \ifnum#1>19\ifnum\gre@insidediscretionary=0\relax % next is a flat, we're not in a clef change
+ \ifnum#1>0\ifnum\gre@insidediscretionary=0\relax % next is a flat, we're not in a clef change
\advance\gre@skip@adjustednextbegindifference by -\gre@space@dimen@alterationadjustmentbar %
\global\gre@skip@alterationshift=\gre@space@dimen@alterationadjustmentbar\relax %
\gre@debugmsg{barspacing}{adjustment for alteration: \gre@space@dimen@alterationadjustmentbar}%
@@ -1548,7 +1565,7 @@
%% This macro creates one dim (#1), setting its value to #2 and sets whether it should scale when the \gre@factor changes (#3, scalable or fixed). Checks that #1 can accept the kind of distance given in #2.
%% Note: the distances created by this function are stored as strings, not skip or dimension registers. This allows the user to specify a distance in em or ex units even though the font parameters may not be the same at the time the distance is specified and the time the distance is used.
\newif\ifgre@checklength%
-\def\grecreatedim#1#2#3{%
+\def\gre@createdim#1#2#3{%
\csname newif\expandafter\endcsname\csname ifgre@scale@#1\endcsname%
\IfStrEqCase{#3}{%
{scalable}%
@@ -1558,7 +1575,7 @@
{inherited}%
{\grescaledim{#1}{false}}%
}[% all other cases
- \gre@error{Unrecognized option "#3" for \protect\grecreatedim\MessageBreak Possible options are: 'scalable' and 'fixed'}%
+ \gre@error{Unrecognized option "#3" for \protect\gre@createdim\MessageBreak Possible options are: 'scalable' and 'fixed' and 'inherited'}%
]%
\gre@dimension{#1}{#2}{#3}%
}%
@@ -1599,31 +1616,16 @@
% all other cases
}[\gre@error{Unrecognized option "#3" for \protect\grechangedim\MessageBreak Possible options are: 'scalable', 'fixed', and 'inherited'}]%
\gre@dimension{#1}{#2}{#3}%
+ %If we are calling grechangedim from a space configuration file (greconffactor is not 0)
+ % and the space configuration file is designed for a \gre@factor other than the current
+ % one, then we need to rescale the distance being changed.
+ \ifnum\greconffactor=0\else%
+ \ifnum\the\gre@factor=\greconffactor\else%
+ \gre@changeonedimenfactor{#1}{\greconffactor}{\gre@factor} %
+ \fi%
+ \fi%
\else%
- \IfStrEqCase{#1}{% OBSOLETE
- {spacearoundsmallbars}% OBSOLETE
- {% OBSOLETE
- \gre@obsolete{spacearoundsmallbars}{bar@virgula or bar@minima}% OBSOLETE
- }% OBSOLETE
- {spacearoundminor}% OBSOLETE
- {% OBSOLETE
- \gre@obsolete{spacearoundminor}{bar@minor}% OBSOLETE
- }% OBSOLETE
- {spacearoundmaior}% OBSOLETE
- {% OBSOLETE
- \gre@obsolete{spacearoundmaior}{bar@maior}% OBSOLETE
- }% OBSOLETE
- {spacearoundfinalis}% OBSOLETE
- {% OBSOLETE
- \gre@obsolete{spacearoundfinalis}{bar@finalis}% OBSOLETE
- }% OBSOLETE
- {spacebeforefinalfinalis}% OBSOLETE
- {% OBSOLETE
- \gre@obsolete{spacebeforfinalfinalis}{bar@finalfinalis}% OBSOLETE
- }% OBSOLETE
- }[% OBSOLETE
- \gre@error{#1 is not a recognized distance.}% keep this line
- ]% OBSOLETE
+ \gre@error{#1 is not a recognized distance.}%
\fi%
}%
@@ -1802,13 +1804,24 @@
\newcount\greconffactor%
\def\greloadspaceconf#1{%
- \input gsp-#1.tex\relax %
- \ifnum\greconffactor=0\relax%
- \gre@error{gsp-#1.tex does not have an assigned staff size.\MessageBreak Please edit it to define \protect\greconffactor}%
- \fi %
- \ifnum\the\gre@factor=\greconffactor\else %If the space configuration file is designed for a \gre@factor other than the current one, then we need to rescale the distances.
- \gre@changedimenfactor{\greconffactor}{\gre@factor} %
- \fi%
+ \IfStrEq{#1}{default}{% load default spacings
+ \ifx\@onlypreamble\@notprerr%
+ \gre@debugmsg{preamble}{Not in preamble}%
+ \makeatletter%
+ \else%
+ \gre@debugmsg{preamble}{In preamble}%
+ \fi%
+ \input gregoriotex-gsp-default.tex%
+ \gre@changedimenfactor{\greconffactor}{\gre@factor}%
+ \ifx\@onlypreamble\@notprerr%
+ \makeatother%
+ \fi%
+ }{% load a custom spacing
+ \input gsp-#1.tex\relax %
+ \ifnum\greconffactor=0\relax%
+ \gre@error{gsp-#1.tex does not have an assigned staff size.\MessageBreak Please edit it to define \protect\greconffactor}%
+ \fi %
+ }
\greconffactor=0%
\relax %
}%
@@ -1896,11 +1909,13 @@
% Math
\gre@rubberpermit{#1}%
\ifgre@rubber%
+ \gre@debugmsg{gsp}{scaling a rubber}%
% if we have a rubber allowed length we create a temporary skip
\let\gre@scaledist\gre@skip@temp@one%
\edef\gre@convert{\csname gre@space@skip@#1\endcsname}%
\gre@scaledist=\glueexpr(\gre@convert * \number#3 / \number#2)\relax %
\else%
+ \gre@debugmsg{gsp}{scaling a fixed distance}%
% otherwise we create a temporary dimen
\let\gre@scaledist\gre@dimen@temp@one%
\edef\gre@convert{\csname gre@space@dimen@#1\endcsname}%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-syllable.tex b/support/gregoriotex/tex/luatex/gregoriotex-syllable.tex
index 137a6f901f..afff36cd64 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-syllable.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-syllable.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -19,7 +19,7 @@
% this file contains definitions of the glyphs and the syllables
-\gre@declarefileversion{gregoriotex-syllable.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-syllable.tex}{6.0.0-beta1}% GREGORIO_VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for the typesetting of the different glyphs
@@ -180,77 +180,54 @@
% this function is quite simple, it just sets \gre@box@temp@width with a box of the good width, watch the next function for the complete thing
% we define the different alignments possible, of course they depend on the font
% the first 10 (0-9) possible values are the same as in glyph
-%% 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
-%% 1: two notes glyph (podatus is considered as a one-note glyph) : here we put the aligncenter in the middle of the glyph
-%% 2: porrectus : has a special align center
-%% 3: initio-debilis : same as 1 but the first note is much smaller
-%% 4: case of a glyph starting with a quilisma
-%% 5: case of a glyph starting with an oriscus
-%% 6: case of a punctum inclinatum
-%% 7: case of a stropha
-%% 8: flexus with an ambitus of one
-%% 9: flexus deminutus
-%% 10: virgula
-%% 11: divisio minima
-%% 12: divisio minor
-%% 13: divisio maior
-%% 14: dominican bar
-%% 15 : divisio finalis
-%% 16 : no note
+% see the cases below
% there is a tricky here : if notesaligncenter is not 0, it means that there is a flat before, so we simply add notes aligncenter
% #2 is 0 if we are in the context of current syllable, 1 if we are in the context of next syllable
\def\gre@calculate@simplenotesaligncenter#1#2{%
\gre@trace{gre@calculate@simplenotesaligncenter{#1}{#2}}%
- \ifcase#1%
- %case of punctum
+ \ifcase#1% 0: punctum
+ % one-note glyph or more than two notes glyph except porrectus : here
+ % we must put the aligncenter in the middle of the first note
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctum}%
- \or%
- %case of flexus
+ \or% 1: flexus
+ % two notes glyph (podatus is considered as a one-note glyph) : here
+ % we put the aligncenter in the middle of the glyph
\gre@handleclivisspecialalignment{\gre@font@music\GreCPPesQuadratumLongqueueThreeNothing}{\gre@font@music\GreCPPunctum}{#2}%
- \or%
- %case of porrectus (we consider it to have the same alignment as punctum)
+ \or% 2: porrectus
+ % we consider it to have the same alignment as punctum
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctum}%
- \or%
- %case of a initio debilis
+ \or% 3: initio debilis
+ % same as 1 but the first note is much smaller
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctumDeminutus}%
- \or %
- %case of a quilisma
+ \or% 4: glyph starting with a quilisma
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPQuilisma}%
- \or %
- %case of an oriscus
+ \or% 5: glyph starting with an oriscus
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPAscendensOriscus}%
- \or %
- %case of a punctum inclinatum
+ \or% 6: punctum inclinatum
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDescendensPunctumInclinatum}%
- \or %
- %case of a stropha
+ \or% 7: stropha
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPStropha}%
- \or %
- % case of flexus with ambitus of one
+ \or% 8: flexus with ambitus of one
\gre@handleclivisspecialalignment{\gre@font@music\GreCPPesQuadratumLongqueueOneNothing}{\gre@font@music\GreCPPunctum}{#2}%
- \or %
- % case of flexus deminutus
+ \or% 9: flexus deminutus
\gre@handleclivisspecialalignment{\gre@font@music\GreCPFlexusTwoDeminutus}{\gre@font@music\GreCPPunctum}{#2}%
- \or %
- % case of virgula
+ \or% 10: virgula
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@virgula}%
- \or %
- % case of divisio minima
+ \or% 11: divisio minima
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@divisiominima}%
- \or %
- % case of divisio minor
+ \or% 12: divisio minor
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@divisiominor}%
- \or %
- % case of divisio maior
+ \or% 13: divisio maior
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@divisiomaior}%
- \or %
- % case of dominican bar
+ \or% 14: dominican bar
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
- \or %
- % case of divisiofinalis
+ \or% 15: parenthesized virgula
+ \global\setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@virgulaparen}%
+ \or% 16: parenthesized divisio minima
+ \global\setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@char@bar@divisiominimaparen}%
+ \or% 17: divisio finalis
\global\setbox\gre@box@temp@width=\hbox{\gre@fontchar@divisiofinalis}%
- \or %
- % case of no note
+ \or% 18: no note
\ifgre@newbarspacing%
\global\setbox\gre@box@temp@width=\hbox{}%
\else%
@@ -326,36 +303,33 @@
\gre@trace@end%
}%
-% this is the function that we call when we try to determine the next aligncenter of the notes. In this case we call this function with normal arguments if there is no flat nor natural ; we call it with argument + 20 if there is a flat and argument + 40 if there is a natural, +60 with a sharp
-\def\gre@calculate@nextnotesaligncenter#1{%
- \gre@trace{gre@calculate@nextnotesaligncenter{#1}}%
- \ifnum#1<20\relax %
- \gre@calculate@simplenotesaligncenter{#1}{1}%
- \gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@width / 2)\relax %
- \global\gre@dimen@notesaligncenter=\gre@dimen@temp@five %
- \else %\ifnum#1<20
- \gre@count@temp@three=#1 %
- \ifnum#1<40\relax%
- \advance\gre@count@temp@three by -20\relax %
- \gre@calculate@simplenotesaligncenter{\gre@count@temp@three}{1}%
- \gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@width / 2)\relax %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@flat}%
- \else%\ifnum#1<40
- \ifnum#1<60\relax%
- \advance\gre@count@temp@three by -40\relax %
- \gre@calculate@simplenotesaligncenter{\gre@count@temp@three}{1}%
- \gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@width / 2)\relax %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@natural}%
- \else%\ifnum#1<60
- \advance\gre@count@temp@three by -60\relax %
- \gre@calculate@simplenotesaligncenter{\gre@count@temp@three}{1}%
- \gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@width / 2)\relax %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@sharp}%
- \fi%
- \fi %
+% this is the function that we call when we try to determine the next aligncenter of the notes.
+% #1 is the note type
+% #2 is the alteration style : 0 = none, 1 = flat, 2 = natural, 3 = sharp,
+% 4 = parenthesized flat, 5 = parenthesized natural,
+% 6 = parenthesized flat
+\def\gre@calculate@nextnotesaligncenter#1#2{%
+ \gre@trace{gre@calculate@nextnotesaligncenter{#1}{#2}}%
+ \gre@calculate@simplenotesaligncenter{#1}{1}%
+ \gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@width / 2)\relax %
+ \ifcase#2\relax% 0 - none
+ \or % 1 - flat
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@flat}%
+ \or % 2 - natural
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@natural}%
+ \or % 3 - sharp
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@sharp}%
+ \or % 4 - parenthesized flat
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@flatparen}%
+ \or % 5 - parenthesized natural
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@naturalparen}%
+ \or % 6 - parenthesized sharp
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@sharpparen}%
+ \fi %
+ \ifnum#2>0\relax %
\advance\gre@dimen@temp@five by \dimexpr(\wd\gre@box@temp@width+\gre@space@dimen@alterationspace)\relax %
- \global\gre@dimen@notesaligncenter=\gre@dimen@temp@five %
\fi %
+ \global\gre@dimen@notesaligncenter=\gre@dimen@temp@five %
\relax %
\gre@trace@end%
}%
@@ -397,8 +371,8 @@
\global\gre@count@lastglyphiscavum=0\relax %
\global\gre@firstglyphtrue%
\global\gre@boxingtrue%
- \let\ifgre@lastendswithmorasave\ifgre@lastendswithmora%
- \xdef\gre@savedlastoflinecount{\number\gre@lastoflinecount\relax }%
+ \let\ifgre@saved@prenotes@lastendswithmora\ifgre@lastendswithmora%
+ \xdef\gre@saved@prenotes@lastoflinecount{\number\gre@lastoflinecount\relax }%
\ifgre@shownotes%
\setbox\gre@box@syllablenotes=\hbox{#1}%
\else%
@@ -406,7 +380,6 @@
\fi%
\gre@debugmsg{spacing}{Width of notes: \the\wd\gre@box@syllablenotes}%
\global\gre@boxingfalse%
- \global\gre@lastoflinecount=\gre@savedlastoflinecount\relax %
\global\gre@firstglyphtrue%
% now gre@lastendswithmora is true if this syllable ends with a
% punctum mora, but we still want to keep gre@lastendswithmora if we
@@ -419,7 +392,8 @@
\else %
\gre@thisendswithmorafalse %
\fi %
- \let\ifgre@lastendswithmora\ifgre@lastendswithmorasave %
+ \let\ifgre@lastendswithmora\ifgre@saved@prenotes@lastendswithmora%
+ \global\gre@lastoflinecount=\gre@saved@prenotes@lastoflinecount\relax %
\global\gre@count@lastglyphiscavum=0\relax %
\global\gre@skip@bar@lastskip=0pt\relax %
\global\gre@endofscorefalse %
@@ -773,18 +747,18 @@
\gre@trace@end%
}%
-\let\gre@save@endsyllablepart\gre@nothing\relax %
-\let\gre@save@fixedtextformat\gre@textnormal\relax %
-\let\gre@save@pointandclick\gre@nothing\relax %
+\let\gre@saved@syllable@endsyllablepart\gre@nothing\relax %
+\let\gre@saved@syllable@fixedtextformat\gre@textnormal\relax %
+\let\gre@saved@syllable@pointandclick\gre@nothing\relax %
\def\gre@push@endsyllable#1{%
\gre@trace{gre@push@endsyllable{#1}}%
- \let\gre@save@endsyllablepart\gre@nothing\relax %
- \let\gre@save@fixedtextformat\gre@textnormal\relax %
- \let\gre@save@pointandclick\gre@nothing\relax %
+ \let\gre@saved@syllable@endsyllablepart\gre@nothing\relax %
+ \let\gre@saved@syllable@fixedtextformat\gre@textnormal\relax %
+ \let\gre@saved@syllable@pointandclick\gre@nothing\relax %
\gre@if@rewritesyllable{%
- \let\gre@save@endsyllablepart\gre@endsyllablepart\relax %
- \let\gre@save@fixedtextformat\gre@fixedtextformat\relax %
- \xdef\gre@save@pointandclick{#1}%
+ \let\gre@saved@syllable@endsyllablepart\gre@endsyllablepart\relax %
+ \let\gre@saved@syllable@fixedtextformat\gre@fixedtextformat\relax %
+ \xdef\gre@saved@syllable@pointandclick{#1}%
}{}%
\relax %
\gre@trace@end%
@@ -792,15 +766,15 @@
\def\gre@emit@syllabletext#1{%
\gre@trace{gre@emit@syllabletext{#1}}%
- \ifx\gre@save@endsyllablepart\gre@nothing %
+ \ifx\gre@saved@syllable@endsyllablepart\gre@nothing %
\gre@fixedtextformat{#1}%
\else %
- \ifx\gre@save@fixedtextformat\gre@fixedtextformat %
+ \ifx\gre@saved@syllable@fixedtextformat\gre@fixedtextformat %
\gre@debugmsg{syllablerewriting}{merging format when prepending previous last syllable part}%
- \gre@fixedtextformat{\gre@pointandclick{\gre@save@endsyllablepart}{\gre@save@pointandclick}#1}%
+ \gre@fixedtextformat{\gre@pointandclick{\gre@saved@syllable@endsyllablepart}{\gre@saved@syllable@pointandclick}#1}%
\else %
\gre@debugmsg{syllablerewriting}{prepending previous last syllable part}%
- \gre@save@fixedtextformat{\gre@pointandclick{\gre@save@endsyllablepart}{\gre@save@pointandclick}}%
+ \gre@saved@syllable@fixedtextformat{\gre@pointandclick{\gre@saved@syllable@endsyllablepart}{\gre@saved@syllable@pointandclick}}%
\gre@fixedtextformat{#1}%
\fi %
\fi %
@@ -833,6 +807,9 @@
\gre@textclearedtrue%
}%
+\def\gre@arg@oftwo@first#1#2{#1}%
+\def\gre@arg@oftwo@second#1#2{#2}%
+
%% general macro : it will typeset the syllable : arguments are :
% #1 : macro setting the letters of this syllable
% #2 : reserved (unused)
@@ -843,7 +820,7 @@
% the three next parameters are to put an hyphen if necessary, they can be empty for end of words
% #5 : macros setting next syllable letters of the next syllable
% #6 : the line:char:column for a textedit link
-% #7 : alignment type of the first next glyph
+% #7 : alignment type of the first next glyph (this is a pair: alignment type and alteration type)
% #8 : other macros (translation, double text, etc.) that don't fit in the limitation of the number of arguments
%% with a special option for #7 : if it is a bar, we don't put a space at the end
%% at the end we wall \greendofword or \gre@endofsyllable with #7, to reduce the space in case of a flat or natural
@@ -878,7 +855,7 @@
#1%
\gre@firstglyphtrue%
\gre@dimen@bolextra = 0pt\relax%
- \gre@calculate@textaligncenter{\gre@save@endsyllablepart}{\gre@firstsyllablepart}{\gre@middlesyllablepart}{0}% we first get the width between the alignment point and the end of the syllable
+ \gre@calculate@textaligncenter{\gre@saved@syllable@endsyllablepart}{\gre@firstsyllablepart}{\gre@middlesyllablepart}{0}% we first get the width between the alignment point and the end of the syllable
\gre@syllablenotes{#9}% we put the notes in a box, so that we have the width of it
% now we calculate the begin difference, that is to say \gre@dimen@notesaligncenter - \gre@dimen@textaligncenter
\gre@dimen@begindifference=\dimexpr(\gre@dimen@notesaligncenter - \gre@dimen@textaligncenter)\relax %
@@ -927,7 +904,7 @@
% by default, gre@attr@dash will be 2
\gre@attr@dash=2\relax %
#5%
- \gre@calculate@nextbegindifference{\gre@emit@endsyllablepartfornextsyllable}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart}}{\gre@evaluatenextsyllable{\gre@nextmiddlesyllablepart}}{\gre@evaluatenextsyllable{\gre@nextendsyllablepart}}{#7}%
+ \gre@calculate@nextbegindifference{\gre@emit@endsyllablepartfornextsyllable}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart}}{\gre@evaluatenextsyllable{\gre@nextmiddlesyllablepart}}{\gre@evaluatenextsyllable{\gre@nextendsyllablepart}}#7%
\gre@unsetfixednexttextformat %
\ifgre@showlyrics%
\setbox\gre@box@syllabletext=\hbox{%
@@ -947,13 +924,14 @@
\gre@calculate@enddifference{\wd\gre@box@syllablenotes}{\wd\gre@box@syllabletext}{\gre@dimen@textaligncenter}{\gre@dimen@notesaligncenter}{1}%
% gre@count@temp@one holds 0 if next is a not bar, 1 if it is
\gre@count@temp@one=0%
- \ifnum#7>9\relax %
- \ifnum#7<20\relax %
+ \ifnum\gre@arg@oftwo@second#7=0\relax %
+ \ifnum\gre@arg@oftwo@first#7>9\relax %
\gre@count@temp@one=1\relax %
- \else %
- \gre@count@temp@one=2\relax %
\fi %
+ \else %
+ \gre@count@temp@one=2\relax %
\fi %
+ \gre@debugmsg{spacing}{ gre@count@temp@one = \the\gre@count@temp@one}%
\gre@calculate@syllablefinalskip{#4}{\gre@count@temp@one}%
\ifcase#4 %
% we enter here if the end of word is 0, so we must determine if we need to type a dash here
@@ -1013,7 +991,7 @@
\fi%
\fi %
% recomputing end difference and final skip with the final hyphen
- \gre@calculate@nextbegindifference{\gre@emit@endsyllablepartfornextsyllable}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart}}{\gre@evaluatenextsyllable{\gre@nextmiddlesyllablepart}}{\gre@evaluatenextsyllable{\gre@nextendsyllablepart}}{#7}%
+ \gre@calculate@nextbegindifference{\gre@emit@endsyllablepartfornextsyllable}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart}}{\gre@evaluatenextsyllable{\gre@nextmiddlesyllablepart}}{\gre@evaluatenextsyllable{\gre@nextendsyllablepart}}#7%
\gre@calculate@enddifference{\wd\gre@box@syllablenotes}{\wd\gre@box@syllabletext}{\gre@dimen@textaligncenter}{\gre@dimen@notesaligncenter}{0}%
\gre@calculate@syllablefinalskip{#4}{\gre@count@temp@one}%
\else %
@@ -1084,7 +1062,7 @@
\GreNoBreak %
\fi%
% we call end of syllable
- \gre@syllable@end{#7}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart\gre@nextmiddlesyllablepart\gre@nextendsyllablepart}}{#4}%
+ \gre@syllable@end#7{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart\gre@nextmiddlesyllablepart\gre@nextendsyllablepart}}{#4}%
\gre@push@endsyllable{#6}\relax %
\global\gre@dimen@notesaligncenter=0pt\relax% very important, see flat and natural
\gre@unsetfixedtextformat %
@@ -1123,15 +1101,16 @@
%% @desc Macro to make a few checks and call the right macros between
%% \endbeforebar, \endofword, \endofsyllable
-%% @arg#1 next syllable type (#7 of \GreSyllable)
-%% @arg#2 next syllable text
-%% @arg#3 end of word or not (#4 of \GreSyllable)
-\def\gre@syllable@end#1#2#3{%
- \gre@trace{gre@syllable@end{#1}{#2}{#3}}%
+%% @arg#1 next syllable alignment type (#7:1 of \GreSyllable)
+%% @arg#2 next syllable alteration type (#7:2 of \GreSyllable)
+%% @arg#3 next syllable text
+%% @arg#4 end of word or not (#4 of \GreSyllable)
+\def\gre@syllable@end#1#2#3#4{%
+ \gre@trace{gre@syllable@end{#1}{#2}{#3}{#4}}%
% gre@count@temp@one holds 0 if next is a not bar, 1 if it is
\gre@count@temp@one=0%
- \ifnum#1>9\relax %
- \ifnum#1<20\relax %
+ \ifnum#2=0\relax %
+ \ifnum#1>9\relax %
\gre@count@temp@one=1%
\fi %
\fi %
@@ -1141,7 +1120,7 @@
\gre@endofsyllable{0}{1}{1}%
\else %
% otherwise we call it with 1 only if there is no letters after (we can see it with nextbegindifference)
- \setbox\gre@box@temp@width=\hbox{#2}%
+ \setbox\gre@box@temp@width=\hbox{#3}%
\ifdim\wd\gre@box@temp@width=0pt\relax%
\gre@endofsyllable{0}{1}{1}%
\else %
@@ -1152,8 +1131,8 @@
\ifnum\gre@lastoflinecount=1\relax %
\global\gre@lastoflinecount=2\relax %
\fi %
- \gre@debugmsg{syllablespacing}{ calling endofsyllable with #3}%
- \gre@endofsyllable{1}{#3}{0}%
+ \gre@debugmsg{syllablespacing}{ calling endofsyllable with #4}%
+ \gre@endofsyllable{1}{#4}{0}%
\fi %
\gre@trace@end%
}
@@ -1243,6 +1222,7 @@
%a macro to typeset a syllable with only a bar inside
\def\GreBarSyllable#1#2#3#4#5#6#7#8#9{%
+ \gre@trace{GreBarSyllable{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}%
\gre@textclearedfalse%
\gre@debugmsg{general}{}%
\gre@debugmsg{general}{New bar syllable}%
@@ -1255,7 +1235,7 @@
% there are two different cases that have almost nothing in common : the case where there is something written under the bar, and the case where there is nothing.
% first of all we need to calculate previousenddifference, begindifference, enddifference and nextbegindifference.
#1%
- \gre@calculate@textaligncenter{\gre@save@endsyllablepart}{\gre@firstsyllablepart}{\gre@middlesyllablepart}{0}%
+ \gre@calculate@textaligncenter{\gre@saved@syllable@endsyllablepart}{\gre@firstsyllablepart}{\gre@middlesyllablepart}{0}%
\ifgre@showlyrics%
\setbox\gre@box@syllabletext=\hbox{%
\IfSubStr{\gre@debug}{,barspacing,}%
@@ -1272,7 +1252,7 @@
\setbox\gre@box@syllabletext=\box\voidb@x%
\fi%
\gre@debugmsg{barspacing}{Width of bar text: \the\wd\gre@box@syllabletext}%
- \global\let\gre@newlinecommonsaved\gre@newlinecommon %
+ \global\let\gre@saved@prelinedelay@newlinecommon\gre@newlinecommon %
\global\let\gre@newlinecommon\gre@newlinecommondelayed %
\xdef\gre@newlinearg{-1}%
\gre@syllablenotes{#9}%
@@ -1281,7 +1261,7 @@
\gre@dimen@begindifference=\dimexpr(\gre@dimen@notesaligncenter - \gre@dimen@textaligncenter)\relax%
\gre@calculate@enddifference{\wd\gre@box@syllablenotes}{\wd\gre@box@syllabletext}{\gre@dimen@textaligncenter}{\gre@dimen@notesaligncenter}{1}%
#5%
- \gre@calculate@nextbegindifference{\gre@emit@endsyllablepartfornextsyllable}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart}}{\gre@evaluatenextsyllable{\gre@nextmiddlesyllablepart}}{\gre@evaluatenextsyllable{\gre@nextendsyllablepart}}{#7}%
+ \gre@calculate@nextbegindifference{\gre@emit@endsyllablepartfornextsyllable}{\gre@evaluatenextsyllable{\gre@nextfirstsyllablepart}}{\gre@evaluatenextsyllable{\gre@nextmiddlesyllablepart}}{\gre@evaluatenextsyllable{\gre@nextendsyllablepart}}#7%
\gre@unsetfixednexttextformat %
\gre@debugmsg{barspacing}{previousenddifference: \the\gre@dimen@previousenddifference}%
\gre@debugmsg{barspacing}{begindifference: \the\gre@dimen@begindifference}%
@@ -1291,7 +1271,7 @@
%
% New bar spacing algorithm
%
- \gre@calculate@barposition{#4}{#7}%
+ \gre@calculate@barposition{#4}{\gre@arg@oftwo@second#7}%
\ifgre@textcleared%
\gre@clearsyllable{bar}%
\fi%
@@ -1335,7 +1315,7 @@
{\raise 12pt\hbox to 0pt{\rule{0.4pt}{12pt}\hss}}%
{}% do nothing if not debugging
\fi%
- \global\let\gre@newlinecommon\gre@newlinecommonsaved %
+ \global\let\gre@newlinecommon\gre@saved@prelinedelay@newlinecommon %
\GreNoBreak%
% get into position to place the penalty
\ifdim\gre@dimen@enddifference < 0pt\relax%
@@ -1418,7 +1398,7 @@
\gre@clearsyllable{bar}%
\fi%
% then we check if there is something to write
- \global\let\gre@newlinecommon\gre@newlinecommonsaved %
+ \global\let\gre@newlinecommon\gre@saved@prelinedelay@newlinecommon %
\gre@debugmsg{ifdim}{ wd(gre@box@syllabletext) = 0pt}%
\ifdim\wd\gre@box@syllabletext = 0 pt\relax %
% the most difficult case : when there is nothing to write
@@ -1544,6 +1524,7 @@
\gre@localrightbox{}%
\fi\fi %
\relax%
+ \gre@trace@end%
}
\newif\ifgre@newbarspacing%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-symbols.lua b/support/gregoriotex/tex/luatex/gregoriotex-symbols.lua
index 8e9f0a3194..19f915f105 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-symbols.lua
+++ b/support/gregoriotex/tex/luatex/gregoriotex-symbols.lua
@@ -1,6 +1,6 @@
--GregorioTeX Symbols Lua support file.
--
---Copyright (C) 2016-2019 The Gregorio Project (see CONTRIBUTORS.md)
+--Copyright (C) 2016-2021 The Gregorio Project (see CONTRIBUTORS.md)
--
--This file is part of Gregorio.
--
@@ -19,7 +19,7 @@
-- this file contains lua functions to support signs used by GregorioTeX.
--- GREGORIO_VERSION 5.2.1
+-- GREGORIO_VERSION 6.0.0-beta1
local err = gregoriotex.module.err
local warn = gregoriotex.module.warn
diff --git a/support/gregoriotex/tex/luatex/gregoriotex-symbols.tex b/support/gregoriotex/tex/luatex/gregoriotex-symbols.tex
index 61478295e0..d99afede5d 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex-symbols.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex-symbols.tex
@@ -1,6 +1,6 @@
%GregorioTeX file.
%
-% Copyright (C) 2007-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2007-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -22,7 +22,7 @@
\ifcsname gregoriotex@symbols@loaded\endcsname\endinput\fi%
\def\gregoriotex@symbols@loaded{}%
-\gre@declarefileversion{gregoriotex-symbols.tex}{5.2.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-symbols.tex}{6.0.0-beta1}% GREGORIO_VERSION
\RequireLuaModule{gregoriotex}%
diff --git a/support/gregoriotex/tex/luatex/gregoriotex.lua b/support/gregoriotex/tex/luatex/gregoriotex.lua
index f3ad902b5a..e16f193552 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex.lua
+++ b/support/gregoriotex/tex/luatex/gregoriotex.lua
@@ -1,6 +1,6 @@
--GregorioTeX Lua file.
--
---Copyright (C) 2008-2019 The Gregorio Project (see CONTRIBUTORS.md)
+--Copyright (C) 2008-2021 The Gregorio Project (see CONTRIBUTORS.md)
--
--This file is part of Gregorio.
--
@@ -24,16 +24,16 @@ local hpack, traverse, traverse_id, has_attribute, count, remove, insert_after,
gregoriotex = gregoriotex or {}
local gregoriotex = gregoriotex
-local internalversion = '5.2.1' -- GREGORIO_VERSION (comment used by VersionManager.py)
+local internalversion = '6.0.0-beta1' -- GREGORIO_VERSION (comment used by VersionManager.py)
local err, warn, info, log = luatexbase.provides_module({
name = "gregoriotex",
- version = '5.2.1', -- GREGORIO_VERSION
+ version = '6.0.0-beta1', -- GREGORIO_VERSION
greinternalversion = internalversion,
- date = "2019/04/06", -- GREGORIO_DATE_LTX
+ date = "2021/02/23", -- GREGORIO_DATE_LTX
description = "GregorioTeX module.",
author = "The Gregorio Project (see CONTRIBUTORS.md)",
- copyright = "2008-2019 - The Gregorio Project",
+ copyright = "2008-2021 - The Gregorio Project",
license = "GPLv3+",
})
@@ -146,7 +146,7 @@ local function gregorio_exe()
local exe_version
-- first look for one with the exact version
- real_gregorio_exe = 'gregorio-5_2_1' -- FILENAME_VERSION
+ real_gregorio_exe = 'gregorio-6_0_0-beta1' -- FILENAME_VERSION
local cmd = string.format([[%s -o "%%s" "%s"]], real_gregorio_exe,
test_snippet_filename)
exe_version = get_prog_output(cmd, '*line')
@@ -769,11 +769,10 @@ local function clean_old_gtex_files(file_withdir)
string.find(os.getenv("PATH"),";",1,true)
if onwindows then
sep = "\\"
- dirpath = string.match(file_withdir, "(.*)"..sep)
else
sep = "/"
- dirpath = string.match(file_withdir, "(.*)"..sep)
end
+ dirpath = string.match(file_withdir, "(.*)"..sep)
if dirpath then -- dirpath is nil if current directory
filename = "^"..file_withdir:match(".*/".."(.*)").."%-%d+_%d+_%d+[-%a%d]*%.gtex$"
for a in lfs.dir(dirpath) do
@@ -854,6 +853,37 @@ local function compile_gabc(gabc_file, gtex_file, glog_file, allow_deprecated)
end
end
+local function locate_file(filename)
+ local result
+ if not gre_input_path then
+ gre_input_path = {""}
+ end
+ for i,k in pairs(gre_input_path) do
+ log("Looking in %s", k)
+ if lfs.isfile(k .. filename) then
+ result = k..filename
+ if result == filename then
+ log("Found %s directly", filename)
+ else
+ log("Found %s in %s", filename, k)
+ end
+ break
+ end
+ end
+ if not result then
+ result = kpse.find_file(filename)
+ if result then
+ log("Found %s at\n%s using kpsewhich", filename, result)
+ if string.match(result," ") then
+ warn("%s contains a space in the path\nTeX will likely complain about this", filename)
+ end
+ else
+ log("Cannot find %s", filename)
+ end
+ end
+ return result
+end
+
local function include_score(input_file, force_gabccompile, allow_deprecated)
if string.match(input_file, "[#%%]") then
err("GABC filename contains invalid character(s): # %%\n"
@@ -872,15 +902,17 @@ local function include_score(input_file, force_gabccompile, allow_deprecated)
end
local cleaned_filename = input_name:gsub("[%s%+%&%*%?$@:;!\"\'`]", "-")
- local gabc_file = string.format("%s%s.gabc", file_dir, input_name)
- local gtex_file = string.format("%s%s-%s.gtex", file_dir, cleaned_filename,
+ local gabc_filename = string.format("%s%s.gabc", file_dir, input_name)
+ local gabc_file = locate_file(gabc_filename)
+ local gtex_filename = string.format("%s%s-%s.gtex", file_dir, cleaned_filename,
internalversion:gsub("%.", "_"))
+ local gtex_file = locate_file(gtex_filename)
local glog_file = string.format("%s%s-%s.glog", file_dir, cleaned_filename,
internalversion:gsub("%.", "_"))
- if not lfs.isfile(gtex_file) then
+ if not gtex_file then
clean_old_gtex_files(file_dir..cleaned_filename)
- log("The file %s does not exist. Searching for a gabc file", gtex_file)
- if lfs.isfile(gabc_file) then
+ log("The file %s does not exist. Will use gabc file", gtex_filename)
+ if gabc_file then
local gabc = io.open(gabc_file, 'r')
if gabc == nil then
err("\n Unable to open %s", gabc_file)
@@ -888,14 +920,18 @@ local function include_score(input_file, force_gabccompile, allow_deprecated)
else
gabc:close()
end
- compile_gabc(gabc_file, gtex_file, glog_file, allow_deprecated)
- tex.print(string.format([[\input %s\relax]], gtex_file))
+ compile_gabc(gabc_file, gtex_filename, glog_file, allow_deprecated)
+ tex.print(string.format([[\input %s\relax]], gtex_filename))
return
else
- err("The file %s does not exist.", gabc_file)
+ err("The file %s does not exist", gabc_filename)
return
end
end
+ if not gabc_file then
+ tex.print(string.format([[\input %s\relax]], gtex_file))
+ return
+ end
local gtex_timestamp = lfs.attributes(gtex_file).modification
local gabc_timestamp = lfs.attributes(gabc_file).modification
-- open the gabc file for reading so that LuaTeX records input from it
@@ -930,7 +966,7 @@ local function direct_gabc(gabc, header, allow_deprecated)
local f = io.open(snippet_filename, 'w')
-- trims spaces on both ends (trim6 from http://lua-users.org/wiki/StringTrim)
gabc = gabc:match('^()%s*$') and '' or gabc:match('^%s*(.*%S)')
- f:write('name:direct-gabc;\n'..(header or '')..'\n%%\n'..gabc:gsub('\\par ', '\n'))
+ f:write('name:direct-gabc;\n'..(header or '')..'\n%%\n'..gabc:gsub('\\par', '\n'))
f:close()
local cmd = string.format([[%s -W %s-o "%%s" -l "%s" "%s"]], gregorio_exe(),
deprecated, snippet_logname, snippet_filename)
@@ -959,8 +995,10 @@ local function direct_gabc(gabc, header, allow_deprecated)
end
glog:close()
end
- os.remove(snippet_filename)
- os.remove(snippet_logname)
+ if not (debug_types_activated['snippet'] or debug_types_activated['all']) then
+ os.remove(snippet_filename)
+ os.remove(snippet_logname)
+ end
end
local function get_gregoriotexluaversion()
diff --git a/support/gregoriotex/tex/luatex/gregoriotex.tex b/support/gregoriotex/tex/luatex/gregoriotex.tex
index a00003eba2..e50be69975 100644
--- a/support/gregoriotex/tex/luatex/gregoriotex.tex
+++ b/support/gregoriotex/tex/luatex/gregoriotex.tex
@@ -1,6 +1,6 @@
% GregorioTeX boostrap file for Plain TeX
%
-% Copyright (C) 2015-2019 The Gregorio Project (see CONTRIBUTORS.md)
+% Copyright (C) 2015-2021 The Gregorio Project (see CONTRIBUTORS.md)
%
% This file is part of Gregorio.
%
@@ -21,13 +21,14 @@
% This file needs to be marked with the version number. For now I've done this with the following comment, but we should check to see if PlainTeX has something similar to the version declaration of LaTeX and use that if it does.
-% [2019/04/06 v5.2.1 GregorioTeX system.]% PARSE_VERSION_DATE_LTX
+% [2021/02/23 v6.0.0-beta1 GregorioTeX system.]% PARSE_VERSION_DATE_LTX
+\input iftex.sty
+\RequireLuaTeX%
\edef\greoldcatcode{\the\catcode`@}
\catcode`\@=11
-\input ifluatex.sty%
\input luatexbase.sty%
\input luamplib.sty%
\input luaotfload.sty%