-
Notifications
You must be signed in to change notification settings - Fork 153
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
Hyphenation should allow initial and final one-letter syllables #1276
Comments
I haven't read the code, and I don't know whether this should be addressed by the dictionary or by our code. In Italian (and probably Latin, when hyphenated using the Italian dictionary) the initial one-letter syllable case could be worked around with the following logic:
I can't imagine exceptions to this logic, according to the Italian rules. Final one-letter syllables are a bit trickier, because whether vowels should or should not be divided depends on the pair of vowels and on the word. Of course if the problem depends on the dictionary I would prefer fixing it rather than working around it with special cases. |
I marked this issue as solved, even though in Italian final one-letter syllables remain not hyphenated: indeed the cause for the latter is that the relevant hyphenation patterns are missing, so it does not depend on Frescobaldi. I'll track this remaining part of the issue and work on it outside Frescobaldi. |
I reverted 77048db in 5615430. Possible approaches:
The whitelist and blacklist approaches should be developed in a way that takes advantage of regular patterns and not simply as lists of words. |
In addition we could set |
I think improving the dictionaries outside of Frescobaldi is a bit hairy, as those dictionaries are (should be) quite tried-and-trusted, and also probably auto-generated from really large real life word lists. Interesting discussion about how patterns are prepared. Maybe we should add an interface to add hyphenation patterns (effectively building a whitelist, via a user interface), and indeed, to make the left and right length per-language configurable. |
I agree. See https://tug.org/tex-hyphen/: in the table they list the minimum length of initial and final syllables assumed by the dictionaries.
At least in the case of Italian, regardless of what the table says, the dictionary already fully supports one-letter initial syllables; some hyphenation points (namely those between two vowels) are missed also in the middle of words, which counts as a bug in my opinion; solving that bug would add support for one-letter final syllables. Especially if the patterns are auto-generated (as we suspect), solving the bug should be possibly tedious but probably not difficult, as it should only be a matter of adding missing hyphenation points to the word list. |
I am currently leaning towards making a specialized music hyphen package, and including the dictionaries, although clearly marking what we change. So we need no config/whitelist UI, but get as best as possible behaviour out of the box. |
As an example, "Ave Maria" is currently hyphenated (with the Italian dictionary) as "Ave Ma -- ria", while the correct hyphenation is "A -- ve Ma -- ri -- a".
One-letter initial and final syllables are quite frequent in both Italian and Latin.
The text was updated successfully, but these errors were encountered: