+ Output_def *def = outdef_count ? defs_[i] : default_def;
+ SCM scaled = def->self_scm ();
+
+ if (def->c_variable ("is-layout") == SCM_BOOL_T)
+ {
+ def = scale_output_def (def, scale);
+ def->parent_ = layoutbook;
+
+ scaled = def->unprotect ();
+ }
+
+ /* TODO: fix or junk --no-layout. */
+ SCM context = ly_run_translator (music_, scaled);
+ if (dynamic_cast<Global_context *> (unsmob_context (context)))
+ {
+ SCM s = ly_format_output (context);
+
+ outputs = scm_cons (s, outputs);
+ }
+
+ scm_remember_upto_here_1 (scaled);