Since be836909c5 the positioning of super- and subscripts
for symbol fonts has been broken because the metrics of the
font of the environment (rather than those of the symbol itself)
were used.
These are now properties of insets that can be operators :
InsetMathSymbols, InsetMathDecoration (for over/underbrace) and
InsetMathMacro (for its contents).
Each of these has a limit_ member that allows to remember a limit
forcing and a member defaultLimits() that indicates what to do in the
absence of such forcing. Moreover the write() method calls
writeLimits().
This allows to simplify the definitions of integrals in lib/symbols by
defining the integrals as macros of their "op" version, as it is done in
the style files.
Also, many hardcoded assumptions can now be removed.
The handling of LFUN_MATH_LIMITS is now done in InsetNest, which tries
successively to apply the limit change to (1) the character after
cursor, (2) the character before cursor and (3) the character at the
end of the inset (useful for script insets?)
The new code allows to define
\newcommand\int{\intop\limits}
but not
\newcommand\makelimits#1{#1\limits}
It is also possible to type explicitly \limits or \nolimits to modify
a symbol.
Includes a test case useful for some of the previous commits (notes in abstract, PI escaping, counter warnings).
Still missing: marginal and side notes. Shouldn't they be ported to InsetMarginal?
The goal is to reproduce the change of size of operators like \sum wen they
are in display style.
The syntax of the symbols file has been extended to allow for two code
points (like 80|88 for \sum). In this case, the second one will be
used in display style.
Update the symbols file to handle all bigops from cmex, esint, wasy and
stmaryrd.
Let the code for math symbol inset handle symbols which can change size,
using the information from the symbols file.
It did access par_metrics_[] directly because there was no non-const
parMetrics().
This patch adds one and unfriends BufferView. The code is equivalent
since in all these cases, the metrics have just been computed with
redoParagraph().
When running redoParagraph, it may happen that the ascent of the first
row changes. Since the ParagraphMetrics position is actually the
baseline of its first row, it may be necessary to update it.
Fixes bug #11601.
The 20px space on top and bottom of document have traditionally been
obtained by adding them to the ascent/descent of the first/last row.
This leads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.
The change is to add the value to the ParagraphMetrics ascent/descent
only and to correct one place where the ascent of the first row may be
different from the ascent of the ParagraphMetrcs object. There may be
other places where this should be done.
Fixes bug #9545.
The 20px space on top and bottom of document have traditionally been
obtained by adding the to the ascent/descent of the first/last row.
This reads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.
The change is to add the values to a separate member of the Row
object, and to add new Row::total(Ascent|Descent) methods that add the
effect of this padding.
Moreover, some methods are added to TextMetrics to simplify the
BufferView code.
Fixes bug #9545.