Le 28/06/2021 14:21, Dan Eble <[1]e...@ticalc.org> a écrit : On Jun 28, 2021, at 06:03, Jean Abou Samra <[2]j...@abou-samra.fr> wrote:
Le 27 juin 2021 à 21:19, Dan Eble <[3]nine.fierce.ball...@gmail.com> a écrit : I am working on a grob for section labels. I want to recommend that the user encode the section name in title case (Coda), but I want LilyPond to render it in all caps (CODA) by default. Could you elaborate? Isn't setting the label through a property just as simple? (I don't have the technical background on your work.) There will be some of that too, but I have something more general in mind. a b c | \sectionLabel "Coda" d e f | "Coda" is just an example. It could be "Intro", "Refrain", "Part 2", etc. It could appear anywhere. I also would like to provide a sane adaptive default for D.S. instructions mentioning these labels. For example, if a user codes \sectionLabel "Outro" at the appropriate point of a \repeat segno, I want LilyPond to use "D.S. al Outro" without having to be told anything else. Emphasis: I don't intend to try to handle all cases correctly automatically, but to provide a default that works for Coda, has a chance of being acceptable for other names, and is at least consistent even if it isn't acceptable. If the user had to code \sectionLabel "CODA" for the sake of the section label, then the D.S. formatter would have to recapitalize speculatively to avoid "D.S. al CODA". I might be willing to implement that, but it is less appealing than recommending that the user capitalize as "Outro" and use grob properties to remap case. If the user had to code \sectionLabel "OUTRO" for the sake of the section label and then had second thoughts about the style, restyling would require a search and replace rather than just changing a grob property in a "house style" include file. That makes sense. The feature looks exciting! I vaguely recall Coda in small caps. Is all caps Gould advice? In _Behind Bars_, p. 239, all letters are capital and have the same height. I'm not knowledgeable enough about fonts to tell whether this is all caps or small caps. SOLO/TUTTI on p. 467 look similar. Character labels on p. 470 look similar and Gould explicitly calls them "small capitals," here, but again all letters have the same height. I am not aware of it being implemented. You'd not want to call string-upcase on the property directly since that would only work on strings, not any markup. text-interface.cc already does string replacements, so uppercasing should fit there. HTH TH. I plan to try enabling small caps and adding the option to transform to *lowercase* in text-interface to avoid a larger "C" in "CODA". I'd make a forced-case property taking values 'upper, 'lower or '(). That should be almost free compared to just lowercasing, and would support cases where small capitals are either nonexistent or ugly in the chosen text font. There could also be use cases in bookTitleMarkup. References 1. mailto:e...@ticalc.org 2. mailto:j...@abou-samra.fr 3. mailto:nine.fierce.ball...@gmail.com