-
- Array<Column_x_positions> breaking = calc_breaking ();
- system_->break_into_pieces (breaking);
-
- outputter_ = paper_->get_paper_outputter (outname);
-
- progress_indication ("\n");
-
- SCM scopes = SCM_EOL;
-
- if (header_)
- scopes = scm_cons (header_, scopes);
- if (global_input_file->header_ && global_input_file->header_ != header_)
- scopes = scm_cons (global_input_file->header_, scopes);
-
- outputter_->output_metadata (scopes, paper_);
- outputter_->output_music_output_def (paper_);
- outputter_->output_scheme (scm_list_1 (ly_symbol2scm ("header-end")));
-
- outputter_
- ->output_scheme (scm_list_2 (ly_symbol2scm ("define-fonts"),
- ly_quote_scm (paper_->font_descriptions ())));
-
-#if 0
- // huh? does not work, stack overflow
- outputter_->output_scheme (scm_list_2 (ly_symbol2scm ("make-title"),
- outputter_->file_));
-#else
-#if 0
- // uhuh?? does not work, stack overflow
- outputter_->output_scheme (scm_list_2 (ly_symbol2scm ("set-port"),
- outputter_->file_));
-#endif
- outputter_->output_scheme (scm_list_1 (ly_symbol2scm ("make-title")));
-#endif
-
- system_->output_lines ();
- outputter_->output_scheme (scm_list_1 (ly_symbol2scm ("end-output")));
-
- progress_indication ("\n");
-
- // huh?
- delete outputter_;
- outputter_ = 0;
+}
+
+System *
+Paper_score::root_system () const
+{
+ return system_;
+}
+
+Output_def *
+Paper_score::layout () const
+{
+ return layout_;
+}
+
+SCM
+Paper_score::get_paper_systems ()
+{
+ if (scm_is_false (paper_systems_))
+ {
+ vector<Column_x_positions> breaking = calc_breaking ();
+ system_->break_into_pieces (breaking);
+ message (_ ("Drawing systems...") + " ");
+ system_->do_break_substitution_and_fixup_refpoints ();
+ paper_systems_ = system_->get_paper_systems ();
+ }
+ return paper_systems_;