On Sunday, 18 October 2015 at 12:46:32 am -0400, Henry So Jr. wrote:
> Perhaps some extra condition is necessary (or was lost) because the
> first syllable has no letters under its note, but comparing 3.0 with
> 4.0, I can't figure out what that is.
>
> At this point, I really have to give in to the need for sleep, so I'll
> put off any further investigation until Sunday evening.
The key difference, as far as I can tell, is the computation of
\gre@skip@syllablefinalskip
In 3.0, the code looks like this:
\ifcase#4 %
% we enter here if the end of word is 0, so we must determine if we need to
type a dash here
% we set gretempdim to the actual space between the text of the two
syllables. The algorithm is quite complex, but quite similar to the one
computing the space between the two syllables several lines above.
%%% in 3.0 we start with intersyllablespace, which is a dimension
\gre@skip@temp@one=\gre@skip@intersyllablespace %
\advance\gre@skip@temp@one by \gre@skip@nextbegindifference %
\gre@debug{ifdim enddifference < 0pt}%
\ifdim\gre@dimen@enddifference<0pt%
\advance\gre@skip@temp@one by \gre@dimen@enddifference %
\fi % \ifdim\gre@dimen@enddifference>0pt
% there is a small """feature""" here: if the first glyph is an alteration,
the algorithm will be quite pessimistic
% about the space, so an hyphen may be added when it's not really necessary.
\gre@debug{ifdim temp@skip@one < 0pt}%
\ifdim\gre@skip@temp@one<0pt%
\gre@skip@temp@one=0pt%
\fi %
\gre@debug{ \the\gre@skip@temp@one }%
\gre@debug{ifdim enddifference > 0pt}%
\ifdim\gre@dimen@enddifference >0pt%
\advance\gre@skip@temp@one by \gre@dimen@enddifference %
\fi %
\gre@debug{ \the\gre@skip@temp@one }%
\gre@debug{ifdim nextbegindifference > 0pt}%
\ifdim\gre@skip@nextbegindifference >0pt%
\advance\gre@skip@temp@one by \gre@skip@nextbegindifference %
\fi %
%
% then we compare it with \gre@dimen@maximumspacewithoutdash, if it is
larger, we add a dash
%
\gre@debug{ifdim temp@skip@one > maximumspacewithoutdash}%
\ifdim\gre@skip@temp@one>\gre@dimen@maximumspacewithoutdash %
%%% put in a hyphen
In 4.0, the code looks like this:
%%% in 4.0, we compute \gre@skip@syllablefinalskip here
\gre@calculate@syllablefinalskip{#4}{\gre@count@temp@one}%
\ifcase#4 %
% we enter here if the end of word is 0, so we must determine if we need to
type a dash here
%%% in 4.0, we then start with the value computed above
\gre@skip@temp@one = \gre@skip@syllablefinalskip\relax%
\gre@debugmsg{ifdim}{ enddifference > 0pt}%
\ifdim\gre@dimen@enddifference >0pt\relax%
\advance\gre@skip@temp@one by \gre@dimen@enddifference\relax%
\fi %
\gre@debugmsg{ifdim}{ nextbegindifference > 0pt}%
\ifdim\gre@skip@nextbegindifference >0pt\relax%
\advance\gre@skip@temp@one by \gre@skip@nextbegindifference\relax%
\fi %
%
% then we compare it with \gre@dimen@maximumspacewithoutdash, if it is
larger, we add a dash
%
\gre@debugmsg{ifdim}{ temp@skip@one > maximumspacewithoutdash}%
\ifdim\gre@skip@temp@one > \gre@dimen@maximumspacewithoutdash\relax%
%%% put in a hyphen
The algorithm for \gre@compute@syllablefinalskip was added by Élie in
https://github.com/gregorio-project/gregorio/commit/5c5821a81e06c884f3895dde755a6673dc6eae6f
with comment "finishing this first step". This algorithm is pretty
complex and involves computing spacing pretty delicately, so I am unable
to determine the root cause of the difference in behavior. I can only
say that in this case, the algorithm computes a skip of about -2 pt,
which is not greater than \gre@dimen@maximumspacewithoutdash.
Can anyone who understands what this code is doing comment with any more
insight?
It's quite possible that what this is doing is more correct than the
previous code and that the user should simply force the hyphen to get
the desired result.
Henry
_______________________________________________
Gregorio-devel mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-devel