You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Incorrect eolshift for mid-syllable line break #1738
If a forced line break occurs in the middle of a syllable, then the full syllable's enddifference is used to compute the eolshift. This can cause the text to be shifted into the margin.
Line breaks can occur in the middle of a syllable, usually because there's a significant melisma on the syllable. Take https://gregobase.selapa.net/chant.php?id=1365 as an example. Three syllables are long enough that automatic line breaks are introduced into them. I can fully imagine someone deciding they don't like where Gregorio has placed the line breaks and introducing their own forced breaks instead. The spot where "tur" is broken, for instance. Someone might prefer to break it at the divisio minima rathe than where it's broken automatically.
at the end of a syllable: the break is preceded by eolshift (to keep text from overflowing into margin) and is followed by bolshift (to align first note of each line).
forced line breaks: preceded by eolshift but not followed by bolshift. If the break occurs mid-syllable, the eolshift is based on the wrong enddifference.
at the end of an element: the break is not preceded by eolshift and not followed by bolshift.
All three kinds of line breaks should call a common macro, say \gre@maybenewline{#1} where #1 is a penalty, which inserts the eolshift, penalty, and bolshift. The sizes of both shifts can be calculated in Lua in the pre-linebreak filter.
Mostly. There are some elements which are allowed to protrude into the margin and the eolshift has to take that into account. Look for "protrusion" in the code base.
Activity
davidweichiang commentedon May 3, 2026
I’m kind of hoping that the answer to this one is that no one ever uses a line break in the middle of a syllable.
rpspringuel commentedon May 3, 2026
Line breaks can occur in the middle of a syllable, usually because there's a significant melisma on the syllable. Take https://gregobase.selapa.net/chant.php?id=1365 as an example. Three syllables are long enough that automatic line breaks are introduced into them. I can fully imagine someone deciding they don't like where Gregorio has placed the line breaks and introducing their own forced breaks instead. The spot where "tur" is broken, for instance. Someone might prefer to break it at the divisio minima rathe than where it's broken automatically.
davidweichiang commentedon May 4, 2026
That makes sense.
Additionally, a natural line break can occur at
\GreEndOfElement, and a similar problem can occur:davidweichiang commentedon May 5, 2026
So my new understanding of this is:
Line breaks can occur in three places:
All three kinds of line breaks should call a common macro, say
\gre@maybenewline{#1}where#1is a penalty, which inserts the eolshift, penalty, and bolshift. The sizes of both shifts can be calculated in Lua in the pre-linebreak filter.rpspringuel commentedon May 5, 2026
Mostly. There are some elements which are allowed to protrude into the margin and the eolshift has to take that into account. Look for "protrusion" in the code base.
davidweichiang commentedon May 5, 2026
I should have clarified, the last paragraph is what I think the right behavior is and will try to implement at some point.