Another implementation would have been to use the lspace and rspace attributes in MathML, but they require to give the exact spacing before and after the operator instead of relying on rules like TeX.
For instance, `$a\mathbin{+}b$` resulted in this MathML output before the patch:
```
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mrow>
<mi>a</mi><!-- -->
<mi>[mathbin [char + mathalpha]]</mi>
<mi>b</mi>
</mrow>
</math>
```
For comparison, this was the output with LyX 2.3.7
```
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mrow><mi>a</mi><!-- -->
<mi>[mathbin [char + mathalpha]]
</mi><mi>b</mi>
</mrow>
</mrow></math>
```
After this patch, it looks like:
```
<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mstyle class='math'>
<mrow>
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</mrow>
</mstyle>
</math>
```
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.
* put the code that is called both from Buffer and InsetBrach in the
two helper methods Buffer::branchActivationStatus() and
Buffer::branchActivationDispatch().
* Cleanup the code so that _MASTER_ lfuns are disabled when there is
no master document.
* When changing branches in the master buffer, make the buffer visible
if it is not, and make sure that undo information is recorded.
* The code in Buffer::dispatch is used first, and it gives control to
the branch inset code if no branch name has been specified.
Fixes bug #12588.
* do not try to dissolve a macro template inset (avoids a crash)
* disable inset-dissolve when an argument is given
* when triggered by the AtPoint mechanism, make sur to dissolve the
right inset.
Fixes bug #12562.
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.