[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem to code page-numbers
From: |
Thomas Morley |
Subject: |
problem to code page-numbers |
Date: |
Fri, 14 Aug 2015 12:01:23 +0200 |
Hi,
I'm trying to put out a \book, affecting the page-numbers in a certain way.
Ofcourse this should happen under certain conditions.
Look at the minimal example below.
All I try to affect is the `counter', if the page is the last of the bookpart.
I had expected that the counter would get up to 3 (starting at 1 and
two bookparts having a last page)
Instead it goes up to 9.
No idea why it's called nine times.
\version "2.19.24"
#(define counter 1)
#(define (test layout props arg)
(if (chain-assoc-get 'page:is-bookpart-last-page props #f)
(set! counter (1+ counter)))
(newline) (format #t "I'm called ~a. time" counter)
(interpret-markup layout props arg))
\paper {
print-first-page-number = ##t
oddHeaderMarkup = \markup
\fill-line { \on-the-fly #test \fromproperty #'page:page-number-string }
evenHeaderMarkup = \markup
\fill-line { \on-the-fly #test \fromproperty #'page:page-number-string }
}
\book {
\bookpart { \repeat unfold 3 { d''1 \pageBreak } }
\bookpart { \repeat unfold 4 { e''1 \pageBreak } }
}
Any hints?
Cheers,
Harm
- problem to code page-numbers,
Thomas Morley <=
Re: problem to code page-numbers, Jan-Peter Voigt, 2015/08/14