When I insert superscript or subscript formatting using the Insert>Formatting menu in Lyx, it leaves a large gap between the sub/super-scripted text and the preceding text. This does not happen when using math mode for sub/superscipting - only when using the formatting menu commands ("script-insert superscript" and "script-insert subscript", respectively). Note that this behaviour only affects the onscreen editing display - the rendered pdf output is fine. But it is rather irritating during editing, particularly when working on technical documents with a lot of units that have superscripts and subscripts. Is there any way to fix this behaviour so that the onscreen display in the editor does not insert these gaps? I am using Lyx 2.1.4

An example of this behaviour is shown in the image below:

enter image description here

  • 2
    I think this kind of thing is better reported at lyx.org/trac/wiki/BugTrackerHome It looks like something that isn't managed by some setting here or there, so not really something we're likely to be able to answer here. May 23, 2016 at 18:42

1 Answer 1


The described behaviour is caused by setting LeftMargin in the document settings Local Layout.

This is because InsetLayouts (which control the layout of sub/superscripts, among other things) inherit the global margin settings, with no possibility to adjust the margin to their own values (missing feature).

A bug report ticket has been raised at http://www.lyx.org/trac/ticket/10177 to the effect that LeftMargin and RightMargin, when specified on top level, should only apply to the main text.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .