+ Object_key *key = new Lilypond_general_key (book_key, user_key_, 0);
+ SCM scm_key = key->self_scm ();
+ scm_gc_unprotect_object (scm_key);
+
+ for (int i = 0; !i || i < outdef_count; i++)
+ {
+ Output_def *def = outdef_count ? defs_[i] : default_def;
+ SCM scaled = SCM_EOL;
+ if (def->c_variable ("is-layout") == SCM_BOOL_T)
+ {
+ def = scale_output_def (def, scale);
+ def->parent_ = layoutbook;
+ scaled = def->self_scm ();
+ scm_gc_unprotect_object (scaled);
+ }
+
+ /* TODO: fix or junk --no-layout. */
+ SCM context = ly_run_translator (music_, def->self_scm (), scm_key);
+ if (dynamic_cast<Global_context *> (unsmob_context (context)))
+ {
+ SCM s = ly_format_output (context, out);
+ if (s != SCM_UNDEFINED)
+ systems = s;
+ }
+
+ scm_remember_upto_here_1 (scaled);
+ }