+class HtmlStream {
+public:
+ ///
+ explicit HtmlStream(odocstream & os);
+ ///
+ void cr();
+ ///
+ odocstream & os() { return os_; }
+ ///
+ int line() const { return line_; }
+ ///
+ int & tab() { return tab_; }
+ ///
+ friend HtmlStream & operator<<(HtmlStream &, char const *);
+ ///
+ void defer(docstring const &);
+ ///
+ void defer(std::string const &);
+ ///
+ docstring deferred() const;
+ ///
+ bool inText() const { return in_text_; }
+private:
+ ///
+ void setTextMode(bool t) { in_text_ = t; }
+ ///
+ odocstream & os_;
+ ///
+ int tab_;
+ ///
+ int line_;
+ ///
+ bool in_text_;
+ ///
+ odocstringstream deferred_;
+ ///
+ friend class SetHTMLMode;
+};
+
+///
+HtmlStream & operator<<(HtmlStream &, MathAtom const &);
+///
+HtmlStream & operator<<(HtmlStream &, MathData const &);
+///
+HtmlStream & operator<<(HtmlStream &, docstring const &);
+///
+HtmlStream & operator<<(HtmlStream &, char const *);
+///
+HtmlStream & operator<<(HtmlStream &, char);
+///
+HtmlStream & operator<<(HtmlStream &, char_type);
+///
+HtmlStream & operator<<(HtmlStream &, MTag const &);
+///
+HtmlStream & operator<<(HtmlStream &, ETag const &);
+
+
+class SetHTMLMode {
+public:
+ ///
+ explicit SetHTMLMode(HtmlStream & os, bool text);
+ ///
+ ~SetHTMLMode();
+private:
+ ///
+ HtmlStream & os_;
+ ///
+ bool was_text_;
+};
+
+