Hmm, maybe I will introduce you to the problem I am now tackling and why
I need to know the available free space in markup command.

I'm modifying the book template shared by Nicolas Sceaux. Now I'm
working on table of contents. The table of contents looks beautiful on
one condition: sections don't have a lot of pieces, so the whole section
fits on one page in table of contents.

Here is an example:
https://drive.google.com/file/d/1RDLaqvYw81cdE9zYB_SvpaNxPhaK8Gr0/view?usp=sharing

The problem is shown on page 5. The section has so many pieces, that
they don't fit on the page (there's a gap between pieces 19-43).

Of course, the problem with not fitting them on one page could be fixed
with proper page breaking. The result could be as such:

--------------------

blah blah blah

foo

bar

        TOC

      SECTION 1

piece a    piece f

piece b    piece g

piece c    piece h

----(page break)----

piece d    piece i

piece e    piece j

     SECTION 2


----(page break)----


Result like this above will not satisfy me, because it's just ugly and
unprofessional. And it could be frustrating for users of books. I want
it to look like this:


--------------------

blah blah blah

foo

bar

        TOC

      SECTION 1

piece a    piece d

piece b    piece e

piece c    piece f

----(page break)----

piece g    piece i

piece h    piece j

     SECTION 2


----(page break)----


And to generate multi page toc section like this I need to know the
space left on page, so markup function could calculate how much toc
pieces could fit in the free left space on page and which pieces pass to
the next page.


On 01.05.2019 12:39, David Kastrup wrote:
>
> At the time markups are evaluated, the page breaking decisions have not
> yet been made, and of course those decisions depend on what your markup
> command will produce.  So this information is still to be established at
> this time.
>


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to