[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can the leading \markup command be eliminated in a new markup comman
From: |
David Kastrup |
Subject: |
Re: can the leading \markup command be eliminated in a new markup command? |
Date: |
Wed, 14 Mar 2018 16:44:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Kieren MacMillan <address@hidden> writes:
> Hi David,
>
>> You either define an event function or a markup command. […]
>> One is the markup, the other is a text script post event. Markups can
>> be used in a variety of circumstances (as text scripts, as lyrics, as
>> part of other markup, as tempo strings, as mark texts and so on). Text
>> scripts can be used as text scripts.
>
> Since all I usually want/need in such situations are text scripts —
> never to be [re]used in any other circumstances — I will go forward
> under the impression that event functions suit my need just fine, and
> adjust my function library accordingly.
Don't be too fast. I've created
Current branch: issue5291
Tracker issue: 5291 (https://sourceforge.net/p/testlilyissues/issues/5291/)
Rietveld issue: 336670043 (https://codereview.appspot.com/336670043)
Issue description:
Allow event functions from partial functions or partial markups
This gives event functions such as ^\tweak font-size 2^\markup \huge
\etc Also contains commits: Allow event functions from partial
markup commands This allows event functions such as ^\markup \huge
#red \etc Add Syntax::create_script This generates post-events
from generic Scheme expressions.
So you can replace the definition
%%% SNIPPET BEGINS
\version "2.19.80"
cue =
#(define-event-function (text) (markup?)
#{ ^\markup \bold #text #})
{ c''\cue "This is the cue." }
%%% SNIPPET ENDS
with
%%% SNIPPET BEGINS
\version "2.21.0"
cue = ^\markup \bold \etc
{ c''\cue "This is the cue." }
%%% SNIPPET ENDS
It's a small amount of syntactic sugar but might come in handy.
--
David Kastrup
- can the leading \markup command be eliminated in a new markup command?, Kieren MacMillan, 2018/03/12
- Re: can the leading \markup command be eliminated in a new markup command?, David Kastrup, 2018/03/13
- Re: can the leading \markup command be eliminated in a new markup command?, Kieren MacMillan, 2018/03/13
- Re: can the leading \markup command be eliminated in a new markup command?, David Kastrup, 2018/03/13
- Re: can the leading \markup command be eliminated in a new markup command?, Kieren MacMillan, 2018/03/13
- Re: can the leading \markup command be eliminated in a new markup command?, David Kastrup, 2018/03/13
- Re: can the leading \markup command be eliminated in a new markup command?, Kieren MacMillan, 2018/03/13
- Re: can the leading \markup command be eliminated in a new markup command?,
David Kastrup <=
- Re: can the leading \markup command be eliminated in a new markup command?, Kieren MacMillan, 2018/03/14