- line_l_->break_into_pieces (breaking);
-
- for (SCM s = element_smob_list_; gh_pair_p (s); s = gh_cdr (s))
- {
- Score_element *sc = unsmob_element (gh_car (s));
- sc->do_break_processing ();
- }
- for (SCM s = element_smob_list_; gh_pair_p (s); s = gh_cdr (s))
- {
- Score_element *sc = unsmob_element (gh_car (s));
- sc->handle_broken_dependencies ();
- }
-
- outputter_l_ = new Paper_outputter ;
- outputter_l_->output_header ();
-
- outputter_l_->output_version();
-
- if (header_global_p)
- outputter_l_->output_scope (header_global_p, "mudela");
- if (header_l_)
- outputter_l_->output_scope (header_l_, "mudela");
-
- outputter_l_->output_comment (_ ("Outputting Score, defined at: "));
- outputter_l_->output_comment (origin_str_);
-
- if (paper_l_->scope_p_)
- outputter_l_->output_scope (paper_l_->scope_p_, "mudelapaper");
-
- SCM scm = gh_list (ly_symbol2scm ("experimental-on"), SCM_UNDEFINED);
- outputter_l_->output_scheme (scm);
- scm = gh_list (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
- outputter_l_->output_scheme (scm);
-
-
- /*
- This is tricky: we have to put the font definitions before the
- actual output, but we don't know all fonts in advanced: generating
- the output might trigger loading of a new font. So we store the
- place to insert the font definitions, generate the output and then
- insert the definitions
-
- */
- SCM before_output = outputter_l_->last_cons_;
-
-
- fixup_refpoints ();
- line_l_->output_lines ();
-
-
- SCM font_names = ly_quote_scm (all_fonts_global_p->font_descriptions ());
- gh_set_cdr_x (before_output,
- gh_cons (gh_list (ly_symbol2scm ("define-fonts"),
- font_names,
- SCM_UNDEFINED),
- gh_cdr (before_output)));
-
- Paper_stream* psp = paper_l_->paper_stream_p ();
- outputter_l_->dump_onto (psp);
- // huh?
- delete outputter_l_;
-
- outputter_l_ = 0;
- delete psp;
-