A new method for drawing ellipses has been added to the painter
and used for drawing real dots for math decorations and the various
\cdots, \ddots, \vdots, etc., latex commands.
For math decorations with arrows at both ends the code was simply
stretching a prototype symbol, thus distorting the arrows.
Another drawing mode is introduced allowing to draw an element by
maintaining its aspect ratio also when it has to be drawn at the
other end of a decoration. An element drawn using this mode is simply
shifted to the other side by adding either the width or the height,
and a finer adjustment can be obtained by specifying an additional
horizontal or vertical shift.
When the argument is long enough, the arrow in the on-screen representation
was not covering the first or the last glyphs. For example, using
\overrightarrow{abcdefghijklmnopqrstuvwxyz}
the 'a' was drawn outside the covering arrow.
This commit takes into account also the case in which a prime follows
a superscript, a case not explicitly mentioned in bug 1633.
This case has to be accounted for in a different way. We cannot look
ahead when exporting, so we simply tell TeXMathStream to output an
empty group if we just output a superscript and a prime comes next.
This patch takes into account the skewness of a character for properly
align a decoration. Unfortunately, the required amount of shift depends
on single chars, so that the recently introduced FontMetrics::italicSlope()
method cannot be used with all characters. A heuristics that produces
satisfactory results is using the italic slope only with characters whose
italic correction (kerning) is zero.
Part of #11491
A reference can be directly inserted into mathed but cannot be pasted
because the pasted material is returned in plain text format. This patch
allows getting a string from the cut stack in a suitable format allowing
the math parser to actually create an InsetRef.
Fixes#11539
It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.
This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).
Fix bug #11225.
If a macro has only optionals and none is specified and a [ immediately
follows, we have to terminate the macro with {}, otherwise what follows
is taken to be an optional argument.
Fixes#11665.
The ensuremath math inset derives from InsetMathNest, so that only the
first cell of a grid gets pasted. This patch makes it a fixed 1x1 grid
inset so that pasting works as in normal simple math hulls, i.e., all
cells are pasted, one after the other.
Fixes#11617.
At the moment, there is no support for plurals and capitalization.
A long comment explains why. Support could be added for that without
a format change.
Since we are not sure of where the cursor ends up after invoking
Cursor::handleNest it is safer to reset the cursor at each cell,
rather than reuse the same one over and over.
Related to bug #12035.
- Add limits support to InsetMathScript
- Add limits support to InsetMathClass
- Fix bug where limits changing is disabled in inline math
Now the MathData objects remember whether they are in diaply mode.
Fixes bug #12045.
The problem here is that the check against TEXT_CODE only
catches InsetText, and not its subclasses. Same for the check
against MATH_HULL_CODE. So there is reason not to check codes
here.
This reverts commit 5a54ccfa87.
Setting the res value and returning from the function at the same time
does not make sense. After reflection, it is the "return" that shall
go.
No idea what effect it had.
The macros defined in the symbols file are only used for on-screen
representation, so that their definition should not require the use
on any latex package. Their definition should be taken into account
only when they are overridden by user macros with same name.
Move InsetMacro::limits_ to InsetMacro::Private, where it should have
been from the start. This means that limits_ is now copied when the
macro is cloned.
This extra spacing was missing and is important for detecting extra
par breaks before equations (which are most of the times not wanted).
To do that, add a new member vmode to MetricsInfo which is equivalent
to LaTeX's \ifvmode (start of paragraph).
If in vmode, add the equivalent of an empty line before a display math inset.
At the same time, tweak value of \(above|below)displayskip, which was
12pt, whereas LaTeX uses 10pt in 10pt size (our reference).
Fixes bug #11891.