From 86483889925e82cc20a72f5b4da9aa76c8b53696 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Fri, 18 Oct 2002 09:43:15 +0000 Subject: [PATCH] Revert yesterday's change. It's going to be too complicated to deal with nasty surprises. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5438 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 5 +++++ src/mathed/formula.C | 15 +-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 69c509ee22..f848dceab8 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2002-10-18 Angus Leeming + + * formula.C (latexString): Revert yesterday's change. It's going to + be too complicated to deal with nasty surprises. + 2002-10-17 Angus Leeming * formula.C (latexString): change "\[ ... \]" to "$ \displaystyle ... $" diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 692f46daea..4b8a9eaa76 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -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(); }