lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scheme function returning \book


From: David Kastrup
Subject: Re: Scheme function returning \book
Date: Wed, 16 Jan 2019 11:52:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> Am Mi., 16. Jan. 2019 um 00:14 Uhr schrieb David Kastrup <address@hidden>:
>>
>> Lukas-Fabian Moser <address@hidden> writes:
>>
>> > Hi David,
>> >> \test apparently expects a string argument.
>> >
>> > Aaargh, sorry, stupid me, and stupid copy'n'paste error. So, another try:
>> >
>> > \version "2.19.82"
>> >
>> > test = #(define-scheme-function (suffix) (string?)  #{
>> >   \book {
>> >     \bookOutputSuffix #suffix
>> >     \score {
>> >       d4
>> >     }
>> >   }
>> > #} )
>> >
>> > \test "surname"
>> >
>> > (still) causes a "Bad expression type" error.
>>
>> Ah, well.  Turns out that copying the code for \xxx here where \xxx was
>> a book identifier was not really a good idea before anybody figures out
>> and defines the difference between a book and a bookpart.  Currently it
>> is not viable to distinguish them.
>>
>> \book { \test "surname" }
>>
>> could conceivably just close its eyes and say "ok, let's treat it as a
>> book rather than a bookpart" but doesn't.  Does anybody have an idea
>> what is supposed to distinguish a book from a bookpart outside of actual
>>
>> \book {
>>   \bookpart { ... } }
>>
>> usage?
>
> For layout vs paper we have is-layout vs is-paper.
> Couldn't we set some variable/property like is-book/is-bookpart for
> book vs bookpart
> ?

We probably could.  I am not sure it even works (or makes sense) to
create a bookpart independent from its containing book with our current
code base but at least the treatment of books could move forward.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]