[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple substitution for oddFooterMarkup?
From: |
Trevor Bača |
Subject: |
Re: Simple substitution for oddFooterMarkup? |
Date: |
Thu, 2 Nov 2006 10:44:15 -0600 |
On 11/2/06, Mats Bengtsson <address@hidden> wrote:
Trevor Bača wrote:
> On 11/2/06, Mats Bengtsson <address@hidden> wrote:
>>
>>
>>
> Hm; maybe it simplifies things a bit to get rid of the include file
> and do the example in a single file like this?
>
> %%% BEGIN %%%
>
> \version "2.9.27"
>
> boldNumber = \markup { \fill-line { \bold \fontsize #3 \on-the-fly
> #print-page-number-check-first \fromproperty #'page:page-number-string
> } }
>
> \paper {
> oddFooterMarkup = \boldNumber
> }
>
> \new Staff {
> c'4
> }
>
> %%% END %%%
>
> And here the same parser error arises ...
>
> Parsing...ERROR: Unbound variable: print-page-number-check-first
>
> ... which makes me think that maybe there's something going on other
> than a scoping error.
You will have to copy the definition also in this case. As far as I can
understand,
the macros defined using (define ...) in ly/titling-init.ly are only
visible within
ly/titling-init.ly (or maybe within a group of init files), but clearly
not in the user
files.
OK, yes, you're clearly right. I was forgetting that oddFooterMarkup
is in fact defined in ly/titling-init.ly (along with
print-page-number-check-first).
Copying the definition of print-page-number-check-first now removes
the scoping error:
%%% BEGIN %%%
\version "2.9.27"
#(define (print-page-number-check-first layout props arg)
(if (or (not (= (chain-assoc-get 'page:page-number props -1)
(ly:output-def-lookup layout 'first-page-number)))
(eq? (ly:output-def-lookup layout 'print-first-page-number) #t))
(print-page-number layout props arg)
empty-stencil))
oddFooterMarkup = \markup { \fill-line { \bold \fontsize #3
\on-the-fly #print-page-number-check-first \fromproperty
#'page:page-number-string } }
\paper {
\oddFooterMarkup
}
\new Staff {
c'4
}
%%% END %%%
And now there's some grumbling at the way I'm invoking oddFooterMarkup:
Parsing...
343.ly:24:2: error: syntax error, unexpected MARKUP_IDENTIFIER
\oddFooterMarkup
What's a good way to reference the redefinition of oddFooterMarkup
inside the paper block?
--
Trevor Bača
address@hidden