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

No ligatures in syllable with the style tags using LuaLaTeX #1444

Closed
rpspringuel opened this issue Mar 3, 2019 · 6 comments
Closed

No ligatures in syllable with the style tags using LuaLaTeX #1444

rpspringuel opened this issue Mar 3, 2019 · 6 comments

Comments

@rpspringuel
Copy link
Contributor

As reported here by Sr. Maria Ruth:

In GregorioTeX 5.1.1, when a style tag is used just for a part of a syllable, part that corresponds to a ligature, LuaLaTeX never typesets the ligature [liga_lualatex_1], while LuaTeX does, with the exception of <c> and <ul> [liga_luatex]. In "gregoriotex.sty", the macros \GreItalic, \GreSmallCaps, \GreBold, and \GreTypewriter use \textit, \textsc, \textbf, and \texttt in their definition. I think those LaTeX's control sequences should be replaced by \itshape, \scshape, \bfseries, and \ttfamily because they cut off (they armour) each character in the ligature, while the last ones do not [liga_lualatex_2].

Anyway I think the overall procedure which manages the style tags within a syllable should be improved.

liga_issues.zip

@rpspringuel
Copy link
Contributor Author

The proposed fix works for bold and italics. The sample for small capitals and typewriter is inconclusive because no ligature is involved.

\underline does not have a flag equivalent in normal LaTeX. To fix it for this case we would need to test the various packages which improve underlining and add that dependency.

Color is already a switch, but its doing something that already breaks the ligature. Based on this answer it appears that we need to switch from xcolor to luacolor to make this work. Is switching this dependency acceptable?

@rpspringuel
Copy link
Contributor Author

Correction. We would need to load luacolor in addition to xcolor, not instead of it.

@rpspringuel
Copy link
Contributor Author

Additional correction: the luacolor solution only works for LuaLaTeX. The package doesn't appear to be compatible with LuaTeX, so I'm looking for an additional option.

@rpspringuel
Copy link
Contributor Author

After further reflection, I cannot come up with a situation where small capitals or typewriter would actually make use of ligatures. As a result, while will make the change according to the pattern for the ones which are problematic, I'm not going to worry about testing it at this point.

I've looked at the soul and ulem packages, neither provide the needed fix for underlining. I'm looking for other options.

Finally, the luacolor package seems to be breaking cavum shapes. I'm still investigating as to why.

rpspringuel added a commit to rpspringuel/gregorio that referenced this issue May 23, 2019
Corrected interaction issues between text styles and ligatures.  The LaTeX commands like `\textit` insert italics correction, preventing ligatures being formed between their arguments if two occur sequentially.  On the other hand the switches like `\itshape` do not.  Since gregorio breaks up syllables around the vowel and then applies the formating commands to each part, this behavior showed up.  We switch to using the switches to avoid this (except for underlining, for which a switch does not exist).  See [gregorio-project#1444](gregorio-project#1444).
A fix for color is still in the works.
@rpspringuel
Copy link
Contributor Author

rpspringuel commented May 27, 2019

I've got a partial fix for the color issue. It works on cavum shapes but is having difficulties with alterations. Specifically, alterations attached to a custos or clef change get filled with black (the color change to grebackgroundcolor is not being applied) while other alterations are fine. Anyone have any ideas as to why those two situations would end up with the different hole filling results? I've been attempting to backtrace without success at this point. Take a look at d323979 to see where I'm at so far.

@rpspringuel
Copy link
Contributor Author

I was able to boil it down and it comes to color changes not happening inside \discretionary when luacolor is loaded. I've posted another question looking for a way to fix this.

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

1 participant