summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex')
-rw-r--r--Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex3204
1 files changed, 1593 insertions, 1611 deletions
diff --git a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
index 36ffb0a23ac..b008290faa0 100644
--- a/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
+++ b/Master/texmf-dist/tex/luatex/gregoriotex/gregoriotex-signs.tex
@@ -23,14 +23,14 @@
\def\grebarbracewidth{.58879}%
\gre@debugmsg{general}{Loading gregoriotex-signs.tex}%
-\gre@declarefileversion{gregoriotex-signs.tex}{4.1.1}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-signs.tex}{4.2.0-beta1}% GREGORIO_VERSION
\def\gre@usestylecommon{%
- \ifgre@usestylefont\else %
- \gre@usestylefonttrue%
- \gre@setstylefont %
- \fi %
- \relax %
+ \ifgre@usestylefont\else %
+ \gre@usestylefonttrue%
+ \gre@setstylefont %
+ \fi %
+ \relax %
}%
\gresetglyphstyle{default}%
@@ -44,40 +44,40 @@
\gre@disablemorafalse
\def\greprintsigns#1#2{%
- \IfStrEqCase{#2}{%
- {enable}%
- {%
- \IfStrEqCase{#1}{%
- {vepisema}%
- {\global\gre@disablevepisemafalse}%
- {hepisema}%
- {\global\gre@disablehepisemafalse}%
- {mora}%
- {\global\gre@disablemorafalse}%
- {all}%
- {\global\gre@disablemorafalse\global\gre@disablevepisemafalse\global\gre@disablehepisemafalse}%
- }[% all other cases
- \gre@error{Unrecognized first argument for \protect\greprintsigns}%
- ]%
- }%
- {disable}%
- {%
- \IfStrEqCase{#1}{%
- {vepisema}%
- {\global\gre@disablevepisematrue}%
- {hepisema}%
- {\global\gre@disablehepisematrue}%
- {mora}%
- {\global\gre@disablemoratrue}%
- {all}%
- {\global\gre@disablemoratrue\global\gre@disablevepisematrue\global\gre@disablehepisematrue}%
- }[% all other cases
- \gre@error{Unrecognized first argument for \protect\greprintsigns}%
- ]%
- }%
- }[% all other cases
- \gre@error{Unrecognized second argument for \protect\greprintsigns}%
- ]%
+ \IfStrEqCase{#2}{%
+ {enable}%
+ {%
+ \IfStrEqCase{#1}{%
+ {vepisema}%
+ {\global\gre@disablevepisemafalse}%
+ {hepisema}%
+ {\global\gre@disablehepisemafalse}%
+ {mora}%
+ {\global\gre@disablemorafalse}%
+ {all}%
+ {\global\gre@disablemorafalse\global\gre@disablevepisemafalse\global\gre@disablehepisemafalse}%
+ }[% all other cases
+ \gre@error{Unrecognized first argument for \protect\greprintsigns}%
+ ]%
+ }%
+ {disable}%
+ {%
+ \IfStrEqCase{#1}{%
+ {vepisema}%
+ {\global\gre@disablevepisematrue}%
+ {hepisema}%
+ {\global\gre@disablehepisematrue}%
+ {mora}%
+ {\global\gre@disablemoratrue}%
+ {all}%
+ {\global\gre@disablemoratrue\global\gre@disablevepisematrue\global\gre@disablehepisematrue}%
+ }[% all other cases
+ \gre@error{Unrecognized first argument for \protect\greprintsigns}%
+ ]%
+ }%
+ }[% all other cases
+ \gre@error{Unrecognized second argument for \protect\greprintsigns}%
+ ]%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -103,24 +103,24 @@
% #1 is the type of discretionary, for penalty assignment. Recognized types:
% - 0: clef change
\def\GreDiscretionary#1#2#3{%
- \global\let\gre@hskip\kern %
- \global\let\gre@penalty\gre@falsepenalty %
- \global\xdef\gre@insidediscretionary{\number 1}%
- \discretionary{%
- \global\gre@lastoflinecount=1\relax % (a good magic trick)
- \gre@debugmsg{bolshift}{discretionary pre lastoflinecount: \the\gre@lastoflinecount}%
- #2%
- }{%
- \global\gre@lastoflinecount=2\relax % (a good magic trick)
- \gre@debugmsg{bolshift}{discretionary post lastoflinecount: \the\gre@lastoflinecount}%
- }{%
- \gre@debugmsg{bolshift}{discretionary no lastoflinecount: \the\gre@lastoflinecount}%
- #3%
- }%
- \global\xdef\gre@insidediscretionary{\number 0}%
- \global\let\gre@hskip\hskip %
- \global\let\gre@penalty\gre@truepenalty %
- \relax %
+ \global\let\gre@hskip\kern %
+ \global\let\gre@penalty\gre@falsepenalty %
+ \global\xdef\gre@insidediscretionary{\number 1}%
+ \discretionary{%
+ \global\gre@lastoflinecount=1\relax % (a good magic trick)
+ \gre@debugmsg{bolshift}{discretionary pre lastoflinecount: \the\gre@lastoflinecount}%
+ #2%
+ }{%
+ \global\gre@lastoflinecount=2\relax % (a good magic trick)
+ \gre@debugmsg{bolshift}{discretionary post lastoflinecount: \the\gre@lastoflinecount}%
+ }{%
+ \gre@debugmsg{bolshift}{discretionary no lastoflinecount: \the\gre@lastoflinecount}%
+ #3%
+ }%
+ \global\xdef\gre@insidediscretionary{\number 0}%
+ \global\let\gre@hskip\hskip %
+ \global\let\gre@penalty\gre@truepenalty %
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -132,61 +132,53 @@
\gre@showcleftrue
\def\gresetclef#1{%
- \IfStrEqCase{#1}{%
- {visible}%
- {\gre@showcleftrue}%
- {invisible}%
- {\gre@showcleffalse}%
- }[% all other cases
- \gre@error{Unrecognized option "#1" for \protect\gresetclef\MessageBreak Possible options are: 'visible' and 'invisible'}%
- ]%
+ \IfStrEqCase{#1}{%
+ {visible}%
+ {\gre@showcleftrue}%
+ {invisible}%
+ {\gre@showcleffalse}%
+ }[% all other cases
+ \gre@error{Unrecognized option "#1" for \protect\gresetclef\MessageBreak Possible options are: 'visible' and 'invisible'}%
+ ]%
}%
-\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)
% if the fourth argument is 3, it means that we must not put a flat after the key, otherwise it's the height of the flat
\def\GreSetLinesClef#1#2#3#4#5#6#7{%
- \gre@localleftbox{%
- \gre@skip@temp@four = \gre@dimen@additionalleftspace\relax%
- \kern\gre@skip@temp@four %
- \copy\gre@box@lines% draws the lines
- \unkern %
- \ifgre@showclef%
- \gre@skip@temp@four = \gre@space@skip@afterclefnospace\relax%
- \hbox{\gre@typeclef{#1}{#2}{0}{#3}{#4}{#5}{#6}{#7}\hskip\gre@skip@temp@four}%
- \else %
- \gre@skip@temp@four = \gre@space@dimen@noclefspace\relax%
- \hbox{\kern\gre@skip@temp@four}%
- \fi %
- }%
- \xdef\gre@clefflatheight{#4}%
- \xdef\gre@cleftwoflatheight{#7}%
- \relax%
+ \gre@localleftbox{%
+ \gre@skip@temp@four = \gre@dimen@additionalleftspace\relax%
+ \kern\gre@skip@temp@four %
+ \copy\gre@box@lines% draws the lines
+ \unkern %
+ \ifgre@showclef%
+ \gre@skip@temp@four = \gre@space@skip@afterclefnospace\relax%
+ \hbox{\gre@typeclef{#1}{#2}{0}{#3}{#4}{#5}{#6}{#7}\hskip\gre@skip@temp@four}%
+ \else %
+ \gre@skip@temp@four = \gre@space@dimen@noclefspace\relax%
+ \hbox{\kern\gre@skip@temp@four}%
+ \fi %
+ }%
+ \xdef\gre@clefflatheight{#4}%
+ \xdef\gre@cleftwoflatheight{#7}%
+ \relax%
}%
\def\gre@save@clef#1#2#3#4#5#6{%
- \global\let\gre@clef=#1\relax%
- \xdef\gre@clefheight{#2}%
- \xdef\gre@clefflatheight{#3}%
- \global\let\gre@cleftwo=#4\relax%
- \xdef\gre@cleftwoheight{#5}%
- \xdef\gre@cleftwoflatheight{#6}%
+ \global\let\gre@clef=#1\relax%
+ \xdef\gre@clefheight{#2}%
+ \xdef\gre@clefflatheight{#3}%
+ \global\let\gre@cleftwo=#4\relax%
+ \xdef\gre@cleftwoheight{#5}%
+ \xdef\gre@cleftwoflatheight{#6}%
}%
%% macro redrawing a key from clefnum, useful for vertical space changes
\def\gre@updatelinesclef{%
- \GreSetLinesClef{\gre@clef}{\gre@clefheight}{1}{\gre@clefflatheight}%
- {\gre@cleftwo}{\gre@cleftwoheight}{\gre@cleftwoflatheight}\relax %
+ \GreSetLinesClef{\gre@clef}{\gre@clefheight}{1}{\gre@clefflatheight}%
+ {\gre@cleftwo}{\gre@cleftwoheight}{\gre@cleftwoflatheight}\relax %
}%
\newbox\gre@box@temp@clef%
@@ -202,35 +194,35 @@
%% #7: the line of the secondary clef (1 is the lowest)
%% #8: if 3, it means that we must not put a flat after the secondary clef, otherwise it's the height of the flat
\def\gre@typeclef#1#2#3#4#5#6#7#8{%
- \setbox\gre@box@temp@width=\hbox{%
- \ifcase#7%
- \gre@typesingleclef{#1}{#2}{#3}{#5}%
- \else %
- \ifnum\numexpr (#7 - #2) * (#7 - #2) > 1 \relax %
- \setbox\gre@box@temp@clef=\hbox{\gre@typesingleclef{#1}{#2}{#3}{#5}}%
- \setbox\gre@box@temp@cleftwo=\hbox{\gre@typesingleclef{#6}{#7}{#3}{#8}}%
- \ifdim\wd\gre@box@temp@clef>\wd\gre@box@temp@cleftwo%
- \hbox to 0pt{\copy\gre@box@temp@cleftwo}\copy\gre@box@temp@clef%
- \else %
- \hbox to 0pt{\copy\gre@box@temp@clef}\copy\gre@box@temp@cleftwo%
- \fi %
- \else %
- \gre@typesingleclef{#1}{#2}{#3}{#5}%
- \gre@skip@temp@two=\gre@space@skip@clefflatspace\relax%
- \gre@hskip\gre@skip@temp@two %
- \gre@typesingleclef{#6}{#7}{#3}{#8}%
- \fi %
- \fi %
- }%
- \ifcase#3%
- \global\gre@dimen@clefwidth=\wd\gre@box@temp@width %
- \fi %
- \copy\gre@box@temp@width %
- \gre@skip@temp@two=\gre@space@skip@spaceafterlineclef\relax%
- \ifnum#4=0\relax %
- \gre@skip@temp@two=\gre@space@skip@afterclefnospace\relax%
- \fi %
- \gre@hskip\gre@skip@temp@two %
+ \setbox\gre@box@temp@width=\hbox{%
+ \ifcase#7%
+ \gre@typesingleclef{#1}{#2}{#3}{#5}%
+ \else %
+ \ifnum\numexpr (#7 - #2) * (#7 - #2) > 1 \relax %
+ \setbox\gre@box@temp@clef=\hbox{\gre@typesingleclef{#1}{#2}{#3}{#5}}%
+ \setbox\gre@box@temp@cleftwo=\hbox{\gre@typesingleclef{#6}{#7}{#3}{#8}}%
+ \ifdim\wd\gre@box@temp@clef>\wd\gre@box@temp@cleftwo%
+ \hbox to 0pt{\copy\gre@box@temp@cleftwo}\copy\gre@box@temp@clef%
+ \else %
+ \hbox to 0pt{\copy\gre@box@temp@clef}\copy\gre@box@temp@cleftwo%
+ \fi %
+ \else %
+ \gre@typesingleclef{#1}{#2}{#3}{#5}%
+ \gre@skip@temp@two=\gre@space@skip@clefflatspace\relax%
+ \gre@hskip\gre@skip@temp@two %
+ \gre@typesingleclef{#6}{#7}{#3}{#8}%
+ \fi %
+ \fi %
+ }%
+ \ifcase#3%
+ \global\gre@dimen@clefwidth=\wd\gre@box@temp@width %
+ \fi %
+ \copy\gre@box@temp@width %
+ \gre@skip@temp@two=\gre@space@skip@spaceafterlineclef\relax%
+ \ifnum#4=0\relax %
+ \gre@skip@temp@two=\gre@space@skip@afterclefnospace\relax%
+ \fi %
+ \gre@hskip\gre@skip@temp@two %
}%
% macro that typesets one clef
@@ -240,58 +232,58 @@
%% #3: if we must use small key characters (inside a line) or not 0: if not inside, 1 if inside
%% #4: if 3, it means that we must not put a flat after the key, otherwise it's the height of the flat
\def\gre@typesingleclef#1#2#3#4{%
- \ifcase#2 %
- \or%
- \gre@calculate@glyphraisevalue{\gre@pitch@c}{0}{}%
- \or%
- \gre@calculate@glyphraisevalue{\gre@pitch@e}{0}{}%
- \or%
- \gre@calculate@glyphraisevalue{\gre@pitch@g}{0}{}%
- \or%
- \gre@calculate@glyphraisevalue{\gre@pitch@i}{0}{}%
- \or%
- \gre@calculate@glyphraisevalue{\gre@pitch@k}{0}{}%
- \fi%
- \ifx c#1% we check if it is a c key
- \ifcase#3%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@cclef}{}{}%
- \or%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@incclef}{}{}%
- \fi%
- \else % we consider that it is a f key
- \ifcase#3%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@fclef}{}{}%
- \or%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@infclef}{}{}%
- \fi%
- \fi%
- \ifnum#4=3%
- \else %
- \gre@skip@temp@four = \gre@space@skip@clefflatspace\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreFlat{#4}{1}{}{}{}%
- \fi %
- \relax %
+ \ifcase#2 %
+ \or%
+ \gre@calculate@glyphraisevalue{\gre@pitch@c}{0}{}%
+ \or%
+ \gre@calculate@glyphraisevalue{\gre@pitch@e}{0}{}%
+ \or%
+ \gre@calculate@glyphraisevalue{\gre@pitch@g}{0}{}%
+ \or%
+ \gre@calculate@glyphraisevalue{\gre@pitch@i}{0}{}%
+ \or%
+ \gre@calculate@glyphraisevalue{\gre@pitch@k}{0}{}%
+ \fi%
+ \ifx c#1% we check if it is a c key
+ \ifcase#3%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@cclef}{}{}%
+ \or%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@incclef}{}{}%
+ \fi%
+ \else % we consider that it is a f key
+ \ifcase#3%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@fclef}{}{}%
+ \or%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@fontchar@infclef}{}{}%
+ \fi%
+ \fi%
+ \ifnum#4=3%
+ \else %
+ \gre@skip@temp@four = \gre@space@skip@clefflatspace\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreFlat{#4}{1}{}{}{}%
+ \fi %
+ \relax %
}%
% macro that writes the initial key, and sets the next keys to the same value
% if #3 is 3, it means that we must not put a flat after the key, otherwise it's the height
% of the flat
\def\GreSetInitialClef#1#2#3#4#5#6{%
- \gre@save@clef{#1}{#2}{#3}{#4}{#5}{#6}%
- \ifgre@showclef%
- \gre@typeclef{#1}{#2}{0}{1}{#3}{#4}{#5}{#6}%
- \else%
- \gre@skip@temp@four = \gre@space@dimen@noclefspace\relax%
- \hbox{\kern\gre@skip@temp@four}%
- \fi %
- \GreSetLinesClef{#1}{#2}{1}{#3}{#4}{#5}{#6}%
- % if the initial is big, then we adjust the second line
- \ifnum\gre@biginitial=0\relax %
- \else %
- \gre@adjustsecondline %
- \fi %
- \relax%
+ \gre@save@clef{#1}{#2}{#3}{#4}{#5}{#6}%
+ \ifgre@showclef%
+ \gre@typeclef{#1}{#2}{0}{1}{#3}{#4}{#5}{#6}%
+ \else%
+ \gre@skip@temp@four = \gre@space@dimen@noclefspace\relax%
+ \hbox{\kern\gre@skip@temp@four}%
+ \fi %
+ \GreSetLinesClef{#1}{#2}{1}{#3}{#4}{#5}{#6}%
+ % if the initial is big, then we adjust the second line
+ \ifnum\gre@biginitial=0\relax %
+ \else %
+ \gre@adjustsecondline %
+ \fi %
+ \relax%
}%
% macro called when the key changes
@@ -300,272 +292,314 @@
% if #4 is 3, it means that we must not put a flat after the key, otherwise it's the height
% of the flat
\def\GreChangeClef#1#2#3#4#5#6#7{%
- % it makes no sense to change the clef when there is no clef...
- \gresetclef{visible}%
- \gre@save@clef{#1}{#2}{#4}{#5}{#6}{#7}%
- \ifnum\gre@insidediscretionary=0\relax %
- \GreSetLinesClef{#1}{#2}{1}{#4}{#5}{#6}{#7}%
- \fi %
- \ifnum#3=1\relax %
- \gre@skip@temp@four = \gre@space@skip@clefchangespace\relax%
- \gre@hskip\gre@skip@temp@four %
- \else %
- % 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 %
- \gre@typeclef{#1}{#2}{1}{0}{#4}{#5}{#6}{#7}%
- \gre@skip@temp@four = \gre@space@skip@clefchangespace\relax%
- \gre@hskip\gre@skip@temp@four %
- \relax%
+ % it makes no sense to change the clef when there is no clef...
+ \gresetclef{visible}%
+ \gre@save@clef{#1}{#2}{#4}{#5}{#6}{#7}%
+ \ifnum\gre@insidediscretionary=0\relax %
+ \GreSetLinesClef{#1}{#2}{1}{#4}{#5}{#6}{#7}%
+ \fi %
+ \ifnum#3=1\relax %
+ \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 %
+ \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@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \relax%
}%
% custos just typesets a custos, useful for before the key changes for example
% #1 is the height
-% #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 %
- \fi %
- \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}}%
- \gre@dimen@temp@three=\wd\gre@box@temp@width %
- \ifgre@showlines %
- \ifnum#1<\gre@pitch@belowstaff\relax %
- \gre@additionalbottomcustoslinemiddle %
- \else\ifnum#1>\gre@pitch@abovestaff\relax %
- \gre@additionaltopcustoslinemiddle %
- \fi\fi %
- \fi %
- \raise \gre@dimen@glyphraisevalue\relax%
- \copy\gre@box@temp@width %
- \ifdim\gre@skip@bar@lastskip=0pt\relax %
- % for now we consider we always have a bar after the custos
- % we don't want to end the line here
- \GreNoBreak %
- \gre@skip@temp@four = -\gre@space@skip@spacearoundclefbars\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \else %
- \GreNoBreak %
- \kern\gre@skip@bar@lastskip %
- \GreNoBreak %
- \fi %
- \relax %
+\def\GreCustos#1#2{%
+ \GreNoBreak %
+ \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@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}}%
+ \gre@dimen@temp@three=\wd\gre@box@temp@width %
+ \ifgre@showlines %
+ \ifnum#1<\gre@pitch@belowstaff\relax %
+ \gre@additionalbottomcustoslinemiddle %
+ \else\ifnum#1>\gre@pitch@abovestaff\relax %
+ \gre@additionaltopcustoslinemiddle %
+ \fi\fi %
+ \fi %
+ \raise \gre@dimen@glyphraisevalue\relax%
+ \copy\gre@box@temp@width %
+ \ifdim\gre@skip@bar@lastskip=0pt\relax %
+ % for now we consider we always have a bar after the custos
+ % we don't want to end the line here
+ \GreNoBreak %
+ \gre@skip@temp@four = -\gre@space@skip@spacearoundclefbars\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \else %
+ \GreNoBreak %
+ \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{%
- \GreNoBreak%
- \gre@dimen@temp@four = \glueexpr(\gre@space@skip@spacebeforeeolcustos)\relax%
- \kern\gre@dimen@temp@four %
- \GreNoBreak%
- \GreCustos{#1}%
- \gre@endofglyphcommon %
+\def\GreFinalCustos#1#2{%
+ \GreNoBreak%
+ \GreCustos{#1}{#2}%
+ \gre@endofglyphcommon %
}
% the argument is the height
-\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@nextcustos{#1}%
- \ifgre@blockeolcustos\else%
- \gre@debugmsg{custos}{not blocked}%
- \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{%
- % we type a hskip and the we type the custos
- \gre@hskip\gre@space@skip@spacebeforeeolcustos\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@pickcustos{#1}\relax %
- }%
- \gre@localrightbox{%
- \ifgre@showlines %
- \ifnum#1<\gre@pitch@belowstaff\relax %
- \gre@additionalbottomcustoslineend %
- \else\ifnum#1>\gre@pitch@abovestaff\relax %
- \gre@additionaltopcustoslineend %
- \fi\fi %
- \fi %
- \raise \gre@dimen@glyphraisevalue\relax%
- \copy\gre@box@temp@width %
- }%
- \fi %
- \fi %
- \relax%
+\edef\gre@nextcustospitch{\gre@pitch@dummy}%
+\edef\gre@nextcustosalteration{}%
+\def\GreNextCustos#1#2{%
+ \gre@debugmsg{custos}{nextcustos = #1,#2}%
+ \ifnum\gre@insidediscretionary=0\relax %
+ \gre@debugmsg{custos}{not discretionary}%
+ \edef\gre@nextcustospitch{#1}%
+ \edef\gre@nextcustosalteration{#2}%
+ \ifgre@blockeolcustos\else%
+ \gre@debugmsg{custos}{not blocked}%
+ \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{%
+ % 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@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@localrightbox{%
+ \ifgre@showlines %
+ \ifnum#1<\gre@pitch@belowstaff\relax %
+ \gre@additionalbottomcustoslineend %
+ \else\ifnum#1>\gre@pitch@abovestaff\relax %
+ \gre@additionaltopcustoslineend %
+ \fi\fi %
+ \fi %
+ \copy\gre@box@temp@width %
+ }%
+ \fi %
+ \fi %
+ \relax%
}%
% macro that typesets an additional line at the top for custos at end of line
\def\gre@additionaltopcustoslineend{%
- \gre@dimen@temp@five=\dimexpr(\gre@dimen@staffheight %
- + \gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@interstafflinespace %
- + \gre@dimen@additionalbottomspace %
- + \gre@dimen@currenttranslationheight)\relax %
- \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 %
- \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
- \hss %
- \endgre@style@additionalstafflines%
- }%
- \relax %
+ \gre@dimen@temp@five=\dimexpr(\gre@dimen@staffheight %
+ + \gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@interstafflinespace %
+ + \gre@dimen@additionalbottomspace %
+ + \gre@dimen@currenttranslationheight)\relax %
+ \raise\gre@dimen@temp@five %
+ \hbox to 0pt{%
+ \gre@style@additionalstafflines %
+ \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 %
+ \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
+ \hss %
+ \endgre@style@additionalstafflines%
+ }%
+ \relax %
}%
\def\gre@additionalbottomcustoslineend{%
- \gre@dimen@temp@five=\dimexpr(\gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@additionalbottomspace %
- + \gre@dimen@currenttranslationheight %
- - \gre@dimen@interstafflinespace %
- - \gre@dimen@stafflineheight)\relax %
- \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 %
- \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
- \hss %
- \endgre@style@additionalstafflines%
- }%
- \relax %
+ \gre@dimen@temp@five=\dimexpr(\gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@additionalbottomspace %
+ + \gre@dimen@currenttranslationheight %
+ - \gre@dimen@interstafflinespace %
+ - \gre@dimen@stafflineheight)\relax %
+ \raise\gre@dimen@temp@five %
+ \hbox to 0pt{%
+ \gre@style@additionalstafflines %
+ \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 %
+ \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
+ \hss %
+ \endgre@style@additionalstafflines%
+ }%
+ \relax %
}%
% same macros, but for a custos in the middle
\def\gre@additionaltopcustoslinemiddle{%
- \gre@dimen@temp@five=\dimexpr(\gre@dimen@staffheight %
- + \gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@interstafflinespace %
- + \gre@dimen@additionalbottomspace %
- + \gre@dimen@currenttranslationheight)\relax%
- \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 %
- \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
- \hss %
- \endgre@style@additionalstafflines%
- }%
- \relax %
+ \gre@dimen@temp@five=\dimexpr(\gre@dimen@staffheight %
+ + \gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@interstafflinespace %
+ + \gre@dimen@additionalbottomspace %
+ + \gre@dimen@currenttranslationheight)\relax%
+ \raise\gre@dimen@temp@five %
+ \hbox to 0pt{%
+ \gre@style@additionalstafflines %
+ \hss %
+ \kern\gre@dimen@temp@three %
+ \gre@dimen@temp@five=\dimexpr((\gre@space@dimen@additionalcustoslineswidth*2)+\wd\gre@box@temp@sign)\relax %
+ \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
+ \hss %
+ \endgre@style@additionalstafflines%
+ }%
+ \relax %
}%
\def\gre@additionalbottomcustoslinemiddle{%
- \gre@dimen@temp@five=\dimexpr(\gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@additionalbottomspace %
- + \gre@dimen@currenttranslationheight %
- - \gre@dimen@interstafflinespace %
- - \gre@dimen@stafflineheight)\relax%
- \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 %
- \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
- \hss %
- \endgre@style@additionalstafflines%
- }%
- \relax %
-}%
-
-\def\gre@pickcustos#1{%
- \ifcase#1%
- \or\or%
- \or\gre@fontchar@custostopmiddle %
- \or\gre@fontchar@custostoplong %
- \or\gre@fontchar@custostopshort %
- \or\gre@fontchar@custostoplong %
- \or\gre@fontchar@custostopshort %
- \or %
- \ifgre@haslinethree %
- \gre@fontchar@custostoplong %
- \else %
- \gre@fontchar@custosbottomlong %
- \fi %
- \or %
- \ifgre@haslinethree %
- \gre@fontchar@custostopshort %
- \else %
- \gre@fontchar@custosbottomshort %
- \fi %
- \or %
- \ifgre@haslinefour %
- \gre@fontchar@custostoplong %
- \else %
- \gre@fontchar@custosbottomlong %
- \fi %
- \or %
- \ifgre@haslinefour %
- \gre@fontchar@custostopshort %
- \else %
- \ifgre@haslinethree %
- \gre@fontchar@custosbottomshort %
- \else %
- \gre@fontchar@custosbottommiddle %
- \fi %
- \fi %
- \or %
- \ifgre@haslinefive %
- \gre@fontchar@custostoplong %
- \else %
- \gre@fontchar@custosbottomlong %
- \fi %
- \or %
- \ifgre@haslinefive %
- \gre@fontchar@custostopshort %
- \else %
- \ifgre@haslinefour %
- \gre@fontchar@custosbottomshort %
- \else %
- \gre@fontchar@custosbottommiddle %
- \fi %
- \fi %
- \or\gre@fontchar@custosbottomlong %
- \or %
- \ifgre@haslinefive %
- \gre@fontchar@custosbottomshort %
- \else %
- \gre@fontchar@custosbottommiddle %
- \fi %
- \or\gre@fontchar@custosbottomlong %
- \or\gre@fontchar@custosbottommiddle %
- \fi%
+ \gre@dimen@temp@five=\dimexpr(\gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@additionalbottomspace %
+ + \gre@dimen@currenttranslationheight %
+ - \gre@dimen@interstafflinespace %
+ - \gre@dimen@stafflineheight)\relax%
+ \raise\gre@dimen@temp@five %
+ \hbox to 0pt{%
+ \gre@style@additionalstafflines %
+ \hss %
+ \kern\gre@dimen@temp@three %
+ \gre@dimen@temp@five=\dimexpr((\gre@space@dimen@additionalcustoslineswidth*2)+\wd\gre@box@temp@sign)\relax %
+ \vrule width \gre@dimen@temp@five height \gre@dimen@stafflineheight\relax%
+ \hss %
+ \endgre@style@additionalstafflines%
+ }%
+ \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 %
+ \ifcase#1%
+ \or\or%
+ \or\gre@fontchar@custostopmiddle %
+ \or\gre@fontchar@custostoplong %
+ \or\gre@fontchar@custostopshort %
+ \or\gre@fontchar@custostoplong %
+ \or\gre@fontchar@custostopshort %
+ \or %
+ \ifgre@haslinethree %
+ \gre@fontchar@custostoplong %
+ \else %
+ \gre@fontchar@custosbottomlong %
+ \fi %
+ \or %
+ \ifgre@haslinethree %
+ \gre@fontchar@custostopshort %
+ \else %
+ \gre@fontchar@custosbottomshort %
+ \fi %
+ \or %
+ \ifgre@haslinefour %
+ \gre@fontchar@custostoplong %
+ \else %
+ \gre@fontchar@custosbottomlong %
+ \fi %
+ \or %
+ \ifgre@haslinefour %
+ \gre@fontchar@custostopshort %
+ \else %
+ \ifgre@haslinethree %
+ \gre@fontchar@custosbottomshort %
+ \else %
+ \gre@fontchar@custosbottommiddle %
+ \fi %
+ \fi %
+ \or %
+ \ifgre@haslinefive %
+ \gre@fontchar@custostoplong %
+ \else %
+ \gre@fontchar@custosbottomlong %
+ \fi %
+ \or %
+ \ifgre@haslinefive %
+ \gre@fontchar@custostopshort %
+ \else %
+ \ifgre@haslinefour %
+ \gre@fontchar@custosbottomshort %
+ \else %
+ \gre@fontchar@custosbottommiddle %
+ \fi %
+ \fi %
+ \or\gre@fontchar@custosbottomlong %
+ \or %
+ \ifgre@haslinefive %
+ \gre@fontchar@custosbottomshort %
+ \else %
+ \gre@fontchar@custosbottommiddle %
+ \fi %
+ \or\gre@fontchar@custosbottomlong %
+ \or\gre@fontchar@custosbottommiddle %
+ \fi%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -577,27 +611,27 @@
\newif\ifgre@metapost@curlybrace\gre@metapost@curlybracetrue %
\newif\ifgre@metapost@barbrace\gre@metapost@barbracetrue %
\def\gresetbracerendering{%
- \@ifnextchar[{\gre@setbracerendering}{\gre@setallbracerendering}%
+ \@ifnextchar[{\gre@setbracerendering}{\gre@setallbracerendering}%
}%
\def\gre@setallbracerendering#1{%
- \gre@@setbracerendering{brace}{#1}%
- \gre@@setbracerendering{underbrace}{#1}%
- \gre@@setbracerendering{curlybrace}{#1}%
- \gre@@setbracerendering{barbrace}{#1}%
+ \gre@@setbracerendering{brace}{#1}%
+ \gre@@setbracerendering{underbrace}{#1}%
+ \gre@@setbracerendering{curlybrace}{#1}%
+ \gre@@setbracerendering{barbrace}{#1}%
}%
\def\gre@setbracerendering[#1]#2{%
- \IfStrEqCase{#1}{%
- {brace}{\gre@@setbracerendering{#1}{#2}}%
- {underbrace}{\gre@@setbracerendering{#1}{#2}}%
- {curlybrace}{\gre@@setbracerendering{#1}{#2}}%
- {barbrace}{\gre@@setbracerendering{#1}{#2}}%
- }[\gre@error{Unrecognized option "#1" for \protect\gresetbracerendering\MessageBreak Possible options are: 'brace', 'underbrace', 'curlybrace', and 'barbrace'}]%
+ \IfStrEqCase{#1}{%
+ {brace}{\gre@@setbracerendering{#1}{#2}}%
+ {underbrace}{\gre@@setbracerendering{#1}{#2}}%
+ {curlybrace}{\gre@@setbracerendering{#1}{#2}}%
+ {barbrace}{\gre@@setbracerendering{#1}{#2}}%
+ }[\gre@error{Unrecognized option "#1" for \protect\gresetbracerendering\MessageBreak Possible options are: 'brace', 'underbrace', 'curlybrace', and 'barbrace'}]%
}%
\def\gre@@setbracerendering#1#2{%
- \IfStrEqCase{#2}{%
- {font}{\csname gre@metapost@#1false\endcsname}%
- {metapost}{\csname gre@metapost@#1true\endcsname}%
- }[\gre@error{Unrecognized option "#2" for \protect\gresetbracerendering\MessageBreak Possible options are: 'font' and 'metapost'}]%
+ \IfStrEqCase{#2}{%
+ {font}{\csname gre@metapost@#1false\endcsname}%
+ {metapost}{\csname gre@metapost@#1true\endcsname}%
+ }[\gre@error{Unrecognized option "#2" for \protect\gresetbracerendering\MessageBreak Possible options are: 'font' and 'metapost'}]%
}%
\gdef\gre@fontchar@curlybrace{\gre@font@music\GreCPCurlyBrace}%
@@ -613,9 +647,9 @@
% #4: 1 if we shift to the beginning of the last glyph, 0 otherwise
% #5: 1 if we put an accentus above or not
\def\GreOverCurlyBrace#1#2#3#4#5{%
- \ifgre@boxing\else %
- \gre@brace@common{#1}{#2}{#3}{#4}{#5}{\gre@pitch@overbraceglyph}{\gre@fontchar@curlybrace}%
- \fi %
+ \ifgre@boxing\else %
+ \gre@brace@common{#1}{#2}{#3}{#4}{#5}{\gre@pitch@overbraceglyph}{\gre@fontchar@curlybrace}%
+ \fi %
}%
% #1: the width
@@ -623,9 +657,9 @@
% #3: a horizontal shift
% #4: 1 if we shift to the beginning of the last glyph, 0 otherwise
\def\GreOverBrace#1#2#3#4{%
- \ifgre@boxing\else %
- \gre@brace@common{#1}{#2}{#3}{#4}{0}{\gre@pitch@overbraceglyph}{\gre@fontchar@brace}%
- \fi %
+ \ifgre@boxing\else %
+ \gre@brace@common{#1}{#2}{#3}{#4}{0}{\gre@pitch@overbraceglyph}{\gre@fontchar@brace}%
+ \fi %
}%
% #1: the width
@@ -633,9 +667,9 @@
% #3: a horizontal shift
% #4: 1 if we shift to the beginning of the last glyph, 0 otherwise
\def\GreUnderBrace#1#2#3#4{%
- \ifgre@boxing\else %
- \gre@brace@common{#1}{#2}{#3}{#4}{0}{\gre@pitch@underbrace}{\gre@fontchar@underbrace}%
- \fi %
+ \ifgre@boxing\else %
+ \gre@brace@common{#1}{#2}{#3}{#4}{0}{\gre@pitch@underbrace}{\gre@fontchar@underbrace}%
+ \fi %
}%
% #1: the width
@@ -646,222 +680,222 @@
% #6: the pitch at which to compute the height
% #7: the brace character
\def\gre@brace@common#1#2#3#4#5#6#7{%
- \ifnum#4=1\relax %
- \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
- \gre@dimen@temp@five=\wd\gre@box@temp@sign %
- \kern-\gre@dimen@temp@five %
- \fi %
- \gre@calculate@glyphraisevalue{#6}{13}{}%
- \advance\gre@dimen@glyphraisevalue by #2\relax %
- \hbox to 0pt{%
- \gre@skip@temp@four = #3\relax %
- \kern\gre@skip@temp@four %
- \raise\gre@dimen@glyphraisevalue\hbox{%
- \ifx#7\gre@fontchar@curlybrace %
- \ifgre@metapost@curlybrace %
- \gre@draw@curlybrace{#1}%
- \else %
- \gre@draw@fontbrace{#1}{#7}%
- \fi %
- \else %
- \ifx#7\gre@fontchar@brace %
- \ifgre@metapost@brace %
- \gre@draw@brace{#1}%
- \else %
- \gre@draw@fontbrace{#1}{#7}%
- \fi %
- \else %
- \ifx#7\gre@fontchar@underbrace %
- \ifgre@metapost@underbrace %
- \gre@draw@underbrace{#1}%
- \else %
- \gre@draw@fontbrace{#1}{#7}%
- \fi %
- \fi %
- \fi %
- \fi %
- }%
- \hss %
- \ifnum#5=1\relax %
- \gre@calculate@glyphraisevalue{\gre@pitch@overbrace}{13}{}%
- \advance\gre@dimen@glyphraisevalue by \gre@space@dimen@curlybraceaccentusshift\relax%
- \raise\gre@dimen@glyphraisevalue\hbox{%
- \gre@font@music\GreCPAccentus\relax %
- }%
- \hss %
- \fi %
- }%
- \ifnum#4=1\relax %
- \kern\gre@dimen@temp@five %
- \fi %
- \relax %
+ \ifnum#4=1\relax %
+ \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
+ \gre@dimen@temp@five=\wd\gre@box@temp@sign %
+ \kern-\gre@dimen@temp@five %
+ \fi %
+ \gre@calculate@glyphraisevalue{#6}{13}{}%
+ \advance\gre@dimen@glyphraisevalue by #2\relax %
+ \hbox to 0pt{%
+ \gre@skip@temp@four = #3\relax %
+ \kern\gre@skip@temp@four %
+ \raise\gre@dimen@glyphraisevalue\hbox{%
+ \ifx#7\gre@fontchar@curlybrace %
+ \ifgre@metapost@curlybrace %
+ \gre@draw@curlybrace{#1}%
+ \else %
+ \gre@draw@fontbrace{#1}{#7}%
+ \fi %
+ \else %
+ \ifx#7\gre@fontchar@brace %
+ \ifgre@metapost@brace %
+ \gre@draw@brace{#1}%
+ \else %
+ \gre@draw@fontbrace{#1}{#7}%
+ \fi %
+ \else %
+ \ifx#7\gre@fontchar@underbrace %
+ \ifgre@metapost@underbrace %
+ \gre@draw@underbrace{#1}%
+ \else %
+ \gre@draw@fontbrace{#1}{#7}%
+ \fi %
+ \fi %
+ \fi %
+ \fi %
+ }%
+ \hss %
+ \ifnum#5=1\relax %
+ \gre@calculate@glyphraisevalue{\gre@pitch@overbrace}{13}{}%
+ \advance\gre@dimen@glyphraisevalue by \gre@space@dimen@curlybraceaccentusshift\relax%
+ \raise\gre@dimen@glyphraisevalue\hbox{%
+ \gre@font@music\GreCPAccentus\relax %
+ }%
+ \hss %
+ \fi %
+ }%
+ \ifnum#4=1\relax %
+ \kern\gre@dimen@temp@five %
+ \fi %
+ \relax %
}%
% #1 : the width
% #2 : the brace character
\def\gre@draw@fontbrace#1#2{%
- \setbox\gre@box@temp@sign=\hbox{#2}%
- \gre@resizebox{#1}{\ht\gre@box@temp@sign}{#2}%
+ \setbox\gre@box@temp@sign=\hbox{#2}%
+ \gre@resizebox{#1}{\ht\gre@box@temp@sign}{#2}%
}%
% #1: the width, or * for the bar brace width
% this can't have @ in the name because of the metapost catcode settings
\def\grebracemetapostpreamble#1{%
- % multiplier to convert gre@factor to em-size in bp
- % (100000 sp) * (72 bp/in) / (65536 sp/pt) / 72.27 (pt/in)
- factor = 1.5201782378;
- scale = \the\gre@factor * factor;
- % assuming #1 is in bp, we convert it back into the internal unit of the
- % calculation, ems
- width = \directlua{gregoriotex.width_to_bp([[#1]], "\grebarbracewidth * scale")} / scale;
+ % multiplier to convert gre@factor to em-size in bp
+ % (100000 sp) * (72 bp/in) / (65536 sp/pt) / 72.27 (pt/in)
+ factor = 1.5201782378;
+ scale = \the\gre@factor * factor;
+ % assuming #1 is in bp, we convert it back into the internal unit of the
+ % calculation, ems
+ width = \directlua{gregoriotex.width_to_bp([[#1]], "\grebarbracewidth * scale")} / scale;
}%
% #1: the width
\def\gre@draw@curlybrace#1{%
- \gre@debugmsg{general}{curly brace width = #1}%
- \gre@metapost{
- \grebracemetapostpreamble{#1}
- transform t;
- t = identity scaled scale;
- p := (width - 0.1416) / 2;
- q := (width - 0.08626) / 2;
- if (p < 0.1005) or (q < 0.12817):
- t := t xscaled (width / 0.34261);
- p := 0.1005;
- q := 0.12817;
- fi;
- f := 1 + (p / 4);
- beginfig(0);
- fill
- ( (0,0)
- -- (0.00651,0)
- .. controls (((0.03239**f)*p)+0.00651,0.01763) and (((0.08502**f)*p)+0.00651,0.03065) .. (((0.15789**f)*p)+0.00651,0.03906)
- .. controls (((0.23347**f)*p)+0.00651,0.04801) and (((0.32659**f)*p)+0.00651,0.05249) .. (((0.43725**f)*p)+0.00651,0.05249)
- .. controls (((0.49663**f)*p)+0.00651,0.05249) and (((0.59109**f)*p)+0.00651,0.05086) .. (((0.72065**f)*p)+0.00651,0.04761)
- .. controls (((0.82861**f)*p)+0.00651,0.04408) and (((0.92173**f)*p)+0.00651,0.04232) .. (p+0.00651,0.04232)
- .. controls (p+0.0198,0.04232) and (p+0.03242,0.04842) .. (p+0.04435,0.06063)
- .. controls (p+0.05602,0.07365) and (p+0.06483,0.0906) .. (p+0.0708,0.11149)
- .. controls (p+0.07677,0.0906) and (p+0.08558,0.07365) .. (p+0.09725,0.06063)
- .. controls (p+0.10918,0.04842) and (p+0.1218,0.04232) .. (p+0.13509,0.04232)
- .. controls (p+((1-(0.92173**f))*p)+0.13509,0.04232) and (p+((1-(0.82861**f))*p)+0.13509,0.04408) .. (p+((1-(0.72065**f))*p)+0.13509,0.04761)
- .. controls (p+((1-(0.59109**f))*p)+0.13509,0.05086) and (p+((1-(0.49663**f))*p)+0.13509,0.05249) .. (p+((1-(0.43725**f))*p)+0.13509,0.05249)
- .. controls (p+((1-(0.32659**f))*p)+0.13509,0.05249) and (p+((1-(0.23347**f))*p)+0.13509,0.04801) .. (p+((1-(0.15789**f))*p)+0.13509,0.03906)
- .. controls (p+((1-(0.08502**f))*p)+0.13509,0.03065) and (p+((1-(0.03239**f))*p)+0.13509,0.01763) .. (p+p+0.13509,0)
- -- (p+p+0.13509,0) -- (q+q+0.08626,0) -- (q+q+0.08626,0)
- .. controls (q+((1-(0.02117**f))*q)+0.08626,0.02658) and (q+((1-(0.08466**f))*q)+0.08626,0.04774) .. (q+((1-(0.19048**f))*q)+0.08626,0.06348)
- .. controls (q+((1-(0.29418**f))*q)+0.08626,0.07975) and (q+((1-(0.42434**f))*q)+0.08626,0.08789) .. (q+((1-(0.58095**f))*q)+0.08626,0.08789)
- .. controls (q+((1-(0.63386**f))*q)+0.08626,0.08789) and (q+((1-(0.70159**f))*q)+0.08626,0.08626) .. (q+((1-(0.78413**f))*q)+0.08626,0.08301)
- .. controls (q+((1-(0.87937**f))*q)+0.08626,0.07894) and (q+((1-(0.95132**f))*q)+0.08626,0.0769) .. (q+0.08626,0.0769)
- .. controls (q+0.06219,0.0769) and (q+0.05013,0.10644) .. (q+0.04679,0.13102)
- -- (q+0.04679,0.13102) -- (q+0.03947,0.13102) -- (q+0.03947,0.13102)
- .. controls (q+0.03614,0.10644) and (q+0.02407,0.0769) .. (q+0,0.0769)
- .. controls (((0.95132**f)*q)+0,0.0769) and (((0.87937**f)*q)+0,0.07894) .. (((0.78413**f)*q)+0,0.08301)
- .. controls (((0.70159**f)*q)+0,0.08626) and (((0.63386**f)*q)+0,0.08789) .. (((0.58095**f)*q)+0,0.08789)
- .. controls (((0.42434**f)*q)+0,0.08789) and (((0.29418**f)*q)+0,0.07975) .. (((0.19048**f)*q)+0,0.06348)
- .. controls (((0.08466**f)*q)+0,0.04774) and (((0.02117**f)*q)+0,0.02658) .. (0,0)
- -- cycle
- ) transformed t;
- setbounds currentpicture to
- ( (0,-0.67980) -- (q+q+0.08626,-0.67980) -- (q+q+0.08626,0.13102) -- (0,0.13102) -- cycle )
- transformed t;
- endfig;
- }%
+ \gre@debugmsg{general}{curly brace width = #1}%
+ \gre@metapost{
+ \grebracemetapostpreamble{#1}
+ transform t;
+ t = identity scaled scale;
+ p := (width - 0.1416) / 2;
+ q := (width - 0.08626) / 2;
+ if (p < 0.1005) or (q < 0.12817):
+ t := t xscaled (width / 0.34261);
+ p := 0.1005;
+ q := 0.12817;
+ fi;
+ f := 1 + (p / 4);
+ beginfig(0);
+ fill
+ ( (0,0)
+ -- (0.00651,0)
+ .. controls (((0.03239**f)*p)+0.00651,0.01763) and (((0.08502**f)*p)+0.00651,0.03065) .. (((0.15789**f)*p)+0.00651,0.03906)
+ .. controls (((0.23347**f)*p)+0.00651,0.04801) and (((0.32659**f)*p)+0.00651,0.05249) .. (((0.43725**f)*p)+0.00651,0.05249)
+ .. controls (((0.49663**f)*p)+0.00651,0.05249) and (((0.59109**f)*p)+0.00651,0.05086) .. (((0.72065**f)*p)+0.00651,0.04761)
+ .. controls (((0.82861**f)*p)+0.00651,0.04408) and (((0.92173**f)*p)+0.00651,0.04232) .. (p+0.00651,0.04232)
+ .. controls (p+0.0198,0.04232) and (p+0.03242,0.04842) .. (p+0.04435,0.06063)
+ .. controls (p+0.05602,0.07365) and (p+0.06483,0.0906) .. (p+0.0708,0.11149)
+ .. controls (p+0.07677,0.0906) and (p+0.08558,0.07365) .. (p+0.09725,0.06063)
+ .. controls (p+0.10918,0.04842) and (p+0.1218,0.04232) .. (p+0.13509,0.04232)
+ .. controls (p+((1-(0.92173**f))*p)+0.13509,0.04232) and (p+((1-(0.82861**f))*p)+0.13509,0.04408) .. (p+((1-(0.72065**f))*p)+0.13509,0.04761)
+ .. controls (p+((1-(0.59109**f))*p)+0.13509,0.05086) and (p+((1-(0.49663**f))*p)+0.13509,0.05249) .. (p+((1-(0.43725**f))*p)+0.13509,0.05249)
+ .. controls (p+((1-(0.32659**f))*p)+0.13509,0.05249) and (p+((1-(0.23347**f))*p)+0.13509,0.04801) .. (p+((1-(0.15789**f))*p)+0.13509,0.03906)
+ .. controls (p+((1-(0.08502**f))*p)+0.13509,0.03065) and (p+((1-(0.03239**f))*p)+0.13509,0.01763) .. (p+p+0.13509,0)
+ -- (p+p+0.13509,0) -- (q+q+0.08626,0) -- (q+q+0.08626,0)
+ .. controls (q+((1-(0.02117**f))*q)+0.08626,0.02658) and (q+((1-(0.08466**f))*q)+0.08626,0.04774) .. (q+((1-(0.19048**f))*q)+0.08626,0.06348)
+ .. controls (q+((1-(0.29418**f))*q)+0.08626,0.07975) and (q+((1-(0.42434**f))*q)+0.08626,0.08789) .. (q+((1-(0.58095**f))*q)+0.08626,0.08789)
+ .. controls (q+((1-(0.63386**f))*q)+0.08626,0.08789) and (q+((1-(0.70159**f))*q)+0.08626,0.08626) .. (q+((1-(0.78413**f))*q)+0.08626,0.08301)
+ .. controls (q+((1-(0.87937**f))*q)+0.08626,0.07894) and (q+((1-(0.95132**f))*q)+0.08626,0.0769) .. (q+0.08626,0.0769)
+ .. controls (q+0.06219,0.0769) and (q+0.05013,0.10644) .. (q+0.04679,0.13102)
+ -- (q+0.04679,0.13102) -- (q+0.03947,0.13102) -- (q+0.03947,0.13102)
+ .. controls (q+0.03614,0.10644) and (q+0.02407,0.0769) .. (q+0,0.0769)
+ .. controls (((0.95132**f)*q)+0,0.0769) and (((0.87937**f)*q)+0,0.07894) .. (((0.78413**f)*q)+0,0.08301)
+ .. controls (((0.70159**f)*q)+0,0.08626) and (((0.63386**f)*q)+0,0.08789) .. (((0.58095**f)*q)+0,0.08789)
+ .. controls (((0.42434**f)*q)+0,0.08789) and (((0.29418**f)*q)+0,0.07975) .. (((0.19048**f)*q)+0,0.06348)
+ .. controls (((0.08466**f)*q)+0,0.04774) and (((0.02117**f)*q)+0,0.02658) .. (0,0)
+ -- cycle
+ ) transformed t;
+ setbounds currentpicture to
+ ( (0,-0.67980) -- (q+q+0.08626,-0.67980) -- (q+q+0.08626,0.13102) -- (0,0.13102) -- cycle )
+ transformed t;
+ endfig;
+ }%
}%
% #1: the width
\def\gre@draw@brace#1{%
- \gre@draw@roundbrace{#1}{.89500}{
- (-.00192,.70347) % start the top
- .. controls (-.00192,.70525) and (-.00134,.70740)
- .. (.00000,.71000) -- (.00000,.71000){curl c}
- .. (p/2,.89500) % top of the center
- .. {curl c}(p,.71000) -- (p,.71000)
- .. controls (p+.00134,.70740) and (p+.00192,.70525)
- .. (p+.00192,.70347) % end the top
- .. controls (p+.00192,.69508) and (p-.01103,.69500)
- .. (p-.01856,.69500) % start the bottom
- .. controls (p-.01856,.69500) and (p-.01900,.69500)
- .. (p-.01900,.69500) -- (p-.01900,.69500){curl c}
- .. (p/2,.86400) % bottom of the center
- .. {curl c}(.01900,.69500) -- (.01900,.69500)
- .. controls (.01900,.69500) and (.01856,.69500)
- .. (.01856,.69500) % end the bottom
- .. controls (.01103,.69500) and (-.00192,.69508)
- .. (-.00192,.70347) -- cycle
- }%
+ \gre@draw@roundbrace{#1}{.89500}{
+ (-.00192,.70347) % start the top
+ .. controls (-.00192,.70525) and (-.00134,.70740)
+ .. (.00000,.71000) -- (.00000,.71000){curl c}
+ .. (p/2,.89500) % top of the center
+ .. {curl c}(p,.71000) -- (p,.71000)
+ .. controls (p+.00134,.70740) and (p+.00192,.70525)
+ .. (p+.00192,.70347) % end the top
+ .. controls (p+.00192,.69508) and (p-.01103,.69500)
+ .. (p-.01856,.69500) % start the bottom
+ .. controls (p-.01856,.69500) and (p-.01900,.69500)
+ .. (p-.01900,.69500) -- (p-.01900,.69500){curl c}
+ .. (p/2,.86400) % bottom of the center
+ .. {curl c}(.01900,.69500) -- (.01900,.69500)
+ .. controls (.01900,.69500) and (.01856,.69500)
+ .. (.01856,.69500) % end the bottom
+ .. controls (.01103,.69500) and (-.00192,.69508)
+ .. (-.00192,.70347) -- cycle
+ }%
}%
% #1: the width
\def\gre@draw@underbrace#1{%
- \gre@draw@roundbrace{#1}{.25500}{
- (-.00192,.24653) % start the bottom
- .. controls (-.00192,.24475) and (-.00134,.24260)
- .. (.00000,.24000) -- (.00000,.24000){curl c}
- .. (p/2,.05500) % bottom of the center
- .. {curl c}(p,.24000) -- (p,.24000)
- .. controls (p+.00134,.24260) and (p+.00192,.24475)
- .. (p+.00192,.24653) % end the bottom
- .. controls (p+.00192,.25492) and (p-.01103,.25500)
- .. (p-.01856,.25500) % start the top
- .. controls (p-.01856,.25500) and (p-.01900,.25500)
- .. (p-.01900,.25500) -- (p-.01900,.25500){curl c}
- .. (p/2,.08600) % top to the center
- .. {curl c}(.01900,.25500) -- (.01900,.25500)
- .. controls (.01900,.25500) and (.01856,.25500)
- .. (.01856,.25500) % end the top
- .. controls (.01103,.25500) and (-.00192,.25492)
- .. (-.00192,.24653) -- cycle
- }%
+ \gre@draw@roundbrace{#1}{.25500}{
+ (-.00192,.24653) % start the bottom
+ .. controls (-.00192,.24475) and (-.00134,.24260)
+ .. (.00000,.24000) -- (.00000,.24000){curl c}
+ .. (p/2,.05500) % bottom of the center
+ .. {curl c}(p,.24000) -- (p,.24000)
+ .. controls (p+.00134,.24260) and (p+.00192,.24475)
+ .. (p+.00192,.24653) % end the bottom
+ .. controls (p+.00192,.25492) and (p-.01103,.25500)
+ .. (p-.01856,.25500) % start the top
+ .. controls (p-.01856,.25500) and (p-.01900,.25500)
+ .. (p-.01900,.25500) -- (p-.01900,.25500){curl c}
+ .. (p/2,.08600) % top to the center
+ .. {curl c}(.01900,.25500) -- (.01900,.25500)
+ .. controls (.01900,.25500) and (.01856,.25500)
+ .. (.01856,.25500) % end the top
+ .. controls (.01103,.25500) and (-.00192,.25492)
+ .. (-.00192,.24653) -- cycle
+ }%
}%
% #1: the width
% #2: height of the bounding box
% #3: metapost commands to draw the outline
\def\gre@draw@roundbrace#1#2#3{%
- \gre@debugmsg{general}{round brace width = #1}%
- \gre@metapost{
- \grebracemetapostpreamble{#1}
- p = width;
- transform t;
- t = identity scaled scale;
- c = 1;
- if p < 0.200:
- c := 0;
- t := t xscaled (p/0.200);
- p := 0.200;
- elseif p < 0.350:
- c := (p - 0.200) / 0.350;
- fi;
- beginfig(0);
- fill ( #3 ) transformed t;
- setbounds currentpicture to
- ( (0,0) -- (p,0) -- (p,#2) -- (0,#2) -- cycle )
- transformed t;
- endfig;
- }%
+ \gre@debugmsg{general}{round brace width = #1}%
+ \gre@metapost{
+ \grebracemetapostpreamble{#1}
+ p = width;
+ transform t;
+ t = identity scaled scale;
+ c = 1;
+ if p < 0.200:
+ c := 0;
+ t := t xscaled (p/0.200);
+ p := 0.200;
+ elseif p < 0.350:
+ c := (p - 0.200) / 0.350;
+ fi;
+ beginfig(0);
+ fill ( #3 ) transformed t;
+ setbounds currentpicture to
+ ( (0,0) -- (p,0) -- (p,#2) -- (0,#2) -- cycle )
+ transformed t;
+ endfig;
+ }%
}%
% #1 : x-distance
% #2 : y-distance
% #3 : -1 for below, 1 for above
\def\gre@draw@slur#1#2#3{%
- \gre@metapost{
- \grebracemetapostpreamble{\directlua{gregoriotex.hypotenuse([[#1]],[[#2]])}}
- transform t;
- t = identity scaled scale;
- t := t xscaled width;
- t := t rotated \directlua{gregoriotex.rotation([[#1]],[[#2]])};
- beginfig(0);
- fill
- ( (0,0)
- .. controls (0.3,#3*0.20) and (0.7,#3*0.20)
- .. (1,0)
- -- (1,0)
- .. controls (0.7,#3*0.22) and (0.3,#3*0.22)
- .. (0,0)
- -- cycle
- ) transformed t withpen pencircle scaled 0.3;
- endfig;
- }%
+ \gre@metapost{
+ \grebracemetapostpreamble{\directlua{gregoriotex.hypotenuse([[#1]],[[#2]])}}
+ transform t;
+ t = identity scaled scale;
+ t := t xscaled width;
+ t := t rotated \directlua{gregoriotex.rotation([[#1]],[[#2]])};
+ beginfig(0);
+ fill
+ ( (0,0)
+ .. controls (0.3,#3*0.20) and (0.7,#3*0.20)
+ .. (1,0)
+ -- (1,0)
+ .. controls (0.7,#3*0.22) and (0.3,#3*0.22)
+ .. (0,0)
+ -- cycle
+ ) transformed t withpen pencircle scaled 0.3;
+ endfig;
+ }%
}%
\newdimen\greslurheight
@@ -872,69 +906,69 @@
% #5 : y-distance
% #6 : end height if #6 not given
\def\GreSlur#1#2#3#4#5#6{%
- \ifgre@boxing\else %
- \ifnum\number#2 > 0\relax %
- \gre@calculate@glyphraisevalue{#1}{15}{}%
- \else %
- \gre@calculate@glyphraisevalue{#1}{16}{}%
- \fi %
- \hbox to 0pt{\raise\gre@dimen@glyphraisevalue\hbox{%
- \ifcase#3 % 0
- \or % 1
- \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
- \kern-\wd\gre@box@temp@sign %
- \or % 2
- \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
- \kern-.5\wd\gre@box@temp@sign %
- \fi %
- \if\relax\detokenize{#5}\relax %
- \gre@dimen@temp@five=\gre@dimen@glyphraisevalue\relax %
- \ifnum\number#2 > 0\relax %
- \gre@calculate@glyphraisevalue{#6}{15}{}%
- \else %
- \gre@calculate@glyphraisevalue{#6}{16}{}%
- \fi %
- \greslurheight = \dimexpr(\gre@dimen@glyphraisevalue - \gre@dimen@temp@five)\relax %
- \else %
- \greslurheight = #5\relax %
- \fi %
- \gre@draw@slur{#4}{\the\greslurheight}{#2}%
- }}%
- \fi %
- \relax %
+ \ifgre@boxing\else %
+ \ifnum\number#2 > 0\relax %
+ \gre@calculate@glyphraisevalue{#1}{15}{}%
+ \else %
+ \gre@calculate@glyphraisevalue{#1}{16}{}%
+ \fi %
+ \hbox to 0pt{\raise\gre@dimen@glyphraisevalue\hbox{%
+ \ifcase#3 % 0
+ \or % 1
+ \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
+ \kern-\wd\gre@box@temp@sign %
+ \or % 2
+ \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
+ \kern-.5\wd\gre@box@temp@sign %
+ \fi %
+ \if\relax\detokenize{#5}\relax %
+ \gre@dimen@temp@five=\gre@dimen@glyphraisevalue\relax %
+ \ifnum\number#2 > 0\relax %
+ \gre@calculate@glyphraisevalue{#6}{15}{}%
+ \else %
+ \gre@calculate@glyphraisevalue{#6}{16}{}%
+ \fi %
+ \greslurheight = \dimexpr(\gre@dimen@glyphraisevalue - \gre@dimen@temp@five)\relax %
+ \else %
+ \greslurheight = #5\relax %
+ \fi %
+ \gre@draw@slur{#4}{\the\greslurheight}{#2}%
+ }}%
+ \fi %
+ \relax %
}%
% #1: id of the variable length brace within the score
\def\GreVarBraceLength#1{%
- \ifgre@boxing\else %
- \directlua{gregoriotex.var_brace_len(#1)}%
- \fi %
+ \ifgre@boxing\else %
+ \directlua{gregoriotex.var_brace_len(#1)}%
+ \fi %
}%
% #1: id of the variable length brace within the score
% #2: 0 = no left-shift, 1 = left-shift 1 punctum, 2 = left shift 1/2 punctum
% #3: 1 if the start, 2 if the end
\def\GreVarBraceSavePos#1#2#3{%
- \ifgre@boxing\else %
- \ifcase#2 % 0
- \gre@debugmsg{general}{save case 0}%
- \pdfsavepos %
- \or % 1
- \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
- \kern-\wd\gre@box@temp@sign %
- \pdfsavepos %
- \kern\wd\gre@box@temp@sign %
- \or % 2
- \gre@debugmsg{general}{save case 2}%
- \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
- \gre@dimen@temp@five=\wd\gre@box@temp@sign %
- \kern-.5\wd\gre@box@temp@sign %
- \pdfsavepos %
- \kern.5\wd\gre@box@temp@sign %
- \fi %
- \directlua{gregoriotex.var_brace_note_pos(#1, #3)}%
- \fi %
- \relax %
+ \ifgre@boxing\else %
+ \ifcase#2 % 0
+ \gre@debugmsg{general}{save case 0}%
+ \gre@savepos %
+ \or % 1
+ \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
+ \kern-\wd\gre@box@temp@sign %
+ \gre@savepos %
+ \kern\wd\gre@box@temp@sign %
+ \or % 2
+ \gre@debugmsg{general}{save case 2}%
+ \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@punctum}%
+ \gre@dimen@temp@five=\wd\gre@box@temp@sign %
+ \kern-.5\wd\gre@box@temp@sign %
+ \gre@savepos %
+ \kern.5\wd\gre@box@temp@sign %
+ \fi %
+ \directlua{gregoriotex.save_length(#1, #3)}%
+ \fi %
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -951,128 +985,115 @@
% #3 is 1 in case of a punctommora in the note before the last note of a podatus, porrectus or torculus resupinus, 0 otherwise.
% #4 is 1 if we are at a punctum inclinatum, 0 otherwise
\def\gre@punctum@mora#1#2#3#4{%
- \GreNoBreak %
- \ifcase#2\relax %
- \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
- \hskip\gre@skip@temp@four%
- \or %
- \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
- \kern\gre@skip@temp@four %
- \or %
- % to get the widht of a punctum minus a line, we calculate the width of a flexus (with ambitus of two) minus the width of a punctum
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPesQuadratumLongqueueThreeNothing}%
- \gre@dimen@temp@five=\wd\gre@box@temp@width %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctum}%
- \advance\gre@dimen@temp@five by -\wd\gre@box@temp@width %
- \kern-\gre@dimen@temp@five %
- \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
- \kern\gre@skip@temp@four %
- \or %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctum}%
- \gre@dimen@temp@five=\wd\gre@box@temp@width %
- \kern-\gre@dimen@temp@five %
- \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
- \kern\gre@skip@temp@four %
- \fi %
- \ifnum#2=0\relax %
- \global\gre@lastendswithmoratrue%
- \fi %
- \ifcase#3\relax % 0
- \gre@calculate@glyphraisevalue{#1}{4}{}%
- \or% 1
- \gre@calculate@glyphraisevalue{#1}{8}{}%
- \or% 2
- \gre@calculate@glyphraisevalue{#1}{14}{}%
- \fi %
- % here we shift a bit left in the case where we have a punctum inclinatum on a line
- \ifnum#4=1\relax %
- \ifgre@isonaline %
- \gre@dimen@temp@three=\dimexpr(3700sp * \gre@factor)\relax %
- \kern-\gre@dimen@temp@three %
- \gre@dimen@temp@three=\dimexpr(4500sp * \gre@factor)\relax%
- \advance\gre@dimen@glyphraisevalue by -\gre@dimen@temp@three %
- \else %
- \gre@dimen@temp@three=\dimexpr(2500sp * \gre@factor)\relax %
- \advance\gre@dimen@glyphraisevalue by -\gre@dimen@temp@three %
- \fi %
- \fi %
- \GreNoBreak %
- \raise \gre@dimen@glyphraisevalue \hbox{\gre@fontchar@punctummora}%
- \GreNoBreak %
- \ifcase#2\relax\or %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@punctummora}%
- \gre@skip@temp@four = -\wd\gre@box@temp@width %
- \kern\gre@skip@temp@four%
- \gre@skip@temp@four = -\gre@space@skip@spacebeforesigns\relax%
- \kern\gre@skip@temp@four %
- \or %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@punctummora}%
- \gre@skip@temp@four = -\wd\gre@box@temp@width %
- \kern\gre@skip@temp@four%
- \gre@skip@temp@four = -\gre@space@skip@spacebeforesigns\relax%
- \kern\gre@skip@temp@four %
- \kern\gre@dimen@temp@five %
- \or %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@punctummora}%
- \gre@skip@temp@four = -\wd\gre@box@temp@width %
- \kern\gre@skip@temp@four%
- \gre@skip@temp@four = -\gre@space@skip@spacebeforesigns\relax%
- \kern\gre@skip@temp@four %
- \kern\gre@dimen@temp@five %
- \fi %
- \GreNoBreak %
- \relax%
+ \GreNoBreak %
+ \ifcase#2\relax %
+ \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
+ \hskip\gre@skip@temp@four%
+ \or %
+ \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
+ \kern\gre@skip@temp@four %
+ \or %
+ % to get the widht of a punctum minus a line, we calculate the width of a flexus (with ambitus of two) minus the width of a punctum
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPesQuadratumLongqueueThreeNothing}%
+ \gre@dimen@temp@five=\wd\gre@box@temp@width %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctum}%
+ \advance\gre@dimen@temp@five by -\wd\gre@box@temp@width %
+ \kern-\gre@dimen@temp@five %
+ \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
+ \kern\gre@skip@temp@four %
+ \or %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPPunctum}%
+ \gre@dimen@temp@five=\wd\gre@box@temp@width %
+ \kern-\gre@dimen@temp@five %
+ \gre@skip@temp@four = \gre@space@skip@spacebeforesigns\relax%
+ \kern\gre@skip@temp@four %
+ \fi %
+ \ifnum#2=0\relax %
+ \global\gre@lastendswithmoratrue%
+ \fi %
+ \ifcase#3\relax % 0
+ \gre@calculate@glyphraisevalue{#1}{4}{}%
+ \or% 1
+ \gre@calculate@glyphraisevalue{#1}{8}{}%
+ \or% 2
+ \gre@calculate@glyphraisevalue{#1}{14}{}%
+ \fi %
+ % here we shift a bit left in the case where we have a punctum inclinatum on a line
+ \ifnum#4=1\relax %
+ \ifgre@isonaline %
+ \gre@dimen@temp@three=\dimexpr(3700sp * \gre@factor)\relax %
+ \kern-\gre@dimen@temp@three %
+ \gre@dimen@temp@three=\dimexpr(4500sp * \gre@factor)\relax%
+ \advance\gre@dimen@glyphraisevalue by -\gre@dimen@temp@three %
+ \else %
+ \gre@dimen@temp@three=\dimexpr(2500sp * \gre@factor)\relax %
+ \advance\gre@dimen@glyphraisevalue by -\gre@dimen@temp@three %
+ \fi %
+ \fi %
+ \GreNoBreak %
+ \raise \gre@dimen@glyphraisevalue \hbox{\gre@fontchar@punctummora}%
+ \GreNoBreak %
+ \ifcase#2\relax\or %
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@punctummora}%
+ \gre@skip@temp@four = -\wd\gre@box@temp@width %
+ \kern\gre@skip@temp@four%
+ \gre@skip@temp@four = -\gre@space@skip@spacebeforesigns\relax%
+ \kern\gre@skip@temp@four %
+ \or %
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@punctummora}%
+ \gre@skip@temp@four = -\wd\gre@box@temp@width %
+ \kern\gre@skip@temp@four%
+ \gre@skip@temp@four = -\gre@space@skip@spacebeforesigns\relax%
+ \kern\gre@skip@temp@four %
+ \kern\gre@dimen@temp@five %
+ \or %
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@punctummora}%
+ \gre@skip@temp@four = -\wd\gre@box@temp@width %
+ \kern\gre@skip@temp@four%
+ \gre@skip@temp@four = -\gre@space@skip@spacebeforesigns\relax%
+ \kern\gre@skip@temp@four %
+ \kern\gre@dimen@temp@five %
+ \fi %
+ \GreNoBreak %
+ \relax%
}%
\def\GrePunctumMora#1#2#3#4{%
- \ifgre@disablemora\else %
- \gre@punctum@mora{#1}{#2}{#3}{#4}%
- \fi %
- \relax %
+ \ifgre@disablemora\else %
+ \gre@punctum@mora{#1}{#2}{#3}{#4}%
+ \fi %
+ \relax %
}
% a function to typeset an augmentum duplex, easy enough to be understood...
\def\GreAugmentumDuplex#1#2#3{%
- \ifgre@boxing\else %
- \GrePunctumMora{#1}{1}{#3}{0}%
- \fi %
- \GrePunctumMora{#2}{0}{0}{0}%
- \relax %
+ \ifgre@boxing\else %
+ \GrePunctumMora{#1}{1}{#3}{0}%
+ \fi %
+ \GrePunctumMora{#2}{0}{0}{0}%
+ \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{%
- \GreNoBreak %
- \gre@skip@temp@four = \gre@space@skip@beforelowchoralsignspace\relax%
- \hskip\gre@skip@temp@four %
- \GreNoBreak %
- \ifnum#3=1\relax %
- \gre@calculate@glyphraisevalue{#1}{12}{}%
- \else %
- \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 %
+ \GreNoBreak %
+ \gre@skip@temp@four = \gre@space@skip@beforelowchoralsignspace\relax%
+ \hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \ifnum#3=1\relax %
+ \gre@calculate@glyphraisevalue{#1}{12}{}%
+ \else %
+ \gre@calculate@glyphraisevalue{#1}{10}{}%
+ \fi %
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@style@lowchoralsign#2\endgre@style@lowchoralsign}%
+ \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 %
+ \GreNoBreak %
+ \gre@vepisemaorrare{#1}{#3}{}{3}{\gre@style@highchoralsign#2\endgre@style@highchoralsign}%
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1080,8 +1101,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\GreLinea#1#2#3#4#5#6{%
- \GreGlyph{\GreCPLinea}{#1}{#2}{#3}{#4}{#5}{#6}%
- \relax %
+ \GreGlyph{\GreCPLinea}{#1}{#2}{#3}{#4}{#5}{#6}%
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1110,46 +1131,46 @@
% #6 is the type of sign (1: vertical episema, 2: rare sign, 3: choral sign)
% #7 is the choral sign if relevant
\def\gre@vepisemaorrareaux#1#2#3#4#5#6#7{%
- % first we set \gre@dimen@temp@three to the width of the last glyph
- \gre@dimen@temp@three=\gre@dimen@lastglyphwidth\relax%
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #2}%
- \gre@dimen@temp@two=\dimexpr(\wd\gre@box@temp@sign / 2)\relax %
- \ifcase#3%
- % tempwidth is the width of the last glyph
- \advance\gre@dimen@temp@three by -\gre@dimen@temp@two %
- \or%
- \gre@dimen@temp@three=\gre@dimen@temp@two %
- \or%
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
- \gre@dimen@temp@three=\dimexpr(\wd\gre@box@temp@sign - \gre@dimen@temp@two)\relax %
- \or %
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
- \advance\gre@dimen@temp@three by \dimexpr(-\wd\gre@box@temp@sign + \gre@dimen@temp@two)\relax %
- \fi%
- \kern-\gre@dimen@temp@three % we do it here because of the now-removed ictus (chironomy)
- % then we draw the sign
- \ifcase#6\or %
- % vertical episema
- \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@verticalepisema}%
- \or % rare sign
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music#5}%
- \or % choral sign
- \setbox\gre@box@temp@sign=\hbox{#7}%
- \or % brace above bar
- \setbox\gre@box@temp@sign=\hbox{\gre@render@barbrace}%
- \fi %
- % we set tempwidth to half a punctum malus half the sign width, so that the centers are aligned
- \gre@dimen@temp@two=\dimexpr(\wd\gre@box@temp@sign / 2)\relax %
- \advance\gre@dimen@temp@three by \gre@dimen@temp@two %
- \kern-\gre@dimen@temp@two%
- \gre@skip@temp@four = #4sp%
- \kern \gre@skip@temp@four%
- \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
- \kern -\gre@skip@temp@four%
- % and finally we go back to the end of the glyph, where we were first
- \advance\gre@dimen@temp@three by -2\gre@dimen@temp@two %
- \kern\gre@dimen@temp@three%
- \relax%
+ % first we set \gre@dimen@temp@three to the width of the last glyph
+ \gre@dimen@temp@three=\gre@dimen@lastglyphwidth\relax%
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #2}%
+ \gre@dimen@temp@two=\dimexpr(\wd\gre@box@temp@sign / 2)\relax %
+ \ifcase#3%
+ % tempwidth is the width of the last glyph
+ \advance\gre@dimen@temp@three by -\gre@dimen@temp@two %
+ \or%
+ \gre@dimen@temp@three=\gre@dimen@temp@two %
+ \or%
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
+ \gre@dimen@temp@three=\dimexpr(\wd\gre@box@temp@sign - \gre@dimen@temp@two)\relax %
+ \or %
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
+ \advance\gre@dimen@temp@three by \dimexpr(-\wd\gre@box@temp@sign + \gre@dimen@temp@two)\relax %
+ \fi%
+ \kern-\gre@dimen@temp@three % we do it here because of the now-removed ictus (chironomy)
+ % then we draw the sign
+ \ifcase#6\or %
+ % vertical episema
+ \setbox\gre@box@temp@sign=\hbox{\gre@fontchar@verticalepisema}%
+ \or % rare sign
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music#5}%
+ \or % choral sign
+ \setbox\gre@box@temp@sign=\hbox{#7}%
+ \or % brace above bar
+ \setbox\gre@box@temp@sign=\hbox{\gre@render@barbrace}%
+ \fi %
+ % we set tempwidth to half a punctum malus half the sign width, so that the centers are aligned
+ \gre@dimen@temp@two=\dimexpr(\wd\gre@box@temp@sign / 2)\relax %
+ \advance\gre@dimen@temp@three by \gre@dimen@temp@two %
+ \kern-\gre@dimen@temp@two%
+ \gre@skip@temp@four = #4sp%
+ \kern \gre@skip@temp@four%
+ \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
+ \kern -\gre@skip@temp@four%
+ % and finally we go back to the end of the glyph, where we were first
+ \advance\gre@dimen@temp@three by -2\gre@dimen@temp@two %
+ \kern\gre@dimen@temp@three%
+ \relax%
}%
\directlua{gregoriotex.emit_offset_macros()}%
@@ -1163,81 +1184,81 @@
% #4 is type (1: vertical episema, 2: rare sign, 3: choral sign, 4: brace above the bar)
% #5 is the choral sign if relevant
\def\gre@vepisemaorrare#1#2#3#4#5{%
- \ifgre@boxing\else %
- \ifcase#4\or %
- % if it is a vertical episema, we call the normal calculateglyphvalue
- \gre@calculate@glyphraisevalue{#1}{3}{}%
- \or %
- % if it is not, we call it with 6 as second argument, it will give us the height of the rare signs (accentus, etc.) the first argument is m if the pitch is < k, otherwise it's n.
- \ifnum#1<\gre@pitch@raresign\relax %
- \gre@calculate@glyphraisevalue{\gre@pitch@raresign}{6}{}%
- \else %
- {%
- \gre@count@temp@three=\numexpr(#1 + 1)\relax %
- \gre@calculate@glyphraisevalue{\gre@count@temp@three}{6}{}%
- }%
- \fi %
- \or % if it's a choral sign
- \gre@calculate@glyphraisevalue{#1}{11}{}%
- \or % if it's the brace above the bar
- \gre@calculate@glyphraisevalue{#1}{13}{}%
- \fi %
- \gre@v@case{#2}{#3}{#4}{#5}%
- \fi %
- \relax%
+ \ifgre@boxing\else %
+ \ifcase#4\or %
+ % if it is a vertical episema, we call the normal calculateglyphvalue
+ \gre@calculate@glyphraisevalue{#1}{3}{}%
+ \or %
+ % if it is not, we call it with 6 as second argument, it will give us the height of the rare signs (accentus, etc.) the first argument is m if the pitch is < k, otherwise it's n.
+ \ifnum#1<\gre@pitch@raresign\relax %
+ \gre@calculate@glyphraisevalue{\gre@pitch@raresign}{6}{}%
+ \else %
+ {%
+ \gre@count@temp@three=\numexpr(#1 + 1)\relax %
+ \gre@calculate@glyphraisevalue{\gre@count@temp@three}{6}{}%
+ }%
+ \fi %
+ \or % if it's a choral sign
+ \gre@calculate@glyphraisevalue{#1}{11}{}%
+ \or % if it's the brace above the bar
+ \gre@calculate@glyphraisevalue{#1}{13}{}%
+ \fi %
+ \gre@v@case{#2}{#3}{#4}{#5}%
+ \fi %
+ \relax%
}%
\def\GreVEpisema#1#2{%
- \ifgre@disablevepisema\else %
- \gre@vepisemaorrare{#1}{#2}{\GreCPVEpisema}{1}{}%
- \fi %
- \relax %
+ \ifgre@disablevepisema\else %
+ \gre@vepisemaorrare{#1}{#2}{\GreCPVEpisema}{1}{}%
+ \fi %
+ \relax %
}%
\def\GreBarBrace#1{%
- \gre@vepisemaorrare{\gre@pitch@overbraceglyph}{#1}{%
- \gre@render@barbrace%
- }{4}{}%
- \relax %
+ \gre@vepisemaorrare{\gre@pitch@overbraceglyph}{#1}{%
+ \gre@render@barbrace%
+ }{4}{}%
+ \relax %
}%
\def\gre@render@barbrace{%
- \hbox{%
- \ifgre@metapost@barbrace %
- \gre@draw@brace{*}%
- \else %
- \gre@fontchar@abovebarbrace %
- \fi %
- }%
+ \hbox{%
+ \ifgre@metapost@barbrace %
+ \gre@draw@brace{*}%
+ \else %
+ \gre@fontchar@abovebarbrace %
+ \fi %
+ }%
}%
\def\GreBarVEpisema#1{%
- \gre@vepisemaorrare{\gre@pitch@barvepisema}{#1}{\GreCPVEpisema}{1}{}%
- \relax %
+ \gre@vepisemaorrare{\gre@pitch@barvepisema}{#1}{\GreCPVEpisema}{1}{}%
+ \relax %
}%
\def\GreAccentus#1#2{%
- \gre@vepisemaorrare{#1}{#2}{\GreCPAccentus}{2}{}%
- \relax %
+ \gre@vepisemaorrare{#1}{#2}{\GreCPAccentus}{2}{}%
+ \relax %
}%
\def\GreSemicirculus#1#2{%
- \gre@vepisemaorrare{#1}{#2}{\GreCPSemicirculus}{2}{}%
- \relax %
+ \gre@vepisemaorrare{#1}{#2}{\GreCPSemicirculus}{2}{}%
+ \relax %
}%
\def\GreCirculus#1#2{%
- \gre@vepisemaorrare{#1}{#2}{\GreCPCirculus}{2}{}%
- \relax %
+ \gre@vepisemaorrare{#1}{#2}{\GreCPCirculus}{2}{}%
+ \relax %
}%
\def\GreReversedAccentus#1#2{%
- \gre@vepisemaorrare{#1}{#2}{\GreCPAccentusReversus}{2}{}%
- \relax %
+ \gre@vepisemaorrare{#1}{#2}{\GreCPAccentusReversus}{2}{}%
+ \relax %
}%
\def\GreReversedSemicirculus#1#2{%
- \gre@vepisemaorrare{#1}{#2}{\GreCPSemicirculusReversus}{2}{}%
- \relax %
+ \gre@vepisemaorrare{#1}{#2}{\GreCPSemicirculusReversus}{2}{}%
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1262,75 +1283,71 @@
% end of #1
% #4 argument is the same as in hepisorline
\def\gre@hepisorlineaux#1#2#3#4{%
- \ifcase#3% case 0
- % first we set \gre@dimen@temp@three to the width of the last glyph
- \gre@dimen@temp@three=\gre@dimen@lastglyphwidth\relax%
- \or % case 1
- \gre@dimen@temp@three=0 pt\relax %
- \or % case 2
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
- \gre@dimen@temp@three=\wd\gre@box@temp@sign%
- \or % case 3
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
- \gre@dimen@temp@three=\dimexpr(\gre@dimen@lastglyphwidth - \wd\gre@box@temp@sign)\relax %
- \or % case 4
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
- \gre@dimen@temp@three=\dimexpr(\gre@dimen@lastglyphwidth - \wd\gre@box@temp@sign)\relax %
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music #2}%
- \advance\gre@dimen@temp@three by \wd\gre@box@temp@sign %
- \fi%
- \kern-\gre@dimen@temp@three %
- % then we draw the sign, and go back to the beginning of the sign
- \setbox\gre@box@temp@sign=\hbox{\gre@font@music#2}%
- % we set tempwidth to half a punctum malus half the sign width, so that the centers are aligned
- \gre@dimen@temp@two=\wd\gre@box@temp@sign %
- \ifcase#4%
- %case of hepisema
- \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
- \or %
- %case of hepisema at the bottom
- \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
- \or % case of a line at the top
- \ifnum\gre@count@lastglyphiscavum=2\relax %
- \gre@drawadditionalline{0}{\gre@dimen@temp@two}{0}{}{1}{}%
- \else %
- \gre@drawadditionalline{0}{\gre@dimen@temp@two}{1}{}{1}{}%
- \fi %
- \gre@dimen@temp@two=0pt\relax %
- \or % case of a line at the bottom
- \ifnum\gre@count@lastglyphiscavum=2\relax %
- \gre@drawadditionalline{1}{\gre@dimen@temp@two}{0}{}{1}{}%
- \else %
- \gre@drawadditionalline{1}{\gre@dimen@temp@two}{1}{}{1}{}%
- \fi %
- \gre@dimen@temp@two=0pt\relax %
- \or %
- %case of choral sign
- \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
- \or %
- \fi %
- % and finally we go back to the end of the glyph, where we were first
- \advance\gre@dimen@temp@three by -\gre@dimen@temp@two %
- \kern\gre@dimen@temp@three %
- \relax%
+ \ifcase#3% case 0
+ % first we set \gre@dimen@temp@three to the width of the last glyph
+ \gre@dimen@temp@three=\gre@dimen@lastglyphwidth\relax%
+ \or % case 1
+ \gre@dimen@temp@three=0 pt\relax %
+ \or % case 2
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
+ \gre@dimen@temp@three=\wd\gre@box@temp@sign%
+ \or % case 3
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
+ \gre@dimen@temp@three=\dimexpr(\gre@dimen@lastglyphwidth - \wd\gre@box@temp@sign)\relax %
+ \or % case 4
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #1}%
+ \gre@dimen@temp@three=\dimexpr(\gre@dimen@lastglyphwidth - \wd\gre@box@temp@sign)\relax %
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music #2}%
+ \advance\gre@dimen@temp@three by \wd\gre@box@temp@sign %
+ \fi%
+ \kern-\gre@dimen@temp@three %
+ % then we draw the sign, and go back to the beginning of the sign
+ \setbox\gre@box@temp@sign=\hbox{\gre@font@music#2}%
+ % we set tempwidth to half a punctum malus half the sign width, so that the centers are aligned
+ \gre@dimen@temp@two=\wd\gre@box@temp@sign %
+ \ifcase#4%
+ %case of hepisema
+ \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
+ \or %
+ %case of hepisema at the bottom
+ \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
+ \or % case of a line at the top
+ \ifnum\gre@count@lastglyphiscavum=2\relax %
+ \gre@drawadditionalline{0}{\gre@dimen@temp@two}{0}{}{1}{}%
+ \else %
+ \gre@drawadditionalline{0}{\gre@dimen@temp@two}{1}{}{1}{}%
+ \fi %
+ \gre@dimen@temp@two=0pt\relax %
+ \or % case of a line at the bottom
+ \ifnum\gre@count@lastglyphiscavum=2\relax %
+ \gre@drawadditionalline{1}{\gre@dimen@temp@two}{0}{}{1}{}%
+ \else %
+ \gre@drawadditionalline{1}{\gre@dimen@temp@two}{1}{}{1}{}%
+ \fi %
+ \gre@dimen@temp@two=0pt\relax %
+ \or %
+ %case of choral sign
+ \raise \gre@dimen@glyphraisevalue \copy\gre@box@temp@sign %
+ \or %
+ \fi %
+ % and finally we go back to the end of the glyph, where we were first
+ \advance\gre@dimen@temp@three by -\gre@dimen@temp@two %
+ \kern\gre@dimen@temp@three %
+ \relax%
}%
% another dumb top function
\def\GreAdditionalLine#1#2#3{%
- \ifgre@showlines %
- \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%
- \fi %
- \fi %
- \relax %
+ \ifgre@showlines %
+ \ifgre@boxing\else %
+ \xdef\gre@dimen@savedglyphraise{\the\gre@dimen@glyphraisevalue}%
+ \gre@style@additionalstafflines %
+ \gre@hepisorline{\gre@pitch@dummy}{#1}{#2}{#3}{f}{}{}%
+ \endgre@style@additionalstafflines%
+ \gre@dimen@glyphraisevalue=\gre@dimen@savedglyphraise\relax%
+ \fi %
+ \fi %
+ \relax %
}%
% #1 0 for over staff,
@@ -1345,60 +1362,56 @@
% 2 for #6 space after
% #6 custom space after, used if #4 is 2
\def\GreDrawAdditionalLine#1#2#3#4#5#6{%
- \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%
- \fi %
- \relax %
+ \ifgre@showlines %
+ \xdef\gre@dimen@savedglyphraise{\the\gre@dimen@glyphraisevalue}%
+ \gre@style@additionalstafflines %
+ \gre@drawadditionalline{#1}{#2}{#3}{#4}{#5}{#6}%
+ \endgre@style@additionalstafflines%
+ \gre@dimen@glyphraisevalue=\gre@dimen@savedglyphraise\relax%
+ \fi %
+ \relax %
}
\def\gre@drawadditionalline#1#2#3#4#5#6{%
- \ifcase#3 % 0
- \gre@dimen@temp@five=0pt\relax %
- \or % 1
- \gre@dimen@temp@five=\gre@space@dimen@additionallineswidth\relax %
- \or % 2
- \gre@dimen@temp@five=#4\relax %
- \fi %
- \ifcase#5 % 0
- \gre@dimen@temp@four=0pt\relax %
- \or % 1
- \gre@dimen@temp@four=\gre@space@dimen@additionallineswidth\relax %
- \or % 2
- \gre@dimen@temp@four=#6\relax %
- \fi %
- \gre@dimen@temp@two=%
- \dimexpr(#2 %
- + \gre@dimen@temp@five %
- + \gre@dimen@temp@four)\relax %
- \ifcase#1 % 0
- \gre@dimen@glyphraisevalue=%
- \dimexpr(\gre@dimen@additionalbottomspace %
- + \gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@currenttranslationheight %
- + \gre@stafflines\gre@dimen@interstafflinespace %
- + \gre@stafflines\gre@dimen@stafflineheight)\relax%
- \or % 1
- \gre@dimen@glyphraisevalue=%
- \dimexpr(\gre@dimen@additionalbottomspace %
- + \gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@currenttranslationheight %
- - \gre@dimen@interstafflinespace %
- - \gre@dimen@stafflineheight)\relax%
- \fi %
- \raise\gre@dimen@glyphraisevalue\hbox to 0pt{%
- \kern-\gre@dimen@temp@five %
- \vrule height \gre@dimen@stafflineheight %
- width \gre@dimen@temp@two %
- }%
+ \ifcase#3 % 0
+ \gre@dimen@temp@five=0pt\relax %
+ \or % 1
+ \gre@dimen@temp@five=\gre@space@dimen@additionallineswidth\relax %
+ \or % 2
+ \gre@dimen@temp@five=#4\relax %
+ \fi %
+ \ifcase#5 % 0
+ \gre@dimen@temp@four=0pt\relax %
+ \or % 1
+ \gre@dimen@temp@four=\gre@space@dimen@additionallineswidth\relax %
+ \or % 2
+ \gre@dimen@temp@four=#6\relax %
+ \fi %
+ \gre@dimen@temp@two=%
+ \dimexpr(#2 %
+ + \gre@dimen@temp@five %
+ + \gre@dimen@temp@four)\relax %
+ \ifcase#1 % 0
+ \gre@dimen@glyphraisevalue=%
+ \dimexpr(\gre@dimen@additionalbottomspace %
+ + \gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@currenttranslationheight %
+ + \gre@stafflines\gre@dimen@interstafflinespace %
+ + \gre@stafflines\gre@dimen@stafflineheight)\relax%
+ \or % 1
+ \gre@dimen@glyphraisevalue=%
+ \dimexpr(\gre@dimen@additionalbottomspace %
+ + \gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@currenttranslationheight %
+ - \gre@dimen@interstafflinespace %
+ - \gre@dimen@stafflineheight)\relax%
+ \fi %
+ \raise\gre@dimen@glyphraisevalue\hbox to 0pt{%
+ \kern-\gre@dimen@temp@five %
+ \vrule height \gre@dimen@stafflineheight %
+ width \gre@dimen@temp@two %
+ }%
}
% a function to typeset a horizontal line (additional line or episema).
@@ -1423,19 +1436,19 @@
%% 4 : low in space below note
%% 5 : high in space below note
\def\gre@hepisorline#1#2#3#4#5#6#7{{%
- \ifcase#4 % 0
- \gre@calculate@glyphraisevalue{#1}{9}{#7}%
- \or % 1
- \gre@calculate@glyphraisevalue{#1}{5}{#7}%
- \or % 2
- % the glyphraisevalue is ignored anyway... but it's just in case...
- \gre@calculate@glyphraisevalue{\gre@pitch@ledger@above}{0}{}%
- \or % 3
- \gre@calculate@glyphraisevalue{\gre@pitch@ledger@below}{0}{}%
- \fi %
- \global\gre@dimen@glyphraisevalue=\dimexpr\gre@dimen@glyphraisevalue#6\relax %
- \gre@h@case{#2}{#3}{#4}{#5}%
- \relax%
+ \ifcase#4 % 0
+ \gre@calculate@glyphraisevalue{#1}{9}{#7}%
+ \or % 1
+ \gre@calculate@glyphraisevalue{#1}{5}{#7}%
+ \or % 2
+ % the glyphraisevalue is ignored anyway... but it's just in case...
+ \gre@calculate@glyphraisevalue{\gre@pitch@ledger@above}{0}{}%
+ \or % 3
+ \gre@calculate@glyphraisevalue{\gre@pitch@ledger@below}{0}{}%
+ \fi %
+ \global\gre@dimen@glyphraisevalue=\dimexpr\gre@dimen@glyphraisevalue#6\relax %
+ \gre@h@case{#2}{#3}{#4}{#5}%
+ \relax%
}}%
% dumb top function
@@ -1451,39 +1464,31 @@
%% 4 : low in space below note
%% 5 : high in space below note
\def\GreHEpisema#1#2#3#4#5#6#7#8#9{%
- \ifgre@boxing\else\ifgre@disablehepisema\else %
- \gre@prephepisemaledgerlineheuristics%
- #7%
- \ifgre@hepisemabridge%
- \gre@hepisorline{#6}{#2}{#3}{#4}{#5}{#8}{#9}%
- \else %
- \gre@hepisorline{#1}{#2}{#3}{#4}{#5}{#8}{#9}%
- \fi %
- \gre@resetledgerlineheuristics%
- \fi\fi %
- \relax %
+ \ifgre@boxing\else\ifgre@disablehepisema\else %
+ \gre@prephepisemaledgerlineheuristics%
+ #7%
+ \ifgre@hepisemabridge%
+ \gre@hepisorline{#6}{#2}{#3}{#4}{#5}{#8}{#9}%
+ \else %
+ \gre@hepisorline{#1}{#2}{#3}{#4}{#5}{#8}{#9}%
+ \fi %
+ \gre@resetledgerlineheuristics%
+ \fi\fi %
+ \relax %
}%
\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}%
- {\gre@hepisemabridgetrue}%
- {break}%
- {\gre@hepisemabridgefalse}%
- }[% all other cases
- \gre@error{Unrecognized option, #1, for \protect\gresethepisema\MessageBreak Possible options are: 'bridge' and 'break'}%
- ]%
+ \IfStrEqCase{#1}{%
+ {bridge}%
+ {\gre@hepisemabridgetrue}%
+ {break}%
+ {\gre@hepisemabridgefalse}%
+ }[% all other cases
+ \gre@error{Unrecognized option, #1, for \protect\gresethepisema\MessageBreak Possible options are: 'bridge' and 'break'}%
+ ]%
}%
% same but for a "bridge episema" after the last note of a glyph (element, syllable) if the next episema is at the same height
@@ -1500,38 +1505,38 @@
%% 4 : low in space below note
%% 5 : high in space below note
\def\GreHEpisemaBridge#1#2#3#4#5#6{%
- \ifgre@hepisemabridge%
- \ifgre@boxing\else %
- \gre@prephepisemaledgerlineheuristics%
- #4%
- \ifcase#2 %
- \gre@calculate@glyphraisevalue{#1}{9}{#6}%
- \or %
- \gre@calculate@glyphraisevalue{#1}{5}{#6}%
- \fi %
- \global\gre@dimen@glyphraisevalue=\dimexpr\gre@dimen@glyphraisevalue#5\relax %
- \IfStrEq{-1}{#3}{%
- \raise\gre@dimen@glyphraisevalue\hbox to 0pt{\gre@font@music\gre@char@he@punctum{f}\hss}%
- }{%
- % special handling for punctum inclinatum
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPHEpisemaPunctumReduced}%
- \gre@dimen@temp@four = \wd\gre@box@temp@width\relax %
- \gre@get@spaceskip{#3}%
- % convert rubber length to dimension... not perfect but works in the usual case
- \gre@dimen@temp@three = 1\gre@skip@temp@four\relax %
- \raise\gre@dimen@glyphraisevalue\hbox to 0pt{%
- \loop\ifdim\gre@dimen@temp@three > 0pt\relax%
- \advance\gre@dimen@temp@three by -\gre@dimen@temp@four\relax %
- {\gre@font@music\GreCPHEpisemaPunctumReduced}%
- \repeat %
- \kern\gre@dimen@temp@three{\gre@font@music\GreCPHEpisemaPunctumReduced}%
- \hss %
- }%
- }%
- \gre@resetledgerlineheuristics%
- \fi %
- \fi %
- \relax %
+ \ifgre@hepisemabridge%
+ \ifgre@boxing\else %
+ \gre@prephepisemaledgerlineheuristics%
+ #4%
+ \ifcase#2 %
+ \gre@calculate@glyphraisevalue{#1}{9}{#6}%
+ \or %
+ \gre@calculate@glyphraisevalue{#1}{5}{#6}%
+ \fi %
+ \global\gre@dimen@glyphraisevalue=\dimexpr\gre@dimen@glyphraisevalue#5\relax %
+ \IfStrEq{-1}{#3}{%
+ \raise\gre@dimen@glyphraisevalue\hbox to 0pt{\gre@font@music\gre@char@he@punctum{f}\hss}%
+ }{%
+ % special handling for punctum inclinatum
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPHEpisemaPunctumReduced}%
+ \gre@dimen@temp@four = \wd\gre@box@temp@width\relax %
+ \gre@get@spaceskip{#3}%
+ % convert rubber length to dimension... not perfect but works in the usual case
+ \gre@dimen@temp@three = 1\gre@skip@temp@four\relax %
+ \raise\gre@dimen@glyphraisevalue\hbox to 0pt{%
+ \loop\ifdim\gre@dimen@temp@three > 0pt\relax%
+ \advance\gre@dimen@temp@three by -\gre@dimen@temp@four\relax %
+ {\gre@font@music\GreCPHEpisemaPunctumReduced}%
+ \repeat %
+ \kern\gre@dimen@temp@three{\gre@font@music\GreCPHEpisemaPunctumReduced}%
+ \hss %
+ }%
+ }%
+ \gre@resetledgerlineheuristics%
+ \fi %
+ \fi %
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1541,134 +1546,134 @@
% we define two types of macro for each four bar : when it is inside a syllable, and when it is not
\def\GreInVirgula#1#2{%
- \gre@writebar{0}{1}{#1}{#2}%
- \relax%
+ \gre@writebar{0}{1}{#1}{#2}%
+ \relax%
}%
\def\GreVirgula#1#2{%
- \gre@writebar{0}{0}{#1}{#2}%
- \relax%
+ \gre@writebar{0}{0}{#1}{#2}%
+ \relax%
}%
\def\GreInDivisioMinima#1#2{%
- \gre@writebar{1}{1}{#1}{#2}%
- \relax%
+ \gre@writebar{1}{1}{#1}{#2}%
+ \relax%
}%
\def\GreDivisioMinima#1#2{%
- \gre@writebar{1}{0}{#1}{#2}%
- \relax%
+ \gre@writebar{1}{0}{#1}{#2}%
+ \relax%
}%
\def\GreInDivisioMinor#1#2{%
- \gre@writebar{2}{1}{#1}{#2}%
- \relax%
+ \gre@writebar{2}{1}{#1}{#2}%
+ \relax%
}%
\def\GreDivisioMinor#1#2{%
- \gre@writebar{2}{0}{#1}{#2}%
- \relax%
+ \gre@writebar{2}{0}{#1}{#2}%
+ \relax%
}%
\def\GreInDivisioMaior#1#2{%
- \gre@writebar{3}{1}{#1}{#2}%
- \relax%
+ \gre@writebar{3}{1}{#1}{#2}%
+ \relax%
}%
\def\GreDivisioMaior#1#2{%
- \gre@writebar{3}{0}{#1}{#2}%
- \relax%
+ \gre@writebar{3}{0}{#1}{#2}%
+ \relax%
}%
\def\GreDominica#1#2#3{%
- \ifcase#1\or %
- \gre@writebar{6}{0}{#2}{#3}%
- \or %
- \gre@writebar{7}{0}{#2}{#3}%
- \or %
- \gre@writebar{8}{0}{#2}{#3}%
- \or %
- \gre@writebar{9}{0}{#2}{#3}%
- \or %
- \gre@writebar{10}{0}{#2}{#3}%
- \or %
- \gre@writebar{11}{0}{#2}{#3}%
- \or %
- \gre@writebar{12}{0}{#2}{#3}%
- \or %
- \gre@writebar{13}{0}{#2}{#3}%
- \fi %
- \relax%
+ \ifcase#1\or %
+ \gre@writebar{6}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{7}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{8}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{9}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{10}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{11}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{12}{0}{#2}{#3}%
+ \or %
+ \gre@writebar{13}{0}{#2}{#3}%
+ \fi %
+ \relax%
}%
\def\GreInDominica#1#2#3{%
- \ifcase#1\or %
- \gre@writebar{6}{1}{#2}{#3}%
- \or %
- \gre@writebar{7}{1}{#2}{#3}%
- \or %
- \gre@writebar{8}{1}{#2}{#3}%
- \or %
- \gre@writebar{9}{1}{#2}{#3}%
- \or %
- \gre@writebar{10}{1}{#2}{#3}%
- \or %
- \gre@writebar{11}{1}{#2}{#3}%
- \or %
- \gre@writebar{12}{1}{#2}{#3}%
- \or %
- \gre@writebar{13}{1}{#2}{#3}%
- \fi %
- \relax%
+ \ifcase#1\or %
+ \gre@writebar{6}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{7}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{8}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{9}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{10}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{11}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{12}{1}{#2}{#3}%
+ \or %
+ \gre@writebar{13}{1}{#2}{#3}%
+ \fi %
+ \relax%
}%
\def\GreInDivisioFinalis#1#2{%
- \ifgre@endofscore %
- \gre@writebar{5}{1}{#1}{#2}%
- \else %
- \gre@writebar{4}{1}{#1}{#2}%
- \fi %
- \relax%
+ \ifgre@endofscore %
+ \gre@writebar{5}{1}{#1}{#2}%
+ \else %
+ \gre@writebar{4}{1}{#1}{#2}%
+ \fi %
+ \relax%
}%
\def\GreDivisioFinalis#1#2{%
- \ifgre@endofscore %
- \gre@writebar{5}{0}{#1}{#2}%
- \else %
- \gre@writebar{4}{0}{#1}{#2}%
- \fi %
- \relax%
+ \ifgre@endofscore %
+ \gre@writebar{5}{0}{#1}{#2}%
+ \else %
+ \gre@writebar{4}{0}{#1}{#2}%
+ \fi %
+ \relax%
}%
% #1 is #2 of gre@writebar
% #2 is #3 of gre@writebar
% emits the suffix of the space
\def\gre@bar@space@suffix#1#2{%
- \ifcase#1\ifgre@newbarspacing %
- \ifcase#2 @standalone@notext\or @standalone@text\fi %
- \fi\fi %
+ \ifcase#1\ifgre@newbarspacing %
+ \ifcase#2 @standalone@notext\or @standalone@text\fi %
+ \fi\fi %
}%
\newcount\gre@count@shiftaftermora
\gre@count@shiftaftermora=5
\def\gresetshiftaftermora#1{%
- \IfStrEqCase{#1}{%
- {always}%
- {\gre@count@shiftaftermora=5}%
- {notesonly}%
- {\gre@count@shiftaftermora=4}%
- {barsonly}%
- {\gre@count@shiftaftermora=3}%
- {barsnotextonly}%
- {\gre@count@shiftaftermora=2}%
- {barsinsideonly}%
- {\gre@count@shiftaftermora=1}%
- {never}%
- {\gre@count@shiftaftermora=0}%
- }[% all other cases
- \gre@error{Unrecognized option "#1" in gresetshiftaftermora\MessageBreak Possible options are: 'always', 'barsonly', 'notesonly', 'barsnotextonly', 'barsinsideonly' and 'never'}%
- ]%
+ \IfStrEqCase{#1}{%
+ {always}%
+ {\gre@count@shiftaftermora=5}%
+ {notesonly}%
+ {\gre@count@shiftaftermora=4}%
+ {barsonly}%
+ {\gre@count@shiftaftermora=3}%
+ {barsnotextonly}%
+ {\gre@count@shiftaftermora=2}%
+ {barsinsideonly}%
+ {\gre@count@shiftaftermora=1}%
+ {never}%
+ {\gre@count@shiftaftermora=0}%
+ }[% all other cases
+ \gre@error{Unrecognized option "#1" in gresetshiftaftermora\MessageBreak Possible options are: 'always', 'barsonly', 'notesonly', 'barsnotextonly', 'barsinsideonly' and 'never'}%
+ ]%
}%
% width of a punctum mora, reinitalized at each score
@@ -1681,36 +1686,36 @@
% - 1 for the general case
% - 2 when the punctum mora is before a bar
\def\gre@get@unkern@aftermora#1{%
- \ifdim\gre@dimen@morawidth=0pt\relax %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@fontchar@punctummora}%
- \global\gre@dimen@morawidth=\wd\gre@box@temp@width %
- \fi %
- \ifnum #1=1%
- \global\gre@skip@punctummorashift=\glueexpr - \gre@dimen@morawidth - \gre@space@skip@spacebeforesigns + \gre@space@skip@moraadjustment\relax %
- \else %
- \global\gre@skip@punctummorashift=\glueexpr - \gre@dimen@morawidth - \gre@space@skip@spacebeforesigns + \gre@space@skip@moraadjustmentbar\relax %
- \fi %
- \relax %
+ \ifdim\gre@dimen@morawidth=0pt\relax %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\gre@fontchar@punctummora}%
+ \global\gre@dimen@morawidth=\wd\gre@box@temp@width %
+ \fi %
+ \ifnum #1=1%
+ \global\gre@skip@punctummorashift=\glueexpr - \gre@dimen@morawidth - \gre@space@skip@spacebeforesigns + \gre@space@skip@moraadjustment\relax %
+ \else %
+ \global\gre@skip@punctummorashift=\glueexpr - \gre@dimen@morawidth - \gre@space@skip@spacebeforesigns + \gre@space@skip@moraadjustmentbar\relax %
+ \fi %
+ \relax %
}
\def\gre@unkern@bar@aftermora{%
- \ifgre@newbarspacing%
- % don't apply a negative kern on the first glyph
- % while boxing, otherwise the box width will be wrong
- \ifgre@firstglyph %
- \ifgre@boxing\else %
- \gre@get@unkern@aftermora{2}%
- \kern\gre@skip@punctummorashift %
- \fi %
- \else %
- \gre@get@unkern@aftermora{2}%
- \kern\gre@skip@punctummorashift %
- \fi %
- \else%
- \gre@get@unkern@aftermora{2}%
- \kern\gre@skip@punctummorashift %
- \fi%
- \relax %
+ \ifgre@newbarspacing%
+ % don't apply a negative kern on the first glyph
+ % while boxing, otherwise the box width will be wrong
+ \ifgre@firstglyph %
+ \ifgre@boxing\else %
+ \gre@get@unkern@aftermora{2}%
+ \kern\gre@skip@punctummorashift %
+ \fi %
+ \else %
+ \gre@get@unkern@aftermora{2}%
+ \kern\gre@skip@punctummorashift %
+ \fi %
+ \else%
+ \gre@get@unkern@aftermora{2}%
+ \kern\gre@skip@punctummorashift %
+ \fi%
+ \relax %
}
\newskip\gre@skip@bar@lastskip% skip after last bar
@@ -1721,295 +1726,296 @@
%% 3: is 0 if there's no text under the bar or 1 if there is text under the bar
%% 4: macros that may happen before the skip after the bar (typically GreVEpisema)
\def\gre@writebar#1#2#3#4{%
- % first, for the bar to be really centered, if the last glyph has a punctum
- % mora, we kern of the corresponding space. We do it only in the case
- % of a bar in the middle of other notes.
- \ifgre@lastendswithmora %
- \ifgre@newbarspacing %
- \ifnum\gre@count@shiftaftermora=0\else\ifnum\gre@count@shiftaftermora=4\else %
- % new bar spacing takes care of punctum mora on its own, but only when
- % bar has its own syllable
- \ifcase #2\or %
- \gre@unkern@bar@aftermora %
- \fi %
- \fi\fi %
- \else %
- \ifcase\gre@count@shiftaftermora\or %
- % barsinsideonly
- \ifcase #2\or %
- \gre@unkern@bar@aftermora %
- \fi %
- \or %
- % barsnotextonly
- \ifcase #3\relax %
- \gre@unkern@bar@aftermora %
- \fi %
- \or %
- % barsonly
- \gre@unkern@bar@aftermora %
- \or\or %
- % always
- \gre@unkern@bar@aftermora %
- \fi %
- \fi %
- \fi %
- \gre@newglyphcommon %
- \gre@calculate@glyphraisevalue{\gre@pitch@bar}{0}{}% bar glyphs are made to be at this height
- \GreNoBreak %
- % count indicating if we have to output space or not:
- \gre@count@temp@one=0\relax %
- \ifnum#2=1\relax %
- \gre@count@temp@one=1\relax %
- \else %
- \ifgre@newbarspacing %
- \gre@count@temp@one=1\relax %
- \fi %
- \fi %
- \gre@skip@temp@four=0pt\relax %
- \ifcase#1 % 0 : virgula
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@virgula\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPVirgula}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPVirgula}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@virgula\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 1 : minima
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@minima\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMinima}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioMinima}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@minima\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 2 : minor
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@minor\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMinor}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioMinor}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@minor\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 3 : maior
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@maior\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMaior}%
- \gre@fontchar@divisiomaior %
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@maior\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 4 : finalis
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@finalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@divisiofinalis}%
- #4\relax %
- \gre@fontchar@divisiofinalis%
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@finalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 5 : final finalis
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@finalfinalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@fontchar@divisiofinalis}%
- #4\relax %
- \gre@fontchar@divisiofinalis%
- \ifgre@newbarspacing %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@finalfinalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \or % 6 : dominican bar 1
- \gre@calculate@glyphraisevalue{\gre@pitch@e}{0}{}%
- % we need to adjust the height of the bar a little so that it is perfectly aligned with the bottom (or the top for some bars) of the staff line, which is not the case by default if \gre@stafflinefactor is not 10.
- \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 7 : dominican bar 2
- \gre@calculate@glyphraisevalue{\gre@pitch@e}{0}{}%
- \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 8 : dominican bar 3
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 9 : dominican bar 4
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 10 : dominican bar 5
- \gre@calculate@glyphraisevalue{\gre@pitch@i}{0}{}%
- \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 11 : dominican bar 6
- \gre@calculate@glyphraisevalue{\gre@pitch@i}{0}{}%
- \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 12 : dominican bar 7
- \gre@calculate@glyphraisevalue{\gre@pitch@k}{0}{}%
- \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \or % 13 : dominican bar 8
- \gre@calculate@glyphraisevalue{\gre@pitch@k}{0}{}%
- \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
- \ifnum\gre@count@temp@one=1\relax %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \GreNoBreak %
- \fi %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
- #4\relax %
- \ifnum\gre@count@temp@one=1\relax %
- \GreNoBreak %
- \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \fi %
- \global\gre@skip@bar@lastskip=\gre@skip@temp@four %
- \gre@debugmsg{spacing}{Width of bar just printed: \the\wd\gre@box@temp@width}%
- \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)}%
- \relax%
+ % first, for the bar to be really centered, if the last glyph has a punctum
+ % mora, we kern of the corresponding space. We do it only in the case
+ % of a bar in the middle of other notes.
+ \ifgre@lastendswithmora %
+ \ifgre@newbarspacing %
+ \ifnum\gre@count@shiftaftermora=0\else\ifnum\gre@count@shiftaftermora=4\else %
+ % new bar spacing takes care of punctum mora on its own, but only when
+ % bar has its own syllable
+ \ifcase #2\or %
+ \gre@unkern@bar@aftermora %
+ \fi %
+ \fi\fi %
+ \else %
+ \ifcase\gre@count@shiftaftermora\or %
+ % barsinsideonly
+ \ifcase #2\or %
+ \gre@unkern@bar@aftermora %
+ \fi %
+ \or %
+ % barsnotextonly
+ \ifcase #3\relax %
+ \gre@unkern@bar@aftermora %
+ \fi %
+ \or %
+ % barsonly
+ \gre@unkern@bar@aftermora %
+ \or\or %
+ % always
+ \gre@unkern@bar@aftermora %
+ \fi %
+ \fi %
+ \fi %
+ \gre@newglyphcommon %
+ \gre@calculate@glyphraisevalue{\gre@pitch@bar}{0}{}% bar glyphs are made to be at this height
+ \GreNoBreak %
+ % count indicating if we have to output space or not:
+ \gre@count@temp@one=0\relax %
+ \ifnum#2=1\relax %
+ \gre@count@temp@one=1\relax %
+ \else %
+ \ifgre@newbarspacing %
+ \gre@count@temp@one=1\relax %
+ \fi %
+ \fi %
+ \gre@skip@temp@four=0pt\relax %
+ \ifcase#1 % 0 : virgula
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@virgula\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPVirgula}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPVirgula}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@virgula\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 1 : minima
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minima\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMinima}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioMinima}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minima\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 2 : minor
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minor\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMinor}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioMinor}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@minor\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 3 : maior
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@maior\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMaior}%
+ \gre@fontchar@divisiomaior %
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@maior\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 4 : finalis
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@finalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@divisiofinalis}%
+ #4\relax %
+ \gre@fontchar@divisiofinalis%
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@finalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 5 : final finalis
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@finalfinalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@fontchar@divisiofinalis}%
+ #4\relax %
+ \gre@fontchar@divisiofinalis%
+ \ifgre@newbarspacing %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@finalfinalis\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \or % 6 : dominican bar 1
+ \gre@calculate@glyphraisevalue{\gre@pitch@e}{0}{}%
+ % we need to adjust the height of the bar a little so that it is perfectly aligned with the bottom (or the top for some bars) of the staff line, which is not the case by default if \gre@stafflinefactor is not 10.
+ \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 7 : dominican bar 2
+ \gre@calculate@glyphraisevalue{\gre@pitch@e}{0}{}%
+ \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 8 : dominican bar 3
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 9 : dominican bar 4
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 10 : dominican bar 5
+ \gre@calculate@glyphraisevalue{\gre@pitch@i}{0}{}%
+ \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 11 : dominican bar 6
+ \gre@calculate@glyphraisevalue{\gre@pitch@i}{0}{}%
+ \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 12 : dominican bar 7
+ \gre@calculate@glyphraisevalue{\gre@pitch@k}{0}{}%
+ \advance\gre@dimen@glyphraisevalue by -\gre@dimen@stafflinediff\relax%
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominican}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominican}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \or % 13 : dominican bar 8
+ \gre@calculate@glyphraisevalue{\gre@pitch@k}{0}{}%
+ \advance\gre@dimen@glyphraisevalue by \gre@dimen@stafflinediff\relax%
+ \ifnum\gre@count@temp@one=1\relax %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \GreNoBreak %
+ \fi %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioDominicanAlt}%
+ #4\relax %
+ \ifnum\gre@count@temp@one=1\relax %
+ \GreNoBreak %
+ \gre@skip@temp@four = \csname gre@space@skip@bar@dominican\gre@bar@space@suffix{#2}{#3}\endcsname\relax%
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \fi %
+ \global\gre@skip@bar@lastskip=\gre@skip@temp@four %
+ \gre@debugmsg{spacing}{Width of bar just printed: \the\wd\gre@box@temp@width}%
+ \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%
}%
\def\gre@fontchar@divisiomaior{%
- \ifnum\gre@stafflinefactor=17\relax %
- %\gre@calculate@glyphraisevalue{\gre@pitch@bar}{0}{}% bar glyphs are made to be at this height
- \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioMaior}%
- \else %
- \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMaior}%
- % we calculate the raise of the bar
- \gre@dimen@temp@five=\dimexpr(\gre@dimen@additionalbottomspace %
- + \gre@space@dimen@spacebeneathtext %
- + \gre@space@dimen@spacelinestext %
- + \gre@dimen@currenttranslationheight)\relax%
- % we calculate the height of the bar
- \raise\gre@dimen@temp@five\hbox{\vrule height \gre@dimen@staffheight width \wd\gre@box@temp@width}%
- \fi %
- \relax %
+ \ifnum\gre@stafflinefactor=17\relax %
+ %\gre@calculate@glyphraisevalue{\gre@pitch@bar}{0}{}% bar glyphs are made to be at this height
+ \raise\gre@dimen@glyphraisevalue\hbox{\gre@font@music\GreCPDivisioMaior}%
+ \else %
+ \setbox\gre@box@temp@width=\hbox{\gre@font@music\GreCPDivisioMaior}%
+ % we calculate the raise of the bar
+ \gre@dimen@temp@five=\dimexpr(\gre@dimen@additionalbottomspace %
+ + \gre@space@dimen@spacebeneathtext %
+ + \gre@space@dimen@spacelinestext %
+ + \gre@dimen@currenttranslationheight)\relax%
+ % we calculate the height of the bar
+ \raise\gre@dimen@temp@five\hbox{\vrule height \gre@dimen@staffheight width \wd\gre@box@temp@width}%
+ \fi %
+ \relax %
}%
\def\gre@fontchar@divisiofinalis{%
- \gre@calculate@glyphraisevalue{\gre@pitch@bar}{0}{}% bar glyphs are made to be at this height
- \gre@fontchar@divisiomaior %
- \kern\gre@space@dimen@divisiofinalissep %
- \GreNoBreak %
- \gre@fontchar@divisiomaior %
+ \gre@calculate@glyphraisevalue{\gre@pitch@bar}{0}{}% bar glyphs are made to be at this height
+ \gre@fontchar@divisiomaior %
+ \kern\gre@space@dimen@divisiofinalissep %
+ \GreNoBreak %
+ \gre@fontchar@divisiomaior %
}%
% Flag to tell if we have to keep the localrightbox until the end
@@ -2017,26 +2023,26 @@
%macro to end a line with a divisio finalis
\def\GreFinalDivisioFinalis#1{%
- \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
- \ifgre@newbarspacing\else %
- \gre@hskip\gre@space@skip@bar@finalfinalis %
- \GreNoBreak %
- \fi %
- \GreLastOfScore %
- \GreDivisioFinalis{0}{}%
- #1%
- }%
- \relax%
+ \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
+ \ifgre@newbarspacing\else %
+ \gre@hskip\gre@space@skip@bar@finalfinalis %
+ \GreNoBreak %
+ \fi %
+ \GreLastOfScore %
+ \GreDivisioFinalis{0}{}%
+ #1%
+ }%
+ \relax%
}%
%macro to end a line with a divisio maior
\def\GreFinalDivisioMaior#1{%
- \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
- \GreLastOfScore %
- \GreDivisioMaior{0}{}%
- #1%
- }%
- \relax%
+ \GreBarSyllable{\GreSetThisSyllable{}{}{}{}{}}{}{}{1}{\GreSetNextSyllable{}{}{}{}{}\GreLastOfLine}{}{16}{}{%
+ \GreLastOfScore %
+ \GreDivisioMaior{0}{}%
+ #1%
+ }%
+ \relax%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2050,22 +2056,14 @@
% macro for manipulating above flag
\def\gresetlinesbehindpunctumcavum#1{%
- \IfStrEqCase{#1}{%
- {visible}%
- {\gre@hidepclinesfalse}%
- {invisible}%
- {\gre@hidepclinestrue}%
- }[% all other cases
- \gre@error{Unrecognized option "#1" for \protect\gresetlinesbehindpunctumcavum\MessageBreak Possible options are: 'visible' and 'invisible'}%
- ]%
-}%
-
-\def\GreHidePCLines{%OBSOLETE
- \gre@obsolete{\protect\GreHidePCLines}{\protect\gresetlinesbehindpunctumcavum{invisible}}%
-}%
-
-\def\GreDontHidePCLines{%OBSOLETE
- \gre@obsolete{\protect\GreDontHidePCLines}{\protect\gresetlinesbehindpunctumcavum{visible}}%
+ \IfStrEqCase{#1}{%
+ {visible}%
+ {\gre@hidepclinesfalse}%
+ {invisible}%
+ {\gre@hidepclinestrue}%
+ }[% all other cases
+ \gre@error{Unrecognized option "#1" for \protect\gresetlinesbehindpunctumcavum\MessageBreak Possible options are: 'visible' and 'invisible'}%
+ ]%
}%
% flag to indicate that lines behind an alteration should be hidden
@@ -2075,22 +2073,14 @@
% macro for manipulating above flag
\def\gresetlinesbehindalteration#1{%
- \IfStrEqCase{#1}{%
- {visible}%
- {\gre@hidealtlinesfalse}%
- {invisible}%
- {\gre@hidealtlinestrue}%
- }[% all other cases
- \gre@error{Unrecognized option "#1" for \protect\gresetlinesbehindalteration\MessageBreak Possible options are: 'visible' and 'invisible'}%
- ]%
-}%
-
-\def\GreHideAltLines{%OBSOLETE
- \gre@obsolete{\protect\GreHideAltLines}{\protect\gresetlinesbehindalteration{invisible}}%
-}%
-
-\def\GreDontHideAltLines{%OBSOLETE
- \gre@obsolete{\protect\GreDontHideAltLines}{\protect\gresetlinesbehindalteration{visible}}%
+ \IfStrEqCase{#1}{%
+ {visible}%
+ {\gre@hidealtlinesfalse}%
+ {invisible}%
+ {\gre@hidealtlinestrue}%
+ }[% all other cases
+ \gre@error{Unrecognized option "#1" for \protect\gresetlinesbehindalteration\MessageBreak Possible options are: 'visible' and 'invisible'}%
+ ]%
}%
% is last glyph a cavum?
@@ -2103,21 +2093,21 @@
% the argument is the character with which we fill the hole, and we suppose that
% isonaline and glyphraisevalue are correctly set.
\def\gre@fillhole#1{%
- \ifgre@boxing\else %
- \global\gre@count@lastglyphiscavum=1\relax %
- \setbox\gre@box@temp@sign=\hbox{#1}%
- \hbox to 0pt{%
- {%
- \color{grebackgroundcolor}%
- \raise \gre@dimen@glyphraisevalue\relax%
- \copy\gre@box@temp@sign %
- }%
- %\pdfliteral{}% this is a ugly hack for old versions of LuaTeX to work
- \hss %
- }%
- \GreNoBreak %
- \fi %
- \relax %
+ \ifgre@boxing\else %
+ \global\gre@count@lastglyphiscavum=1\relax %
+ \setbox\gre@box@temp@sign=\hbox{#1}%
+ \hbox to 0pt{%
+ {%
+ \color{grebackgroundcolor}%
+ \raise \gre@dimen@glyphraisevalue\relax%
+ \copy\gre@box@temp@sign %
+ }%
+ %\pdfliteral{}% this is a ugly hack for old versions of LuaTeX to work
+ \hss %
+ }%
+ \GreNoBreak %
+ \fi %
+ \relax %
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2133,63 +2123,63 @@
% #6 are the signs to typeset after the glyph (almost all signs)
% #7 is the line:char:column for a textedit link
\def\gre@alteration#1#2#3#4#5#6#7{%
- \setbox\gre@box@temp@width=\hbox{\gre@pointandclick{#2}{#7}}%
- \ifnum#4=0\relax %
- \gre@newglyphcommon %
- \fi %
- \global\gre@dimen@lastglyphwidth=\wd\gre@box@temp@width %
- % the three next lines are a trick to get the additional lines below the glyphs
- \gre@skip@temp@one = \gre@dimen@lastglyphwidth\relax%
- \kern\gre@skip@temp@one %
- #5\relax %
- \kern-\gre@skip@temp@one %
- \gre@calculate@glyphraisevalue{#1}{0}{}%
- \ifgre@hidealtlines %
- \gre@fillhole{#3}%
- \fi %
- \raise \gre@dimen@glyphraisevalue\relax%
- \copy\gre@box@temp@width%
- #6\relax %
- \ifnum#4=0\relax %
- % we try to avoid line breaking after a flat or a natural
- \GreNoBreak %
- \gre@skip@temp@four = \gre@space@dimen@alterationspace\relax%
- \ifgre@firstglyph%
- \gre@debugmsg{bolshift}{making adjustments for leading alteration}%
- \global\advance\gre@dimen@notesaligncenter by %
- \dimexpr(\wd\gre@box@temp@width + \dimexpr\gre@skip@temp@four)\relax %
- \kern\gre@skip@temp@four %
- \global\gre@dimen@bolextra = \dimexpr(\wd\gre@box@temp@width + \dimexpr\gre@skip@temp@four)\relax%
- \gre@debugmsg{bolshift}{bolextra: \the\gre@dimen@bolextra}%
- \else %
- \gre@hskip\gre@skip@temp@four %
- \fi %
- \GreNoBreak %
- \directlua{gregoriotex.adjust_line_height(\gre@insidediscretionary)}%
- \fi %
- \relax %
+ \setbox\gre@box@temp@width=\hbox{\gre@pointandclick{#2}{#7}}%
+ \ifnum#4=0\relax %
+ \gre@newglyphcommon %
+ \fi %
+ \global\gre@dimen@lastglyphwidth=\wd\gre@box@temp@width %
+ % the three next lines are a trick to get the additional lines below the glyphs
+ \gre@skip@temp@one = \gre@dimen@lastglyphwidth\relax%
+ \kern\gre@skip@temp@one %
+ #5\relax %
+ \kern-\gre@skip@temp@one %
+ \gre@calculate@glyphraisevalue{#1}{0}{}%
+ \ifgre@hidealtlines %
+ \gre@fillhole{#3}%
+ \fi %
+ \raise \gre@dimen@glyphraisevalue\relax%
+ \copy\gre@box@temp@width%
+ #6\relax %
+ \ifnum#4=0\relax %
+ % we try to avoid line breaking after a flat or a natural
+ \GreNoBreak %
+ \gre@skip@temp@four = \gre@space@dimen@alterationspace\relax%
+ \ifgre@firstglyph%
+ \gre@debugmsg{bolshift}{making adjustments for leading alteration}%
+ \global\advance\gre@dimen@notesaligncenter by %
+ \dimexpr(\wd\gre@box@temp@width + \dimexpr\gre@skip@temp@four)\relax %
+ \kern\gre@skip@temp@four %
+ \global\gre@dimen@bolextra = \dimexpr(\wd\gre@box@temp@width + \dimexpr\gre@skip@temp@four)\relax%
+ \gre@debugmsg{bolshift}{bolextra: \the\gre@dimen@bolextra}%
+ \else %
+ \gre@hskip\gre@skip@temp@four %
+ \fi %
+ \GreNoBreak %
+ \directlua{gregoriotex.adjust_line_height(\gre@insidediscretionary)}%
+ \fi %
+ \relax %
}%
% This macro typesets a flat on the height provided by #1.
% #2 is 1 if the flat is part of a clef.
\def\GreFlat#1#2#3#4#5{%
- \gre@alteration{#1}{\gre@fontchar@flat}{\gre@fontchar@flathole}{#2}{#3}{#4}{#5}%
- \relax%
+ \gre@alteration{#1}{\gre@fontchar@flat}{\gre@fontchar@flathole}{#2}{#3}{#4}{#5}%
+ \relax%
}%
% Same as the one before, but for naturals.
\def\GreNatural#1#2#3#4#5{%
- \gre@alteration{#1}{\gre@fontchar@natural}{\gre@fontchar@naturalhole}{#2}{#3}{#4}{#5}%
- \relax%
+ \gre@alteration{#1}{\gre@fontchar@natural}{\gre@fontchar@naturalhole}{#2}{#3}{#4}{#5}%
+ \relax%
}%
% Same as the one before, but for sharps.
\def\GreSharp#1#2#3#4#5{%
- \gre@alteration{#1}{\gre@fontchar@sharp}{\gre@fontchar@sharphole}{#2}{#3}{#4}{#5}%
- \relax%
+ \gre@alteration{#1}{\gre@fontchar@sharp}{\gre@fontchar@sharphole}{#2}{#3}{#4}{#5}%
+ \relax%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2202,81 +2192,73 @@
\def\gre@fontchar@lineapunctumcavumhole{\gre@font@music\GreCPLineaPunctumCavumHole}%
\def\gresetpunctumcavum#1{%
- \IfStrEqCase{#1}{%
- {alternate}%
- {%
- \grechangeglyph{PunctumCavum}{greciliae}{.caeciliae}%
- \grechangeglyph{LineaPunctumCavum}{greciliae}{.caeciliae}%
- \grechangeglyph{PunctumCavumHole}{greciliae}{.caeciliae}%
- \grechangeglyph{LineaPunctumCavumHole}{greciliae}{.caeciliae}%
- }%
- {normal}%
- {%
- \greresetglyph{PunctumCavum}%
- \greresetglyph{LineaPunctumCavum}%
- \greresetglyph{PunctumCavumHole}%
- \greresetglyph{LineaPunctumCavumHole}%
- }%
- }[% all other cases
- \gre@error{Unrecognized option "#1" for \protect\gresetpunctumcavum\MessageBreak Possible options are: 'alternate' and 'normal'}%
- ]%
+ \IfStrEqCase{#1}{%
+ {alternate}%
+ {%
+ \grechangeglyph{PunctumCavum}{greciliae}{.caeciliae}%
+ \grechangeglyph{LineaPunctumCavum}{greciliae}{.caeciliae}%
+ \grechangeglyph{PunctumCavumHole}{greciliae}{.caeciliae}%
+ \grechangeglyph{LineaPunctumCavumHole}{greciliae}{.caeciliae}%
+ }%
+ {normal}%
+ {%
+ \greresetglyph{PunctumCavum}%
+ \greresetglyph{LineaPunctumCavum}%
+ \greresetglyph{PunctumCavumHole}%
+ \greresetglyph{LineaPunctumCavumHole}%
+ }%
+ }[% all other cases
+ \gre@error{Unrecognized option "#1" for \protect\gresetpunctumcavum\MessageBreak Possible options are: 'alternate' and 'normal'}%
+ ]%
}%
-\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 %
- \gre@skip@temp@four = \gre@dimen@lastglyphwidth\relax%
- \kern\gre@skip@temp@four %
- #4\relax %
- \kern-\gre@skip@temp@four %
- \gre@calculate@glyphraisevalue{#1}{0}{}%
- \ifgre@hidepclines%
- \gre@fillhole{#8}%
- \fi %
- \GreGlyph{#7}{#1}{#2}{#3}{}{#5}{#6}%
- %\relax %
+ \setbox\gre@box@temp@width=\hbox{#7}%
+ \global\gre@dimen@lastglyphwidth=\wd\gre@box@temp@width %
+ \gre@skip@temp@four = \gre@dimen@lastglyphwidth\relax%
+ \kern\gre@skip@temp@four %
+ #4\relax %
+ \kern-\gre@skip@temp@four %
+ \gre@calculate@glyphraisevalue{#1}{0}{}%
+ \ifgre@hidepclines%
+ \gre@fillhole{#8}%
+ \fi %
+ \GreGlyph{#7}{#1}{#2}{#3}{}{#5}{#6}%
+ %\relax %
}%
\def\GrePunctumCavum#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@fontchar@punctumcavum}{\gre@fontchar@punctumcavumhole}%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@fontchar@punctumcavum}{\gre@fontchar@punctumcavumhole}%
}%
\def\GreLineaPunctumCavum#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@fontchar@lineapunctumcavum}{\gre@fontchar@lineapunctumcavumhole}%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@fontchar@lineapunctumcavum}{\gre@fontchar@lineapunctumcavumhole}%
}%
\def\GrePunctumCavumInclinatum#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPPunctumCavumInclinatum}{\gre@font@music\GreCPPunctumCavumInclinatumHole}%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@font@music\GreCPPunctumCavumInclinatum}{\gre@font@music\GreCPPunctumCavumInclinatumHole}%
}%
\def\GrePunctumCavumInclinatumAuctus#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPPunctumCavumInclinatumAuctus}{\gre@font@music\GreCPPunctumCavumInclinatumAuctusHole}%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@font@music\GreCPPunctumCavumInclinatumAuctus}{\gre@font@music\GreCPPunctumCavumInclinatumAuctusHole}%
}%
-\def\GreOriscusCavum#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPOriscusCavum}{\gre@font@music\GreCPOriscusCavumHole}%
+\def\GreAscendensOriscusCavum#1#2#3#4#5#6{%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@font@music\GreCPAscendensOriscusCavum}{\gre@font@music\GreCPAscendensOriscusCavumHole}%
}%
-\def\GreOriscusCavumAuctus#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPOriscusCavumReversus}{\gre@font@music\GreCPOriscusCavumReversusHole}%
+\def\GreDescendensOriscusCavum#1#2#3#4#5#6{%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@font@music\GreCPDescendensOriscusCavum}{\gre@font@music\GreCPDescendensOriscusCavumHole}%
}%
\def\GreOriscusCavumDeminutus#1#2#3#4#5#6{%
- \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
- {\gre@font@music\GreCPOriscusCavumDeminutus}{\gre@font@music\GreCPOriscusCavumDeminutusHole}%
+ \gre@char@cavum{#1}{#2}{#3}{#4}{#5}{#6}%
+ {\gre@font@music\GreCPOriscusCavumDeminutus}{\gre@font@music\GreCPOriscusCavumDeminutusHole}%
}%