gregorio-project / gregorio

The Gregorio Project
http://gregorio-project.github.io
Other
164 stars 43 forks source link

Custos causing unnecessary line height adjustment #1535

Closed fiat96 closed 2 years ago

fiat96 commented 3 years ago

When the custos at the end of a line is the only item below the staff, it is causing the text to shift downwards (even after a second pass). There's no reason for the text to be so low and it looks odd. Perhaps the custos could be excluded from the lowest-object calculation?

MWE:

\documentclass[latin]{book}
\usepackage{gregoriotex}

\begin{document}

\gabcsnippet{(c4) SE(f)púl(h)crum(g) Chris(h)ti(f) vi(g)vén(fe~)tis,(d.) (;) et(d) gló(g)ri(f)am(g) vi(h)di(g) re(f)sur(g)gén(fe~)tis:(d.) (::z) An(a)gé(c)li(d)cos(f) te(g)stes,(e_d) (,) su(c)dá(f)ri(e)um,(d) et(e) ve(c)stes.(d.) (::)}

\end{document}

image

henryso commented 3 years ago

I would argue that this looks right to me.

fiat96 commented 3 years ago

I was expecting something along the lines of this:

image with the words at a normal distance from the notes on the first line.

I'll have a look and see if there are any cases in the books.

rpspringuel commented 3 years ago

The problem with trying to do that it creates the possibility of the words colliding with the custos. What you're asking for would require detecting just how close to the end of the line the words get and adding space if they would collide with the custos. This is far from a simple requirement.

fiat96 commented 3 years ago

I did find a few examples in the Liber, for illustration. Such a low custos seems to be tolerated only at a major division, so only a few examples seem to exist...

image image

image image

I understand how potential collision with the custos makes this complicated, but to me the large gap between the staff and the words is glaring. It is a rare case, for sure, so I realize it might not be worthwhile to change. One can always force a less ideal line break, I suppose.