]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/book.cc:
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 9 Mar 2005 00:54:31 +0000 (00:54 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 9 Mar 2005 00:54:31 +0000 (00:54 +0000)
* lily/paper-book.cc: Fold hearders, score and texts into scores_.

* lily/parser.yy: Handle toplevel and book texts as score.

* scm/page-layout.scm (default-page-make-stencil):
Bugfix: (page-properties rename.

19 files changed:
ChangeLog
input/regression/score-text.ly
lily/book-scheme.cc
lily/book.cc
lily/include/accidental-interface.hh
lily/include/book.hh
lily/include/music.hh
lily/include/paper-book.hh
lily/include/score.hh
lily/lily-parser-scheme.cc
lily/paper-book.cc
lily/parser.yy
lily/score-scheme.cc
lily/score.cc
ly/declarations-init.ly
ly/init.ly
scm/lily-library.scm
scm/page-layout.scm
scripts/lilypond-book.py

index 01967b3883f4a1ead701852a483239cfd148657e..96300d92fda8bd065199213cace5dc130d095069 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-03-09  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * lily/book.cc:
+       * lily/paper-book.cc: Fold hearders, score and texts into scores_.
+
+       * lily/parser.yy: Handle toplevel and book texts as score.
+
+       * scm/page-layout.scm (default-page-make-stencil):
+       Bugfix: (page-properties rename.
+
+       * scm/backend-library.scm (ly:system): Typo.
+
 2005-03-09  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/font-select.cc (get_font_by_design_size): revert
index a86f06ef180b912591df4f32b47fb789cb3ed112..2cf43d56219191de271fb9cb2613b8c7df8255ca 100644 (file)
@@ -2,13 +2,16 @@
 
 \header {
 
-    texidoc = "Markup texts are set beneath a score."
+    texidoc = "Markup texts are rendered above or below a score."
 
 }
 
 \paper {
     linewidth = #110
 }
+\markup {
+    \fill-line { "High up above" }
+}
 <<
     \relative {
        \clef bass
index 32bcb0e1586fca4cdb3b388633f3c47407ea7a04..058be63a9ecea87bd5e682938270c32134cc8eda 100644 (file)
@@ -25,14 +25,9 @@ LY_DEFINE(ly_make_book, "ly:make-book",
 
   if (ly_c_module_p (header))
     book->header_ = header;
-  
-  for (SCM s = scores; scm_is_pair (s); s = scm_cdr (s))
-    {
-      Score *score = unsmob_score (scm_car (s));
-      if (score)
-       book->scores_.push (score);
-    }
-  
+
+  book->scores_ = scm_append (scm_list_2 (scores, book->scores_));
+
   SCM x = book->self_scm ();
   scm_gc_unprotect_object (x);
   return x;
index d15233f70c5ac04eab8c0f1f84b90f15b1003b7c..0ba3fdf7f85d99062f0e1e2499593254834f3071 100644 (file)
@@ -6,10 +6,10 @@
   (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
+#include "book.hh"
 
 #include <cstdio>
 
-#include "book.hh"
 #include "lilypond-key.hh"
 #include "global-context.hh"
 #include "main.hh"
@@ -20,6 +20,7 @@
 #include "paper-book.hh"
 #include "score.hh"
 #include "stencil.hh"
+#include "text-item.hh"
 #include "warn.hh"
 
 #include "ly-smobs.icc"
@@ -29,7 +30,7 @@ Book::Book ()
 {
   paper_ = 0;
   header_ = SCM_EOL;
-  assert (!scores_.size ());
+  scores_ = SCM_EOL;
   smobify_self ();
 }
 
@@ -44,16 +45,16 @@ SCM
 Book::mark_smob (SCM s)
 {
   Book *book = (Book*) SCM_CELL_WORD_1 (s);
-  int score_count = book->scores_.size ();
-  for (int i = 0; i < score_count; i++)
-    scm_gc_mark (book->scores_[i]->self_scm ());
 
 #if 0
   if (book->key_)
     scm_gc_mark (book->key_->self_scm());
 #endif
+
   if (book->paper_)
     scm_gc_mark (book->paper_->self_scm ());
+  scm_gc_mark (book->scores_);
+
   return book->header_;
 }
 
@@ -64,23 +65,26 @@ Book::print_smob (SCM, SCM p, scm_print_state*)
   return 1;
 }
 
+void
+Book::add_score (SCM s)
+{
+  scores_ = scm_cons (s, scores_);
+}
+
 /* This function does not dump the output; outname is required eg. for
    dumping header fields.  */
 Paper_book *
 Book::process (String outname, Output_def *default_def)
 {
-  bool error = false;
-  for (int i = 0; i < scores_.size(); i++)
-    error = error || scores_[i]->error_found_;
-
-  if (error)
-    return 0;
+  for (SCM s = scores_; s != SCM_EOL; s = scm_cdr (s))
+    if (Score *score = unsmob_score (scm_car (s)))
+      if (score->error_found_)
+       return 0;
 
   Paper_book *paper_book = new Paper_book ();
   Real scale = scm_to_double (paper_->c_variable ("outputscale"));
   Output_def * scaled_bookdef = scale_output_def (paper_, scale);
 
-
   Object_key * key = new Lilypond_general_key (0, user_key_, 0);
   SCM  scm_key = key->self_scm();
   scm_gc_unprotect_object (scm_key);
@@ -89,40 +93,30 @@ Book::process (String outname, Output_def *default_def)
   scm_gc_unprotect_object (scaled_bookdef->self_scm());
   
   paper_book->header_ = header_;
-  int score_count = scores_.size ();
-  for (int i = 0; i < score_count; i++)
+
+  /* Render in order of parsing.  */
+  for (SCM s = scm_reverse (scores_); s != SCM_EOL; s = scm_cdr (s))
     {
-      SCM systems = scores_[i]->book_rendering (outname,
-                                               paper_book->paper_,
-                                               default_def,
-                                               key
-                                               );
-      
-      /*
-       If the score is empty, generate no output.  Should we
-       do titling?
-      */
-      if (SCM_NFALSEP(scm_vector_p (systems)))
+      if (Score *score = unsmob_score (scm_car (s)))
        {
-         Score_systems sc;
-         sc.systems_ = systems;
-         sc.header_ = scores_[i]->header_;
-         sc.texts_ = scores_[i]->texts_;
-         paper_book->score_systems_.push (sc);
+         SCM systems = score
+           ->book_rendering (outname, paper_book->paper_, default_def, key);
+      
+         /* If the score is empty, generate no output.  Should we do
+            titling? */
+         if (scm_is_vector (systems))
+           {
+             if (ly_c_module_p (header_))
+               paper_book->add_score (header_);
+             paper_book->add_score (systems);
+           }
        }
+      else if (Text_interface::markup_p (scm_car (s)))
+       paper_book->add_score (scm_car (s));
+      else
+       assert (0);
     }
 
-
   scm_remember_upto_here_1 (scm_key);
   return paper_book;
 }
-
-
-  
-
-void
-Book::add_score (Score *s)
-{
-  scores_.push (s);
-  scm_gc_unprotect_object (s->self_scm ());
-}
index 236e177078629e39d6b20ed2b5645607ba3e75ba..2b8aabfc129b01fee39d28b8e8d3a660e5b1f7cf 100644 (file)
@@ -1,11 +1,10 @@
-/*   
-accidental-interface.hh -- declare  Accidental_interface
-
-source file of the GNU LilyPond music typesetter
-
-(c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
+/*
+  accidental-interface.hh -- declare  Accidental_interface
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2002--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
 
 #ifndef ACCIDENTAL_INTERFACE_HH
 #define ACCIDENTAL_INTERFACE_HH
index 2be317d12f4c55aa44f6f9b98ce495738433df7f..0d4fa66147decdc23f87f5a04f5cf3ecb141a340 100644 (file)
 class Book : public Input
 {
   DECLARE_SMOBS (Book, foo);
+
 public:
   String user_key_;
-  
   SCM header_;
   Output_def *paper_;
+  SCM scores_;
 
-  void add_score (Score*);
-  Link_array<Score> scores_;
   Book ();
-  void set_keys ();
+  void add_score (SCM);
   Paper_book* process (String, Output_def*);
+  void set_keys ();
 };
+
 DECLARE_UNSMOB (Book, book);
 
 #endif /* BOOK_HH */
index 6a0794092fe5ed056d1232b4c387ebada9b934c9..973b65ac876f0bafaccdd4ce4b3d37a2a44ba9fc 100644 (file)
@@ -61,6 +61,5 @@ DECLARE_UNSMOB(Music, music);
 
 Music *make_music_by_name (SCM sym);
 SCM ly_music_deep_copy (SCM);
-SCM ly_music_scorify (SCM, SCM, SCM);
 
 #endif /* MUSIC_HH */
index 4ee2911cee9654864fab65769d00a463a3779729..a95ed8e3f64b4e553e4bc61ed5696503b17a5075 100644 (file)
 class Output_def;
 class Stencil;
 
-struct Score_systems
-{
-  SCM systems_;
-  SCM header_;
-  SCM texts_;
+/** Paper_book collects headers, systems (Paper_system) and texts, and
+    exports them to the output backend, either as systems or as
+    completely formatted pages.  */
 
-  Score_systems () ;
-  void gc_mark ();
-};
-
-/*
-  
-This class is rather empty. It collects systems (Paper_system), and
-exports them to the output backend, either as systems or as completely
-formatted pages.
-  
-*/
 class Paper_book
 {
   DECLARE_SMOBS (Paper_book, );
 
   SCM systems_;
   SCM pages_;
+
 public:
   SCM header_;
-  Array<Score_systems> score_systems_;
+  SCM scores_;
   Output_def *paper_;
   
   Paper_book ();
 
+  void add_score (SCM);
   SCM systems ();
   SCM pages ();
   Stencil book_title ();
-  Stencil score_title (int);
+  Stencil score_title (SCM);
   void classic_output (String);
   void output (String);
   void post_processing (SCM, SCM);
@@ -57,4 +46,3 @@ public:
 DECLARE_UNSMOB (Paper_book, paper_book)
 
 #endif /* PAPER_BOOK_HH */
-
index fac59eee38d43ee6ea0345e6d060d112f0cad07d..bb879e9841dd7c6b4dc885f24643100889ebb9e7 100644 (file)
@@ -22,6 +22,7 @@ class Score : public Input
   DECLARE_SMOBS (Score, foo);
 
   SCM music_;
+
 public:
   String user_key_;
   Link_array<Output_def> defs_;
@@ -29,18 +30,19 @@ public:
   SCM texts_;
   bool error_found_;
   
-  SCM get_music () const;
-  void set_music (SCM music, SCM parser);
   Score ();
   Score (Score const&);
-  
+
+  SCM get_music () const;
+  void set_music (SCM music, SCM parser);
   SCM book_rendering (String, Output_def*, Output_def*, Object_key*);
 };
 
 DECLARE_UNSMOB (Score, score);
 
-SCM ly_run_translator (SCM, SCM, SCM);
+void default_rendering (SCM, SCM, SCM, SCM, SCM, SCM);
+SCM ly_music_scorify (SCM, SCM);
 SCM ly_render_output (SCM, SCM);
-void default_rendering (SCM, SCM, SCM, SCM, SCM, SCM, SCM);
+SCM ly_run_translator (SCM, SCM, SCM);
 
 #endif /* SCORE_HH */
index 1e10b870c3db39fc200c38c1d17314a98d9c85c2..69c90478b18f282c5a0349d95b96edd5e42dbe65 100644 (file)
@@ -26,6 +26,7 @@ LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click",
           1, 0, 0, (SCM what),
           "Deprecated.")
 {
+  (void) what;
   warning ("ly:set-point-and-click called");
   return SCM_UNSPECIFIED;
 }
@@ -205,16 +206,14 @@ LY_DEFINE (ly_parser_print_score, "ly:parser-print-score",
   SCM paper = get_paper (parser)->self_scm ();
   for (int i = 0; i < score->defs_.size (); i++)
     default_rendering (score->get_music (), score->defs_[i]->self_scm (),
-                      paper, header, score->texts_,
-                      os, key->self_scm ());
+                      paper, header, os, key->self_scm ());
 
   if (score->defs_.is_empty ())
     {
       Output_def *layout = get_layout (parser);
       default_rendering (score->get_music(), layout->self_scm (),
                         get_paper (parser)->self_scm (),
-                        header, score->texts_,
-                        os, key->self_scm ());
+                        header, os, key->self_scm ());
       scm_gc_unprotect_object (layout->self_scm ());
     }
 
index b9e94803db7a52ccfe1daa5b43659bd7452a7623..d3a7e8512f62a8352ac62c6ea6a8440d0a107936 100644 (file)
 
 Paper_book::Paper_book ()
 {
+  header_ = SCM_EOL;
   pages_ = SCM_BOOL_F;
+  scores_ = SCM_EOL;
   systems_ = SCM_BOOL_F;
-  header_ = SCM_EOL;
   
   paper_ = 0;
   smobify_self ();
@@ -39,13 +40,11 @@ SCM
 Paper_book::mark_smob (SCM smob)
 {
   Paper_book *b = (Paper_book*) SCM_CELL_WORD_1 (smob);
-  for (int i = 0; i < b->score_systems_.size (); i++)
-    b->score_systems_[i].gc_mark ();
-
   if (b->paper_)
     scm_gc_mark (b->paper_->self_scm ());
   scm_gc_mark (b->header_);
   scm_gc_mark (b->pages_);
+  scm_gc_mark (b->scores_);
   return b->systems_;
 }
 
@@ -72,10 +71,16 @@ dump_fields ()
   return fields;
 }
 
+void
+Paper_book::add_score (SCM s)
+{
+  scores_ = scm_cons (s, scores_);
+}
+
 void
 Paper_book::output (String outname)
 {
-  if (!score_systems_.size ())
+  if (scores_ == SCM_EOL)
     return;
 
   /* Generate all stencils to trigger font loads.  */
@@ -124,8 +129,10 @@ Paper_book::classic_output (String outname)
   if (ly_c_module_p (header_))
     scopes = scm_cons (header_, scopes);
 
-  if (ly_c_module_p (score_systems_[0].header_))
-    scopes = scm_cons (score_systems_[0].header_, scopes);
+#if 0
+  if (ly_c_module_p (scores_[0].header_))
+    scopes = scm_cons (scores_[0].header_, scopes);
+#endif  
   //end ugh
 
   String format = output_backend_global;
@@ -174,20 +181,18 @@ Paper_book::book_title ()
 }
 
 Stencil
-Paper_book::score_title (int i)
+Paper_book::score_title (SCM header)
 {
   SCM title_func = paper_->lookup_variable (ly_symbol2scm ("score-title"));
 
   Stencil title;
 
-  // ugh code dup
   SCM scopes = SCM_EOL;
   if (ly_c_module_p (header_))
     scopes = scm_cons (header_, scopes);
 
-  if (ly_c_module_p (score_systems_[i].header_))
-    scopes = scm_cons (score_systems_[i].header_, scopes);
-  //end ugh
+  if (ly_c_module_p (header))
+    scopes = scm_cons (header, scopes);
 
   SCM tit = SCM_EOL;
   if (ly_c_procedure_p (title_func))
@@ -242,30 +247,28 @@ Paper_book::systems ()
     = scm_call_1 (ly_lily_module_constant ("layout-extract-page-properties"),
                  paper_->self_scm ());
 
-  int score_count = score_systems_.size ();
-  for (int i = 0; i < score_count; i++)
+  SCM header = SCM_EOL;
+  for (SCM s = scm_reverse (scores_); s != SCM_EOL; s = scm_cdr (s))
     {
-      Stencil title = score_title (i);      
-      if (!title.is_empty ())
+      if (ly_c_module_p (scm_car (s)))
+       header = scm_car (s);
+      else if (scm_is_vector (scm_car (s)))
        {
-         Paper_system *ps = new Paper_system (title, true);
-         systems_ = scm_cons (ps->self_scm (), systems_);
-         scm_gc_unprotect_object (ps->self_scm ());
-
-         set_system_penalty (ps, score_systems_[i].header_);
-         
-       }
+         Stencil title = score_title (header);
+         if (!title.is_empty ())
+           {
+             Paper_system *ps = new Paper_system (title, true);
+             systems_ = scm_cons (ps->self_scm (), systems_);
+             scm_gc_unprotect_object (ps->self_scm ());
+             set_system_penalty (ps, header);
+           }
+         header = SCM_EOL;
       
-      if (scm_vector_p (score_systems_[i].systems_) == SCM_BOOL_T)
-       {
-         // guh.         
-         SCM system_list = scm_vector_to_list (score_systems_[i].systems_);
-
+         SCM system_list = scm_vector_to_list (scm_car (s));
          system_list = scm_reverse (system_list);
          systems_ = scm_append (scm_list_2 (system_list, systems_));
        }
-
-      for (SCM s = score_systems_[i].texts_; s != SCM_EOL; s = scm_cdr (s))
+      else if (Text_interface::markup_p (scm_car (s)))
        {
          SCM t = Text_interface::interpret_markup (paper_->self_scm (),
                                                    page_properties,
@@ -275,8 +278,10 @@ Paper_book::systems ()
          systems_ = scm_cons (ps->self_scm (), systems_);
          scm_gc_unprotect_object (ps->self_scm ());
          // FIXME: figure out penalty.
-         //set_system_penalty (ps, score_systems_[i].header_);
+         //set_system_penalty (ps, scores_[i].header_);
        }
+      else
+       assert (0);
     }
   
   systems_ = scm_reverse (systems_);
@@ -309,22 +314,3 @@ Paper_book::pages ()
   pages_ = scm_apply_0 (proc, scm_list_2 (systems (), self_scm ()));
   return pages_;
 }
-
-
-/****************************************************************/
-
-Score_systems::Score_systems ()
-{
-  systems_ = SCM_EOL;
-  header_ = SCM_EOL;
-  texts_ = SCM_EOL;
-}
-
-void
-Score_systems::gc_mark ()
-{
-  scm_gc_mark (systems_);
-  scm_gc_mark (header_);
-  scm_gc_mark (texts_);
-}
-
index fe8dbee58221ef28fb5a87dee13765305b5427b8..064323bcf5e782791dbb83ad68a297ebb37fad04 100644 (file)
@@ -436,7 +436,6 @@ or
 %type <scm>     Alternative_music
 %type <scm>    full_markup lyric_markup
 %type <scm>    markup_list markup_composed_list markup_braced_list markup_braced_list_body 
-%type <scm>    optional_text
 %type <scm>    markup_head_1_item markup_head_1_list markup simple_markup markup_top
 %type <scm>    mode_changing_head
 %type <scm>    mode_changing_head_with_context
@@ -492,12 +491,16 @@ toplevel_expression:
                scm_call_2 (proc, THIS->self_scm (), score->self_scm ());
                scm_gc_unprotect_object (score->self_scm ());
        }
-       | toplevel_music optional_text {
+       | toplevel_music {
                Music *music = $1;
                SCM proc = THIS->lexer_->lookup_identifier ("toplevel-music-handler");
-               scm_call_3 (proc, THIS->self_scm (), music->self_scm (), $2);
+               scm_call_2 (proc, THIS->self_scm (), music->self_scm ());
                scm_gc_unprotect_object (music->self_scm ());
        }
+       | full_markup {
+               SCM proc = THIS->lexer_->lookup_identifier ("toplevel-text-handler");
+               scm_call_2 (proc, THIS->self_scm (), $1);
+       }
        | output_def {
                SCM id = SCM_EOL;
                Output_def * od = $1;
@@ -541,15 +544,6 @@ lilypond_header:
        }
        ;
 
-optional_text:
-       /* empty */ {
-               $$ = SCM_EOL
-       }
-       | optional_text full_markup {
-               $$ = ly_snoc ($2, $1);
-       }
-       ;
-
 /*
        DECLARATIONS
 */
@@ -671,25 +665,17 @@ book_body:
                $$->paper_ = $2;
                scm_gc_unprotect_object ($2->self_scm ());
        }
-       | book_body score_block optional_text {
-               Score *score = $2;
-               score->texts_ = $3;
-               $$->add_score (score);
-       }
-       /* let's do optional
-       | book_body full_markup {
-               if (!$$->scores_.size ())
-                       THIS->parser_error (@2, _("\\markup cannot be used before \\score."));
-               Score *score = $$->scores_.top ();
-               score->texts_ = ly_snoc ($2, score->texts_);
+       | book_body score_block {
+               SCM s = $2->self_scm ();
+               $$->add_score (s);
+               scm_gc_unprotect_object (s);
        }
-       */
        | book_body lilypond_header {
                $$->header_ = $2;
        }
        | book_body error {
                $$->paper_ = 0;
-               $$->scores_.clear();
+               $$->scores_ = SCM_EOL;
        }
        | book_body object_id_setting {
                $$->user_key_ = ly_scm2string ($2);
index 7da2b20b466338aeebfda6a825c45fd08e77df70..d8470132c16b4a3a7d841d08ed7374b9f13851f5 100644 (file)
 #include "global-context.hh"
 
 LY_DEFINE (ly_music_scorify, "ly:music-scorify",
-          3, 0, 0,
-          (SCM music, SCM texts, SCM parser),
+          2, 0, 0,
+          (SCM music, SCM parser),
           "Return MUSIC with TEXTS encapsulated in SCORE.")
 {
 #if 0
   SCM_ASSERT_TYPE (ly_c_music_p (music), music, SCM_ARG1, __FUNCTION__, "music");
 #endif
   Score *score = new Score;
-
   score->set_music (music, parser);
-  score->texts_ = texts;
-
   scm_gc_unprotect_object (score->self_scm ());
   return score->self_scm ();
 }
@@ -42,9 +39,7 @@ LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
   Output_def *od = unsmob_output_def (layout);
 
   if (sc->error_found_)
-    {
-      return SCM_EOL;
-    }
+    return SCM_EOL;
   
   SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "Score");
   SCM_ASSERT_TYPE (od, layout, SCM_ARG2, __FUNCTION__, "Output_def");
index e072eaaaf18181ed6cbdb62b93d5a1bec31e4a71..f8747dd660f06d815cacab5043543dd51dbd0aad 100644 (file)
@@ -91,7 +91,7 @@ Score::Score (Score const &s)
 void
 default_rendering (SCM music, SCM outdef,
                   SCM book_outputdef,
-                  SCM header, SCM texts,
+                  SCM header,
                   SCM outname,
                   SCM key)
 {
@@ -128,14 +128,11 @@ default_rendering (SCM music, SCM outdef,
          Paper_book *paper_book = new Paper_book ();
          paper_book->header_ = header;
          paper_book->paper_ = unsmob_output_def (scaled_bookdef);
-         
-         Score_systems sc;
-         sc.systems_ = systems;
-         sc.header_ = header;
-         sc.texts_ = texts;
-
-         paper_book->score_systems_.push (sc);
-         
+
+         if (ly_c_module_p (header))
+           paper_book->add_score (header);
+         paper_book->add_score (systems);
+
          paper_book->classic_output (ly_scm2string (outname));
          scm_gc_unprotect_object (paper_book->self_scm ());
        }
index 052bd6edb07c4c65a9683b3ac7d2fbafd6048828..eecf711186d88f7067b00b7383bd2a433304335b 100644 (file)
@@ -116,3 +116,4 @@ setDefaultDurationToQuarter = { c4 }
 #(define toplevel-book-handler ly:parser-print-book)
 #(define toplevel-music-handler collect-music-for-book)
 #(define toplevel-score-handler collect-scores-for-book)
+#(define toplevel-text-handler collect-scores-for-book)
index 5e3305072a644edc116d8bfef3b500abdcd31027..3e36bd347bd23dca86b78b517c20218be9aaf5b6 100644 (file)
@@ -33,5 +33,5 @@
 
 #(if (pair? toplevel-scores)
   (ly:parser-print-book parser
-   (apply ly:make-book $defaultpaper $globalheader (reverse toplevel-scores))))
+   (apply ly:make-book $defaultpaper $globalheader toplevel-scores)))
 
index 786545cfad68a79f2d19facf5b4af40635a18447..18fb45ff5c994d300eb140bc3d6958fae6941918 100644 (file)
@@ -65,9 +65,8 @@
    parser 'toplevel-scores
    (cons score (ly:parser-lookup parser 'toplevel-scores))))
     
-(define-public (collect-music-for-book parser music texts)
-  (collect-scores-for-book parser (ly:music-scorify music texts parser)))
-
+(define-public (collect-music-for-book parser music)
+  (collect-scores-for-book parser (ly:music-scorify music parser)))
 
   
 ;;;;;;;;;;;;;;;;
index c2f554bb84bfb9a75790c96b422776dfac757b0a..fb32fb6eeb9b5a69a5382310695d8117aad8fb82 100644 (file)
@@ -87,7 +87,7 @@ create offsets.
         (system-separator-markup (ly:output-def-lookup layout 'systemSeparatorMarkup))
         (system-separator-stencil (if (markup? system-separator-markup)
                                       (interpret-markup layout
-                                                        (page-properties layout)
+                                                        (layout-extract-page-properties layout)
                                                         system-separator-markup)
                                       #f))
         (lmargin (ly:output-def-lookup layout 'leftmargin))
index 495577ead10237be92dc05c5ec28c89e631d8745..559a08012e031fba7121b10bc30e3eeccd018425 100644 (file)
@@ -532,9 +532,9 @@ PREAMBLE_LY = r'''%%%% Generated by %(program_name)s
 %%%% Options: [%(option_string)s]
 
 #(set! toplevel-score-handler ly:parser-print-score)
-#(set! toplevel-music-handler (lambda (p m t)
+#(set! toplevel-music-handler (lambda (p m)
                               (ly:parser-print-score
-                               p (ly:music-scorify m p))))
+                               p (ly:music-scorify m p))))
 
 #(define version-seen? #t)
 %(preamble_string)s