Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5211)

Issue 4848: Nested book parts (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 8 months ago by nicolas.sceaux
Modified:
13 years, 1 month ago
Reviewers:
pas, joeneeman, hanwenn
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : Take account for code review from oct 15th #

Patch Set 3 : Proper paper block inheritance #

Patch Set 4 : Final draft #

Unified diffs Side-by-side diffs Delta from patch set Stats (+695 lines, -156 lines) Patch
A input/new/book-parts.ly View 2 3 1 chunk +64 lines, -0 lines 0 comments Download
A input/regression/bookparts.ly View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
M lily/book.cc View 1 5 chunks +155 lines, -38 lines 0 comments Download
M lily/book-scheme.cc View 2 chunks +22 lines, -0 lines 0 comments Download
M lily/include/book.hh View 1 2 chunks +16 lines, -0 lines 0 comments Download
M lily/include/lily-parser.hh View 3 1 chunk +4 lines, -0 lines 0 comments Download
M lily/include/paper-book.hh View 1 2 chunks +13 lines, -0 lines 0 comments Download
M lily/lily-lexer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M lily/lily-parser.cc View 3 1 chunk +38 lines, -2 lines 0 comments Download
M lily/page-breaking.cc View 1 2 3 4 chunks +14 lines, -9 lines 0 comments Download
M lily/paper-book.cc View 1 2 3 8 chunks +138 lines, -56 lines 0 comments Download
M lily/paper-book-scheme.cc View 1 chunk +5 lines, -1 line 0 comments Download
M lily/parser.yy View 1 2 3 8 chunks +75 lines, -0 lines 0 comments Download
M ly/declarations-init.ly View 1 1 chunk +5 lines, -0 lines 0 comments Download
M ly/init.ly View 2 chunks +21 lines, -7 lines 0 comments Download
M ly/titling-init.ly View 3 1 chunk +33 lines, -7 lines 0 comments Download
M scm/layout-page-layout.scm View 3 8 chunks +21 lines, -17 lines 0 comments Download
M scm/lily-library.scm View 1 chunk +16 lines, -2 lines 0 comments Download
M scm/midi.scm View 1 1 chunk +2 lines, -4 lines 0 comments Download
M scm/page.scm View 3 4 chunks +7 lines, -8 lines 0 comments Download
M scm/titling.scm View 3 3 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 6
joeneeman
I'm really sorry I took so long to do this. I honestly thought it had ...
15 years, 6 months ago (2008-10-15 01:06:06 UTC) #1
hanwenn
http://codereview.appspot.com/4848/diff/1/5 File lily/include/book.hh (right): http://codereview.appspot.com/4848/diff/1/5#newcode35 Line 35: void add_bookpart (); On 2008/10/15 01:06:06, joeneeman wrote: ...
15 years, 6 months ago (2008-10-15 01:29:22 UTC) #2
nicolas.sceaux
http://codereview.appspot.com/4848/diff/1/4 File lily/book.cc (right): http://codereview.appspot.com/4848/diff/1/4#newcode139 Line 139: Book::add_bookpart () On 2008/10/15 01:06:06, joeneeman wrote: > ...
15 years, 6 months ago (2008-10-18 15:10:28 UTC) #3
pas
http://codereview.appspot.com/4848/diff/1/4 File lily/book.cc (right): http://codereview.appspot.com/4848/diff/1/4#newcode139 Line 139: Book::add_bookpart () On 2008/10/18 15:10:29, nicolas.sceaux wrote: > ...
15 years, 6 months ago (2008-10-29 06:11:17 UTC) #4
joeneeman
Look good, just one nitpick. http://codereview.appspot.com/4848/diff/806/615 File lily/page-breaking.cc (right): http://codereview.appspot.com/4848/diff/806/615#newcode227 Line 227: ly_symbol2scm ("is-part-last"), scm_from_bool ...
15 years, 6 months ago (2008-11-03 00:27:51 UTC) #5
nicolas.sceaux
15 years, 5 months ago (2008-11-16 12:16:58 UTC) #6
http://codereview.appspot.com/4848/diff/806/615
File lily/page-breaking.cc (right):

http://codereview.appspot.com/4848/diff/806/615#newcode227
Line 227: ly_symbol2scm ("is-part-last"), scm_from_bool (last),
On 2008/11/03 00:27:51, joeneeman wrote:
> A really minor naming nitpick, but you have is-last and is-part-last in the
page
> properties, part-is-last in the paper block and is-part-last-page as a titling
> predicate. Of these, is-part-last and is-part-last-page mean the same thing
> (AFAICT), but is-last and part-is-last are completely different from each
other
> and from the other 2. Could you make the names more clear (I have no objection
> to verbose names for things with broad visibility, maybe something like
> is-last-page-from-bookpart and is-last-bookpart)?

Done: use is-bookpart-last-page and is-last-bookpart everywhere
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b