]> git.donarmstrong.com Git - lilypond.git/blob - lily/outputter.cc
release: 0.1.61
[lilypond.git] / lily / outputter.cc
1
2 /*
3   outputter.cc -- implement Tex_outputter
4
5   source file of the GNU LilyPond music typesetter
6
7   (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
8 */
9
10 #include "outputter.hh"
11 #include "tex-stream.hh"
12 #include "molecule.hh"
13 #include "varray.hh"
14 #include "dimen.hh"
15 #include "tex.hh"
16
17 Tex_outputter::Tex_outputter (Tex_stream *s)
18 {
19   outstream_l_ = s;
20 }
21
22 void
23 Tex_outputter::output_molecule (Molecule const*m, Offset o)
24 {
25   String t = m->TeX_string();
26   if (t.empty_b ())
27     return ;
28
29   String s ("\\placebox{%}{%}{%}");
30   Array<String> a;
31   a.push (print_dimen (o.y()));
32   a.push (print_dimen (o.x()));
33   a.push (t);
34   String r;
35   /*
36   if (check_debug)
37     r = String ("\n%start: ") + name() + "\n";
38     */
39   
40   r += substitute_args (s, a);
41   
42   *outstream_l_ << r;
43 }
44
45
46 void
47 Tex_outputter::start_line ()
48 {
49   *outstream_l_ << "\\hbox{%<- line of score\n";
50 }
51
52 void
53 Tex_outputter::stop_line ()
54 {
55   *outstream_l_ << "}";
56   *outstream_l_ << "\\interscoreline";
57 }