gregorio-project / gregorio

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

Clef rendered instead of custos when first note on next staff is flat #1573

Closed ebydj1 closed 8 months ago

ebydj1 commented 1 year ago

Sometimes, when it should render a custos with a flat, Gregorio renders a new clef instead. See attached example. mwe.pdf mwe.tex.txt ky--credo_iii--solesmes.gabc.txt image

ebydj1 commented 1 year ago

More debug info:

lsb_release -a output:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

lualatex version: This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian)

gregoriotex version:

% This file needs to be marked with the version number.  For now I've done this with the following comment, but we should check to see if PlainTeX has something similar to the version declaration of LaTeX and use that if it does.
%               [2021/03/13 v6.0.0 GregorioTeX system.]% PARSE_VERSION_DATE_LTX

Ran lualatex mwe.tex against the source files attached above (renamed to lose the .txt extension, of course), and obtained the output attached in run_1.zip. See output_run_1.txt for console output. Notice that there are no custos errors in the PDF.

Since the console output issued a warning about line heights, I reran and obtained the output attached in run_2.zip. Notice that custos errors appear.

As far as I can tell, the following files are identical in run_1 and run_2:

And the following files differ:

Let me know what other information I can provide about my system to help with this.

MRoth1910 commented 1 year ago

This doesn't happen for me. In both cases where a flattened Si is the first note on the next line, a custos appears correctly.

Screenshot 2023-02-05 at 20 51 07
ebydj1 commented 1 year ago

@MRoth1910 Did you run it once or twice? The first time is fine for me as well; it's only when I re-run the files (per the suggestion in run_1.zip's output txt file) that the second custos turns into a guide clef instead.

MRoth1910 commented 1 year ago

Ah, now I see the problem, and it's picking them off one by one in this case, i.e. it runs correctly, but each successive run doesn't produce the custos correctly, adding an error each time (first, the one after homo, then for the one after consubstantialem…).

This is a variant of an old bug… https://github.com/gregorio-project/gregorio/issues/1373. But, the solution here won't work for all of us — page references and hyperref depend on the original files, if I understand correctly. https://groups.google.com/g/gregorio-users/c/9GxFLNOz_S0/m/QV23N_lNAwAJ

MRoth1910 commented 1 year ago

I just noticed that in my own work (setting a Kyriale) Sanctus IX is typeset correctly, but Sanctus VIII isn't, even though both have a Si-flat on the first note of new lines, and the file is typeset twice due to using hyperref and the label and pageref functions. I'm very new to using those, which is why I was unsure above about the possibility of deleting the aux files to run again, because I don't want to break them. In any case, it seems that the custos with a flat –> clef bug doesn't happen at every iteration, and it doesn't necessarily have to do with a second run.

Screenshot 2023-02-06 at 11 33 11 Screenshot 2023-02-06 at 11 32 37
rpspringuel commented 8 months ago

See #1373.