-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline initial #1491
base: ctan
Are you sure you want to change the base?
Multiline initial #1491
Conversation
This appears to fix gregorio-project#1458. Please test on other systems.
There was a whole bunch of repeated code on both branches of several if statements. I've pulled that code out to reduce the if branches down to the absolute minimum.
The gre@biginitial flag is redundant. The same information can be found out by checking the value of gre@count@initiallines.
I don't know what circumstances led to this backup being put into place, but I the whole test suite passes without it, so I don't think it's necessary anymore.
We want to identify gre@knownline as a count Also adding in debug messages associated with knownline to help with the identification of when lines are processed (eventually so we can adjust the staff lines at the right places).
initialraise is already accounted for when \gre@dimen@temp@five is first established (line 402). It doesn't need to be double counted for the large initial.
This makes the height placement of the initial a function of the number of lines which wrap it rather than a fixed amount. It doesn't change anything for the 1 or 2 line initials, just makes it so that when 3 (or more) line initials are implemented, this calculation will be ready for them.
As staff lines with fewer or more than 4 lines have different heights so the position of the initial needs to be adapted as appropriate. This change fixes the new tests introduced in gregorio-project/gregorio-test@8713c85 (and amended in gregorio-project/gregorio-test@d8829fc).
We already calculate the staffheight and don't need to calculate it again here. Note: making this change reveals an off-by-one error in the manual calculation: there was an extra interstafflinespace. The number of spaces between the lines is one less than the number of lines: line-space-line
In line with 8106316 these are calculations which should have been using staffheight but weren't. Also found another off-by-one error in the placement of the above lines text. This was hidden by the fact that the size of the lyrics wasn't being taken into account. The change in gregoriotex-signs.tex did not have an off-by-one error because we're drawing the ledger line exactly one interstafflinespace above the staff. Hence, when we change to using staffheight, we still need one more factor of interstafflinespace
In semi-manual mode, only the last line of the lines wrapping the initial needs to be indicated manually (as opposed to the manual mode, where each line must be indicated).
Hmm... Another thing I noticed that still needs fixing: Right now the placement of the initial is based purely on the height of the first line (multiplied by the appropriate number of lines to lower the initial when the initial is wrapped by more than one line). Since the subsequent lines could be slightly taller or shorter, this means that 2 or more line initials may be slightly higher or lower than they ought to be (in the test case, they're all higher). Ideally I should access the actual heights of the second (and later) lines when they wrap the initial. |
I've done some more research on this and am rapidly coming to the conclusion that implementing the fully automatic multi-line initial may require changing how the lines are drawn: going from using |
Accidentally removed this when merging other branches in.
Since there are only two possible states, the code can be simplified if this flag is a boolean.
Part of the implementation for gregorio-project#1558
Implemented virga fusion and shape change on clivis.
@rpspringuel I realize this is way late. I've been off the scene for a while due to family issues. I looked at your commit, and I can't tell why it's not working. Maybe it's some collapsed measurement in TeX, but I don't think I understand TeX at that level to give a good answer. |
Fix segfault for first syllables of one letter with a style. RE: Issue gregorio-project#1585
." This reverts commit af37000.
Stop custos from erroneously changing into clef
At least on my system, the folder created is `_minted` with nothing appended. In case other systems append something (like a version number) I retain the wildcard, but remove the hyphen separator.
Even though there's nothing to be done during a build operation in these folders, they need to have a Makefile generated so that the files they contain will be properly added to a distribution.
For each line, baselineskip forms a minimum line height, so we need to check against that on a line by line basis and adjust our initial placement by that if it's bigger than the nominal height of the line. Since we're already looping over the lines in Lua, this is much easier on the Lua side, but that means Lua needs to look at the fixed height stuff too, so while we still calculate the base amount in TeX, we no longer add it directly to the initial position adjustment amount there.
When there is no line height information (either because it's the first pass and thus no gaux file exists or because the score simply has no elements which would require that information) the initial still needs to align down with the lower line.
With some significant refactoring and bug-fixing along the way, this PR is about supporting initials of an arbitrary number of lines explicitly.
Right now I've got two "modes" for doing so:
z
orZ
). This is the way 2-line initials are currently supported and so is set as the default.I'd like to make something which is fully automatic, but have yet to come up with a good way of tracking the automatic line endings. I've identified a point in the
post_linebreak
function where the line numbers are increasing as expected, but I'm not sure how, or even if, I can resize the lines on the lua side. Hence, I'm posting this here for some feedback.Note: This still needs some documentation work and so is not ready for merge.