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

changing the formatting of first syllable after initial #135

Closed
eroux opened this issue Mar 23, 2015 · 9 comments
Closed

changing the formatting of first syllable after initial #135

eroux opened this issue Mar 23, 2015 · 9 comments

Comments

@eroux
Copy link
Contributor

eroux commented Mar 23, 2015

Currently Gregorio uppercases the first syllable after the initial, which make it impossible to "small capitalize". For example

initial-style:1;
%%
(c4) P<sc>ri</sc>(f)<sc>mus</sc>(gh)

doesn't work. The solution, I believe, would be to have a \firstsyllablestyle that defaults to uppercase, but can be changed by the user. This requires some intervention of what is certainly the biggest spaghetti plate of gregorio, lib/characters.c, and requires bravery.

@eroux
Copy link
Contributor Author

eroux commented Mar 23, 2015

If anyone is brave enough for this, #42 could be fixed at the same time (it is in the same function).

@henryso
Copy link
Contributor

henryso commented Mar 23, 2015

I would like to try to fix this and #42, in order to get a better feel for that code, but I will most likely not have a satisfactory fix by release-3.0. If we need it for release-3.0, I suggest someone with more experience take a look at it.

@eroux
Copy link
Contributor Author

eroux commented Mar 23, 2015

Well, that's very brave of yours! This code is really terrible... I thought it would be ok for 3.1, but after thinking back about it, it might introduce a backward-incompatible change: the letters of the first syllable won't be uppercased in the .gtex files after this change.

Maybe the best solution would be to change the c code only to remove the current uppercasing, and do the uppercasing in TeX (it's easy to know if current syllable is the first one). It will solve the issue in a much simpler way. What do you think?

@henryso
Copy link
Contributor

henryso commented Mar 23, 2015

Are you sure gregorio capitalizes the first letter? It doesn't seem to do that for me.

foo.gabc

%%
(c3) test(d)

foo.tex

% File generated by gregorio 3.0.0-beta
\gregoriotexapiversion{3.0.0-beta}%
\begingregorioscore%
\greinitial{t}%
\grebeginnotes %
\gresetinitialclef{c}{3}{a}%
\gresyllable{}{e}{st}{1}{\gresetnextsyllable{}{}{}}{}{0}{%
\grelastofscore %
}{%
\greglyph{\char 178}{d}{g}{0}{}{}%
}%
%
\endgregorioscore %
\endinput %

@henryso
Copy link
Contributor

henryso commented Mar 23, 2015

I think the bug is something else. It's emitting something weird for \gresyllable. Or at least it seems that way to me.

bad.gabc

%%
(c4) Test(e/ec)ing(d)

bad.tex

% File generated by gregorio 3.0.0-beta
\gregoriotexapiversion{3.0.0-beta}%
\begingregorioscore%
\grefirstlinebottomspace{1}{0}%
\greinitial{T}%
\grebeginnotes %
\gresetinitialclef{c}{4}{a}%
\gresyllable{\gresmallcaps{}{e}{}\gresmallcaps{st}}{0}{\gresetnextsyllable{\gresetfixednexttextformat{3}}{i}{ng}}{}{0}{}{%
\greglyph{\char 178}{e}{e}{0}{}{}%
\greendofelement{0}{0}%
\greglyph{\char 5283}{e}{d}{1}{}{}%
}%
\gresyllable{\gresetfixedtextformat{3}}{i}{ng}{1}{\gresetnextsyllable{}{}{}}{}{0}{%
\grelastofscore %
}{%
\greglyph{\char 178}{d}{g}{0}{}{}%
}%
%
\endgregorioscore %
\endinput %

@eroux
Copy link
Contributor Author

eroux commented Mar 23, 2015

Oh, I see, it seems I made the wrong diagnostic... Looks like a bug in characters.c indeed.

@henryso
Copy link
Contributor

henryso commented Mar 23, 2015

The dump looks right, so I'm thinking the error is in gregoriotex-write.c.

@henryso henryso self-assigned this Mar 24, 2015
@henryso
Copy link
Contributor

henryso commented Mar 24, 2015

I've found some other edge-cases I've missed in the pull request for this issue. I'll work on them and create a new pull request.

eroux added a commit that referenced this issue Mar 25, 2015
@henryso
Copy link
Contributor

henryso commented Mar 26, 2015

Closing this issue. If additional breaking cases are found, we can reopen this or open a new issue.

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

2 participants