8 Tex_stream::Tex_stream(String filename
)
11 os
= new ofstream(filename
);
13 error("can't open " + filename
);
15 outputting_comment
=false;
21 *os
<< "% Creator: " << get_version() << "\n";
22 *os
<< "% Automatically generated, at ";
24 *os
<< ctime(&t
)<<"\n";
25 //*os << "% from input file ..\n";
27 Tex_stream::~Tex_stream()
29 assert(nest_level
== 0);
33 // print string. don't forget indent.
35 Tex_stream::operator<<(String s
)
37 for (const char *cp
= s
; *cp
; cp
++) {
38 if (outputting_comment
) {
41 outputting_comment
=false;
49 outputting_comment
= true;
59 assert (nest_level
>= 0);
64 *os
<< String(' ', nest_level
);
75 /****************************************************************/