lilypond-user
[Top][All Lists]
Advanced

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

Re: v2.15.24: void-, scheme- or music-function in toc-section?


From: Jan-Peter Voigt
Subject: Re: v2.15.24: void-, scheme- or music-function in toc-section?
Date: Mon, 16 Jan 2012 09:50:37 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Lightning/1.0b2 Thunderbird/3.1.16

Am 16.01.2012 09:37, schrieb Jan-Peter Voigt:
Hi Thomas,


--snip--
indexItems =
#(define-music-function (parser location text) (markup?)
  (let* ((text-rev (if (string? text)
                       text
                       (markup->string text)))
        
         (args (string-split text-rev #\#))
         (initial (string-upcase (substring (car args) 0 1)))
         (label (gensym "index-item")))
        ;; add label to all index-lists with predefined label
        (add-abctoc-item! 'abcTocItemMarkup text-rev label)
        (add-index-item! 'indexItemMarkup text-rev label)
        (add-index-item! 'indexSectionMarkup initial label)
        (add-customtoc-item! 'customTocItemMarkup text-rev label)
))
--snip--
... you can simply return the last (add-customtoc-item! 'customTocItemMarkup text-rev label) here. It already creates the label-event-chord. The point is, that all different toc-entries share one page-label.

Cheers, Jan-Peter

reply via email to

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