]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-def.cc
patch::: 1.0.12.jcn2: opniewvisite
[lilypond.git] / lily / paper-def.cc
index e6294c37406b608a7766ea6249504db07cdb42e1..2c006ad09798684bcc4e78ed34fdfae8e3fe214a 100644 (file)
@@ -13,6 +13,8 @@
 #include "paper-def.hh"
 #include "debug.hh"
 #include "lookup.hh"
+#include "ps-lookup.hh"
+#include "tex-lookup.hh"
 #include "dimension.hh"
 #include "assoc-iter.hh"
 #include "score-engraver.hh"
@@ -45,12 +47,11 @@ Paper_def::Paper_def (Paper_def const&s)
   lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
   for (Assoc_iter<int, Lookup*> ai(*s.lookup_p_assoc_p_); ai.ok (); ai++)
     {
-      Lookup * l=new Lookup (*ai.val ());
+      Lookup * l = ps_output_global_b ? new Ps_lookup (*ai.val ())
+       : new Tex_lookup (*ai.val ());
       l->paper_l_ = this;
       set_lookup (ai.key(), l);
     }
-  
-
 }
 
 Real
@@ -212,7 +213,18 @@ Paper_def::lookup_l (int i) const
 IMPLEMENT_IS_TYPE_B1 (Paper_def, Music_output_def);
 
 String
-Paper_def::TeX_output_settings_str () const
+Paper_def::ps_output_settings_str () const
+{
+  String s ("\n ");
+  for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
+    s += String ("/mudelapaper") + i.key () 
+      + "{" + i.val ()->str () + "} bind def\n";
+  s +=  *scope_p_->elem ("texsetting")->access_String ();
+  return s;
+}
+
+String
+Paper_def::tex_output_settings_str () const
 {
   String s ("\n ");
   for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)