]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathStream.cpp
de.po
[lyx.git] / src / mathed / MathStream.cpp
index c1c0830f5a9be2a52803d7b30976894948f82d1c..774e964a8dfb94caa968a1e7f23193aa12f9c4be 100644 (file)
@@ -16,6 +16,8 @@
 #include "MathData.h"
 #include "MathExtern.h"
 
+#include "TexRow.h"
+
 #include "support/docstring.h"
 #include "support/RefChanger.h"
 #include "support/textutils.h"
@@ -126,9 +128,10 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s)
 WriteStream::WriteStream(otexrowstream & os, bool fragile, bool latex,
                                                 OutputType output, Encoding const * encoding)
        : os_(os), fragile_(fragile), firstitem_(false), latex_(latex),
-         output_(output), pendingspace_(false), pendingbrace_(false),
-         textmode_(false), locked_(0), ascii_(0), canbreakline_(true),
-         line_(0), encoding_(encoding), row_entry_(TexRow::row_none)
+         output_(output), insidemacro_(false), pendingspace_(false),
+         pendingbrace_(false), textmode_(false), locked_(0), ascii_(0),
+         canbreakline_(true), mathsout_(false), ulemcmd_(NONE), line_(0),
+         encoding_(encoding), row_entry_(TexRow::row_none)
 {}
 
 
@@ -292,7 +295,7 @@ void MathStream::defer(string const & s)
 
 
 docstring MathStream::deferred() const
-{ 
+{
        return deferred_.str();
 }
 
@@ -382,7 +385,7 @@ void HtmlStream::defer(string const & s)
 
 
 docstring HtmlStream::deferred() const
-{ 
+{
        return deferred_.str();
 }
 
@@ -705,6 +708,12 @@ docstring convertDelimToXMLEscape(docstring const & name)
                        return from_ascii("&gt;");
                else
                        return name;
+       } else if (name.size() == 2 && name[0] == '\\') {
+               char_type const c = name[1];
+               if (c == '{')
+                       return from_ascii("&#123;");
+               else if (c == '}')
+                       return from_ascii("&#125;");
        }
        MathWordList const & words = mathedWordList();
        MathWordList::const_iterator it = words.find(name);