bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: override color property of a markup command


From: David Kastrup
Subject: Re: override color property of a markup command
Date: Mon, 27 Jan 2014 20:59:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Davide Bonetti <address@hidden> writes:

>> I'm not top posting.
>
> %non si riesce a modificare la proprietà di un nuovo comando markup
> %se questa proprietà si riferisce a un colore
>
> % in a new markup command it is not possible to override a color property
>
> % esempio minimo: definisco un nuovo comando che colora un markup di rosso
> % ma del quale voglio poter cambiare la proprietà "internal-color"
> successivamente
>
> % minimal example: a new command that turn red a text, where i can change
> the property "internal-color"
>
> \version "2.18.0"
>
> #(define-markup-command (colorize layout props arg1) (markup?)
>   #:properties ((internal-color red))
>     (interpret-markup layout props
>     #{\markup 
>       \with-color #internal-color #arg1
>     #}))
>
> % usato normalmente il comando funziona
>
> % the new command works in normal way
>
> \markup \colorize "foo" %funziona
>
> % tentando di cambiare la proprietà "internal-color" si riceve un messaggio
> di errore
>
> % but if I try to override the "internal-color" property I get an error 
> message
>
> \markup 
>   \override #'(internal-color . green)
>    \colorize "foo"
>    
> % messaggio di errore ricevuto:
> % errore: tipo di argomento errato per 1. Previsto color, trovato
> green

\markup \override #`(internal-color . ,green) ...

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]