summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/gregoriotex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-10 21:27:24 +0000
committerKarl Berry <karl@freefriends.org>2016-05-10 21:27:24 +0000
commit18e100730bd2e086a899a55f7423e028f07e90b9 (patch)
treea8a1e68d59e61256ebffadbe060ee834a29f60af /Master/texmf-dist/tex/luatex/gregoriotex
parent8a59bef2d86da7bbe2ffd977865b0e011b4175aa (diff)
gregoriotex (10may16)
git-svn-id: svn://tug.org/texlive/trunk@41008 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/gregoriotex')
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex24
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex362
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex2
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua18
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex192
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex260
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex169
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex5
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua331
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex50
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gsp-default.tex58
13 files changed, 721 insertions, 754 deletions
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex
index 5303a304c01..ea7f8d31031 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-chars.tex
@@ -18,7 +18,7 @@
% along with Gregorio. If not, see <http://www.gnu.org/licenses/>.
\gre@debugmsg{general}{Loading gregoriotex-chars.tex}%
-\gre@declarefileversion{gregoriotex-chars.tex}{4.2.0-beta1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-chars.tex}{4.1.2}% GREGORIO_VERSION
\def\gre@char@fuse@punctum@one{\GreFuseTwo{\GreCPLeadingPunctumOne}{\GreCPPunctum}}%
\def\gre@char@fuse@quilisma@one{\GreFuseTwo{\GreCPLeadingQuilismaOne}{\GreCPPunctum}}%
@@ -61,7 +61,7 @@
\gre@def@char@he{punctum@line@bl}{PunctumLineBL}%
\gre@def@char@he{punctum@line@blbr}{PunctumLineBLBR}%
\gre@def@char@he{punctumauctus@line@bl}{PunctumAuctusLineBL}%
-\gre@def@char@he{salicus@oriscus}{AscendensOriscusLineBLTR}%
+\gre@def@char@he{salicus@oriscus}{SalicusOriscus}%
\gre@def@char@he{flexus}{FlexusDeminutus}%
\gre@def@char@he{initio}{Debilis}%
\gre@def@char@he{virga}{Virga}%
@@ -74,8 +74,8 @@
\gre@def@char@he@porr{porrectusfl}{PorrectusFlexus}%
\gre@def@char@he{quilisma}{Quilisma}%
\gre@def@char@he{quilisma@line@tr}{QuilismaLineTR}%
-\gre@def@char@he{oriscus}{AscendensOriscus}%
-\gre@def@char@he{oriscus@line@tr}{AscendensOriscusLineTR}%
+\gre@def@char@he{oriscus}{Oriscus}%
+\gre@def@char@he{oriscus@line@tr}{OriscusLineTR}%
\gre@def@char@he{smallpunctum}{HighPes}% "smallpunctum" is the top punctum in a pes
\gre@def@char@he{flat}{Flat}%
\gre@def@char@he{sharp}{Sharp}%
@@ -183,3 +183,19 @@
\gre@error{Unrecognized option "#1" for \protect\gresetglyphstyle\MessageBreak Possible options are: 'default', 'medicaea', 'hufnagel' and 'mensural'}%
]%
}%
+
+\def\greusedefaultstyle{%OBSOLETE
+ \gre@obsolete{\protect\greusedefaultstyle}{\protect\gresetglyphstyle{default}}%
+}%
+
+\def\greusemedicaeastyle{%OBSOLETE
+ \gre@obsolete{\protect\greusemedicaeastyle}{\protect\gresetglyphstyle{medicaea}}%
+}%
+
+\def\greusehufnagelstyle{%OBSOLETE
+ \gre@obsolete{\protect\greusehufnagelstyle}{\protect\gresetglyphstyle{hufnagel}}%
+}%
+
+\def\greusemensuralstyle{%OBSOLETE
+ \gre@obsolete{\protect\greusemensuralstyle}{\protect\gresetglyphstyle{mensural}}%
+}%
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex
index 2655ae1da1a..2aa37d47d79 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-main.tex
@@ -38,11 +38,11 @@
%true
{\gre@error{Debug error: ‘all’ is not a permitted keyword}}%
%false
- {\IfStrEq{\gre@debug}{,all,}%
+ {\IfStrEq{\gre@debug}{all}%
%true
{\gre@typeout{GregorioTeX debug: (#1) #2}}%
%false
- {\IfSubStr{\gre@debug}{,#1,}%
+ {\IfSubStr{\gre@debug}{#1}%
%true
{\gre@typeout{GregorioTeX debug: (#1) #2}}%
%false
@@ -52,21 +52,6 @@
}%
}%
-\AtBeginDocument{%
- \IfStrEq{\gre@debug}{}%
- {}%
- {%
- \directlua{gregoriotex.set_debug_string([[\gre@debug]])}%
- \typeout{GregorioTeX is in debug mode}%
- \typeout{\gre@debug\space messages will be printed to the log.}%
- {% we're starting a group in order to localize \exploregroups
- \exploregroups%
- \StrRemoveBraces{\gre@debug}[\gre@debug]%
- \xdef\gre@debug{,\gre@debug,}%
- }%
- }%
-}%
-
\gre@debugmsg{general}{Loading gregoriotex-main.tex}%
% Macro to handle deprecated macros.
@@ -89,6 +74,8 @@
\def\gre@nothing{}%
+\AtBeginDocument{\IfStrEq{\gre@debug}{}{}{\directlua{gregoriotex.set_debug_string([[\gre@debug]])}\typeout{GregorioTeX is in debug mode}\typeout{\gre@debug\space messages will be printed to the log.}}}%
+
%%%%%%%%%%%%%%%
%% Backwards Compatibility
%%%%%%%%%%%%%%%
@@ -156,7 +143,7 @@
% The version of gregorio. All gregoriotex*.tex files must have the same.
% All gtex files must also have the same version.
-\xdef\gre@gregorioversion{4.2.0-beta1}% GREGORIO_VERSION - VersionManager.py
+\xdef\gre@gregorioversion{4.1.2}% GREGORIO_VERSION - VersionManager.py
% first some macros to allow checks for version:
% Tests that all gregoriotex files are of the same version.
@@ -245,7 +232,6 @@
\let\gre@pitch@overbraceglyph\gre@pitch@g %
\let\gre@pitch@bar\gre@pitch@g %
\let\gre@pitch@dummy\gre@pitch@g %
-\let\gre@pitch@nominal\gre@pitch@e %
% factor is the factor with which you open you font (the number after the at). It will decide almost everything (spaces, etc.), so it is particularly important.
% it is set to the default value : 17 (the value that makes it look like a standard graduale)
@@ -430,6 +416,10 @@
\gre@debugmsg{initial}{Fill initial box a}%
\setbox\gre@box@initial=\hbox{\gre@style@initial\gre@fixedtextformat{#1}\endgre@style@initial}%
\fi%
+ \ifx\gre@empty@initialformat\greinitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greinitialformat}{\protect\grechangestyle{initial}}% OBSOLETE
+ \fi% OBSOLETE
\gre@debugmsg{ifdim}{ manualinitialwidth = 0pt}%
\ifdim\gre@space@dimen@manualinitialwidth=0 pt\relax%
\global\gre@dimen@initialwidth=\wd\gre@box@initial %
@@ -437,6 +427,10 @@
\gre@style@initial%
\global\gre@dimen@initialwidth=\gre@space@dimen@manualinitialwidth\relax%
\endgre@style@initial%
+ \ifx\gre@empty@initialformat\greinitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greinitialformat}{\protect\grechangestyle{initial}}% OBSOLETE
+ \fi% OBSOLETE
\fi%
\gre@debugmsg{ifdim}{ wd(gre@box@annotation) > initialwidth}%
\ifdim\wd\gre@box@annotation>\gre@dimen@initialwidth\relax%
@@ -448,23 +442,13 @@
\gre@style@initial%
\global\gre@dimen@temp@four = \gre@space@dimen@beforeinitialshift\relax%
\endgre@style@initial%
+ \ifx\gre@empty@initialformat\greinitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greinitialformat}{\protect\grechangestyle{initial}}% OBSOLETE
+ \fi% OBSOLETE
\else %
\ifgre@allowdeprecated%%% DEPRECATED for removal in 5.0
- \gre@warning{%
- biginitial style is deprecated, but since you are\MessageBreak %
- allowing deprecated usage, Gregorio will continue\MessageBreak %
- to use your biginitial style as it did before.\MessageBreak %
- However, in upcoming version 5.0, Gregorio will\MessageBreak %
- only support one initial style for both big and\MessageBreak %
- small initials. Consider disabling deprecated\MessageBreak %
- usage by passing the [allowdeprecated=false]\MessageBreak %
- package option, which will then require you to\MessageBreak %
- set the initial style before the appropriate\MessageBreak %
- scores to style all initials: set the initial\MessageBreak %
- style for a big initial before a score with a big\MessageBreak %
- initial and back for a small initial afterwards.\MessageBreak %
- (See UPGRADE.md for more information)\MessageBreak %
- ...}%%% DEPRECATED for removal in 5.0
+ \gre@warning{biginitial style is deprecated, but the old\MessageBreak behavior will be used since deprecated usage is\MessageBreak currently enabled. This behavior will disappear\MessageBreak in 5.0, so consider disabling deprecated usage\MessageBreak and switching to the initial style instead. (See\MessageBreak UPGRADE.md for more information)}%%% DEPRECATED for removal in 5.0
\fi%%% DEPRECATED for removal in 5.0
\advance\gre@dimen@temp@five by \dimexpr(-\gre@dimen@additionalbottomspace %
- \gre@space@dimen@spacebeneathtext %
@@ -482,6 +466,10 @@
\setbox\gre@box@initial=\hbox{\gre@style@initial\gre@fixedtextformat{#1}\endgre@style@initial}% keep this line
\fi%%% DEPRECATED for removal in 5.0
\fi%
+ \ifx\gre@empty@biginitialformat\grebiginitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grebiginitialformat}{\protect\grechangestyle{biginitial}}% OBSOLETE
+ \fi% OBSOLETE
\gre@debugmsg{ifdim}{ manualinitialwidth = 0pt}%
\ifdim\gre@space@dimen@manualinitialwidth=0 pt\relax%
\global\gre@dimen@initialwidth=\wd\gre@box@initial %
@@ -495,6 +483,10 @@
\global\gre@dimen@initialwidth=\gre@space@dimen@manualinitialwidth\relax% keep this line
\endgre@style@initial% keep this line
\fi%%% DEPRECATED for removal in 5.0
+ \ifx\gre@empty@biginitialformat\grebiginitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grebiginitialformat}{\protect\grechangestyle{biginitial}}% OBSOLETE
+ \fi% OBSOLETE
\fi%
\gre@debugmsg{ifdim}{ wd(GreAboveinitialfirstbox) > initialwidth}%
\ifdim\wd\gre@box@annotation>\gre@dimen@initialwidth\relax%
@@ -510,19 +502,23 @@
\global\gre@dimen@temp@four = \gre@space@dimen@beforeinitialshift\relax% keep this line
\endgre@style@initial% keep this line
\fi%%% DEPRECATED for removal in 5.0
+ \ifx\gre@empty@biginitialformat\grebiginitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grebiginitialformat}{\protect\grechangestyle{biginitial}}% OBSOLETE
+ \fi% OBSOLETE
\fi %
\hskip\gre@dimen@temp@four %
\global\advance\gre@dimen@initialwidth by \gre@dimen@temp@four %
\gre@debugmsg{annotation}{Ready to place initial.}%
- \ifgre@showlyrics%
- \box\gre@box@initial%
- \else%
- \kern\wd\gre@box@initial%
- \fi%
+ \box\gre@box@initial%
\ifnum\gre@biginitial=0\relax%
\gre@style@initial%
\global\gre@dimen@temp@four = \gre@space@dimen@afterinitialshift\relax%
\endgre@style@initial%
+ \ifx\gre@empty@initialformat\greinitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greinitialformat}{\protect\grechangestyle{initial}}% OBSOLETE
+ \fi% OBSOLETE
\else%
\ifgre@allowdeprecated%%% DEPRECATED for removal in 5.0
\gre@style@biginitial%%% DEPRECATED for removal in 5.0
@@ -533,6 +529,10 @@
\global\gre@dimen@temp@four = \gre@space@dimen@afterinitialshift\relax% keep this line
\endgre@style@initial% keep this line
\fi%%% DEPRECATED for removal in 5.0
+ \ifx\gre@empty@biginitialformat\grebiginitialformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grebiginitialformat}{\protect\grechangestyle{biginitial}}% OBSOLETE
+ \fi% OBSOLETE
\fi%
\hskip\gre@dimen@temp@four %
\global\advance\gre@dimen@initialwidth by \gre@dimen@temp@four%
@@ -663,15 +663,44 @@
}%
+\def\gresetfirstlineaboveinitial#1#2{%OBSOLETE
+ \gre@obsolete{\protect\gresetfirstlineaboveinitial}{\protect\greannotation}%
+}%
+
+\def\gresetfirstannotation#1{%OBSOLETE
+ \gre@obsolete{\protect\gresetfirstannotation}{\protect\greannotation}%
+}%
+
+\let\setfirstannotation\gresetfirstannotation%OBSOLETE
+
+\def\gresetsecondannotation#1{%OBSOLETE
+ \gre@obsolete{\protect\gresetsecondannotation}{\protect\greannotation}%
+}%
+
+\let\setsecondannotation\gresetsecondannotation%OBSOLETE
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for the score reference (unused)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\grescorereference#1{% OBSOLETE
- \gre@error{\protect\grescorereference\space is obsolete.\MessageBreak It does nothing; stop using it.}%
+\def\grescorereference#1{% DEPRECATED by 4.1
+ \ifgre@allowdeprecated%
+ \gre@warning{\protect\grescorereference\space is deprecated.\MessageBreak It does nothing; stop using it.}%
+ \else%
+ \gre@error{\protect\grescorereference\space is deprecated.\MessageBreak It does nothing; stop using it.}%
+ \fi%
\relax %
}%
+\def\GreScoreReference#1{%OBSOLETE
+ \gre@error{\protect\GreScoreReference\space is obsolete.\MessageBreak It does nothing; stop using it.}%
+ \relax%
+}%
+
+\def\scorereference#1{%OBSOLETE
+ \gre@error{\protect\scorereference\space is obsolete.\MessageBreak It does nothing; stop using it.}%
+}%
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for the typesetting the things above the initial
@@ -751,16 +780,30 @@
\fi%
}
+\def\commentary#1{%OBSOLETE
+ \gre@obsolete{\protect\commentary}{\protect\grecommentary}%
+}%
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macro for putting text above lines for annotations and the like
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% format for text above the lines
+\def\greabovelinestextstyle#1{% OBSOLETE
+ \relax %
+}%
+\let\gre@empty@abovelinestextstyle\greabovelinestextstyle%
+
% set space above the text lines - almost the same as for the translation
\def\gre@addspaceabove{%
\gre@style@abovelinestext%
\global\gre@dimen@currentabovelinestextheight=\gre@space@dimen@abovelinestextheight\relax%
\gre@generatelines %
\endgre@style@abovelinestext%
+ \ifx\gre@empty@abovelinestextstyle\greabovelinestextstyle% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greabovelinestextstyle}{\protect\grechangestyle{abovelinestext}}% OBSOLETE
+ \fi% OBSOLETE
\relax %
}%
@@ -790,6 +833,10 @@
\gre@style@abovelinestext%
\gre@debugmsg{spacing}{Raise alt text: \gre@space@dimen@abovelinestextraise}%
\endgre@style@abovelinestext%
+ \ifx\gre@empty@abovelinestextstyle\greabovelinestextstyle% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greabovelinestextstyle}{\protect\grechangestyle{abovelinestext}}% OBSOLETE
+ \fi% OBSOLETE
\gre@dimen@temp@five=\dimexpr(4\gre@dimen@stafflineheight %
+ 4\gre@dimen@interstafflinespace %
+ \gre@space@dimen@spacebeneathtext %
@@ -801,6 +848,10 @@
\gre@mark@abovelinestext %
\gre@debugmsg{spacing}{Raise alt text: \the\gre@dimen@temp@five}%
\leavevmode\raise\gre@dimen@temp@five\hbox to 0pt{\gre@style@abovelinestext#1\endgre@style@abovelinestext\hss}%
+ \ifx\gre@empty@abovelinestextstyle\greabovelinestextstyle% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\greabovelinestextstyle}{\protect\grechangestyle{abovelinestext}}% OBSOLETE
+ \fi% OBSOLETE
\relax %
}%
@@ -823,6 +874,14 @@
]%
}
+\def\greremovelines{%OBSOLETE
+ \gre@obsolete{\protect\greremovelines}{\protect\gresetlines{invisible}}%
+}%
+
+\def\gredonotremovelines{%OBSOLETE
+ \gre@obsolete{\protect\gredonotremovelines}{\protect\gresetlines{visible}}%
+}%
+
%% macro that draws the stafflines on the first line, it is different from others due to the initial that can take some place, without lines
\def\gre@drawfirstlines{%
\advance\gre@dimen@stafflinewidth by -\gre@dimen@initialwidth\relax%
@@ -831,6 +890,10 @@
\hbox to 0pt{%
\vbox{%
\gre@style@normalstafflines%
+ \ifx\gre@empty@normalstafflinesformat\grenormalstafflinesformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grenormalstafflinesformat}{\protect\grechangestyle{normalstafflines}}% OBSOLETE
+ \fi% OBSOLETE
\vskip\gre@dimen@currentabovelinestextheight\relax%
\vskip\gre@dimen@additionaltopspace\relax%
\ifgre@showlines %
@@ -892,6 +955,10 @@
\setbox\gre@box@lines=\hbox to 0pt{%
\vbox{%
\gre@style@normalstafflines%
+ \ifx\gre@empty@normalstafflinesformat\grenormalstafflinesformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grenormalstafflinesformat}{\protect\grechangestyle{normalstafflines}}% OBSOLETE
+ \fi% OBSOLETE
\vskip\glueexpr(\gre@dimen@additionaltopspace+\gre@space@skip@spaceabovelines+\gre@dimen@currentabovelinestextheight)\relax%
\ifgre@showlines %
\hrule height \gre@dimen@stafflineheight width \gre@dimen@stafflinewidth\relax%
@@ -993,6 +1060,10 @@
]%
}%
+\def\setgretranslationcenteringscheme#1{%OBSOLETE
+ \gre@obsolete{\protect\setgretranslationcenteringscheme}{\protect\gresettranslationcentering}%
+}%
+
\newif\ifgre@breakintranslation%
\gre@breakintranslationfalse%
@@ -1008,6 +1079,10 @@
]%
}%
+\def\gresetnlbintranslation#1{%OBSOLETE
+ \gre@obsolete{\protect\gresetnlbintranslation}{\protect\gresetbreakintranslation}%
+}%
+
\def\GreWriteTranslation#1{%
\ifgre@translationcentering %
\setbox\gre@box@temp@width=\hbox{#1}%
@@ -1015,10 +1090,18 @@
\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}}}%
+ \ifx\gre@empty@translationformat\gretranslationformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\gretranslationformat}{\protect\grechangestyle{translation}}% OBSOLETE
+ \fi% OBSOLETE
\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}}}%
+ \ifx\gre@empty@translationformat\gretranslationformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\gretranslationformat}{\protect\grechangestyle{translation}}% OBSOLETE
+ \fi% OBSOLETE
\fi %
}%
@@ -1029,6 +1112,10 @@
\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}%
+ \ifx\gre@empty@translationformat\gretranslationformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\gretranslationformat}{\protect\grechangestyle{translation}}% OBSOLETE
+ \fi% OBSOLETE
\unsetluatexattribute{\gre@attr@center}%
\relax %
}%
@@ -1163,7 +1250,8 @@
\global\setluatexattribute\gre@attr@glyph@id{0}%
\xdef\gre@gabcname{#6}%
\gre@setstafflines{#7}%
- \global\let\gre@opening@initialstyle\gre@initiallines\relax % DEPRECATED for removal in 5.0
+ \global\let\gre@save@englishcentering\gre@lyriccentering\relax % OBSOLETE
+ \global\let\gre@opening@initialstyle\gre@initiallines\relax % DEPRECATED by 4.1
\ifgre@justifylastline%
\xdef\gre@save@parfillskip{\the\parfillskip}%
\parfillskip=0pt plus 0pt minus 0pt\relax%
@@ -1244,13 +1332,14 @@
\ifgre@justifylastline%
\parfillskip=\gre@save@parfillskip\relax%
\fi %
+ \global\let\gre@lyriccentering\gre@save@englishcentering\relax % OBSOLETE
\global\setluatexattribute\gre@attr@glyph@id{0}%
\relax%
}%
% macro called at the end of a bar (old bar spacing algorithm only).
\def\gre@endafterbar#1{%
- \gre@penalty{\the\gre@space@count@endafterbarpenalty }\relax %
+ \gre@penalty{\greendafterbarpenalty }\relax %
\ifnum#1=1\relax %
\gre@debugmsg{ifdim}{ enddifference > 0pt}%
\ifdim\gre@dimen@enddifference > 0 pt\relax%
@@ -1273,7 +1362,7 @@
\fi %
\fi %
\fi %
- %\gre@penalty{\the\gre@space@count@endafterbarpenalty }\relax
+ %\gre@penalty{\greendafterbarpenalty }\relax
%\global\gre@dimen@enddifference=0pt
\relax %
}%
@@ -1338,6 +1427,13 @@
]%
}%
+\def\gredisableeolshifts{%OBSOLETE
+ \gre@obsolete{\protect\gredisableeolshifts}{\protect\greseteolshifts{disable}}%
+}%
+
+\def\greenableeolshifts{%OBSOLETE
+ \gre@obsolete{\protect\greenableeolshifts}{\protect\greseteolshifts{enable}}%
+}%
% Flag indicating if we block the custos. We just block custos at the end of a score, to prevent a bug.
\newif\ifgre@blockeolcustos%
@@ -1386,13 +1482,17 @@
}%
\gresetbreakbeforeeuouae{justified}%
-\def\GreAdHocSpaceEndOfElement#1#2#3{%
+% macro to suppress the custos
+\def\greblockcustos{%OBSOLETE
+ \gre@obsolete{\protect\greblockcustos}{\protect\greseteolcustos{manual}}%
+}%
+
+\def\GreAdHocSpaceEndOfElement#1#2{%
\gre@skip@temp@four = \gre@space@skip@interelementspace\relax %
\directlua{gregoriotex.scale_space(#1)}%
- \GreEndOfElement{4}{#2}{#3}%
+ \GreEndOfElement{4}{#2}%
}%
-\newif\ifgre@unbreakableendofelement %
% macro to end elements, #1 is the type of space, it can be :
%% 0: default space
%% 1: larger space
@@ -1400,30 +1500,11 @@
%% 3: zero-width space
%% 4: custom space
% #2 is if the space is unbreakable (1) or not (0)
-% #3 is the number of notes emitted in this syllable before this macro
-\def\GreEndOfElement#1#2#3{%
- \ifnum\gre@count@syllablenotes<\gre@count@unbreakabletotalnotes\relax %
- \gre@unbreakableendofelementtrue %
+\def\GreEndOfElement#1#2{%
+ \ifnum #2=0\relax %
+ \gre@penalty{\greendofelementpenalty}%
\else %
- \ifnum#3<\gre@count@unbreakableinitialnotes\relax %
- \gre@unbreakableendofelementtrue %
- \else %
- \ifnum\numexpr\gre@count@syllablenotes-#3\relax<%
- \gre@count@unbreakablefinalnotes\relax %
- \gre@unbreakableendofelementtrue %
- \else %
- \ifnum#2=1\relax %
- \gre@unbreakableendofelementtrue %
- \else %
- \gre@unbreakableendofelementfalse %
- \fi %
- \fi %
- \fi %
- \fi %
- \ifgre@unbreakableendofelement %
\GreNoBreak %
- \else %
- \gre@penalty{\the\gre@space@count@endofelementpenalty}%
\fi %
\ifcase#1%
\gre@skip@temp@four = \gre@space@skip@interelementspace\relax%
@@ -1440,7 +1521,7 @@
\or% case 4
\gre@hskip\gre@skip@temp@four %
\fi%
- \ifgre@unbreakableendofelement %
+ \ifnum #2=1\relax %
\GreNoBreak %
\fi %
\relax%
@@ -1519,10 +1600,6 @@
\gre@skip@temp@four = \gre@space@skip@ascendinginclinatumtonobarmaxshift\relax%
\or% case 22
\gre@skip@temp@four = \gre@space@skip@halfspace\relax%
- \or% case 23
- \gre@skip@temp@four = \gre@space@skip@punctuminclinatumunisonshift\relax%
- \else%
- \gre@error{Unrecognized spaceskip #1}%
\fi%
}%
@@ -1542,13 +1619,6 @@
% 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
% 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{%
@@ -1565,21 +1635,20 @@
\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@space@count@nobreakpenalty=10001\relax %
- \global\gre@space@count@endofwordpenalty=10001\relax %
- \global\gre@space@count@endofsyllablepenalty=10001\relax %
- \global\gre@space@count@endafterbarpenalty=10001\relax %
- \global\gre@space@count@endafterbaraltpenalty=10001\relax %
- \global\gre@space@count@endofelementpenalty=10001\relax %
- \global\gre@space@count@hyphenpenalty=10001\relax %
+ \xdef\gre@nobreakpenaltysave{\grenobreakpenalty }%
+ \xdef\grenobreakpenalty{10001}%
+ \xdef\gre@endofwordpenaltysave{\greendofwordpenalty }%
+ \xdef\greendofwordpenalty{10001}%
+ \xdef\gre@endofsyllablepenaltysave{\greendofsyllablepenalty }%
+ \xdef\greendofsyllablepenalty{10001}%
+ \xdef\gre@endafterbarpenaltysave{\greendafterbarpenalty }%
+ \xdef\greendafterbarpenalty{10001}%
+ \xdef\gre@endafterbaraltpenaltysave{\greendafterbaraltpenalty }%
+ \xdef\greendafterbaraltpenalty{10001}%
+ \xdef\gre@endofelementpenaltysave{\greendofelementpenalty }%
+ \xdef\greendofelementpenalty{10001}%
+ \xdef\gre@hyphenpenaltysave{\grehyphenpenalty }%
+ \xdef\grehyphenpenalty{10001}%
\fi %
}%
@@ -1599,17 +1668,17 @@
% 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 %
+ \xdef\grenobreakpenalty{\gre@nobreakpenaltysave }%
+ \xdef\greendofwordpenalty{\gre@endofwordpenaltysave}%
+ \xdef\greendofsyllablepenalty{\gre@endofsyllablepenaltysave}%
+ \xdef\greendafterbarpenalty{\gre@endafterbarpenaltysave}%
+ \xdef\greendafterbaraltpenalty{\gre@endafterbaraltpenaltysave}%
+ \xdef\greendofelementpenalty{\gre@endofelementpenaltysave}%
+ \xdef\grehyphenpenalty{\gre@hyphenpenaltysave}%
\ifcase #1\relax % 0
- \gre@penalty{\the\gre@space@count@endofelementpenalty}%
+ \gre@penalty{\greendofelementpenalty}%
\or % 1
- \gre@penalty{\the\gre@space@count@endofsyllablepenalty}%
+ \gre@penalty{\greendofsyllablepenalty}%
\or % 2
% end of score, no penalty needs to be added
\or % 3
@@ -1728,6 +1797,38 @@
\relax%
}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% The following style functions are defined for backwards compatibility. They will eventually be removed.
+\def\greinitialformat#1{% OBSOLETE
+ \relax %
+}
+\let\gre@empty@initialformat\greinitialformat
+
+\def\grebiginitialformat#1{% OBSOLETE
+ \relax %
+}
+\let\gre@empty@biginitialformat\grebiginitialformat
+
+\def\gretranslationformat#1{% OBSOLETE
+ \relax %
+}%
+\let\gre@empty@translationformat\gretranslationformat
+
+\def\grenormalstafflinesformat{% OBSOLETE
+ \relax %
+}%
+\let\gre@empty@normalstafflinesformat\grenormalstafflinesformat
+
+\def\greadditionalstafflinesformat{% OBSOLETE
+ \relax %
+}%
+\let\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def\GreSetStaffLinesFormat#1{%OBSOLETE
+ \gre@obsolete{\protect\GreSetStaffLinesFormat}{\protect\grechangestyle{normalstafflines}}%
+}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Master function for changing element formats
@@ -1756,6 +1857,10 @@
\relax %
}%
+\def\setgrefactor#1{%OBSOLETE
+ \gre@obsolete{\protect\setgrefactor}{\protect\grechangestaffsize}%
+}%
+
%%%%%%%%%%%%%%%%%%%
%% headers
%%%%%%%%%%%%%%%%%%%
@@ -1788,7 +1893,24 @@
]%
}%
-\def\gre@allowdeprecated@asboolean{\ifgre@allowdeprecated true\else false\fi}%
+
+% User macro to force gregriotex to recompile gabc files. Useful for when there
+% are changes to gregoriotex but the GREGORIOTEX API VERSION is not changed.
+\def\forcecompilegabc{%OBSOLETE
+ \gre@obsolete{\protect\forcecompilegabc}{\protect\gresetcompilegabc{force}}%
+}%
+
+% User macro to let gregoriotex auto recompile gabc files as necessary.
+% Intended to be used in the main tex file to revert the previous macro.
+\def\autocompilegabc{%OBSOLETE
+ \gre@obsolete{\protect\autocompilegabc}{\protect\gresetcompilegabc{auto}}%
+}%
+
+% User macro to force score inclusion without compilation.
+\def\nevercompilegabc{%OBSOLETE
+ \gre@obsolete{\protect\nevercompilegabc}{\protect\gresetcompilegabc{never}}%
+}
+
% Internal marco which includes a score when \gregorioscore is called without the optional argument. Behavior is determined by the value of \gre@compilegabc flag.
%
@@ -1809,10 +1931,10 @@
\input #1%
\or% case 1, auto compile
\gre@debugmsg{compile}{Auto compile #1}%
- \directlua{gregoriotex.include_score([[#1]], nil, \gre@allowdeprecated@asboolean)}%
+ \directlua{gregoriotex.include_score([[#1]], nil)}%
\or% case 2, force compile
\gre@debugmsg{compile}{Forced to compile #1}%
- \directlua{gregoriotex.include_score([[#1]], true, \gre@allowdeprecated@asboolean)}%
+ \directlua{gregoriotex.include_score([[#1]], true)}%
\fi%
\relax%
}%
@@ -1828,11 +1950,11 @@
\else%
\ifx #1f\relax%
\gre@debugmsg{compile}{Override force compiling #2}%
- \directlua{gregoriotex.include_score([[#2]], true, \gre@allowdeprecated@asboolean)}%
+ \directlua{gregoriotex.include_score([[#2]], true)}%
\else%
\ifx #1a\relax%
\gre@debugmsg{compile}{Override auto compiling #2}%
- \directlua{gregoriotex.include_score([[#2]], nil, \gre@allowdeprecated@asboolean)}%
+ \directlua{gregoriotex.include_score([[#2]], nil)}%
\else%
\gre@error{Unrecognized option "#1" for \protect\includescore\MessageBreak Possible options are: 'f', 'a', and 'n'}%
\fi%
@@ -1843,6 +1965,10 @@
% The main macro used by the user to input scores into the document.
+\def\includescore{%OBSOLETE
+ \gre@obsolete{\protect\includescore}{\protect\gregorioscore}%
+}%
+
\def\gregorioscore{\@ifnextchar[{\gre@gregorioscore@option}%
{\gre@gregorioscore}%
}%
@@ -1864,16 +1990,16 @@
% Macros for compiling short snippets of GABC directly expressed in TeX
-\long\def\gre@gabcsnippet@option[#1]#2{%%% DEPRECATED for removal in 5.0
+\long\def\gre@gabcsnippet@option[#1]#2{%%% DEPRECATED by 4.1
\gre@deprecated{\protect\gabcsnippet with initial-style argument}{\protect\gresetinitiallines}%
- \directlua{gregoriotex.direct_gabc("\luatexluaescapestring{\unexpanded\expandafter{#2}}", "initial-style: #1;", \gre@allowdeprecated@asboolean)}%
+ \directlua{gregoriotex.direct_gabc("\luatexluaescapestring{\unexpanded\expandafter{#2}}", "initial-style: #1;")}%
}%
\long\def\gre@gabcsnippet#1{%
- \directlua{gregoriotex.direct_gabc("\luatexluaescapestring{\unexpanded\expandafter{#1}}", nil, \gre@allowdeprecated@asboolean)}%
+ \directlua{gregoriotex.direct_gabc("\luatexluaescapestring{\unexpanded\expandafter{#1}}")}%
}%
-%%% \gre@gabcsnipper@option is DEPRECATED for removal in 5.0
+%%% \gre@gabcsnipper@option is DEPRECATED by 4.1
\def\gabcsnippet{\@ifnextchar[{\gre@gabcsnippet@option}{\gre@gabcsnippet}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1909,6 +2035,14 @@
]%
}%
+\def\GreUseNormalHyphen{%OBSOLETE
+ \gre@obsolete{\protect\GreUseNormalHyphen}{\protect\greseteolhyphen{normal}}%
+}%
+
+\def\GreUseZeroHyphen{%OBSOLETE
+ \gre@obsolete{\protect\GreUseZeroHyphen}{\protect\greseteolhyphen{zero}}%
+}%
+
% macro to force hyphenation of all syllables.
\newif\ifgre@forcehyphen\gre@forcehyphenfalse%
\def\gresethyphen#1{%
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua
index 125acc458b4..589c2915524 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.lua
@@ -20,7 +20,7 @@
-- this file contains lua functions used by GregorioTeX St. Gall ancient
-- neume support when called with LuaTeX.
--- GREGORIO_VERSION 4.2.0-beta1
+-- GREGORIO_VERSION 4.1.2
local catcode_at_letter = luatexbase.catcodetables['gre@atletter']
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
index 15d18920417..7f4b7a08f36 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-nabc.tex
@@ -20,7 +20,7 @@
% this file contains macros for St. Gall ancient neume support
\gre@debugmsg{general}{Loading gregoriotex-nabc.tex}%
-\gre@declarefileversion{gregoriotex-nabc.tex}{4.2.0-beta1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-nabc.tex}{4.1.2}% GREGORIO_VERSION
\xdef\gre@nabcfontname{gregall}%
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua
index 17879fe855b..d7064f22fd4 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.lua
@@ -19,7 +19,7 @@
-- this file contains lua functions to support signs used by GregorioTeX.
--- GREGORIO_VERSION 4.2.0-beta1
+-- GREGORIO_VERSION 4.1.2
local err = gregoriotex.module.err
local warn = gregoriotex.module.warn
@@ -135,8 +135,8 @@ local offset_cases = {
-- oriscus as last note
{
case = 'FinalOriscus',
- v = [[\gre@vepisemaorrareaux{0}{\GreCPAscendensOriscus}{0}{0}{#2}{#3}{#4}]],
- h = [[\gre@hepisorlineaux{\GreCPAscendensOriscus}{\gre@char@he@oriscus{#4}}{2}{#3}]],
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPOriscus}{0}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\GreCPOriscus}{\gre@char@he@oriscus{#4}}{2}{#3}]],
},
-- second-to-last note, with a second ambitus of one, when last note is a
-- standard punctum (like the second note of ghg)
@@ -155,7 +155,7 @@ local offset_cases = {
-- oriscus as first note, disconnected from next note
{
case = 'InitialOriscus',
- v = [[\gre@vepisemaorrareaux{0}{\GreCPDescendensOriscus}{0}{0}{#2}{#3}{#4}]],
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPOriscusReversus}{0}{0}{#2}{#3}{#4}]],
h = [[\gre@hepisorlineaux{0}{\gre@char@he@oriscus{#4}}{0}{#3}]],
},
-- quilisma as first note, disconnected from next note
@@ -370,7 +370,7 @@ local offset_cases = {
-- oriscus as first note, connected to next higher note
{
case = 'InitialConnectedOriscus',
- v = [[\gre@vepisemaorrareaux{0}{\GreCPAscendensOriscusLineTR}{0}{0}{#2}{#3}{#4}]],
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPOriscusLineTR}{0}{0}{#2}{#3}{#4}]],
h = [[\gre@hepisorlineaux{0}{\gre@char@he@oriscus@line@tr{#4}}{0}{#3}]],
},
-- punctum as last note, connected to prior higher note
@@ -407,13 +407,13 @@ local offset_cases = {
-- least two
{
case = 'SalicusOriscusWide',
- v = [[\gre@vepisemaorrareaux{\GreCPVirgaStrataThreeNothing}{\GreCPAscendensOriscusLineBLTR}{3}{0}{#2}{#3}{#4}]],
+ v = [[\gre@vepisemaorrareaux{\GreCPVirgaStrataThreeNothing}{\GreCPSalicusOriscus}{3}{0}{#2}{#3}{#4}]],
h = [[\gre@hepisorlineaux{\GreCPVirgaStrataThreeNothing}{\gre@char@he@salicus@oriscus{#4}}{4}{#3}]],
},
-- "oriscus" as the middle note of a salicus with a second ambitus of one
{
case = 'SalicusOriscusOne',
- v = [[\gre@vepisemaorrareaux{\GreCPVirgaStrataOneNothing}{\GreCPAscendensOriscus}{3}{0}{#2}{#3}{#4}]],
+ v = [[\gre@vepisemaorrareaux{\GreCPVirgaStrataOneNothing}{\GreCPOriscus}{3}{0}{#2}{#3}{#4}]],
h = [[\gre@hepisorlineaux{\GreCPVirgaStrataOneNothing}{\gre@char@he@salicus@oriscus{#4}}{4}{#3}]],
},
-- punctum fused to the next note
@@ -431,8 +431,8 @@ local offset_cases = {
-- oriscus fused to the next note
{
case = 'LeadingOriscus',
- v = [[\gre@vepisemaorrareaux{0}{\GreCPAscendensOriscus}{0}{0}{#2}{#3}{#4}]],
- h = [[\gre@hepisorlineaux{\GreCPAscendensOriscusTwoUp}{\gre@char@he@oriscus{#4}}{2}{#3}]],
+ v = [[\gre@vepisemaorrareaux{0}{\GreCPOriscus}{0}{0}{#2}{#3}{#4}]],
+ h = [[\gre@hepisorlineaux{\GreCPOriscusTwoUp}{\gre@char@he@oriscus{#4}}{2}{#3}]],
},
-- flat
{
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
index b008290faa0..f1c863c330a 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
@@ -23,7 +23,7 @@
\def\grebarbracewidth{.58879}%
\gre@debugmsg{general}{Loading gregoriotex-signs.tex}%
-\gre@declarefileversion{gregoriotex-signs.tex}{4.2.0-beta1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-signs.tex}{4.1.2}% GREGORIO_VERSION
\def\gre@usestylecommon{%
\ifgre@usestylefont\else %
@@ -143,6 +143,14 @@
}%
+\def\greremoveclef{% OBSOLETE
+ \gre@obsolete{\protect\greremoveclef}{\protect\gresetclef{invisible}}%
+}%
+
+\def\grenormalclef{% OBSOLETE
+ \gre@obsolete{\protect\grenormalclef}{\protect\gresetclef{visible}}%
+}%
+
%% marcro to define the clef that will appear at the beginning of the lines
% the first argument is the type : f or c, and the second is the height
% the third argument is whether we must type a space after or not (0 if not, 1 if yes)
@@ -302,53 +310,28 @@
\gre@skip@temp@four = \gre@space@skip@clefchangespace\relax%
\gre@hskip\gre@skip@temp@four %
\else %
- \ifdim\gre@skip@bar@lastskip=0pt\else % we're after a bar:
- % here it means that there is a bar before the clef, so we skip the difference between the normal space and the space around bars with clef changes
- \gre@skip@temp@four = -\gre@space@skip@spacearoundclefbars\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
+ % here it means that there is a bar before the clef, so we skip the difference between the normal space and the space around bars with clef changes
+ \gre@skip@temp@four = -\gre@space@skip@spacearoundclefbars\relax%
+ \gre@hskip\gre@skip@temp@four %
\fi %
- \GreNoBreak %
\gre@typeclef{#1}{#2}{1}{0}{#4}{#5}{#6}{#7}%
- \ifnum\gre@insidediscretionary=0\relax %
- \gre@skip@temp@four = \gre@space@skip@clefchangespace\relax%
- \else %
- \gre@skip@temp@four = \gre@space@skip@interwordspacenotes\relax%
- \fi %
+ \gre@skip@temp@four = \gre@space@skip@clefchangespace\relax%
\gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
\relax%
}%
% custos just typesets a custos, useful for before the key changes for example
% #1 is the height
-\def\GreCustos#1#2{%
- \GreNoBreak %
+% #2 is indicating if the custo ends the line
+\def\GreCustos#1{%
\ifdim\gre@skip@bar@lastskip=0pt\else % we're after a bar:
\kern-\gre@skip@bar@lastskip %
- \GreNoBreak %
- \fi %
- \ifgre@firstglyph% we check if it is the first glyph
- \global\gre@firstglyphfalse%
- \ifnum\gre@insidediscretionary=0\else %
- \gre@skip@temp@four=\gre@space@skip@interwordspacenotes %
- \kern\gre@skip@temp@four%
- \GreNoBreak %
- \fi %
- \else%
- \ifgre@endofscore %
- \gre@skip@temp@four=\gre@space@skip@spacebeforeeolcustos %
- \else %
- \gre@skip@temp@four=\gre@space@skip@spacebeforeinlinecustos %
- \fi %
- \kern\gre@skip@temp@four%
- \GreNoBreak %
\fi %
- \gre@custosalteration{#1}{#2}%
- \GreNoBreak%
+ \gre@skip@temp@four = \gre@space@skip@spacebeforeinlinecustos\relax%
+ \kern\gre@skip@temp@four%
\gre@calculate@glyphraisevalue{#1}{0}{}%
%here we need some tricks to draw the line before the custos (for the color)
- \setbox\gre@box@temp@width=\hbox{\gre@pickcustos{#1}{1}}%
+ \setbox\gre@box@temp@width=\hbox{\gre@pickcustos{#1}}%
\gre@dimen@temp@three=\wd\gre@box@temp@width %
\ifgre@showlines %
\ifnum#1<\gre@pitch@belowstaff\relax %
@@ -371,26 +354,26 @@
\kern\gre@skip@bar@lastskip %
\GreNoBreak %
\fi %
- \directlua{gregoriotex.adjust_line_height(\gre@insidediscretionary)}%
\relax %
}%
% typesets a custos for the end of the score
-\def\GreFinalCustos#1#2{%
+\def\GreFinalCustos#1{%
+ \GreNoBreak%
+ \gre@dimen@temp@four = \glueexpr(\gre@space@skip@spacebeforeeolcustos)\relax%
+ \kern\gre@dimen@temp@four %
\GreNoBreak%
- \GreCustos{#1}{#2}%
+ \GreCustos{#1}%
\gre@endofglyphcommon %
}
% the argument is the height
-\edef\gre@nextcustospitch{\gre@pitch@dummy}%
-\edef\gre@nextcustosalteration{}%
-\def\GreNextCustos#1#2{%
- \gre@debugmsg{custos}{nextcustos = #1,#2}%
+\edef\gre@nextcustos{\gre@pitch@dummy}%
+\def\GreNextCustos#1{%
+ \gre@debugmsg{custos}{nextcustos = #1}%
\ifnum\gre@insidediscretionary=0\relax %
\gre@debugmsg{custos}{not discretionary}%
- \edef\gre@nextcustospitch{#1}%
- \edef\gre@nextcustosalteration{#2}%
+ \edef\gre@nextcustos{#1}%
\ifgre@blockeolcustos\else%
\gre@debugmsg{custos}{not blocked}%
\gre@calculate@glyphraisevalue{#1}{0}{}%
@@ -398,19 +381,12 @@
\setbox\gre@box@temp@width=\hbox{%
% we type a hskip and the we type the custos
\gre@hskip\gre@space@skip@spacebeforeeolcustos\relax %
- \gre@custosalteration{#1}{#2}%
- \GreNoBreak%
- \raise \gre@dimen@glyphraisevalue\relax%
- \hbox{%
- \gre@pickcustos{#1}{2}\relax %
- }%
+ \gre@pickcustos{#1}\relax %
}%
\gre@dimen@temp@three=\wd\gre@box@temp@width %
% we make \wd\gre@box@temp@sign contain the width of a custos
\setbox\gre@box@temp@sign=\hbox{%
- \gre@custosalteration{#1}{#2}%
- \GreNoBreak%
- \gre@pickcustos{#1}{0}\relax %
+ \gre@pickcustos{#1}\relax %
}%
\gre@localrightbox{%
\ifgre@showlines %
@@ -420,6 +396,7 @@
\gre@additionaltopcustoslineend %
\fi\fi %
\fi %
+ \raise \gre@dimen@glyphraisevalue\relax%
\copy\gre@box@temp@width %
}%
\fi %
@@ -439,6 +416,10 @@
\raise\gre@dimen@temp@five %
\hbox to 0pt{%
\gre@style@additionalstafflines %
+ \ifx\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat% OBSOLETE
+ \else % OBSOLETE
+ \gre@obsolete{\protect\greadditionalstafflinesformat}{\protect\grechangestyle{additionalstafflinesformat}}% OBSOLETE
+ \fi% OBSOLETE
\kern\gre@dimen@temp@three %
\gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@sign + \gre@space@dimen@additionalcustoslineswidth)\relax%
\kern-\gre@dimen@temp@five %
@@ -459,6 +440,10 @@
\raise\gre@dimen@temp@five %
\hbox to 0pt{%
\gre@style@additionalstafflines %
+ \ifx\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat% OBSOLETE
+ \else % OBSOLETE
+ \gre@obsolete{\protect\greadditionalstafflinesformat}{\protect\grechangestyle{additionalstafflinesformat}}% OBSOLETE
+ \fi% OBSOLETE
\kern\gre@dimen@temp@three %
\gre@dimen@temp@five=\dimexpr(\wd\gre@box@temp@sign+\gre@space@dimen@additionalcustoslineswidth)\relax%
\kern-\gre@dimen@temp@five %
@@ -481,6 +466,10 @@
\raise\gre@dimen@temp@five %
\hbox to 0pt{%
\gre@style@additionalstafflines %
+ \ifx\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat% OBSOLETE
+ \else % OBSOLETE
+ \gre@obsolete{\protect\greadditionalstafflinesformat}{\protect\grechangestyle{additionalstafflinesformat}}% OBSOLETE
+ \fi% OBSOLETE
\hss %
\kern\gre@dimen@temp@three %
\gre@dimen@temp@five=\dimexpr((\gre@space@dimen@additionalcustoslineswidth*2)+\wd\gre@box@temp@sign)\relax %
@@ -501,6 +490,10 @@
\raise\gre@dimen@temp@five %
\hbox to 0pt{%
\gre@style@additionalstafflines %
+ \ifx\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat% OBSOLETE
+ \else % OBSOLETE
+ \gre@obsolete{\protect\greadditionalstafflinesformat}{\protect\grechangestyle{additionalstafflinesformat}}% OBSOLETE
+ \fi% OBSOLETE
\hss %
\kern\gre@dimen@temp@three %
\gre@dimen@temp@five=\dimexpr((\gre@space@dimen@additionalcustoslineswidth*2)+\wd\gre@box@temp@sign)\relax %
@@ -511,34 +504,7 @@
\relax %
}%
-\newif\ifgre@usecustosalteration%
-\gre@usecustosalterationtrue%
-\def\gresetcustosalteration#1{%
- \IfStrEqCase{#1}{%
- {visible}{\gre@usecustosalterationtrue}%
- {invisible}{\gre@usecustosalterationfalse}%
- }[% all other cases
- \gre@error{Unrecognized option "#1" for \protect\gresetcustosalteration\MessageBreak Possible options are: 'visible' and 'invisible'}%
- ]%
-}%
-\def\gre@custosalteration#1#2{%
- \ifgre@usecustosalteration %
- \IfStrEq{#2}{}{}{\csname Gre#2\endcsname{#1}{0}{}{}{}}%
- \fi %
-}%
-
-% #2 is 0 for measurement only, 1 in the normal case, 2 for the right box
-\def\gre@pickcustos#1#2{%
- % set attributes to adjust the line height for the pitch of the custos
- \ifcase#2% 0
- \or % 1
- \global\advance\gre@attr@glyph@id by 1\relax %
- \GreGlyphHeights{#1}{#1}%
- \or % 2
- \ifgre@eolshiftsenabled %
- \GreGlyphHeights{#1}{#1}%
- \fi %
- \fi %
+\def\gre@pickcustos#1{%
\ifcase#1%
\or\or%
\or\gre@fontchar@custostopmiddle %
@@ -966,7 +932,7 @@
\gre@savepos %
\kern.5\wd\gre@box@temp@sign %
\fi %
- \directlua{gregoriotex.save_length(#1, #3)}%
+ \directlua{gregoriotex.var_brace_note_pos(#1, #3)}%
\fi %
\relax %
}%
@@ -1074,6 +1040,11 @@
\relax %
}%
+\gdef\grelowchoralsignstyle#1{\relax}% OBSOLETE
+\let\gre@empty@lowchoralsignstyle\grelowchoralsignstyle%
+\gdef\grehighchoralsignstyle#1{\relax}% OBSOLETE
+\let\gre@empty@highchoralsignstyle\grehighchoralsignstyle%
+
% quite simple function: #1 is the height, #2 is the string, #3 is #2 of punctum mora, #4 is #3 of punctum mora
% #3 is 1 if it must be a bit higher
\def\GreLowChoralSign#1#2#3{%
@@ -1087,12 +1058,20 @@
\gre@calculate@glyphraisevalue{#1}{10}{}%
\fi %
\raise\gre@dimen@glyphraisevalue\hbox{\gre@style@lowchoralsign#2\endgre@style@lowchoralsign}%
+ \ifx\gre@empty@lowchoralsignstyle\grelowchoralsignstyle% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grelowchoralsignstyle}{\protect\grechangestyle{lowchoralsign}}% OBSOLETE
+ \fi% OBSOLETE
\relax %
}%
\def\GreHighChoralSign#1#2#3{%
\GreNoBreak %
\gre@vepisemaorrare{#1}{#3}{}{3}{\gre@style@highchoralsign#2\endgre@style@highchoralsign}%
+ \ifx\gre@empty@highchoralsignstyle\grehighchoralsignstyle% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\grehighchoralsignstyle}{\protect\grechangestyle{highchoralsign}}% OBSOLETE
+ \fi% OBSOLETE
\relax %
}%
@@ -1342,6 +1321,10 @@
\ifgre@boxing\else %
\xdef\gre@dimen@savedglyphraise{\the\gre@dimen@glyphraisevalue}%
\gre@style@additionalstafflines %
+ \ifx\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat% OBSOLETE
+ \else % OBSOLETE
+ \gre@obsolete{\protect\greadditionalstafflinesformat}{\protect\grechangestyle{additionalstafflinesformat}}% OBSOLETE
+ \fi% OBSOLETE
\gre@hepisorline{\gre@pitch@dummy}{#1}{#2}{#3}{f}{}{}%
\endgre@style@additionalstafflines%
\gre@dimen@glyphraisevalue=\gre@dimen@savedglyphraise\relax%
@@ -1365,6 +1348,10 @@
\ifgre@showlines %
\xdef\gre@dimen@savedglyphraise{\the\gre@dimen@glyphraisevalue}%
\gre@style@additionalstafflines %
+ \ifx\gre@empty@additionalstafflinesformat\greadditionalstafflinesformat% OBSOLETE
+ \else % OBSOLETE
+ \gre@obsolete{\protect\greadditionalstafflinesformat}{\protect\grechangestyle{additionalstafflinesformat}}% OBSOLETE
+ \fi% OBSOLETE
\gre@drawadditionalline{#1}{#2}{#3}{#4}{#5}{#6}%
\endgre@style@additionalstafflines%
\gre@dimen@glyphraisevalue=\gre@dimen@savedglyphraise\relax%
@@ -1480,6 +1467,14 @@
\newif\ifgre@hepisemabridge
\gre@hepisemabridgetrue
+\def\AddHEpisemusBridges{%OBSOLETE
+ \gre@obsolete{\protect\AddHEpisemusBridges}{\protect\gresethepisema{bridge}}%
+}%
+
+\def\RemoveHEpisemusBridges{%OBSOLETE
+ \gre@obsolete{\protect\RemoveHEpisemusBridges}{\protect\gresethepisema{break}}%
+}%
+
\def\gresethepisema#1{%
\IfStrEqCase{#1}{%
{bridge}%
@@ -1989,7 +1984,6 @@
\gre@debugmsg{spacing}{Last bar space: \the\gre@skip@temp@four}%
\global\gre@dimen@lastglyphwidth=\wd\gre@box@temp@width %
\directlua{gregoriotex.adjust_line_height(\gre@insidediscretionary)}%
- \global\gre@firstglyphfalse %
\relax%
}%
@@ -2066,6 +2060,14 @@
]%
}%
+\def\GreHidePCLines{%OBSOLETE
+ \gre@obsolete{\protect\GreHidePCLines}{\protect\gresetlinesbehindpunctumcavum{invisible}}%
+}%
+
+\def\GreDontHidePCLines{%OBSOLETE
+ \gre@obsolete{\protect\GreDontHidePCLines}{\protect\gresetlinesbehindpunctumcavum{visible}}%
+}%
+
% flag to indicate that lines behind an alteration should be hidden
\newif\ifgre@hidealtlines
% default state is to not hide them
@@ -2083,6 +2085,14 @@
]%
}%
+\def\GreHideAltLines{%OBSOLETE
+ \gre@obsolete{\protect\GreHideAltLines}{\protect\gresetlinesbehindalteration{invisible}}%
+}%
+
+\def\GreDontHideAltLines{%OBSOLETE
+ \gre@obsolete{\protect\GreDontHideAltLines}{\protect\gresetlinesbehindalteration{visible}}%
+}%
+
% is last glyph a cavum?
\newcount\gre@count@lastglyphiscavum
% 0 if no
@@ -2213,6 +2223,14 @@
}%
+\def\UseAlternatePunctumCavum{%OBSOLETE
+ \gre@obsolete{\protect\UseAlternatePunctumCavum}{\protect\gresetpunctumcavum{alternate}}%
+}%
+
+\def\UseNormalPunctumCavum{%OBSOLETE
+ \gre@obsolete{\protect\UseNormalPunctumCavum}{\protect\gresetpunctumcavum{normal}}%
+}%
+
\def\gre@char@cavum#1#2#3#4#5#6#7#8{%
\setbox\gre@box@temp@width=\hbox{#7}%
\global\gre@dimen@lastglyphwidth=\wd\gre@box@temp@width %
@@ -2248,14 +2266,14 @@
{\gre@font@music\GreCPPunctumCavumInclinatumAuctus}{\gre@font@music\GreCPPunctumCavumInclinatumAuctusHole}%
}%
-\def\GreAscendensOriscusCavum#1#2#3#4#5#6{%
+\def\GreOriscusCavum#1#2#3#4#5#6{%
\gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPAscendensOriscusCavum}{\gre@font@music\GreCPAscendensOriscusCavumHole}%
+ {\gre@font@music\GreCPOriscusCavum}{\gre@font@music\GreCPOriscusCavumHole}%
}%
-\def\GreDescendensOriscusCavum#1#2#3#4#5#6{%
+\def\GreOriscusCavumAuctus#1#2#3#4#5#6{%
\gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPDescendensOriscusCavum}{\gre@font@music\GreCPDescendensOriscusCavumHole}%
+ {\gre@font@music\GreCPOriscusCavumReversus}{\gre@font@music\GreCPOriscusCavumReversusHole}%
}%
\def\GreOriscusCavumDeminutus#1#2#3#4#5#6{%
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex
index d46efe02a3a..675dcdf39d5 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-spaces.tex
@@ -20,7 +20,7 @@
% this file contains definitions of spaces
\gre@debugmsg{general}{Loading gregoriotex-spaces.tex}%
-\gre@declarefileversion{gregoriotex-spaces.tex}{4.2.0-beta1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-spaces.tex}{4.1.2}% GREGORIO_VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for tuning penalties
@@ -29,51 +29,38 @@
%% The following macros enable users to tune penalties used in Gregorio
% macro to force a break on a new line
-\def\GreForceBreak{\gre@penalty{\the\gre@space@count@newlinepenalty}}%
+\def\GreForceBreak{\gre@penalty{\grenewlinepenalty}}%
% macro to prevent a line break
-\def\GreNoBreak{\gre@penalty{\the\gre@space@count@nobreakpenalty}}%
+\def\GreNoBreak{\gre@penalty{\grenobreakpenalty}}%
-
-\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%
%% The following macros cancel some useless penalties, and reinstates them
%% at the end of a score
\def\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 %
- %
- \hyphenpenalty=\gre@space@count@hyphenpenalty %
- \exhyphenpenalty=\gre@space@count@hyphenpenalty %
+ \xdef\gre@hyphenpenaltysave{\the\hyphenpenalty }%
+ \xdef\gre@exhyphenpenaltysave{\the\exhyphenpenalty }%
+ \xdef\gre@doublehyphendemeritssave{\the\doublehyphendemerits }%
+ \xdef\gre@finalhyphendemeritssave{\the\finalhyphendemerits }%
+ \xdef\gre@brokenpenaltysave{\the\brokenpenalty }%
+ \hyphenpenalty=\grehyphenpenalty\relax %
+ \exhyphenpenalty=\grehyphenpenalty\relax %
\doublehyphendemerits=0\relax %
\finalhyphendemerits=0\relax %
- \brokenpenalty=\gre@space@count@brokenpenalty %
- \looseness=\gre@space@count@looseness %
- \tolerance=\gre@space@count@tolerance %
- \pretolerance=\gre@space@count@pretolerance %
- \emergencystretch=\gre@space@skip@emergencystretch\relax %
- \widowpenalty=\gre@space@count@widowpenalty %
- \clubpenalty=\gre@space@count@clubpenalty %
+ \brokenpenalty=\grebrokenpenalty\relax %
+ \xdef\gre@loosenesssave{\the\looseness}%
+ \xdef\gre@tolerancesave{\the\tolerance}%
+ \xdef\gre@pretolerancesave{\the\pretolerance}%
+ \xdef\gre@emergencystretchsave{\the\emergencystretch}%
+ \xdef\gre@widowpenaltysave{\the\widowpenalty}%
+ \xdef\gre@clubpenaltysave{\the\clubpenalty}%
+ \looseness=\grelooseness %
+ \tolerance=\gretolerance %
+ \pretolerance=\grepretolerance %
+ \emergencystretch=\greemergencystretch %
+ \widowpenalty=\grewidowpenalty %
+ \clubpenalty=\greclubpenalty %
}%
\def\gre@restorepenalties{%
@@ -162,6 +149,9 @@
\relax %
}%
+\def\setstafflinethickness{%OBSOLETE
+ \gre@obsolete{\protect\setstafflinethickness}{\protect\grechangestafflinethickness}%
+}%
%constantglyphraise is the space between the 0 of the gregorian fonts and the effective 0 of the TeX score
\newdimen\gre@dimen@constantglyphraise\relax%
@@ -441,7 +431,7 @@
% The maximum value is wd(custos) + spacebeforeeolcustos
% Were the eolshift larger than this the lyrics would stick out
% into the margin
- \setbox\gre@box@temp@width=\hbox{\gre@pickcustos{\gre@pitch@g}{0}}%
+ \setbox\gre@box@temp@width=\hbox{\gre@pickcustos{\gre@pitch@g}}%
\gre@skip@temp@three = \glueexpr(\wd\gre@box@temp@width+\gre@space@skip@spacebeforeeolcustos)\relax%
\gre@debugmsg{eolshift}{custos + space before custos = \the\gre@skip@temp@three}%
% pick the smaller of the two values calculated above
@@ -455,10 +445,6 @@
\else%
\global\gre@dimen@eolshift=0pt\relax%
\fi %
- % if the notes are not visible, then there's no shifting allowed.
- \ifgre@shownotes\else%
- \global\gre@dimen@eolshift=0pt\relax%
- \fi%
\gre@debugmsg{eolshift}{eolshift: \the\gre@dimen@eolshift}%
\relax %
}
@@ -819,6 +805,10 @@
\gre@generatelines %
\gre@calculate@constantglyphraise %
\endgre@style@translation%
+ \ifx\gre@empty@translationformat\gretranslationformat% OBSOLETE
+ \else% OBSOLETE
+ \gre@obsolete{\protect\gretranslationformat}{\protect\grechangestyle{translation}}% OBSOLETE
+ \fi% OBSOLETE
\relax %
}%
@@ -1183,20 +1173,25 @@
%% 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{%
+ \gre@dimension{#1}{#2}%
\csname newif\expandafter\endcsname\csname ifgre@scale@#1\endcsname%
\IfStrEqCase{#3}{%
+ {1}%
+ {\gre@obsolete{A numerical (1) last argument for \protect\grecreatedim}{'scalable'}}%
+ {0}%
+ {\gre@obsolete{A numerical (0) last argument for \protect\grecreatedim}{'fixed'}}%
{scalable}%
{\grescaledim{#1}{true}}%
{fixed}%
{\grescaledim{#1}{false}}%
- {inherited}%
- {\grescaledim{#1}{false}}%
}[% all other cases
\gre@error{Unrecognized option "#3" for \protect\grecreatedim\MessageBreak Possible options are: 'scalable' and 'fixed'}%
]%
- \gre@dimension{#1}{#2}{#3}%
}%
+\def\gresetdim{%OBSOLETE
+ \gre@obsolete{\protect\gresetdim}{\protect\grecreatedim}%
+}%
% a macro for changing a dimension. Unlike \grecreatedim, this function won’t create a new distance, just change an existing one.
\def\grechangedim#1#2#3{%
@@ -1211,28 +1206,18 @@
\fi%
\ifcsname gre@space@\gre@prefix @#1\endcsname%
\gre@debugmsg{spacing}{It does exist.}%
+ \gre@dimension{#1}{#2}%
\IfStrEqCase{#3}{%
+ {1}%
+ {\gre@obsolete{A numerical (1) last argument for \protect\grechangedim}{'scalable'}}%
+ {0}%
+ {\gre@obsolete{A numerical (0) last argument for \protect\grechangedim}{'fixed'}}%
{scalable}%
{\grescaledim{#1}{true}}%
{fixed}%
{\grescaledim{#1}{false}}%
- {inherited}%
- {%
- \gre@rubberpermit{#2}%
- \ifgre@rubber%
- \def\gre@prefixII{skip}%
- \else%
- \def\gre@prefixII{dimen}%
- \fi%
- \ifcsname gre@space@\gre@prefixII @#2\endcsname%
- \grescaledim{#1}{false}%
- \else%
- \gre@error{'#1' cannot inherit from '#2'\MessageBreak Please make sure '#2' is a valid GregorioTeX distance}%
- \fi%
- }%
% all other cases
- }[\gre@error{Unrecognized option "#3" for \protect\grechangedim\MessageBreak Possible options are: 'scalable', 'fixed', and 'inherited'}]%
- \gre@dimension{#1}{#2}{#3}%
+ }[\gre@error{Unrecognized option "#3" for \protect\grechangedim\MessageBreak Possible options are: 'scalable' and 'fixed'}]%
\else%
\IfStrEqCase{#1}{% DEPRECATED
{spacearoundsmallbars}% DEPRECATED
@@ -1273,101 +1258,63 @@
}
% The common internals for \grecreatedim and \grechangedim.
-\def\gre@dimension#1#2#3{%
- \IfStrEq{#3}{inherited}{%
- \gre@debugmsg{spacing}{setting inherited distance}%
- \gre@rubberpermit{#1}%
- \ifgre@rubber%
- \def\gre@prefix{skip}%
+\def\gre@dimension#1#2{%
+ \gre@checklengthfalse%
+ %check if #2 is a rubber length (contains plus and/or minus)
+ \IfSubStr{#2}{plus}{\gre@checklengthtrue}{\relax}%
+ \IfSubStr{#2}{minus}{\gre@checklengthtrue}{\relax}%
+ %if #1 is one of the distances which cannot be rubber.
+ \gre@rubberpermit{#1}%
+ % do we try to assign a rubber to one where it's not permitted?
+ \ifgre@rubber%
+ \def\gre@prefix{skip}%
+ \else%
+ \ifgre@checklength%
+ \gre@error{#1 cannot be a rubber length.}%
\else%
\def\gre@prefix{dimen}%
\fi%
- \gre@rubberpermit{#2}%
- \ifgre@rubber%
- \def\gre@prefixII{skip}%
- \else%
- \def\gre@prefixII{dimen}%
- \fi%
- \expandafter\edef\csname gre@space@\gre@prefix @#1\endcsname{\expandafter\unexpanded{\csname gre@space@\gre@prefixII @#2\endcsname}}%
- }{%
- \gre@rubberpermit{#2}%
- \ifgre@rubber%
- \def\gre@prefixII{skip}%
- \else%
- \def\gre@prefixII{dimen}%
- \fi%
- \ifcsname gre@space@\gre@prefixII @#2\endcsname%
- \gre@error{'#1' cannot be '#3' and depend on '#2' at the same time\MessageBreak Either use 'inherited' in the third argument\MessageBreak or give an actual distance in the second}%
- \fi%
- \gre@checklengthfalse%
- %check if #2 is a rubber length (contains plus and/or minus)
- \IfSubStr{#2}{plus}{\gre@checklengthtrue}{\relax}%
- \IfSubStr{#2}{minus}{\gre@checklengthtrue}{\relax}%
- %if #1 is one of the distances which cannot be rubber.
- \gre@rubberpermit{#1}%
- % do we try to assign a rubber to one where it's not permitted?
- \ifgre@rubber%
- \def\gre@prefix{skip}%
- \else%
- \ifgre@checklength%
- \gre@error{#1 cannot be a rubber length.}%
- \else%
- \def\gre@prefix{dimen}%
+ \fi%
+ % special check for bar@rubber
+ \IfStrEq*{#1}{bar@rubber}%
+ {%
+ \gre@skip@temp@one = #2\relax%
+ \ifdim\gre@skip@temp@one=0pt\relax\else%
+ \gre@error{bar@rubber cannot have a non-zero base}%
\fi%
- \fi%
- % special check for bar@rubber
- \IfStrEq*{#1}{bar@rubber}%
- {%
- \gre@skip@temp@one = #2\relax%
- \ifdim\gre@skip@temp@one=0pt\relax\else%
- \gre@error{bar@rubber cannot have a non-zero base}%
- \fi%
- }{}%
- \expandafter\edef\csname gre@space@\gre@prefix @#1\endcsname{#2}%
- \relax %
- }%
+ }{}%
+ \expandafter\edef\csname gre@space@\gre@prefix @#1\endcsname{#2}%
+ \relax %
}
%a macro to use if all you want to do is turn on or off the scaling for a particular distance
\def\grescaledim#1#2{%
- \ifcsname ifgre@scale@#1\endcsname%
- \IfStrEqCase{#2}{%
- {true}%
- {\csname gre@scale@#1true\endcsname}%
- {yes}%
- {\grescaledim{true}}%
- {on}%
- {\grescaledim{true}}%
- {scalable}%
- {\grescaledim{true}}%
- }[% all other cases
- \csname gre@scale@#1false\endcsname%
- ]%
- \else%
- \gre@error{Unrecognized distance "#1" in \protect\grescaledim}%
- \fi%
+ \IfStrEqCase{#2}{%
+ {true}%
+ {\csname gre@scale@#1true\endcsname}%
+ {yes}%
+ {\grescaledim{true}}%
+ {on}%
+ {\grescaledim{true}}%
+ {scalable}%
+ {\grescaledim{true}}%
+ }[% all other cases
+ \csname gre@scale@#1false\endcsname%
+ ]%
}
-\newcount\gre@space@count@newlinepenalty%
-\newcount\gre@space@count@nobreakpenalty%
-\newcount\gre@space@count@endofwordpenalty%
-\newcount\gre@space@count@endofsyllablepenalty%
-\newcount\gre@space@count@endafterbarpenalty%
-\newcount\gre@space@count@endafterbaraltpenalty%
-\newcount\gre@space@count@finalpenalty%
-\newcount\gre@space@count@endofelementpenalty%
-\newcount\gre@space@count@hyphenpenalty%
-\newcount\gre@space@count@brokenpenalty%
-\newcount\gre@space@count@looseness%
-\newcount\gre@space@count@tolerance%
-\newcount\gre@space@count@pretolerance%
-\newcount\gre@space@count@widowpenalty%
-\newcount\gre@space@count@clubpenalty%
+\def\grenoscaledim#1{%OBSOLETE
+ \gre@obsolete{\protect\grenoscaledim}{\protect\grescaledim{...}{no}}%
+}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% space configuration loading
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\GreLoadSpaceConf#1{%OBSOLETE
+ \gre@obsolete{\protect\GreLoadSpaceConf}{\protect\greloadspaceconf}%
+}%
+
\newcount\greconffactor%
\def\greloadspaceconf#1{%
\input gsp-#1.tex\relax %
@@ -1842,3 +1789,36 @@
\fi%
\relax %
}%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Some Macros for changing the spacing around the initial
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%Seeing as these are the distances that people will want to change the most often,
+%we give them their own set of macros to make that easier.
+
+% To change the spacing between annotations.
+%First argument is distance, second is whether it should scale when \gre@factor changes.
+\def\setaboveinitialseparation#1#2{%OBSOLETE
+ \gre@obsolete{\protect\setaboveinitialseparation}{\protect\grechangedim\{annotationseparation\}}%
+}%
+
+
+%To change the space after the initial
+%First argument is distance, second is whether it should scale when \gre@factor changes.
+\def\setspaceafterinitial#1#2{%OBSOLETE
+ \gre@obsolete{\protect\setspaceafterinitial}{\protect\grechangedim{afterinitialshift}}%
+}
+
+%To change the space before the initial
+%First argument is distance, second is whether it should scale when \gre@factor changes.
+\def\setspacebeforeinitial#1#2{%OBSOLETE
+ \gre@obsolete{\protect\setspacebeforeinitial}{\protect\grechangedim{beforeinitialshift}}%
+}%
+
+
+%To change all the distances associated with the initial.
+%First three arguments are distances, last is whether they should scale when \gre@factor changes.
+\def\setinitialspacing#1#2#3#4{%OBSOLETE
+ \gre@obsolete{\protect\setinitialspacing}{\protect\grechangedim{beforeinitialshift}, \protect\grechangedim{manualinitialwidth}, and \protect\grechangedim{afterinitialshift}}%
+}%
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex
index b8afe707735..e6f46024296 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-syllable.tex
@@ -20,7 +20,7 @@
% this file contains definitions of the glyphs and the syllables
\gre@debugmsg{general}{Loading gregoriotex-syllable.tex}%
-\gre@declarefileversion{gregoriotex-syllable.tex}{4.2.0-beta1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-syllable.tex}{4.1.2}% GREGORIO_VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for the typesetting of the different glyphs
@@ -103,7 +103,7 @@
\global\gre@lastendswithmorafalse %
\ifgre@boxing\else\ifgre@firstin@euouae %
\ifgre@raggedbreakbeforeeuouae %
- \directlua{gregoriotex.save_euouae(\the\gre@lasteuouaeindex,2)}%
+ \directlua{gregoriotex.save_pos(\the\gre@lasteuouaeindex,2)}%
\fi %
\gre@firstin@euouaefalse %
\fi\fi %
@@ -112,7 +112,7 @@
\def\gre@endofglyphcommon{%
\ifgre@endofscore %
- \gre@penalty{\the\gre@space@count@finalpenalty}%
+ \gre@penalty{\grefinalpenalty}%
\gre@localleftbox{}%
\gre@localrightbox{}%
\fi %
@@ -132,7 +132,7 @@
% macro to typeset the glyph. attributes are :
% #1: character : the character that it must call
% #2: height : the height it must be raised : can be negative (must be calculated by a preprocessor)
-% #3: typesets the next custos
+% #3: height of the next note : we define the custos with that
% #4: type : the type of glyph, to determine the aligncenter; can be :
%%%%%%%% 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
@@ -160,7 +160,7 @@
\raise\gre@dimen@glyphraisevalue\relax%
\copy\gre@box@temp@width%
\ifgre@endofscore\else\ifgre@boxing\else %
- #3%
+ \GreNextCustos{#3}%
\fi\fi %
\ifgre@firstglyph% we check if it is the first glyph
\gre@calculate@notesaligncenter{#4}%
@@ -212,7 +212,7 @@
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPQuilisma}%
\or %
%case of an oriscus
- \global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPAscendensOriscus}%
+ \global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPOriscus}%
\or %
%case of a punctum inclinatum
\global\setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctumInclinatum}%
@@ -348,30 +348,6 @@
% box that we will use to determine the width of the notes, to determine wether we typeset a - or not after the letters
\newbox\gre@box@syllablenotes%
-\newif\ifgre@showlyrics%
-\gre@showlyricstrue%
-
-\def\gresetlyrics#1{%
- \IfStrEqCase{#1}{%
- {visible}{\gre@showlyricstrue}%
- {invisible}{\gre@showlyricsfalse}%
- }[% all other cases
- \gre@error{Unknown option, "#1" for \protect\gresetlyrics\MessageBreak Possible options are: 'visible' and 'invisible'}%
- ]%
-}%
-
-\newif\ifgre@shownotes%
-\gre@shownotestrue%
-
-\def\gresetnotes#1{%
- \IfStrEqCase{#1}{%
- {visible}{\gre@shownotestrue}%
- {invisible}{\gre@shownotesfalse}%
- }[% all other cases
- \gre@error{Unknown option, "#1" for \protect\gresetnotes\MessageBreak Possible options are: 'visible' and 'invisible'}%
- ]%
-}%
-
% Macro used to fill \gre@box@syllablenotes with everything contained in #1. This
% saves and restores a few values so that when really typesetting #1 in \GreSyllable,
% the result is identical.
@@ -383,11 +359,7 @@
\global\gre@boxingtrue%
\let\ifgre@lastendswithmorasave\ifgre@lastendswithmora%
\xdef\gre@savedlastoflinecount{\number\gre@lastoflinecount\relax }%
- \ifgre@shownotes%
- \setbox\gre@box@syllablenotes=\hbox{#1}%
- \else%
- \setbox\gre@box@syllablenotes=\box\voidb@x%
- \fi%
+ \setbox\gre@box@syllablenotes=\hbox{#1}%
\gre@debugmsg{spacing}{Width of notes: \the\wd\gre@box@syllablenotes}%
\global\gre@boxingfalse%
\global\gre@lastoflinecount=\gre@savedlastoflinecount\relax %
@@ -622,6 +594,13 @@
\xdef\gre@lyriccentering{1}%
+\def\englishcentering{%OBSOLETE
+ \gre@obsolete{\protect\englishcentering}{\protect\gresetlyriccentering{syllable}}%
+}%
+
+\def\defaultcentering{%OBSOLETE
+ \gre@obsolete{\protect\defaultcentering}{\protect\gresetlyriccentering{vowel} }%
+}%
%% options about clivis centering scheme. Clivis are usually aligned by their
%% center, which is different from most neumes. Gregorio has three modes:
@@ -648,6 +627,17 @@
]%
}%
+\def\clivisalignmentalways{%OBSOLETE
+ \gre@obsolete{\protect\clivisalignmentalways}{\protect\gresetclivisalignment{always}}%
+}%
+
+\def\clivisalignmentnever{%OBSOLETE
+ \gre@obsolete{\protect\clivisalignmentnever}{\protect\gresetclivisalignment{never}}%
+}%
+
+\def\clivisalignmentspecial{%OBSOLETE
+ \gre@obsolete{\protect\clivisalignmentspecial}{\protect\gresetclivisalignment{special}}%
+}%
\newif\ifgre@forceemptyfirstsyllablehyphen%
\gre@forceemptyfirstsyllablehyphentrue%
@@ -671,24 +661,6 @@
\newif\ifgre@possibleluahyphenafterthissyllable
\gre@possibleluahyphenafterthissyllablefalse
-\newcount\gre@count@unbreakabletotalnotes %
-\newcount\gre@count@unbreakableinitialnotes %
-\newcount\gre@count@unbreakablefinalnotes %
-% #1 : minimum notes in the syllable before the syllable may be split across lines
-% #2 : minimum notes to keep together at the start of a syllable
-% #3 : minimum notes to keep together at the end of a syllable
-\def\gresetunbreakablesyllablenotes#1#2#3{%
- \gre@count@unbreakabletotalnotes=\number#1\relax %
- \gre@count@unbreakableinitialnotes=\number#2\relax %
- \gre@count@unbreakablefinalnotes=\number#3\relax %
-}%
-\gresetunbreakablesyllablenotes{10}{4}{4}%
-
-\newcount\gre@count@syllablenotes %
-\def\GreSyllableNoteCount#1{%
- \gre@count@syllablenotes=\number#1\relax %
-}%
-
%% general macro : it will typeset the syllable : arguments are :
% #1 : macro setting the letters of this syllable
% #2 : reserved (unused)
@@ -767,11 +739,7 @@
#5%
\gre@calculate@nextbegindifference{\gre@nextfirstsyllablepart}{\gre@nextmiddlesyllablepart}{\gre@nextendsyllablepart}{#7}%
\gre@unsetfixednexttextformat %
- \ifgre@showlyrics%
- \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart}{#6}}}%
- \else%
- \setbox\gre@box@syllabletext=\box\voidb@x%
- \fi%
+ \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart}{#6}}}%
\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%
@@ -807,17 +775,9 @@
\gre@debugmsg{hyphen}{Showing the hyphen}%
% if it's the last syllable of line, the hyphen will be \GreHyph
\ifnum\gre@lastoflinecount=1\relax %
- \ifgre@showlyrics%
- \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart#3{\GreHyph}\relax}{#6}}}%
- \else%
- \setbox\gre@box@syllabletext=\box\voidb@x%
- \fi%
+ \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart#3{\GreHyph}\relax}{#6}}}%
\else %
- \ifgre@showlyrics%
- \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart#3{-}}{#6}}}%
- \else%
- \setbox\gre@box@syllabletext=\box\voidb@x%
- \fi%
+ \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart#3{-}}{#6}}}%
\fi %
% recomputing end difference and final skip with the final hyphen
\gre@calculate@enddifference{\wd\gre@box@syllablenotes}{\wd\gre@box@syllabletext}{\gre@dimen@textaligncenter}{\gre@dimen@notesaligncenter}{0}%
@@ -827,11 +787,7 @@
\gre@debugmsg{hyphen}{No hyphen}%
\gre@attr@dash=1\relax % in this particular case where it is not the end of a word and we haven't put a dash, we set potentital dash to 1
% we rebuild this box, in order it to have the attribute
- \ifgre@showlyrics%
- \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart}{#6}}}%
- \else%
- \setbox\gre@box@syllabletext=\box\voidb@x%
- \fi%
+ \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart}{#6}}}%
\global\gre@possibleluahyphenafterthissyllabletrue %
\fi %
\fi%
@@ -856,9 +812,7 @@
% here we need to unset \gre@attr@dash for the typesetting of notes
\gre@attr@dash=0\relax %
\GreNoBreak % no line breaks between text and notes
- \ifgre@shownotes%
- #9% we do that instead of \unhbox\Syllablnotes, because it would not set the \localrightbox
- \fi%
+ #9% we do that instead of \unhbox\Syllablnotes, because it would not set the \localrightbox
\GreNoBreak % no line breaks between notes and end of syllable skips
\gre@debugmsg{ifdim}{ enddifference < 0pt}%
\ifdim\gre@dimen@enddifference <0pt\relax%
@@ -885,7 +839,7 @@
\gre@usemanualeolcustos %
\fi %
\ifgre@raggedbreakbeforeeuouae %
- \directlua{gregoriotex.save_euouae(#1,1)}%
+ \directlua{gregoriotex.save_pos(#1,1)}%
\ifcase#2\ifcase\directlua{gregoriotex.is_ypos_different(#1)}\relax%
\gre@newlinecommon{1}{1}%
\fi\fi %
@@ -954,14 +908,14 @@
\fi%
\ifnum#3=1\relax %
\GreNoBreak %
- \gre@debugmsg{syllablespacing}{ set penalty \the\gre@space@count@nobreakpenalty}%
+ \gre@debugmsg{syllablespacing}{ set penalty \grenobreakpenalty}%
\else %
\ifnum#2=1\relax %
- \gre@penalty{\the\gre@space@count@endofwordpenalty}%
- \gre@debugmsg{syllablespacing}{ set penalty \the\gre@space@count@endofwordpenalty}%
+ \gre@penalty{\greendofwordpenalty}%
+ \gre@debugmsg{syllablespacing}{ set penalty \greendofwordpenalty}%
\else %
- \gre@penalty{\the\gre@space@count@endofsyllablepenalty}%
- \gre@debugmsg{syllablespacing}{ set penalty \the\gre@space@count@endofsyllablepenalty}%
+ \gre@penalty{\greendofsyllablepenalty}%
+ \gre@debugmsg{syllablespacing}{ set penalty \greendofsyllablepenalty}%
\fi %
\fi %
\ifgre@eolshiftsenabled%
@@ -1024,11 +978,7 @@
% first of all we need to calculate previousenddifference, begindifference, enddifference and nextbegindifference.
#1%
\gre@calculate@textaligncenter{\gre@firstsyllablepart}{\gre@middlesyllablepart}{0}%
- \ifgre@showlyrics%
- \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart}{#6}}}%
- \else%
- \setbox\gre@box@syllabletext=\box\voidb@x%
- \fi%
+ \setbox\gre@box@syllabletext=\hbox{\gre@fixedtextformat{\gre@pointandclick{\gre@firstsyllablepart\gre@middlesyllablepart\gre@endsyllablepart}{#6}}}%
\gre@debugmsg{barspacing}{Width of bar text: \the\wd\gre@box@syllabletext}%
\global\let\gre@newlinecommonsaved\gre@newlinecommon %
\global\let\gre@newlinecommon\gre@newlinecommondelayed %
@@ -1079,9 +1029,7 @@
\kern\dimexpr(\gre@dimen@enddifference% move from end of text to end of bar line
-\wd\gre@box@syllablenotes)\relax % back up from end of bar line to beginning
\GreNoBreak%
- \ifgre@shownotes%
- #9%
- \fi%
+ #9%
\global\let\gre@newlinecommon\gre@newlinecommonsaved %
\GreNoBreak%
% get into position to place the penalty
@@ -1104,17 +1052,14 @@
\ifnum\gre@newlinearg=-1\else %
\gre@count@temp@one=1\relax %
\fi %
- \ifnum\gre@lastoflinecount=1\relax %
- \gre@count@temp@one=1\relax %
- \fi %
\ifgre@endofscore %
\gre@count@temp@one=1\relax %
- \fi %
+ \fi %
% if no end of line or end of score
\ifnum\gre@count@temp@one=0\relax %
% add the penalty
- \gre@debugmsg{barspacing}{after bar penalty: \the\gre@space@count@endafterbarpenalty}%
- \gre@penalty{\the\gre@space@count@endafterbarpenalty}%
+ \gre@debugmsg{barspacing}{after bar penalty: \greendafterbarpenalty}%
+ \gre@penalty{\greendafterbarpenalty}%
\ifgre@eolshiftsenabled%
%If the above penalties don't result in a line break, then we need to undo the eolshift to prevent the next syllable from overlapping with this one. If the line break did occur, then this shift will occur at the beginning of a line and thus will be ignored automatically by TeX.
\kern \dimexpr(\gre@dimen@eolshift)\relax%
@@ -1138,13 +1083,11 @@
\else %
\ifgre@endofscore %
\gre@localleftbox{}%
- \gre@debugmsg{barspacing}{after bar penalty: \gre@space@count@endafterbarpenalty}%
- \gre@penalty{\the\gre@space@count@finalpenalty}%
+ \gre@debugmsg{barspacing}{after bar penalty: \greendafterbarpenalty}%
+ \gre@penalty{\grefinalpenalty}%
\else %
- \ifnum\gre@newlinearg=-1\else %
- \gre@debugmsg{barspacing}{calling new line with argument: \gre@newlinearg}%
- \gre@newlinecommon{\gre@newlinearg}{1}%
- \fi %
+ \gre@debugmsg{barspacing}{calling new line with argument: \gre@newlinearg}%
+ \gre@newlinecommon{\gre@newlinearg}{1}%
\fi %
\fi%
\else%
@@ -1206,10 +1149,8 @@
\gre@dotranslationcenterend %
\gre@mustdotranslationcenterendfalse%
\fi %
- \ifgre@shownotes%
- #9\relax %
- \fi%
- \gre@penalty{\the\gre@space@count@endafterbaraltpenalty }% TODO: isn't it a bit buggy?
+ #9\relax %
+ \gre@penalty{\greendafterbaraltpenalty }% TODO: isn't it a bit buggy?
% end of same code as syllable
\ifnum\gre@lastoflinecount=1\relax %
\global\gre@lastoflinecount=2\relax %
@@ -1252,9 +1193,7 @@
\kern\gre@skip@temp@one %
\gre@skip@temp@one = -\gre@dimen@begindifference\relax%
\kern\gre@skip@temp@one %
- \ifgre@shownotes%
- #9%
- \fi%
+ #9%
\gre@debugmsg{ifdim}{ enddifference < 0pt}%
\ifdim\gre@dimen@enddifference <0pt\relax%
%% important, else we are not really at the end of the syllable
@@ -1318,10 +1257,10 @@
}%
\gresetinitiallines{1}% default to one-line initials
-\def\GreSetInitialStyle#1{%%% DEPRECATED for removal in 5.0
- \gre@deprecated{initial-style gabc header}{\protect\gresetinitiallines}%%% DEPRECATED for removal in 5.0
- \def\gre@opening@initialstyle{#1}%%% DEPRECATED for removal in 5.0
-}%%% DEPRECATED for removal in 5.0
+\def\GreSetInitialStyle#1{%%% DEPRECATED by 4.1
+ \gre@deprecated{initial-style gabc header}{\protect\gresetinitiallines}%%% DEPRECATED by 4.1
+ \def\gre@opening@initialstyle{#1}%%% DEPRECATED by 4.1
+}%%% DEPRECATED by 4.1
%% sets the first syllable text
%% #1 - Initial
@@ -1331,7 +1270,7 @@
%% #5 - Three syllable parts where there is no separated initial
%% #6 - Extra macros to run if there is an initial
\def\GreSetFirstSyllableText#1#2#3#4#5#6{%
- %%% DEPRECATED for removal in 5.0: When \gre@opening@initialstyle is removed, use \gre@initiallines directly in the following line
+ %%% DEPRECATED by 4.1: When \gre@opening@initialstyle is removed, use \gre@initiallines directly in the following line
\ifcase\gre@opening@initialstyle\relax % no initial
\gre@noinitial %
\gre@setfirstsyllabletext#5{#1}{#2#3}{}%
@@ -1354,7 +1293,7 @@
\gre@usemanualeolcustos %
\or % 1 - forced on
\gre@useautoeolcustos %
- \GreNextCustos{\gre@nextcustospitch}{\gre@nextcustosalteration}%
+ \GreNextCustos{\gre@nextcustos}%
\fi %
}%
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua
index 633e1397f6e..1b8416053d7 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.lua
@@ -19,7 +19,7 @@
-- this file contains lua functions to support signs used by GregorioTeX.
--- GREGORIO_VERSION 4.2.0-beta1
+-- GREGORIO_VERSION 4.1.2
local err = gregoriotex.module.err
local warn = gregoriotex.module.warn
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex
index 7b56622e351..f92e00b10b7 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-symbols.tex
@@ -23,7 +23,7 @@
\def\gregoriotex@symbols@loaded{}%
\gre@debugmsg{general}{Loading gregoriotex-symbols.tex}%
-\gre@declarefileversion{gregoriotex-symbols.tex}{4.2.0-beta1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-symbols.tex}{4.1.2}% GREGORIO_VERSION
\RequireLuaModule{gregoriotex}%
@@ -193,6 +193,9 @@
\fi%
}%
+\def\gresep#1#2{%OBSOLETE
+ \gre@obsolete{\protect\gresep}{\protect\greseparator}%
+}
%%%%%%%%%%%
%% Ornamentation
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua
index e00885a3ca5..72775a0a8c1 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua
@@ -24,13 +24,13 @@ local hpack, traverse, traverse_id, has_attribute, count, remove, insert_after,
gregoriotex = gregoriotex or {}
local gregoriotex = gregoriotex
-local internalversion = '4.2.0-beta1' -- GREGORIO_VERSION (comment used by VersionManager.py)
+local internalversion = '4.1.2' -- GREGORIO_VERSION (comment used by VersionManager.py)
local err, warn, info, log = luatexbase.provides_module({
name = "gregoriotex",
- version = '4.2.0-beta1', -- GREGORIO_VERSION
+ version = '4.1.2', -- GREGORIO_VERSION
greinternalversion = internalversion,
- date = "2016/04/27", -- GREGORIO_DATE_LTX
+ date = "2016/05/08", -- GREGORIO_DATE_LTX
description = "GregorioTeX module.",
author = "The Gregorio Project (see CONTRIBUTORS.md)",
copyright = "2008-2015 - The Gregorio Project",
@@ -68,14 +68,11 @@ local line_heights = nil
local new_line_heights = nil
local score_heights = nil
local new_score_heights = nil
-local saved_positions = nil
-local saved_lengths = nil
-local new_saved_lengths = nil
-local saved_newline_before_euouae = nil
-local new_saved_newline_before_euouae = nil
+local var_brace_positions = nil
+local new_var_brace_positions = nil
+local pos_saves = nil
+local new_pos_saves = nil
local auxname = nil
-local snippet_filename = nil
-local snippet_logname = nil
local space_below_staff = 5
local space_above_staff = 13
@@ -137,35 +134,7 @@ local function keys_changed(tab1, tab2)
return false
end
-local function saved_computations_changed(tab1, tab2)
- local score_ids = {}
- local id,_
- for id,_ in pairs(tab1) do
- score_ids[id] = true
- end
- for id,_ in pairs(tab2) do
- score_ids[id] = true
- end
- for id,_ in pairs(score_ids) do
- local inner1 = tab1[id]
- local inner2 = tab2[id]
- if inner1 == nil or inner2 == nil then return true end
- local keys = {}
- local index
- for index,_ in pairs(inner1) do
- keys[index] = true
- end
- for index,_ in pairs(inner2) do
- keys[index] = true
- end
- for index,_ in pairs(keys) do
- if inner1[index] ~= inner2[index] then return true end
- end
- end
- return false
-end
-
-local function is_greaux_write_needed()
+local function heights_changed()
local id, tab
for id, tab in pairs(new_line_heights) do
if keys_changed(tab, line_heights[id]) then return true end
@@ -173,24 +142,30 @@ local function is_greaux_write_needed()
for id, tab in pairs(line_heights) do
if keys_changed(tab, new_line_heights[id]) then return true end
end
- if saved_computations_changed(saved_lengths, new_saved_lengths) then
- return true
+ for id, tab in pairs(new_var_brace_positions) do
+ if keys_changed(tab, var_brace_positions[id]) then return true end
end
- if saved_computations_changed(saved_newline_before_euouae, new_saved_newline_before_euouae) then
- return true
+ for id, tab in pairs(var_brace_positions) do
+ if keys_changed(tab, new_var_brace_positions[id]) then return true end
+ end
+ for id, tab in pairs(new_pos_saves) do
+ if keys_changed(tab, pos_saves[id]) then return true end
+ end
+ for id, tab in pairs(pos_saves) do
+ if keys_changed(tab, new_pos_saves[id]) then return true end
end
return false
end
local function write_greaux()
- if is_greaux_write_needed() then
+ if heights_changed() then
-- only write this if heights change; since table ordering is not
-- predictable, this ensures a steady state if the heights are unchanged.
local aux = io.open(auxname, 'w')
if aux then
log("Writing %s", auxname)
aux:write('return {\n ["line_heights"]={\n')
- local id, tab, id2, line, value
+ local id, tab, id2, line
for id, tab in pairs(new_line_heights) do
aux:write(string.format(' ["%s"]={\n', id))
for id2, line in pairs(tab) do
@@ -199,26 +174,25 @@ local function write_greaux()
end
aux:write(' },\n')
end
- aux:write(' },\n ["saved_lengths"]={\n')
- for id, tab in pairs(new_saved_lengths) do
+ aux:write(' },\n ["var_brace_positions"]={\n')
+ for id, tab in pairs(new_var_brace_positions) do
aux:write(string.format(' ["%s"]={\n', id))
- for id2, value in pairs(tab) do
- if value ~= nil then
- aux:write(string.format(' [%d]=%d,\n', id2, value))
+ for id2, line in pairs(tab) do
+ if line[1] ~= nil and line[2] ~= nil then
+ aux:write(string.format(' [%d]={%d,%d},\n', id2, line[1],
+ line[2]))
end
end
aux:write(' },\n')
end
- aux:write(' },\n ["saved_newline_before_euouae"]={\n')
- for id, tab in pairs(new_saved_newline_before_euouae) do
+ aux:write(' },\n ["pos_saves"]={\n')
+ for id, tab in pairs(new_pos_saves) do
aux:write(string.format(' ["%s"]={\n', id))
- for id2, value in pairs(tab) do
- if value ~= nil then
- if value then
- aux:write(string.format(' [%d]=true,\n', id2))
- else
- aux:write(string.format(' [%d]=false,\n', id2))
- end
+ for id2, line in pairs(tab) do
+ if line[1] ~= nil and line[2] ~= nil and line[3] ~= nil and
+ line[4] ~= nil then
+ aux:write(string.format(' [%d]={%d,%d,%d,%d},\n', id2, line[1],
+ line[2], line[3], line[4]))
end
end
aux:write(' },\n')
@@ -247,12 +221,8 @@ local function init(arg, enable_height_computation)
end
if outputdir and lfs.isdir(outputdir) then
auxname = outputdir..'/'..tex.jobname..'.gaux'
- snippet_filename = outputdir..'/'..tex.jobname..'.gsnippet'
- snippet_logname = outputdir..'/'..tex.jobname..'.gsniplog'
else
auxname = tex.jobname..'.gaux'
- snippet_filename = tex.jobname..'.gsnippet'
- snippet_logname = tex.jobname..'.gsniplog'
end
-- to get latexmk to realize the aux file is a dependency
@@ -261,12 +231,12 @@ local function init(arg, enable_height_computation)
log("Reading %s", auxname)
local score_info = dofile(auxname)
line_heights = score_info.line_heights or {}
- saved_lengths = score_info.saved_lengths or {}
- saved_newline_before_euouae = score_info.saved_newline_before_euouae or {}
+ var_brace_positions = score_info.var_brace_positions or {}
+ pos_saves = score_info.pos_saves or {}
else
line_heights = {}
- saved_lengths = {}
- saved_newline_before_euouae = {}
+ var_brace_positions = {}
+ pos_saves = {}
end
if enable_height_computation then
@@ -292,9 +262,8 @@ local function init(arg, enable_height_computation)
'line heights. Remove or undefine \\greskipheightcomputation to '..
'resume height computation.')
end
- saved_positions = {}
- new_saved_lengths = {}
- new_saved_newline_before_euouae = {}
+ new_var_brace_positions = {}
+ new_pos_saves = {}
end
-- node factory
@@ -558,43 +527,19 @@ local function clean_old_gtex_files(file_withdir)
end
end
-local function compile_gabc(gabc_file, gtex_file, glog_file, allow_deprecated)
+local function compile_gabc(gabc_file, gtex_file)
info("compiling the score %s...", gabc_file)
local extra_args = ''
if tex.count['gre@generate@pointandclick'] == 1 then
- extra_args = extra_args..' -p'
- end
- if not allow_deprecated then
- extra_args = extra_args..' -D'
+ extra_args = ' -p'
end
- local cmd = string.format("gregorio %s -W -o %s -l %s %s",
- extra_args, gtex_file, glog_file, gabc_file)
- res = os.execute(cmd)
+ res = os.execute(string.format("gregorio %s -o %s %s", extra_args, gtex_file, gabc_file))
if res == nil then
- err("\nSomething went wrong when executing\n '%s'.\n"
- .."shell-escape mode may not be activated. Try\n\n"
- .."%s --shell-escape %s.tex\n\n"
- .."See the documentation of gregorio or your TeX\n"
- .."distribution to automatize it.",
- cmd, tex.formatname, tex.jobname)
+ err("\nSomething went wrong when executing\n 'gregorio -o %s %s'.\n"
+ .."shell-escape mode may not be activated. Try\n\n%s --shell-escape %s.tex\n\nSee the documentation of gregorio or your TeX\ndistribution to automatize it.", gtex_file, gabc_file, tex.formatname, tex.jobname)
elseif res ~= 0 then
- local glog = io.open(glog_file, 'a+')
- if glog == nil then
- err("\n Unable to open %s", glog_file)
- else
- local size = glog:seek('end')
- if size > 0 then
- glog:seek('set')
- local line
- for line in glog:lines() do
- warn(line)
- end
- end
- glog:close()
- end
- err("\nAn error occured when compiling the score file\n"
- .."'%s' with gregorio.\nPlease check your score file.", gabc_file)
+ err("\nAn error occured when compiling the score file\n'%s' with gregorio.\nPlease check your score file.", gabc_file)
else
-- open the gtex file for writing so that LuaTeX records output to it
-- when the -recorder option is used
@@ -604,25 +549,10 @@ local function compile_gabc(gabc_file, gtex_file, glog_file, allow_deprecated)
else
gtex:close()
end
- local glog = io.open(glog_file, 'a+')
- if glog == nil then
- err("\n Unable to open %s", glog_file)
- else
- local size = glog:seek('end')
- if size > 0 then
- glog:seek('set')
- local line
- for line in glog:lines() do
- warn(line)
- end
- warn("*** end of warnings for %s ***", gabc_file)
- end
- glog:close()
- end
end
end
-local function include_score(input_file, force_gabccompile, allow_deprecated)
+local function include_score(input_file, force_gabccompile)
local file_root
if string.match(input_file:sub(-5), '%.gtex') then
file_root = input_file:sub(1,-6)
@@ -634,7 +564,6 @@ local function include_score(input_file, force_gabccompile, allow_deprecated)
file_root = input_file
end
local gtex_file = file_root.."-"..internalversion:gsub("%.", "_")..".gtex"
- local glog_file = file_root.."-"..internalversion:gsub("%.", "_")..".glog"
local gabc_file = file_root..".gabc"
if not lfs.isfile(gtex_file) then
clean_old_gtex_files(file_root)
@@ -647,7 +576,7 @@ local function include_score(input_file, force_gabccompile, allow_deprecated)
else
gabc:close()
end
- compile_gabc(gabc_file, gtex_file, glog_file, allow_deprecated)
+ compile_gabc(gabc_file, gtex_file)
tex.print(string.format([[\input %s\relax]], gtex_file))
return
else
@@ -668,57 +597,29 @@ local function include_score(input_file, force_gabccompile, allow_deprecated)
end
if gtex_timestamp < gabc_timestamp then
log("%s has been modified and %s needs to be updated. Recompiling the gabc file.", gabc_file, gtex_file)
- compile_gabc(gabc_file, gtex_file, glog_file, allow_deprecated)
+ compile_gabc(gabc_file, gtex_file)
elseif force_gabccompile then
- compile_gabc(gabc_file, gtex_file, glog_file)
+ compile_gabc(gabc_file, gtex_file)
end
tex.print(string.format([[\input %s\relax]], gtex_file))
return
end
-local function direct_gabc(gabc, header, allow_deprecated)
- info('Processing gabc snippet...')
- local deprecated
- if allow_deprecated then
- deprecated = ''
- else
- deprecated = '-D '
- end
- local f = io.open(snippet_filename, 'w')
+local function direct_gabc(gabc, header)
+ tmpname = os.tmpname()
+ local f = io.open(tmpname, '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:close()
- local cmd = string.format('gregorio -W %s-S -l %s %s', deprecated, snippet_logname,
- snippet_filename)
- local p = io.popen(cmd, 'r')
+ local p = io.popen('gregorio -S '..tmpname, 'r')
if p == nil then
- err("\nSomething went wrong when executing\n %s\n"
- .."shell-escape mode may not be activated. Try\n\n"
- .."%s --shell-escape %s.tex\n\n"
- .."See the documentation of gregorio or your TeX\n"
- .."distribution to automatize it.", cmd, tex.formatname, tex.jobname)
- else
- tex.print(p:read("*a"):explode('\n'))
- p:close()
+ err("\nSomething went wrong when executing\n gregorio -S "..tmpname..".\n"
+ .."shell-escape mode may not be activated. Try\n\n%s --shell-escape %s.tex\n\nSee the documentation of gregorio or your TeX\ndistribution to automatize it.", tex.formatname, tex.jobname)
end
- local glog = io.open(snippet_logname, 'a+')
- if glog == nil then
- err("\n Unable to open %s", snippet_logname)
- else
- local size = glog:seek('end')
- if size > 0 then
- glog:seek('set')
- local line
- for line in glog:lines() do
- warn(line)
- end
- warn("*** end of warnings/errors processing snippet ***")
- end
- glog:close()
- end
- os.remove(snippet_filename)
- os.remove(snippet_logname)
+ tex.print(p:read("*a"):explode('\n'))
+ p:close()
+ os.remove(tmpname)
end
local function get_gregorioversion()
@@ -978,97 +879,64 @@ local function adjust_line_height(inside_discretionary)
end
end
-local function prep_save_position(index, fn)
- if saved_positions[cur_score_id] == nil then
- saved_positions[cur_score_id] = {}
- end
- saved_positions[cur_score_id][index] = { fn = fn }
-end
-
-local function save_position(index, which)
- tex.print(catcode_at_letter, string.format([[\luatexlatelua{gregoriotex.late_save_position('%s', %d, %d, \number\gre@lastxpos, \number\gre@lastypos)}]], cur_score_id, index, which))
+local function var_brace_note_pos(brace, start_end)
+ tex.print(catcode_at_letter, string.format([[\luatexlatelua{gregoriotex.late_brace_note_pos('%s', %d, %d, \number\gre@lastxpos)}]], cur_score_id, brace, start_end))
end
-local function late_save_position(score_id, index, which, xpos, ypos)
- info('saving %s, %d [%d] (%d,%d)', score_id, index, which, xpos, ypos)
- local pos = saved_positions[score_id][index]
- if pos == nil then
- err('Attempting to use unprepared position save slot %d', index)
- return
- end
- --[[
- if pos.fn == nil then
- err('Attempting to reuse position save slot %d', index)
- return
+local function late_brace_note_pos(score_id, brace, start_end, pos)
+ if new_var_brace_positions[score_id] == nil then
+ new_var_brace_positions[score_id] = {}
end
- --]]
- pos['x'..which] = xpos
- pos['y'..which] = ypos
- if pos.x1 ~= nil and pos.y1 ~= nil and pos.x2 ~= nil and pos.y2 ~= nil then
- pos.fn(score_id, index, pos)
- --pos.fn = nil
+ if new_var_brace_positions[score_id][brace] == nil then
+ new_var_brace_positions[score_id][brace] = {}
end
+ new_var_brace_positions[score_id][brace][start_end] = pos
end
-local function compute_saved_length(score_id, index, pos)
- if new_saved_lengths[score_id] == nil then
- new_saved_lengths[score_id] = {}
- end
- new_saved_lengths[score_id][index] = pos.x2 - pos.x1
- info('computed length for %s, %d: %d', score_id, index,
- new_saved_lengths[score_id][index])
-end
-
-local function save_length(index, which)
- if which == 1 then
- prep_save_position(index, compute_saved_length)
+local function var_brace_len(brace)
+ if var_brace_positions[cur_score_id] ~= nil then
+ if var_brace_positions[cur_score_id][brace] ~= nil then
+ local posend = var_brace_positions[cur_score_id][brace][2]
+ local posstart = var_brace_positions[cur_score_id][brace][1]
+ if posend > posstart then
+ tex.print(string.format('%dsp', posend - posstart))
+ else
+ warn('Dynamically sized braces spanning multiple lines unsupported, using length 2mm.')
+ tex.print('2mm')
+ end
+ return
+ end
end
- save_position(index, which)
+ tex.print('2mm')
end
-local function compute_saved_newline_before_euouae(score_id, index, pos)
- if new_saved_newline_before_euouae[score_id] == nil then
- new_saved_newline_before_euouae[score_id] = {}
- end
- new_saved_newline_before_euouae[score_id][index] = pos.y2 ~= pos.y1
- info('computed euouae for %s, %d: %s', score_id, index,
- new_saved_newline_before_euouae[score_id][index])
+local function save_pos(index, which)
+ tex.print(catcode_at_letter, string.format([[\gre@savepos\luatexlatelua{gregoriotex.late_save_pos('%s', %d, %d, \number\gre@lastxpos, \number\gre@lastypos)}]], cur_score_id, index, which))
end
-local function save_euouae(index, which)
- if which == 1 then
- prep_save_position(index, compute_saved_newline_before_euouae)
+local function late_save_pos(score_id, index, which, xpos, ypos)
+ if new_pos_saves[score_id] == nil then
+ new_pos_saves[score_id] = {}
end
- tex.sprint(catcode_at_letter, [[\gre@savepos]])
- save_position(index, which)
-end
-
-local function var_brace_len(brace)
- if saved_lengths[cur_score_id] ~= nil then
- local length = saved_lengths[cur_score_id][brace]
- if saved_lengths[cur_score_id][brace] ~= nil then
- if length > 0 then
- tex.print(string.format('%dsp', length))
- return
- else
- warn('Dynamically sized signs spanning multiple lines unsupported, using length 2mm.')
- end
- end
+ if new_pos_saves[score_id][index] == nil then
+ new_pos_saves[score_id][index] = {}
end
- tex.print('2mm')
+ new_pos_saves[score_id][index][(2 * which) - 1] = xpos
+ new_pos_saves[score_id][index][2 * which] = ypos
end
-- this function is meant to be used from \ifcase; prints 0 for true and 1 for false
local function is_ypos_different(index)
- if saved_newline_before_euouae[cur_score_id] ~= nil then
- local newline_before_euouae =
- saved_newline_before_euouae[cur_score_id][index]
- if newline_before_euouae then
+ if pos_saves[cur_score_id] ~= nil then
+ local saved_pos = pos_saves[cur_score_id][index]
+ if saved_pos == nil or saved_pos[2] == saved_pos[4] then
+ tex.sprint([[\number1\relax ]])
+ else
tex.sprint([[\number0\relax ]])
- return
end
+ else
+ tex.sprint([[\number1\relax ]])
end
- tex.sprint([[\number1\relax ]])
end
local function width_to_bp(width, value_if_star)
@@ -1162,7 +1030,8 @@ gregoriotex.font_size = font_size
gregoriotex.direct_gabc = direct_gabc
gregoriotex.adjust_line_height = adjust_line_height
gregoriotex.var_brace_len = var_brace_len
-gregoriotex.save_length = save_length
+gregoriotex.var_brace_note_pos = var_brace_note_pos
+gregoriotex.late_brace_note_pos = late_brace_note_pos
gregoriotex.mark_translation = mark_translation
gregoriotex.mark_abovelinestext = mark_abovelinestext
gregoriotex.width_to_bp = width_to_bp
@@ -1171,11 +1040,11 @@ gregoriotex.rotation = rotation
gregoriotex.scale_space = scale_space
gregoriotex.set_header_capture = set_header_capture
gregoriotex.capture_header = capture_header
+gregoriotex.save_pos = save_pos
+gregoriotex.late_save_pos = late_save_pos
gregoriotex.is_ypos_different = is_ypos_different
-gregoriotex.save_euouae = save_euouae
gregoriotex.mode_part = mode_part
gregoriotex.set_debug_string = set_debug_string
-gregoriotex.late_save_position = late_save_position
dofile(kpse.find_file('gregoriotex-nabc.lua', 'lua'))
dofile(kpse.find_file('gregoriotex-signs.lua', 'lua'))
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex
index 73bb165e3ec..666b5b667bb 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex.tex
@@ -21,7 +21,7 @@
% 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.
-% [2016/04/27 v4.2.0-beta1 GregorioTeX system.]% PARSE_VERSION_DATE_LTX
+% [2016/05/08 v4.1.2 GregorioTeX system.]% PARSE_VERSION_DATE_LTX
\edef\greoldcatcode{\the\catcode`@}
@@ -33,7 +33,6 @@
\input luaotfload.sty%
\input graphicx.tex % for \resizebox
\input xstring.sty%
-\input color.sty%
\def\gre@error#1{\begingroup%
\def\MessageBreak{^^J}%
@@ -92,14 +91,6 @@
\long\def\gre@iflatex#1{}%
\input gregoriotex-main.tex
-
-%%%%%%%%%
-%% Color definitions
-%%%%%%%%%
-
-\definecolor{grebackgroundcolor}{RGB}{255,255,255}%
-\definecolor{gregoriocolor}{RGB}{229,53,44}%
-
%%%%%%%%%
%% PlainTeX specific definitions for fonts
%%%%%%%%%
@@ -124,19 +115,19 @@
\relax %
}%
-\def\GreColored#1{%
- {%
- \color{gregoriocolor}#1%
- }%
-}%
-
-% Note since underlining don’t exist in PlainTeX, we need the following command to maintain compatibility with LaTeX, but all it does is raise a warning.
+% Note since underlining and coloring don’t exist in PlainTeX, but we need the following commands to maintain compatibility with LaTeX.
\def\GreUnderline#1{%
\gre@warning{Underlining cannot be done in PlainTeX}%
{#1}%
\relax %
}%
+\def\GreColored#1{%
+ \gre@warning{Text color cannot be changed in PlainTeX}%
+ {#1}%
+ \relax %
+}%
+
%%%%%%%%%%%%%%%
%% Line color
%%%%%%%%%%%%%%%
@@ -144,9 +135,26 @@
% Colors don't work in PlainTeX, but we need these functions for interoperability with LaTeX.
\def\gresetlinecolor#1{%
- \gre@changestyle{normalstafflines}{\color{#1}}[\relax]%
+ \gre@warning{Line color cannot be changed in PlainTeX}%
+ \relax%
+}
+
+
+\def\grecoloredlines#1#2#3{%OBSOLETE
+ \gre@obsolete{\protect\grecoloredlines}{\protect\gresetlinecolor}%
+}
+
+\def\greredlines{%OBSOLETE
+ \gre@obsolete{\protect\greredlines}{\protect\gresetlinecolor{gregoriocolor}}%
+}
+
+\let\redlines\greredlines%OBSOLETE
+
+\def\grenormallines{%OBSOLETE
+ \gre@obsolete{\protect\grenormallines}{\protect\gresetlinecolor{black}}%
}
+\let\normallines\grenormallines%OBSOLETE
%%%%%%%%%%%%%%%%%%%%
%% Formatting environments
@@ -273,13 +281,13 @@
\def\gre@style@nabc{%
\begingroup%
- \color{gregoriocolor}%
+ \relax% we do nothing since colors are not implemented in PlainTeX
}
\def\endgre@style@nabc{\endgroup}%
\def\gre@changestyle#1#2[#3]{%
- \expandafter\gdef\csname gre@style@#1\endcsname{\begingroup#2}%
- \expandafter\gdef\csname endgre@style@#1\endcsname{#3\endgroup}%
+ \gdef\csname gre@style@#1\endcsname{\begingroup#2}%
+ \gdef\csname endgre@style@#1\endcsname{#3\endgroup}%
}%
\catcode`\@=\greoldcatcode
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gsp-default.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gsp-default.tex
index 0426e613ced..b29e1cb6258 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gsp-default.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gsp-default.tex
@@ -22,50 +22,51 @@
%% First, the penalties
% penalty to force a break on a new line
-\grechangecount{newlinepenalty}{-10001}%
+\xdef\grenewlinepenalty{-10001}%
% penalty to prevent a line break
-\grechangecount{nobreakpenalty}{10001}%
+\xdef\grenobreakpenalty{10001}%
% penalty at the end of a syllable which is the end of a word
-\grechangecount{endofwordpenalty}{-100}%
+\xdef\greendofwordpenalty{-100}%
% penalty at the end of a syllable which is not the end of a word
-\grechangecount{endofsyllablepenalty}{-50}%
+\xdef\greendofsyllablepenalty{-50}%
% penalty at the end of a syllable which is just a bar, with something printed
% under it
-\grechangecount{endafterbarpenalty}{-200}%
+\xdef\greendafterbarpenalty{-200}%
% penalty right after a bar with nothing printed
-\grechangecount{endafterbaraltpenalty}{-200}%
+\xdef\greendafterbaraltpenalty{-200}%
% penalty at the end of the score
-\grechangecount{finalpenalty}{0}%
+\xdef\grefinalpenalty{0}%
% penalty at the end of a breakable neumatic element (typically at a space
% between elements)
-\grechangecount{endofelementpenalty}{-50}%
+\xdef\greendofelementpenalty{-50}%
% hyphenpenalty will be used in discretionaries, in Gregorio this is used for
% a bar with clef change for example. It also set \exhyphenpenalty. It should
-% be close to endafterbarpenalty
-\grechangecount{hyphenpenalty}{-200}%
+% be close to \greendafterbarpenalty
+\xdef\grehyphenpenalty{-200}%
% broken penalty is the vertical penalty inserted after a break on a clef change
% I'm not sure it should be set, but it might be useful...
-\grechangecount{brokenpenalty}{0}%
+\xdef\grebrokenpenalty{0}%
%% These macro enable the tuning of linepenalty, tolerance, pretolerance
%% and emergencystretch
-\grechangecount{looseness}{-1}%
-\grechangecount{tolerance}{9000}%
+\def\grelooseness{-1}%
+\def\gretolerance{9000}%
% Workaround for bug 842 (http://tracker.luatex.org/view.php?id=842)
% see http://tug.org/pipermail/luatex/2013-July/004516.html
% The idea is that we use discretionaries (explicit hyphens, though more than hyphens in our case) for clef changes, and we need to give them a special penalty, which is not taken into account if pretolerance is > -1 on LuaTeX < 0.80. For a more detailed explanation see http://tug.org/pipermail/luatex/2013-July/004516.html.
\ifnum\the\luatexversion < 78\relax %
- \grechangecount{pretolerance}{-1}%
+ \global\def\grepretolerance{-1}%
\else %
- \grechangecount{pretolerance}{\the\pretolerance}%
+ \global\def\grepretolerance{\pretolerance}%
\fi %
-\grecreatedim{emergencystretch}{\the\emergencystretch}{scalable}%
+\def\greemergencystretch{\emergencystretch}%
% 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
% some spacings a lot).
-\grechangecount{widowpenalty}{0}%
-\grechangecount{clubpenalty}{0}%
+\def\grewidowpenalty{0}%
+\def\greclubpenalty{0}%
+
%%%%%%%%%%%%%%%%%%%
@@ -108,7 +109,7 @@
% space between elements which has the size of a note
\grecreatedim{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}%
+\grecreatedim{spacebeforeinlinecustos}{0 cm plus 0 cm minus 0 cm}{scalable}%
% space before end-of-line custos
\grecreatedim{spacebeforeeolcustos}{0.3 cm plus 0 cm minus 0 cm}{scalable}%
% space before punctum mora and augmentum duplex
@@ -130,11 +131,12 @@
% 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}%
-% minimal space between letters of different words.
-\grecreatedim{interwordspacetext}{1ex plus 0.15cm minus 0.05cm}{fixed}%
+% minimal space between letters of different words. Makes sense to have
+% the same plus and minus as interwordspacenotes.
+\grecreatedim{interwordspacetext}{0.38 cm plus 0.15 cm minus 0.05 cm}{scalable}%
% Versions of interword spaces for euouae blocks
\grecreatedim{interwordspacenotes@euouae}{0.19 cm plus 0.1 cm minus 0.05 cm}{scalable}%
-\grecreatedim{interwordspacetext@euouae}{0.8ex plus 01.cm minus 0.05cm}{fixed}%
+\grecreatedim{interwordspacetext@euouae}{0.27 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}%
@@ -150,8 +152,6 @@
%
% space between two punctum inclinatum
\grecreatedim{punctuminclinatumshift}{-0.03918 cm plus 0.0009 cm minus 0.0009 cm}{scalable}%
-% space between two unison punctum inclinatum
-\grecreatedim{punctuminclinatumunisonshift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
% space before puncta inclinata
\grecreatedim{beforepunctainclinatashift}{0.05286 cm plus 0.00728 cm minus 0.00455 cm}{scalable}%
% space between a punctum inclinatum and a punctum inclinatum deminutus
@@ -223,14 +223,14 @@
%
% minimal space between letters of different syllable texts for text around bars
% (new bar spacing algorithm only)
-\grecreatedim{interwordspacetext@bars}{0.7ex}{fixed}%
+\grecreatedim{interwordspacetext@bars}{0.15 cm}{scalable}%
% minimal space between letters of different syllable texts for text around bars,
% euouae context
-\grecreatedim{interwordspacetext@bars@euouae}{0.7ex}{fixed}%
-\grecreatedim{interwordspacetext@bars@notext}{1ex}{fixed}%
+\grecreatedim{interwordspacetext@bars@euouae}{0.15 cm}{scalable}%
+\grecreatedim{interwordspacetext@bars@notext}{0.4 cm}{scalable}%
% minimal space between letters of different syllable texts for text around bars,
% euouae context
-\grecreatedim{interwordspacetext@bars@notext@euouae}{0.7ex}{fixed}%
+\grecreatedim{interwordspacetext@bars@notext@euouae}{0.3 cm}{scalable}%
% rubber length that will be added around bars in new bar spacing algorithm
\grecreatedim{bar@rubber}{0 cm plus 0.22787 cm minus 0.02 cm}{scalable}%
% additional space that will appear around bars that are preceded by a custos and followed by a key.
@@ -280,7 +280,7 @@
% space at the beginning of the lines if there is no clef
\grecreatedim{noclefspace}{0.1 cm}{scalable}%
% space around a clef change
-\grecreatedim{clefchangespace}{0.27345 cm plus 0.14584 cm minus 0.01367 cm}{scalable}%
+\grecreatedim{clefchangespace}{0.01768 cm plus 0.00175 cm minus 0.01768 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}%