]> git.lyx.org Git - features.git/commitdiff
Try again with LaTeX output for XHTML math.
authorRichard Heck <rgheck@comcast.net>
Thu, 22 Jul 2010 02:47:12 +0000 (02:47 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 22 Jul 2010 02:47:12 +0000 (02:47 +0000)
The previous attempt messed up the inheritance hierarchy somehow. I
think.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35002 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathHull.cpp

index 4de876f01fe3c2c3ecfad301c648aafbae552c55..234bb56d8231451d0d4cb7c45ba9fddb8463cf0e 100644 (file)
@@ -1889,7 +1889,14 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const
        } 
        case BufferParams::LaTeX: {
                string const tag = (getType() == hullSimple) ? "span" : "div";
-               docstring const latex = latexString(*this);
+               // Unfortunately, we cannot use latexString() because we do not want
+               // $...$ or whatever.
+               odocstringstream ls;
+               WriteStream wi(ls, false, true, WriteStream::wsPreview);
+               ModeSpecifier specifier(wi, MATH_MODE);
+               InsetMathGrid::write(wi);
+               docstring const latex = ls.str();
+               
                // class='math' allows for use of jsMath
                // http://www.math.union.edu/~dpvc/jsMath/
                // FIXME XHTML