+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 ... $"
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();
}