]> git.lyx.org Git - features.git/commitdiff
Revert yesterday's change. It's going to be too complicated to deal
authorAngus Leeming <leeming@lyx.org>
Fri, 18 Oct 2002 09:43:15 +0000 (09:43 +0000)
committerAngus Leeming <leeming@lyx.org>
Fri, 18 Oct 2002 09:43:15 +0000 (09:43 +0000)
with nasty surprises.

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

src/mathed/ChangeLog
src/mathed/formula.C

index 69c509ee222cfa6b877c9ee922e754cb9969c855..f848dceab8567a7a4b25ad202347488472878ae4 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-18  Angus Leeming  <leeming@lyx.org>
+
+       * formula.C (latexString): Revert yesterday's change. It's going to
+       be too complicated to deal with nasty surprises.
+
 2002-10-17  Angus Leeming  <leeming@lyx.org>
 
        * formula.C (latexString): change "\[ ... \]" to "$ \displaystyle ... $"
index 692f46daeae14b3826990a9c82292bc8afe5769d..4b8a9eaa76f0adcbea6e4a895ba33fa773a21a5a 100644 (file)
@@ -330,18 +330,5 @@ string const InsetFormula::PreviewImpl::latexString() const
        ostringstream ls;
        WriteStream wi(ls, false, false);
        parent().par_->write(wi);
-       string str = ls.str().c_str();
-
-       // If we are in displaymode, the preview will include the margins
-       // on either side of the previewed equation.
-       // We can create an image with a tight bounding box by replacing the
-       // "\[ ... \]" delimiters with "$ \displaystyle ... $".
-       // Note that we have to get rid of any trailing '\n's for the fix
-       // to work.
-       if (prefixIs(str, "\\[")) {
-               str = rtrim(rtrim(ltrim(str, "\\["), "\n"), "\\]");
-               str = "$ \\displaystyle " + str + " $";
-       }
-
-       return str;
+       return ls.str().c_str();
 }