]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/framework-ps.scm (output-preview-framework): use
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 10 Oct 2005 21:29:48 +0000 (21:29 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 10 Oct 2005 21:29:48 +0000 (21:29 +0000)
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.

ChangeLog
lily/paper-book.cc
ly/paper-defaults.ly
scm/framework-ps.scm

index 567489daf526a562c1d800495c066ba85943b2ce..2c748f67949cc735e269fa2aebe3715898aff7ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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.
 
index fc4da3d89df256ca263f162427201ffbfee05990..3ba7bef6b3a85edce6e864ea6d8a905ab10b9e63 100644 (file)
@@ -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_);
index adc879efca66ab0ab558bd6ce3b01a2637fd1d5a..a87599f61a22d0adaa49fd9f2dbd562e4d719e2e 100644 (file)
 
     #(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.
index a6e60d48c9104a9e6f76a09cf8896444316d59fa..8cb006d70ae48952f60003be88fedd092647519d 100644 (file)
 
     ;; 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