gregorio
gregorio copied to clipboard
Control horizontal alignment of NABC neumes relative to GABC notes
Following https://github.com/gregorio-project/gregorio/issues/1662#issuecomment-2850994662, I would like to suggest a feature in GregorioTeX to allow controlling the horizontal alignment (left, center, right) of NABC neums relative to its GABC counterparts. Currently, they're left-aligned.
Currently there is not any notion of a gabc "counterpart", so this could be harder than it sounds.
Currently there is not any notion of a gabc "counterpart", so this could be harder than it sounds.
Currently, in a score generated by e.g. Text(gabc1|nabc1|gabc2|nabc2...) the NABC neumes rendered by nabc1 are left-aligned to square notes rendered by gabc1, nabc2 left-aligned to gabc2, and so on. How is this currently calculated? Is it so hard in current GregorioTeX implementation to calculate the widths of rendered glyphs to allow centering or right-alignment?
What I mean is that if you have a score like
word(ababab|pu|cdcdcd|pu)
internally the ababab is split into two elements, ababa and b, and the pu is attached to the ababa. Presumably it would be surprising to center the pu over just ababa.
Maybe the mechanism already used for centering a translation over multiple syllables could be repurposed for centering nabc over multiple elements. gregorio would emit a command \GreNABCCenterEnd at the end of each nabc segment, and the Lua post-linebreak filter could do the centering.