lilypond-user
[Top][All Lists]
Advanced

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

Re: Book with bookpart stored in variable: expecting real number


From: David Kastrup
Subject: Re: Book with bookpart stored in variable: expecting real number
Date: Wed, 18 Apr 2018 12:21:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Caagr98 <address@hidden> writes:

> This code:
>
>
> \version "2.19.81"
> bk = \book{\bookpart{\score{a}}}
> \bk
>
>
> gives a strange error:
>
>
> GNU LilyPond 2.19.81
> Processing `bpart.ly'
> Parsing.../usr/share/lilypond/2.19.81/scm/lily-library.scm:243:5: In
> procedure ly:book-process in expression (process-procedure book paper
> ...):
> /usr/share/lilypond/2.19.81/scm/lily-library.scm:243:5: Wrong type
> (expecting real number): #<undefined>
> ⋙.
>
> Inserting the \book{...} directly without a variable works as it should.
> Replacing the \bk with $bk acts exactly the same.
> #bk gives no error, but is instead silently ignored.
> $((lambda () bk)) and #((lambda () bk)) act the same as their
> respective #bk or $bk variants.
> The #(print-book-with-defaults) function works, but is quite clunky.
>
> Does anyone know why all these methods fail, and what is the proper
> way to store a book in a variable?

I think this is the proper way.  I think it breaks in Book::process (the
three-argument version of the function) when doing

  Real scale = scm_to_double (paper->c_variable ("output-scale"));

Adding a paper block to the \bookpart (!) helps.  Book/bookpart
processing is seriously broken and I don't have a good idea what the
actual design behind it was supposed to be, though the code causing the
error is likely my fault.

-- 
David Kastrup



reply via email to

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