]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathStream.cpp
Produce a cleaner latex output by avoiding \lyxmathsym when in text mode
[lyx.git] / src / mathed / MathStream.cpp
index b0a842f209fdfe140be456ec97ebecde3b057438..8677358b55f9c653931781cd9dbb0abd87679c33 100644 (file)
@@ -20,6 +20,7 @@
 #include "support/docstring.h"
 
 #include <algorithm>
+#include <cstring>
 #include <ostream>
 
 using namespace std;
@@ -102,15 +103,15 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s)
 }
 
 
-WriteStream::WriteStream(odocstream & os, bool fragile, bool latex)
+WriteStream::WriteStream(odocstream & os, bool fragile, bool latex, bool dryrun)
        : os_(os), fragile_(fragile), firstitem_(false), latex_(latex),
-         pendingspace_(false), line_(0)
+         dryrun_(dryrun), pendingspace_(false), textmode_(false), line_(0)
 {}
 
 
 WriteStream::WriteStream(odocstream & os)
        : os_(os), fragile_(false), firstitem_(false), latex_(false),
-         pendingspace_(false), line_(0)
+         dryrun_(false), pendingspace_(false), textmode_(false), line_(0)
 {}
 
 
@@ -133,6 +134,12 @@ void WriteStream::pendingSpace(bool how)
 }
 
 
+void WriteStream::textMode(bool textmode)
+{
+       textmode_ = textmode;
+}
+
+
 WriteStream & operator<<(WriteStream & ws, MathAtom const & at)
 {
        at->write(ws);