[involving the group again] On Sat, May 7, 2016 at 8:24 AM, Peter Gentry <peter.gen...@sunscales.myzen.co.uk> wrote: > Yes I meant input the page number data as data to the procedure rather than > in the procedure it self >
I think it's better to read the settings from the \paper variable as Harm does here. The \paper block is where the user sets other page-number variables. Also, I think it's useful to show that new variables can be added there (which never occurred to me). > > > On 7 May 2016 14:17:30 BST, David Nalesnik <david.nales...@gmail.com> wrote: >> >> Hi Harm, >> >> On Sat, May 7, 2016 at 5:52 AM, Thomas Morley <thomasmorle...@gmail.com> >> wrote: >>> >>> 2016-05-07 10:53 GMT+02:00 Peter Gentry <peter.gen...@sunscales.co.uk>: >>> >>>> Could I sugeest that the range data is input in the individual music >>>> file rather than the procedure so that the procedure remains >>>> unchanged for any arrangement of page ranges. It should be a minor >>>> addition that would make the snippet much more usuable as one of >>>> the staple includes. >>> >>> >>> >>> Hi Peter, >>> >>> not sure what you mean, could you elaborate more detailed? >>> >>> Anyway, I reworked it >>> http://lsr.di.unimi.it/LSR/Item?u=1&id=1036 >> >> >> >> >> Looks great! The comments below make some grammatical corrections. >> Thanks for doing this! >> >> %%%%%%%%%%%%%%% >> >> #(define-markup-command (use-page-number-ranges layout props)() >> "Reads @code{'page-number-ranges} from @var{layout} and transforms it >> into a >> flat list of integers. Prints a number-string taken from this list for >> page-numbering. >> The values are referenced by the actual page-number. If all elements of >> this >> list are consumed, additional pages are numbered consecutive. >> >> >> ;;;; consecutive --> consecutively >> >> >> An empty list will cause default page-numbers. Same for non-list settings >> or >> unsetting of @code{'page-number-ranges} >> >> >> ;;;; An empty list will cause default page-numbers, as will non-list >> settings or >> ;;;; unsetting of >> @code{'page-number-ranges} >> >> >> Limitations: >> - doesn't work for roman page-numbers. >> - only integer page-numbers are supported" >> >> (define (page-numbers ranges) >> ;; get a flat, unfolded list from a list containing ranges of >> integers. >> ;; p.e. '((1) (3 5) (7 10)) -> '(1 3 4 5 7 8 9 10) >> (append-map >> (lambda (e) >> (if (every integer? e) >> (iota (- (last e) (1- (car e))) (car e) 1) >> (ly:error "All elements needs to be integers: ~a" e))) >> >> >> ;;;; needs --> need >> >> >> ranges)) >> >> >> [snip] >> >> %%%%%%%%%%%%%%%%%% >> >> Best, >> David > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user