Gregorio version: 6.2.0-develop (built from develop at commit 7c806e0)
Summary
The extra vertical space GregorioTeX reserves above/below the staff (to avoid collisions with above-lines-text, gregorian commentary, the NABC lines, and the lyrics) is driven entirely by each glyph's highest/lowest note pitch (compute_height_extrema() in gregoriotex-write.c, propagated to Lua via \GreGlyphHeights, consumed by adjust_additional_spaces() in gregoriotex.lua). Two glyphs that are drawn beyond the note's own pitch aren't accounted for by that computation, so they can collide with neighboring elements.
r1-r8
accentus, accentus reversus, circulus, semicirculus, semicirculus reversus, musica ficta flat/natural/sharp can collide with above-lines-text/commentary/the upper NABC line
These are always rendered above the note (at least at pitch highest_pitch - 2, see \gre@vepisemaorrare in gregoriotex-signs.tex), but compute_height_extrema() never looks at note->special_sign, so this extra height never reaches the space-reservation logic.
MWE (dimensions reduced only to make the collision visible without a huge score; the underlying gap exists at any setting):
\documentclass{article}
\usepackage{gregoriotex}
\grechangedim{abovelinestextheight}{0cm}{scalable}
\grechangedim{abovelinestextraise}{0cm}{scalable}
\begin{document}
\gabcsnippet{<alt>al</alt>ta(gr1)}
\end{document}
Screenshot:
Low notes (pitch a/b) can collide with the lower NABC line
name: low-pitch-blnabc-spacing;
nabc-lines: 2;
%%
(c4)
gra(a||ta)
Screenshot (the ta neume sits immediately against the low note, while the lyrics below have a generous gap):
blnabc_lower in adjust_additional_spaces() (gregoriotex.lua) uses a fixed dimension
(belowlinesnabcheight) and never grows with additional_bottom_space, unlike the lyrics position,
which already does grow with it. So as a note gets lower, the note-to-blnabc gap shrinks while the
blnabc-to-lyrics gap grows.
Gregorio version: 6.2.0-develop (built from
developat commit 7c806e0)Summary
The extra vertical space GregorioTeX reserves above/below the staff (to avoid collisions with above-lines-text, gregorian commentary, the NABC lines, and the lyrics) is driven entirely by each glyph's highest/lowest note pitch (
compute_height_extrema()ingregoriotex-write.c, propagated to Lua via\GreGlyphHeights, consumed byadjust_additional_spaces()ingregoriotex.lua). Two glyphs that are drawn beyond the note's own pitch aren't accounted for by that computation, so they can collide with neighboring elements.r1-r8accentus, accentus reversus, circulus, semicirculus, semicirculus reversus, musica ficta flat/natural/sharp can collide with above-lines-text/commentary/the upper NABC line
These are always rendered above the note (at least at pitch
highest_pitch - 2, see\gre@vepisemaorrareingregoriotex-signs.tex), butcompute_height_extrema()never looks atnote->special_sign, so this extra height never reaches the space-reservation logic.MWE (dimensions reduced only to make the collision visible without a huge score; the underlying gap exists at any setting):
Screenshot:
Low notes (pitch a/b) can collide with the lower NABC line
Screenshot (the
taneume sits immediately against the low note, while the lyrics below have a generous gap):blnabc_lowerinadjust_additional_spaces()(gregoriotex.lua) uses a fixed dimension(
belowlinesnabcheight) and never grows withadditional_bottom_space, unlike the lyrics position,which already does grow with it. So as a note gets lower, the note-to-blnabc gap shrinks while the
blnabc-to-lyrics gap grows.