+ 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);
+
+ *tail = scm_cons (s, SCM_EOL);
+ tail = SCM_CDRLOC(*tail);
+ }
+
+ scm_remember_upto_here_1 (scaled);
+ }
+
+ scm_remember_upto_here_1 (scm_key);
+ scm_remember_upto_here_1 (scaled_bookdef);
+ return outputs;