Skip to content
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

Manual custos and automatic custos (on clef change) have inconsistent spacing #642

Closed
henryso opened this issue Oct 9, 2015 · 20 comments
Closed
Assignees
Milestone

Comments

@henryso
Copy link
Contributor

henryso commented Oct 9, 2015

The manual custos of a figure like (g+::c3) has additional space behind it compared to (z0::c3). It is actually coded this way: \GreManualCustos adds the space before calling \GreCustos. As such, it works as coded.

Neither I nor @rpspringuel know whether this is the desired behavior or is just some inconsistency that worked its way into the code (and thus would be considered a bug).

Does anyone know the history here? Is this a bug?

@henryso
Copy link
Contributor Author

henryso commented Oct 10, 2015

If no one knows the history behind this (probably @eroux would be the best to speak to that), then does anyone have an opinion on the correct behavior?

My not-very-strong opinion is that we should set that space to 0 by default and apply it before both the g+ and z0 custos, but not to the end-of-line custos.

@henryso
Copy link
Contributor Author

henryso commented Oct 10, 2015

Sr. Maria Ruth OSB, who brought up this issue on the mailing list, says this:

My simple thoughts are that all custos should be equally treated, obviously when they are at the end of a line shouldn't be followed by a space.

@eroux
Copy link
Contributor

eroux commented Oct 10, 2015

Neither do I have a strong opinion, I guess treating all custos inside a line equally is consistent, and maybe set the space to 0 is good too...

@henryso
Copy link
Contributor Author

henryso commented Oct 10, 2015

I'll work on this and submit a pull request. Should this be in 4.0.0?

@henryso henryso self-assigned this Oct 10, 2015
@henryso
Copy link
Contributor Author

henryso commented Oct 10, 2015

It turns out that spacebeforecustos is actually applied to the end-of-line custos, so zeroing it out is a bad idea. However, if I apply it to both the g+ and z0 figures, the space is very wide because (I think) the end-of-element space (whichever case it happens to be), which would have been swallowed at the end of the line, is placed before the custos (and spacebeforecustos) in the middle of a line. Can anyone confirm or disprove this finding and, if true, give me a hint on how to combine the end-of-element space with the spacebeforecustos so that the space is the maximum of both spaces and not the sum of both spaces?

@rpspringuel
Copy link
Contributor

I haven't done any checking to see if what you're getting is true (though it does sound right), but perhaps the easiest thing to do would be to split spacebeforecustos into spacebeforeinlinecustos and spacebeforeeolcustos. In this scenario one could then zero out the inline value without affecting the end of line value.

@henryso
Copy link
Contributor Author

henryso commented Oct 10, 2015

I tried that, and that does indeed help if there was a note before the custos. To reduce the "too wide" space in this case, I set spacebeforeinlinecustos to be 0. However, using those settings, if the custos immediately follows a bar (like at the end of gabc-output/bugs/fix-569.gabc), the custos touches the bar. This might be the reason (in the annals of history) that the space was there in the first place.

I tried a few things, but I can't figure out a good way to deal with this in TeX without having the gregorio program detect it and use a different macro at that point. Can you think of a way to fix this problem in TeX?

@rpspringuel
Copy link
Contributor

So you're saying that a bar doesn't surround itself with the appropriate spacearound..., at least under some circumstances? That itself sounds to me like another bug. Is there some set of circumstances under which spacearound... should intentionally not be placed both before and after the corresponding bar? Maybe @eroux can remember programming that behavior?

@eroux
Copy link
Contributor

eroux commented Oct 11, 2015

Well, sorry, I cannot remember anything about this...

@henryso
Copy link
Contributor Author

henryso commented Oct 11, 2015

That's a good clue. The problem with touching is only on the final divisio finalis. The final divisio finalis uses the end-of-line finalis macro as opposed to the in-line finalis macro, and changing this might break some edge cases where a final divisio finalis without any custos after it appears at the end of a line. I don't have any more time to look into it this morning, but I'll most likely use a special macro to handle this case unless someone has a better suggestion.

@rpspringuel
Copy link
Contributor

Perhaps the final divisio finalis macro should only be used if the absolutely last element of the score.

@henryso
Copy link
Contributor Author

henryso commented Oct 11, 2015

I tried that, but found that the rubber space after the normal in-line divisio finalis can make things look a bit funny at the end of a line (this is from tex-output/bugs/fix-43/fix-43.tex):

image

I personally am not happy with how that looks, but I am willing to accept it if others think it is OK. Otherwise, I will try to come up with some way to tighten that space with a special \GreFinalCustos macro.

@henryso
Copy link
Contributor Author

henryso commented Oct 13, 2015

Any comment on this? Should I try to tighten that space or is this satisfactory?

@eroux
Copy link
Contributor

eroux commented Oct 13, 2015

I think it should be tightened

@henryso
Copy link
Contributor Author

henryso commented Oct 13, 2015

With a final custos macro, I can get it to look like this:
image
... with the space tuned to be like the one after the dagger in:
image
Comments?

@eroux
Copy link
Contributor

eroux commented Oct 13, 2015

looks good!

@rpspringuel
Copy link
Contributor

I agree.

@eschwab
Copy link
Contributor

eschwab commented Oct 13, 2015

I also agree. It looks much better tightened.

@henryso
Copy link
Contributor Author

henryso commented Oct 13, 2015

The big question: release-4.0 or develop?

@eroux
Copy link
Contributor

eroux commented Oct 14, 2015

I don't have a very strong opinion, but I would say 4.0...

@henryso henryso added this to the 4.0 milestone Oct 14, 2015
henryso added a commit to henryso/gregorio that referenced this issue Oct 14, 2015
henryso added a commit to henryso/gregorio-test that referenced this issue Oct 14, 2015
@henryso henryso closed this as completed Oct 15, 2015
rpspringuel added a commit to rpspringuel/gregorio that referenced this issue Oct 16, 2015
* commit '049cd5d4c6df955b5721ba9b88b4b4000b4d5d1d':
  Made custos spacing consistent. Fixes gregorio-project#642.
  Change date format to prevent spurious spaces from accruing.
  Automate the insertion of the version number into CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants