2005-10-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * 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.
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);
}
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_);
#(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.
;; 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