2005-03-09 Jan Nieuwenhuizen <janneke@gnu.org>
- * lily/book.cc:
+ * lily/paper-book.cc (classic_output): Reinstate header_0_ hack.
+
+ * lily/book.cc (process): Oops, add score_.header_.
+
* lily/paper-book.cc: Fold hearders, score and texts into scores_.
* lily/parser.yy: Handle toplevel and book texts as score.
\paper {
linewidth = #110
}
-\markup {
- \fill-line { "High up above" }
-}
-<<
- \relative {
- \clef bass
- d,2 d c4 bes a2 \break
- c2 c d4 f g2
+
+%% using Book and Score to get text in lilypond-book
+\book {
+ \markup {
+ \fill-line { "High up above" }
}
- \addlyrics {
- My first Li -- ly song,
- Not much can go wrong!
+ \score {
+ <<
+ \relative {
+ \clef bass
+ d,2 d c4 bes a2 \break
+ c2 c d4 f g2
+ }
+ \addlyrics {
+ My first Li -- ly song,
+ Not much can go wrong!
+ }
+ >>
}
->>
\markup {
%%TODO: make \verse markup.
\fill-line {
}
}
}
+}
\ No newline at end of file
titling? */
if (scm_is_vector (systems))
{
- if (ly_c_module_p (header_))
- paper_book->add_score (header_);
+ if (ly_c_module_p (score->header_))
+ paper_book->add_score (score->header_);
paper_book->add_score (systems);
}
}
Paper_book::Paper_book ()
{
header_ = SCM_EOL;
+ header_0_ = SCM_EOL;
pages_ = SCM_BOOL_F;
scores_ = SCM_EOL;
systems_ = SCM_BOOL_F;
if (b->paper_)
scm_gc_mark (b->paper_->self_scm ());
scm_gc_mark (b->header_);
+ scm_gc_mark (b->header_0_);
scm_gc_mark (b->pages_);
scm_gc_mark (b->scores_);
return b->systems_;
/* Generate all stencils to trigger font loads. */
systems ();
- // ugh code dup
SCM scopes = SCM_EOL;
if (ly_c_module_p (header_))
scopes = scm_cons (header_, scopes);
-#if 0
- if (ly_c_module_p (scores_[0].header_))
- scopes = scm_cons (scores_[0].header_, scopes);
-#endif
- //end ugh
+ if (ly_c_module_p (header_0_))
+ scopes = scm_cons (header_0_, scopes);
String format = output_backend_global;
String mod_nm = "scm framework-" + format;
for (SCM s = scm_reverse (scores_); s != SCM_EOL; s = scm_cdr (s))
{
if (ly_c_module_p (scm_car (s)))
- header = scm_car (s);
+ {
+ header = scm_car (s);
+ if (header_0_ == SCM_EOL)
+ header_0_ = header;
+ }
else if (scm_is_vector (scm_car (s)))
{
Stencil title = score_title (header);
+ if (title.is_empty ())
+ title = score_title (header_);
if (!title.is_empty ())
{
Paper_system *ps = new Paper_system (title, true);