Skip to content

ALT-text/commentary/NABC colliding with note accents r1-r8 and pitch extremes #1766

Description

@lbssousa

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:

Image

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):

Image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions