David Kastrup wrote >> >> Assuming we would want to support stencils as well as markups, we'd need >> a >> new type predicate: >> >> markup-or-stencil? >> >> And if it is to be as flexible as a \tweak, then it should also support >> procedures (i.e. that return a stencil). > > I don't think it makes a lot of sense to support procedures as then so > many internals shine through that the abstraction is basically gone. > I am already unconvinced about stencils for that reason. > >> So we'd need: >> >> markup-or-stencil-or-procedure? > > markup-or-stencil-or-procedure-or-false? ... > > We don't do this elsewhere.
Good point about needing false to cover the full range of \tweak inputs for stencils. Let me try to make the case that such a long and unprecedented type predicate might actually make sense here by comparing two stories we could present to users. 1. "To do A with markups you have to use B, but to do A with stencils or procedures you have to use C." 2. "To do A you can always use B. It works with markups, stencils, or procedures." Or to put it another way: 1. "Here's a shortcut for tweaking/replacing a stencil. It only accepts markups. If you want to tweak/replace a stencil with another stencil you have to wrap your stencil in a \markup \stencil first (or just use the non-shortcut form). If you want to tweak/replace a stencil with a procedure then you have to use the non-shortcut form." 2. "Here's a shortcut for tweaking/replacing a stencil. It works just like the non-shortcut form for tweaking/replacing a stencil except that it can also accept markups." As a user I prefer 2 because I only have to learn one command that will work with anything (reasonable) that I throw at it. If I only ever use markups then everything is the same as with 1 (and I don't have to see any additional internals shining through), but if at some point I want to use stencils or procedures then I don't have to learn a new way to do it. So maybe the question is whether we're talking about a general shortcut for tweaking stencils, or a new command for tweaking stencils with markups. If it is only for markups then maybe the name should be less general to indicate this specific use? Something like \substituteMarkup ? Cheers, -Paul -- View this message in context: http://lilypond.1069038.n5.nabble.com/Re-Issue-3918-Add-alternatingTimeSignatures-issue-97110045-tp162462p162759.html Sent from the Dev mailing list archive at Nabble.com. _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel