Hi Harm, On 5/05/2016, 11:53 PM, "Thomas Morley" <thomasmorle...@gmail.com> wrote:
>Right now I don't remember such code. Just to refresh my memory, >please provide a link. I don’t have the link but these are the code fragments I collected. By the way, the subject line for this topic was meant to read ‘multiple page number skip ranges’ - but I suppose it’s clear what I meant by now. Andrew — snip % procedures for altering page numbering. % author: David Nalesnik 2013 #(define-markup-command (skip-page-number-range layout props arg) (number-list?) (let ((page-number (chain-assoc-get 'page:page-number props -1))) (interpret-markup layout props (if (>= page-number (car arg)) (number->string (+ page-number (1+ (- (cadr arg) (car arg))))) (chain-assoc-get 'page:page-number-string props -1))))) % author: Curt McDowell 2013 % define a list of page numbers to skip % #(define page-number-skip-list '(3 4 7 14)) #(define (pages-less skip-list page offset) (if (null? skip-list) offset (pages-less (cdr skip-list) page (+ offset (if (<= (car skip-list) (+ page offset)) 1 0))))) #(define-markup-command (page-number-compute layout props) () (let ((page-number (chain-assoc-get 'page:page-number props 0))) (interpret-markup layout props (format "~a" (+ page-number (pages-less page-number-skip-list page-number 0)))))) — snip _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user