bool & firstitem() { return firstitem_; }
///
void addlines(unsigned int);
+ /// record whether we can write an immediately following newline char
+ void canBreakLine(bool breakline) { canbreakline_ = breakline; }
+ /// tell whether we can write an immediately following newline char
+ bool canBreakLine() const { return canbreakline_; }
/// writes space if next thing is isalpha()
void pendingSpace(bool how);
/// writes space if next thing is isalpha()
bool locked_;
/// should we use only ascii chars when producing latex code?
bool ascii_;
+ /// are we allowed to output an immediately following newline?
+ bool canbreakline_;
///
int line_;
///
};
+/// Throw MathExportException to signal that the attempt to export
+/// some math in the current format did not succeed. E.g., we can't
+/// export xymatrix as MathML, so that will throw, and we'll fall back
+/// to images.
+class MathExportException : public std::exception {};
+
+
class MathStream {
public:
///
///
int line_;
///
- char lastchar_;
- ///
bool in_text_;
///
odocstringstream deferred_;
class SetMode {
public:
///
- explicit SetMode(MathStream & os, bool text, docstring attrs);
+ explicit SetMode(MathStream & os, bool text, std::string const & attrs);
///
explicit SetMode(MathStream & os, bool text);
///
~SetMode();
private:
///
- void init(bool, docstring);
+ void init(bool, std::string const &);
///
MathStream & os_;
///
///
int line_;
///
- char lastchar_;
- ///
bool in_text_;
///
odocstringstream deferred_;
///
~SetHTMLMode();
private:
+ ///
+ void init(bool, std::string const &);
///
HtmlStream & os_;
///