/////////////////////////////////////////////////////////////////////////
+namespace {
+
+class InsetGraphicsTight : public InsetGraphics
+{
+public:
+ ///
+ explicit InsetGraphicsTight(Buffer * buf) : InsetGraphics(buf) {}
+
+ ///
+ int leftOffset(BufferView const *) const override { return 0; }
+ ///
+ int rightOffset(BufferView const *) const override { return 0; }
+};
+
+}
+
InsetInfo::InsetInfo(Buffer * buf, string const & info)
: InsetCollapsible(buf), initialized_(false)
// in the original Buffer. This is especially important for VCS.
// Otherwise, we could in principle have different settings here
// than in the Buffer we were exporting.
- if (buffer().isClone())
+ // However, we need to check whether the inset is in an intitle
+ // context.
+ if (buffer().isClone()) {
+ InsetText::checkIntitleContext(it);
return;
+ }
BufferParams const & bp = buffer().params();
params_.lang = it.paragraph().getFontSettings(bp, it.pos()).language();
InsetCollapsible::updateBuffer(it, utype, deleted);
percent_scale = (100 * iconsize + imgsize / 2)/imgsize;
}
}
- InsetGraphics * inset = new InsetGraphics(buffer_);
+ InsetGraphicsTight * inset = new InsetGraphicsTight(buffer_);
InsetGraphicsParams igp;
igp.filename = file;
igp.lyxscale = percent_scale;