]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathXYMatrix.cpp
\protect xymatrix in fragile context
[features.git] / src / mathed / InsetMathXYMatrix.cpp
index 7e35fe92e12691de0beba9f7569cdb0e3e0a16e8..d8f54602b9d3b20b106e9b91f687d0e070f6a5bf 100644 (file)
@@ -66,6 +66,8 @@ void InsetMathXYMatrix::draw(PainterInfo & pi, int x, int y) const
 void InsetMathXYMatrix::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        os << "\\xymatrix";
        bool open = os.startOuterRow();
        if (equal_spacing_) {