Closed rpspringuel closed 9 years ago
Also looks good for me.
Looks like we are missing \setgregoriofont
unless that has been changed somewhere else that I'm missing.
I'm pretty sure \setgregoriofont
will become \GreSetGregorioFont
. It is not part of this set of renames. See #453.
Since that function normally gets written to the gtex file (taking the value of its argument from the gabc header) it's been renamed to \GreSetGregorioFont.
However, perhaps we should deprecate the font choice header in the gabc file? I think this would be more inline with the way we're handling the lyric centering now.
I agree
If we're going to make that change, then I should probably make it before we merge #453. Does anyone else have any opinions on deprecating the gregoriotex-font
header?
It makes sense to me. Moving styling concerns to TeX is (I think) a generally good idea.
I concur with @henryso
I've gotten started with the changes and have committed them to my feature/tex-renaming branch now that the first phase has been merged. Below is a task list showing my progress:
\gregorioscore
\gabcsnippet
\gresetcompile{force|auto|never}
\grechangestaffsize
\grechangestafflinethickness
\grecreatedim
\grechangedim
\grescaledim{yes|no}
\greloadspaceconf
\gresetlinecolor{gregoriocolor|black|...}
\gresetlines{visible|invisible}
\gresetlinesbehindalteration{visible|invisible}
\gresetlinesbehindpunctumcavum{visible|invisible}
\gresetgregoriofont
\grechangeglyph
\greresetglyph
\gredefsymbol
\gredefsizedsymbol
\gresimpledefbarredsymbol
\gredefbarredsymbol
\grechangestyle
\greannotation
\grecommentary
\grescorereference
\gresetlyriccentering{vowel|syllable}
\gresettranslationcentering{left|center}
\gresetbreakineuouae{allow|prohibit}
\gresetbreakintranslation{allow|prohibit}
\greseteolcustos{manual|auto}
\greseteolshifts{enabled|disabled}
\gresetlastline{justified|ragged}
\gresethyphen{force|auto}
\greseteolhyphen{noraml|zero}
\gresetclef{visible|invisible}
Oh, and for documentation, I'd appreciate any opinions on the proper order of the sections (or even if my section divisions make sense).
These are just my opinions:
"Dimensional control" sounds like some kind of superpower. I would change that to simply "Dimensions". In fact, I would drop "control" from "Custos control" as well, or perhaps put \gresetcustos
under "Line breaks".
I can also see \gresetlastline
and \greseteolshifts
under "Line breaks", which could be named something like "End of line"
I'm not sure about "Neume font" as there is more than just neumes in there. Maybe "Score font" would be better. Somewhat related, maybe \gresetgregoriofont
should probably be \gresetscorefont
.
I think "Styling changes" should just be "Styling".
\gresetcompile
could go under "Score inclusion".
In terms of section order, it seems somewhat arbitrary, so maybe just alphabetize it.
I've made some changes to the outline above, using some of the advice of @henryso as well as some ideas of my own.
Phase II is up for review.
Phase III, the renaming of the internals, will have to wait for when I get back from the North American Benedictine Juniors Conference (I leave tomorrow and will be back on the 27th of June), unless someone else wants to take it on.
I found some bugs while removing deprecation warnings from the tests.
\grenormalclef
is called by \GreChangeClef
and \greinchangeclef
. \greinchangeclef
appears to be unused, so I suppose it can be removed, but \GreChangeClef
is produced by the gregorio executable and thus generates Package GregorioTeX Warning: \grenormalclef is deprecated.
\gresetdim
is called by \gre@changeonedimenfactor#1#2#3
, so there are a lot of spurious Package GregorioTeX Warning: \gresetdim is deprecated.
warnings in the logs.The first should be changed to \gresetclef{visible}
, assuming the functionality provided by the old command is needed. (I'd need to look at the code in context to determine that and it's late.)
The second should be changed to \gerceatedim
. This one I know for sure should be changed because I authored that section of the code and thus know what's going on there without looking.
I will create a pull request for these two bugs and you can review/merge as you see fit.
Thanks for the fixes.
Is there a reason the texverb-called macros in the gabc-notes-determination.l
were not renamed to camel-case?
I didn't realize there was anything in that file which needed to be renamed.
I wouldn't have noticed either except that I was looking at @jakubjelinek's work on the dynamically sizable braces, which means that a change now will be a bit of a messy merge with his work.
Perhaps, then, we should hold off on making the changes until he's done?
Also, is it a good idea to keep those macro names in that file or should there be some sort of mechanism for having gregoriotex-write.c
write them like it does all the other macros?
Those macros are "shimmed over" to use the texverb system rather than being "first class" gregorio objects. It's not perfect, but it does work, so I'd just as soon leave them there (my opinion and only mine, of course) unless and until there's a reason to promote them into "first class" status (like we did for the manual custos).
@rpspringuel I noticed that the barred letter macro names in UPGRADE.md
don't match after the rename. I think UPGRADE.md
needs a review before 4.0 RC1 (which I realize is down the road a bit).
Edit: Note: I've updated the barred letter macro section of UPGRADE.md
with the new names as part of #543, but I didn't review any other part of that file.
I'll take a look when I get the chance.
I'm nearly done with this and plan to look at the nabc functions next. Not being familiar with this section of the code, I'm not sure which functions should go in which category. Can someone who is familiar with the nabc code (@eroux or @jakubjelinek) look at the following list and let me know how they should align with the naming scheme:
\nabcneumes \scorenabclines \dogregorionabcchar \donabcneumes \gregorionabcchar \gregorionabcfontname \gregorionabcfontsize \gregorionabcstyle \gregoriosetnabcfont \grenabcfontloaded
Another question:
Right now there are several \gre@char@...
macros which are simply aliases for a corresponding \GreCP...
function. Is there a reason for having this extra layer of aliases or would it be okay to replace the \gre@char@...
macros with the corresponding \GreCP...
functions?
I would personally prefer to get rid of the extra layer (i.e., I agree with what you suggest), but I didn't want to rile any feathers.
Since no one has provided a reason for the extra layer, I'm going to explore eliminating it.
Oh, @eroux and @jakubjelinek, I'm still looking for some guidance on the nabc functions.
\nabcneumes \scorenabclines \gregorionabcchar
are macros used in .gtex generated from .gabc. BTW, it seems there is a typo in gregoriotex/, one of the uses is gregorionabccchar (3xc) which is not defined anywhere. gregorionabcchar is also used directly in the documentation.
\gregoriosetnabcfont
is a macro that users can use to change the neume font and/or size.
\gregorionabcstyle
is something users can redefine to other style.
\donabcneumes \dogregorionabcchar \gregorionabcfontname \gregorionabcfontsize \grenabcfontloaded
I think all these are internal (but for all of them one should check the documentation, it uses some internals directly).
And, of course, feel free to rename any or all of them to match the style.
@jakubjelinek, In looking at the nabc functions, I've noticed that \nabcneumes
is defined with two arguments, but only makes use of the second. Is there a planned purpose for the first argument (and thus a reason to keep it) or would it be safe to eliminate it?
@jakubjelinek, Along similar lines, I note that the argument for \scorenabclines
(which appears to be the number of nabc lines the score is supposed to accept) doesn't get used. Is this something I should keep around?
Hmm... After reading through the nabc documentation, I think I see what those arguments are for: multiple lines of nabc above the staff. While it doesn't look like it's been implemented yet, it does look like you've got plans for allowing multiple lines of nabc above the staff and the currently unused arguments would be for specifying information about those lines. If that's the case, I'll leave them in.
The plan is primarily to add support for having one line of neumes above the score and one in between the score and text below it (like in Graduale Triplex). So the first argument to nabcneumes is meant to say which of the locations it goes to. It will primarily make sense when (if) support for Laon neumes is added.
I'm not sure if this should be closed now. Should it?
The only thing left to deal with (if desired) are the names of the fonts. These are currently a bit of a hodge-podge: \gregoriofont
, \gregoriostylefont
, \gre@nabcfont
, \gre@fontofbiginitial
(PlainTeX only), \gre@fontofinitial
(PlainTeX only), and some whose names are less immediately clear because they are defined by Lua based on the value of some string variable. I haven't done anything with these because of just how much of a mess changes here could make (especially for the ones defined or used by Lua). My thoughts are to name them in the pattern \gre@font@...
but I'm also willing to leave well enough alone if that's what others would prefer.
Because of how they are used, the lua generated fonts had to be named without the at-symbol (but this can probably be worked around by using catcode_at_letter
, which came into existence later). I don't have a strong opinion on this, either way; just saying it's doable if we wanted to do it.
I have a patch ready to name the fonts created in Lua to \gre@font@variant@...
. Now is a good time as any to rename the rest of them, if you want to do it. Let me know if and where you want me to push change to gregoriotex.lua
.
Can you submit it as a pull request against the texrenamingiii branch on my repository? That should make it easy for me to build on what you've done to rename the rest of the fonts.
Actually, never mind. I just did a fetch operation and I see the branch on your repository. I can merge it into my repository locally.
I suppose this is done.
I figured I'd open in issue for this so that it can be listed in the milestones for 4.0 and so people can comment on it if the feel the need.
\gre@*
\gre*