* scm/define-markup-commands.scm (stencil): New markup.
* lily/parser.yy (markup): Use it to grok \score.
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.
--- /dev/null
+
+\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
+}
+
$$ = $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 ());
}
;
;; 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\" @}}."