]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/markup-score.ly: New file.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 27 Apr 2004 23:11:45 +0000 (23:11 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 27 Apr 2004 23:11:45 +0000 (23:11 +0000)
* scm/define-markup-commands.scm (stencil): New markup.

* lily/parser.yy (markup): Use it to grok \score.

ChangeLog
input/test/markup-score.ly [new file with mode: 0644]
lily/parser.yy
scm/define-markup-commands.scm

index cd5b51712ab56b6dfff6ea22f5d7cdc40e8a5567..8f332321744eeeb66efc7fffd353abc7c6244c36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-04-28  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * input/test/markup-score.ly: New file.
+
+       * scm/define-markup-commands.scm (stencil): New markup.
+
        * lily/book.cc (to_stencil): New method.
 
        * lily/parser.yy (markup): Use it to grok \score.
diff --git a/input/test/markup-score.ly b/input/test/markup-score.ly
new file mode 100644 (file)
index 0000000..8e1966f
--- /dev/null
@@ -0,0 +1,41 @@
+
+\header {
+    %% WIP
+    texidoc = "Use \\score block as markup command."
+    
+}
+
+\version "2.3.1"
+
+
+\paper {
+    raggedright = ##t
+    vsize = 30 \mm
+    linewidth = 30\mm
+    indent = 0 \mm
+    hsize = 40\mm
+}
+\header {
+    title = "title"
+    subtitle = \markup { \fill-line <
+       "subtitle with score: "
+       \score { \relative \notes { a'^"Hi" b c } }
+       "woo!"
+    > }
+    subsubtitle = "subsubtitle"
+}
+
+\paper {
+    raggedright = ##f
+    linewidth = 150\mm
+    indent = 15\mm
+    vsize = 298\mm
+    hsize = 210 \mm
+}
+
+\relative {
+    a' b c d \break
+    a b c d \break
+    a b c d \break
+}
+
index 033e57158a15bd86aa398f6381b7ef7fbf690aa8..5914531b8593a285443d246e059af301bb982374 100644 (file)
@@ -2446,15 +2446,15 @@ markup:
                $$ = $1;
        }
        | score_block {
+               // WIP -- arbitrary, shoul also allow \book or Composite_music.
                Score *score = $1;
-               //Book *book = unsmob_book (ly_score_bookify (score->self_scm ()));
                Book *book = new Book;
                book->scores_.push (score);
                extern Music_output_def* get_paper (My_lily_parser *parser);
                Music_output_def *paper = get_paper (THIS);
                SCM s = book->to_stencil (paper, THIS->header_);
-//             $$ = s;
-               $$ = Text_item::interpret_markup (paper->self_scm (), SCM_EOL, s);
+               $$ = scm_list_2 (ly_scheme_function ("stencil-markup"), s);
+               scm_gc_unprotect_object (score->self_scm ());
        }
        ;
 
index fa7666419b7c55fe2df4d449579182ff4fc1fd85..f5114886c8ba52a569d69b56f73cd80e6b59e8a3 100644 (file)
 ;;     syntax, description and example. 
 
 
-  
+(def-markup-command (stencil paper props stil) (ly:stencil?)
+  "Stencil as markup"
+  stil)
+
 (def-markup-command (simple paper props str) (string?)
   "A simple text string; @code{\\markup @{ foo @}} is equivalent with
 @code{\\markup @{ \\simple #\"foo\" @}}."