* the GNU General Public Licence version 2 or later.
*/
-#ifdef __GNUG__
-#pragma implementation
-#endif
#include <config.h>
void InsetFormula::write(Buffer const *, ostream & os) const
{
WriteStream wi(os, false, false);
- os << par_->fileInsetLabel() << " ";
+ os << par_->fileInsetLabel() << ' ';
par_->write(wi);
}
int InsetFormula::ascii(Buffer const *, ostream & os, int) const
{
- if (display()) {
+ if (0 && display()) {
TextMetricsInfo mi;
par()->metricsT(mi);
TextPainter tpain(par()->width(), par()->height());
MathPainterInfo pi(bv->painter());
if (use_preview) {
- pi.pain.image(x, y - a, w, h,
+ pi.pain.image(x + 1, y - a, w, h, // one pixel gap in front
*(preview_->pimage()->image(*this, *bv)));
} else {
pi.base.style = LM_ST_TEXT;
{
metrics(bv, font);
return preview_->previewReady() ?
- preview_->pimage()->width() : par_->width();
+ 1 + preview_->pimage()->width() : par_->width();
+ // insert a one pixel gap in front of the formula
}
ostringstream ls;
WriteStream wi(ls, false, false);
parent().par_->write(wi);
- return ls.str().c_str();
+ return STRCONV(ls.str());
}