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

calling \GreHyph with an argument #1140

Open
eroux opened this issue Jun 14, 2016 · 10 comments
Open

calling \GreHyph with an argument #1140

eroux opened this issue Jun 14, 2016 · 10 comments
Labels
Milestone

Comments

@eroux
Copy link
Contributor

eroux commented Jun 14, 2016

It would be useful sometimes to be able to reduce the size of the hyphen, but depending on the space between the syllables: having a long hyphen when the space is very big, and a shorter one when the space can be shrinked. I think the best way to do that is by

  • calling \GreHyph more consistently when inserting an hyphen (sometimes - is used)
  • calling \GreHyph with an argument (ignored by default?) being the width between the two syllables
@eroux eroux added this to the 4.2 milestone Jun 14, 2016
@henryso
Copy link
Contributor

henryso commented Jun 16, 2016

It seems that the \GreHyph vs - dichotomy was done on purpose (there are comments to that effect). Before we start changing it, does anyone remember why that was done?

@eroux
Copy link
Contributor Author

eroux commented Jun 16, 2016

I'm affraid I don't...

@henryso
Copy link
Contributor

henryso commented Jun 21, 2016

Researching this a bit more, there is an option to make the \GreHyph hyphen protrude when at the end of a line by setting \greseteolhyphen{zero}, so if we change all - to \GreHyph and set that zero option, hyphens within a line will protrude into the next syllable, which is most likely not a desirable result. This also means that gregorio (the executable) emitting \GreHyph for all hyphens entered in gabc is probably wrong. How should we proceed here?

@henryso
Copy link
Contributor

henryso commented Jun 22, 2016

There are 3 types of hyphens:

  • a hyphen within a syllable (entered in gabc)
  • a hyphen at the end of a syllable, but not at the end of a line
  • a hyphen at the end of a line

Either of the latter two may be "forced" by entering a hyphen at the end of a syllable in gabc.

My proposal:

  • A hyphen entered in gabc within a syllable will be \GreIntraSyllableHyphen, which will typeset a hyphen, regardless of any other settings
  • A hyphen entered in gabc at the end of a syllable will continue to be \GreForceHyphen (as it is now), which will force a hyphen to appear at the end of the current syllable.
  • A hyphen at the end of a syllable but not at the end of a line will be \gre@hyphen#1, which will typeset a hyphen that is not affected by the \greseteolhyphen setting. #1 is the amount of space between the syllable texts on either side.
  • A hyphen at the end of a syllable will be \gre@eolhyphen, which will typeset a hyphen and be affected by the \greseteolhyphen setting.

Comments?

@eroux
Copy link
Contributor Author

eroux commented Jun 22, 2016

I agree, but I think the best would be to make something a bit more generic, like a \gre@hyphen with two arguments, the first being the type (among the 4 you described), and the second the space between the texts of this syllable and of the next one... \GreForceHyphen, etc. would call it internally. How does it sound? Also, we must think of a way for users to override the \gre@hyph macro in a user-friendly way...

@henryso
Copy link
Contributor

henryso commented Jun 23, 2016

What you're suggesting doesn't entirely make sense so me. The second argument only makes sense for hyphens at the end of syllables which are not at the end of a line.

What is the second argument for a hyphen that is not at the end of a syllable? 0? The width of a hyphen?

What is the second argument for a hyphen at the end of a line? Infinity? 0?

Also, \GreForceHyphen does not emit a hyphen. It sets a flag that causes the hyphen determination code to always generate a hyphen (either interline end-of-line, depending on the final position).

@eroux
Copy link
Contributor Author

eroux commented Jun 23, 2016

The second argument would ignored in these cases yes. Ok for \GreForceHyphen, let's ignore it then

@henryso henryso self-assigned this Jun 24, 2016
henryso added a commit to henryso/gregorio that referenced this issue Jun 24, 2016
This was referenced Jun 24, 2016
@henryso henryso removed their assignment Jun 25, 2016
@eroux eroux modified the milestones: 5.0, 4.2 Jul 4, 2016
@eroux
Copy link
Contributor Author

eroux commented Jul 4, 2016

let's finish it in 5.0

@henryso
Copy link
Contributor

henryso commented Oct 24, 2016

Is the thing left to do here the override of \gre@hyph in a user-friendly way, or is there something else missing?

@eroux
Copy link
Contributor Author

eroux commented Oct 24, 2016

I remember something about being able to control the length of the hyphen to put at the end of a line when it's automatically added in Lua... I'm affraid I can't have a clearer answer without digging in the code (which won't be this week I'm affraid...)

@henryso henryso modified the milestones: 5.0, 5.1.0 Apr 16, 2017
@rpspringuel rpspringuel modified the milestones: 5.1.0, 5.1.2 Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants