2 tex-outputter.cc -- implement Tex_outputter
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "tex-outputter.hh"
11 #include "tex-stream.hh"
12 #include "molecule.hh"
15 #include "string-convert.hh"
18 Tex_outputter::Tex_outputter (Paper_stream *s)
23 Tex_outputter::~Tex_outputter ()
28 26 fonts ought to be enough for anyone.
31 tex_font_command(int i)
33 return "\\font" +String_convert::form_str ("%c", 'A' + i) ;
37 Tex_outputter::switch_to_font (String fontname)
39 if (!fontname.length_i () || fontname == current_font_)
42 current_font_ = fontname;
44 for (; i< font_arr_.size (); i++)
45 if (font_arr_[i] == fontname)
47 *outstream_l_ <<tex_font_command (i) << "\n";
52 font_arr_.push (fontname);
53 *outstream_l_ << "\\font" + tex_font_command (i) << "=" + fontname << "\n";
54 *outstream_l_<< tex_font_command (i);
58 Tex_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
61 *outstream_l_ << String ("\n%start: ") << nm << "\n";
63 Paper_outputter::output_molecule (m, o, nm, "\\placebox{%}{%}{%}");
67 Tex_outputter::start_line ()
69 *outstream_l_ << "\\hbox{%\n";
73 Tex_outputter::stop_line ()
76 *outstream_l_ << "\\interscoreline";