[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Behaviour of \paper and \layout in ly:book-process
From: |
Urs Liska |
Subject: |
Re: Behaviour of \paper and \layout in ly:book-process |
Date: |
Tue, 19 Jul 2016 10:54:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
Am 18.07.2016 um 19:19 schrieb David Kastrup:
> Urs Liska <address@hidden> writes:
>
>> Am 18.07.2016 um 13:46 schrieb David Kastrup:
>>
>>> The defaultpaper argument of ly:book-process is only consulted when the
>>> book argument does not already have a paper block of its own, and every
>>> \book block takes the global \paper block when nothing else is given.
>> Thank you for the hint.
>>
>>> If you really want to pass the paper block in yourself during
>>> ly:book-process (rather than incorporating it in the \book explicitly),
>> No, I didn't do that intentionally but was misled by the fact that I
>> have to supply that default-paper and -layout arguments.
> Well, I wrote:
>
>>> If that sounds like I have any clue about how the hierarchy of books
>>> and bookparts is supposed to work, that would be misleading. That's
>>> basically just a report on what some code does. Why one would want
>>> it to do that, I have no idea.
> and indeed I did not have any clue about this difference until you
> popped the question and I looked into the code for the answer. I don't
> think that there is any reasonable other way to discover that.
All the more thank you for looking into this.
Through that I also managed to make the \layout block work now.
As said I have a Scheme function producing the \score block. And when I
apply the \layout block directly within that function's \score block it
seems to be respected.
Somewhat strange though that I *need* to put these two empty expressions
in ly:process-book.
Best
Urs
>
> And I could not really write useful documentation for this since I fail
> to understand the underlying design.
>
> The commits are
>
> commit e9b10d6b0e1549a3d3d9ca81c63e1b2d9b431910
> Merge: 3dbfeb1 c45e558
> Author: Nicolas Sceaux <address@hidden>
> Date: Sun Nov 16 23:32:33 2008 +0100
>
> Book parts: \bookpart implementation
>
> Book parts aim at splitting a book into several parts, in order to be
> able to use eg. different page breaking functions, or to make the page
> breaking problem less difficult and more likely to finish.
>
> - Book and Paper_book instances respectively are nestable: children
> book or paper_book are added to the bookparts_ slot;
>
> - the paper_ slot of a child Book (or Book_paper) is created empty,
> and has its parent set to the paper object of the parent Book (or
> Paper_book), so that default paper properties are got from the
> higher level paper object, and child objects only store part-wide
> overrides. This way, we ensure that fonts are loaded in the higher
> level paper object, so that the output framework can get all the
> loaded fonts from the top level book;
>
> - a Paper_book::top_paper() method is added to access the higher level
> paper object, to access properties that are book-wide, for instance
> the table used to store labels and page numbers;
>
> - in the parser, \bookpart blocks are introduced, which can be used at
> toplevel, or inside a \book block. It can contain the same things as
> \book blocks (except \bookpart blocks, though that would be
> possible). The associated handlers are added.
>
> - in header and footer markups, the following predicates can be used
> to determine if a page is the first or the last one in a book part:
> part-first-page, part-last-page.
>
> commit dbefd4b8d0249c6a739d09118f3e0a71001c1c52
> Author: Nicolas Sceaux <address@hidden>
> Date: Sat Aug 23 18:34:30 2008 +0200
>
> Book parts: nestable book parts
>
> - Book and Paper_book instances respectively are nestable: children
> book or paper_book are added to the bookparts_ slot;
>
> - the paper_ slot of a child Book (or Book_paper) is created empty,
> and has its parent set to the paper object of the parent Book (or
> Paper_book), so that default paper properties are got from the
> higher level paper object, and child objects only store part-wide
> overrides. This way, we ensure that fonts are loaded in the higher
> level paper object, so that the output framework can get all the
> loaded fonts from the top level book;
>
> - a Paper_book::top_paper() method is added to access the higher level
> paper object, to access properties that are book-wide, for instance
> the table used to store labels and page numbers;
>
> - in the parser, \bookpart blocks are introduced, which can be used at
> toplevel, or inside a \book block. It can contain the same things as
> \book blocks (except \bookpart blocks, though that would be
> possible). The associated handlers are added.
>
>