[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Duplication of pages with slight changes to color of grobs?
From: |
Paul |
Subject: |
Re: Duplication of pages with slight changes to color of grobs? |
Date: |
Mon, 17 Jul 2017 17:09:07 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Hi Knut,
Nice work on the videos. Just a couple quick thoughts.
On 07/17/2017 02:30 AM, Knut Petersen wrote:
B) Is there a practical way to redefine color? within a .ly file in a
way that it is recognized
by lilyponds code?
I take it you have tried this?
#(define (color? ...) ...)
In the after-line-breaking function I give color the objects ... well,
not really:
I abuse the color property to encode the moment and duration of the
color change.
Would it help to define your own custom properties (grob or context) to
avoid overloading the color property. I have this in my include file
for Clairnote:
#(let*
;; translator-property-description function
;; from "scm/define-context-properties.scm" (modified)
((context-prop
(lambda (symbol type?)
(set-object-property! symbol 'translation-type? type?)
(set-object-property! symbol 'translation-doc "custom context
property")
(set! all-translation-properties (cons symbol
all-translation-properties))
symbol))
;; define-grob-property function
;; from "scm/define-grob-properties.scm" (modified)
(grob-prop
(lambda (symbol type?)
(set-object-property! symbol 'backend-type? type?)
(set-object-property! symbol 'backend-doc "custom grob property")
symbol)))
(context-prop 'myfoo list?)
(grob-prop 'mybar integer?)
;; etc...
)
Then I can use my custom properties just like the built-in ones.
-Paul