From: Han-Wen Nienhuys Date: Mon, 10 Oct 2005 21:29:48 +0000 (+0000) Subject: * scm/framework-ps.scm (output-preview-framework): use X-Git-Tag: release/2.7.13~30 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4ef9167955d2238b18b725a0eb3cde595ba93860;p=lilypond.git * scm/framework-ps.scm (output-preview-framework): use is-book-title to determine whether to chop off the booktitle. * lily/paper-book.cc (systems): init from book-title-properties (add_score_title): init score-title-properties. * ly/paper-defaults.ly: add {score,book}-title-properties. --- diff --git a/ChangeLog b/ChangeLog index 567489daf5..2c748f6794 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2005-10-10 Han-Wen Nienhuys + * scm/framework-ps.scm (output-preview-framework): use + is-book-title to determine whether to chop off the booktitle. + + * lily/paper-book.cc (systems): init from book-title-properties + (add_score_title): init score-title-properties. + + * ly/paper-defaults.ly: add {score,book}-title-properties. + * scm/document-backend.scm (lookup-interface): error message if using unknown interface. diff --git a/lily/paper-book.cc b/lily/paper-book.cc index fc4da3d89d..3ba7bef6b3 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -243,10 +243,12 @@ Paper_book::add_score_title (SCM header) title = score_title (header_); if (!title.is_empty ()) { - // TODO: init properties, from where? - Paper_system *ps = new Paper_system (title, SCM_EOL); - ps->set_property ("is-title", SCM_BOOL_T); - systems_ = scm_cons (ps->self_scm (), systems_); + /* + TODO: this should come from the \layout {} block, which should + override settings from \paper {} + */ + SCM props = paper_->lookup_variable (ly_symbol2scm ("score-title-properties")); + Paper_system *ps = new Paper_system (title, props); ps->unprotect (); set_system_penalty (ps, header); } @@ -263,8 +265,8 @@ Paper_book::systems () if (!title.is_empty ()) { - Paper_system *ps = new Paper_system (title, SCM_EOL); - ps->set_property ("is-title", SCM_BOOL_T); + SCM props = paper_->lookup_variable (ly_symbol2scm ("book-title-properties")); + Paper_system *ps = new Paper_system (title, props); set_system_penalty (ps, header_); systems_ = scm_cons (ps->self_scm (), systems_); diff --git a/ly/paper-defaults.ly b/ly/paper-defaults.ly index adc879efca..a87599f61a 100644 --- a/ly/paper-defaults.ly +++ b/ly/paper-defaults.ly @@ -35,6 +35,16 @@ #(layout-set-staff-size (* 20.0 pt)) + + #(define-public score-title-properties + '((is-title . #t) + (is-book-title . #f) + )) + #(define-public book-title-properties + '((is-title . #t) + (is-book-title . #t) + )) + %% %% this dimension includes the extent of the %% staves themselves. diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index a6e60d48c9..8cb006d70a 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -495,11 +495,10 @@ ;; skip booktitles. (if (and - (not - (ly:get-option 'preview-include-book-title)) - (< 1 (length systems)) - (paper-system-title? (list-ref systems 0)) - (paper-system-title? (list-ref systems 1))) + (not (ly:get-option 'preview-include-book-title)) + (pair? systems) + (ly:paper-system-property (car systems) 'is-book-title #f)) + (set! systems (cdr systems))) (for-each