void asciiOnly(bool ascii);
/// tell whether to use only ascii chars when producing latex code
bool asciiOnly() const { return ascii_; }
+ /// tell whether we are in a MathClass inset
+ void inMathClass(bool mathclass) { mathclass_ = mathclass; };
+ /// tell whether we are in a MathClass inset
+ bool inMathClass() const { return mathclass_; }
/// LaTeX encoding
Encoding const * encoding() const { return encoding_; }
Encoding const * encoding_;
/// Row entry we are in
TexRow::RowEntry row_entry_;
+ /// whether we are in a MathClass inset
+ bool mathclass_;
};
///
class MathStream {
public:
/// Builds a stream proxy for os; the MathML namespace is given by xmlns (supposed to be already defined elsewhere in the document).
- explicit MathStream(odocstream & os, std::string xmlns="");
+ explicit MathStream(odocstream & os, std::string xmlns="", bool xmlMode=false);
///
void cr();
///
bool inText() const { return in_text_; }
///
std::string xmlns() const { return xmlns_; }
+ ///
+ bool xmlMode() const { return xml_mode_; }
/// Returns the tag name prefixed by the name space if needed.
std::string namespacedTag(std::string tag) const { return ((xmlns().empty()) ? "" : xmlns() + ":") + tag; }
private:
///
std::string xmlns_;
///
+ bool xml_mode_;
+ ///
friend class SetMode;
};
OctaveStream & operator<<(OctaveStream &, int);
-docstring convertDelimToXMLEscape(docstring const & name);
+docstring convertDelimToXMLEscape(docstring const & name, bool xmlmode);
} // namespace lyx