]> git.donarmstrong.com Git - lilypond.git/blob - lily/tex-score.cc
07e1108c086ffbc5cf5952a1516592954b2b36a8
[lilypond.git] / lily / tex-score.cc
1 /*
2   tex-score.cc -- implement Tex_score
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "debug.hh"
10 #include "file-results.hh"
11 #include "header.hh"
12 #include "main.hh"
13 #include "paper-def.hh"
14 #include "tex-stream.hh"
15 #include "tex-outputter.hh"
16 #include "tex-score.hh"
17
18 Paper_outputter*
19 Tex_score::paper_outputter_p (Paper_stream* os_p) const
20 {
21   if (header_global_p)
22     *os_p << header_global_p->tex_string ();
23   
24   *os_p << _ ("\n% outputting Score, defined at: ") << origin_str_ << '\n';
25
26   if (header_l_)
27     *os_p << header_l_->tex_string();
28   *os_p << paper_l_->output_settings_str ();
29   
30   if (experimental_features_global_b)
31     *os_p << "\\turnOnExperimentalFeatures%\n";
32
33   *os_p << "\\turnOnPostScript%\n";
34
35   return new Tex_outputter (os_p);
36 }
37
38 Paper_stream *
39 Tex_score::paper_stream_p () const
40 {
41   String outname = base_output_str ();
42
43   Paper_stream* p;
44   if (outname != "-")
45     outname += ".tex";
46   *mlog << _f ("TeX output to %s...", 
47                outname == "-" ? String ("<stdout>") : outname ) << endl;
48   p = new Tex_stream (outname);
49   target_str_global_array.push (outname);
50   return p;
51 }
52