See here:
https://www.mail-archive.com/search?l=mid&q=a7960223ee91696e916b281d1d9fc55df10a9480.camel%40gmail.com
Description from José pasted below:
Functions `length_in_bp` and `revert_flex_inset` have an error in a
(almost) never used path. The reason why this was never triggered is
because this is part of the code where we try all the best efforts
to recover from an ill-formed LyX file.
The problem is that the functions call the `document` variable to
issue an warning if the file does not follow the usual structure.
The simple fix is to add that variable (as the first for the
functions) and to add them at all the places where the functions are
called.
For reference this code was introduced by Georg (Baum) more than 8
years ago and it was never reported. So the issue is not urgent in
any meaningful way. :-)
In `lyx2lyx/lyx_2_0.py`, in the function `revert_nameref`, there is
a call to the document variable. The same as all the above.
In `lyx2lyx/lyx_2_4.py`, in the `class fontmapping`. Similar to the
above but now for error.
This does now apply to the whole inset or paragraph group (not to the
current paragraph only) unless the new boolean AllowedOccurrencesPerItem
is set and we are in a list-type environment.
Amends 729ab602ca
This allows to restrict the use of flex insets to specific contexts.
Note that this is currently very basis. It only considers immediately
containing insets/layouts and can be surpassed via cut and paste.
The use case that made me finally implement this are macros in covington
that make sense only in specific environments (but also consider \inst
in some article classes)
A new counter type \superarabic is introduced, that transforms the
counter into superscript Unicode numbers.
This is used for the footnote counter.
The Foot inset layout is modified to use an empty LabelString (in size
Normal, since the numbers could be too small).
We use this occasion to set footnote text in footnotesize, as it should.
A couple of changes are done to the code to make the button label and
tooltip look better.
Fixes bug #12238.
Each removed inheritFont method is replaced by a 'InheritFont false'
line in the relevant InsetLayout entry.
Add code to layout2layout that does this automatically when the entry
is missing.
The case of InsetScript is special, since the inheritFont() was not
needed here: the default is indeed true.
Fixes bug #12238.