[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Function operating on header
From: |
Noeck |
Subject: |
Re: Function operating on header |
Date: |
Sat, 14 Mar 2020 20:14:47 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
Hi,
Am 13.03.20 um 20:36 schrieb Noeck:
>> Finally, \fromproperty is important as it defers the evaluation of the
>> property. Using \title would give you the current value whereas
>> \fromproperty #'header:title can accommodate changes to the property.
> And that’s exactly why \fromproperty is the wrong tool for me here as I
> want to change the header fields based on what is there now not later.
I spoke too soon here. It would actually be nice to put the includes first.
Can I use fromproperty also in Scheme code? Or does the late evaluation
contradict with the usage in Scheme?
So I did another try and used the footer markup, but I can't use
fromproperty in Scheme code. This is what I tried:
\version "2.20.0"
\header { title = "Title" }
\paper {
oddFooterMarkup = \markup \fill-line {
\null
#(if
(string-null? (markup->string #{
\markup \fromproperty 'header:license #}))
#{ \markup \with-url
#(string-append "http://url/" (markup->string #{
\markup \fromproperty 'header:license #}) "/4.0")
\fromproperty 'header:license #} "")
% the lines above should finally produce this if license is defined:
% \with-url "http://url/cc by-sa/4.0" "cc by-sa"
\null
}
}
\header {
license = "cc by-sa"
}
{ b }
Cheers,
Joram
- Function operating on header, Noeck, 2020/03/07
- Re: Function operating on header, Timothy Lanfear, 2020/03/07
- Re: Function operating on header, Noeck, 2020/03/07
- Re: Function operating on header, Timothy Lanfear, 2020/03/07
- Re: Function operating on header, Francisco Vila, 2020/03/12
- Re: Function operating on header, Noeck, 2020/03/12
- Re: Function operating on header, Aaron Hill, 2020/03/12
- Re: Function operating on header, David Kastrup, 2020/03/13
- Re: Function operating on header, Noeck, 2020/03/13
- Re: Function operating on header, Timothy Lanfear, 2020/03/13
- Re: Function operating on header,
Noeck <=
- Re: Function operating on header, Timothy Lanfear, 2020/03/14