lilypond-1.3.154
[lilypond.git] / lily / tex-stream.cc
blobd8030580020674b707616c0514751cf739a94327
1 /*
2 tex-stream.cc -- implement Tex_stream
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #include <fstream.h>
11 #include <time.h>
13 #include "main.hh"
14 #include "tex-stream.hh"
15 #include "debug.hh"
17 Tex_stream::Tex_stream (String filename)
18 : Paper_stream (filename)
20 header ();
23 Tex_stream::~Tex_stream ()
25 *os << "\n\\EndLilyPondOutput";
28 void
29 Tex_stream::header ()
31 // urg, merge with Ps
32 *os << _ ("% Creator: ");
33 if (no_timestamps_global_b)
34 *os << "GNU LilyPond\n";
35 else
36 *os << get_version_str () << '\n';
37 *os << _ ("% Automatically generated");
38 if (no_timestamps_global_b)
39 *os << ".\n";
40 else
42 *os << _ (", at ");
43 time_t t (time (0));
44 *os << ctime (&t) << "%\n";
48 // print string. don't forget indent.
49 Paper_stream&
50 Tex_stream::operator << (Scalar s)
52 return Paper_stream::operator << (s);