When including files, LyX always searches the user and the system
directory, in that order. This means that when using local layout
files broken down into multiple includes, the various includes should
be specified with a path relative to the user layouts directory
(typically ~/.lyx/layouts), making this very impractical.
This commit allows including local files by specifying their path
as explicitly relative to the main layout file position, i.e., by
specifying their path with either "./" or "../". If the main layout
is not loaded from a local file, the usual search order is used,
even if the path are explicitly relative. So, for system layouts,
both "Input ./name.inc" and "Input name.inc" are equivalent.
It extended QToolBox with size calculation to fix UI issues with the previous
design of GuiCitation. Since it always needed some kind of hack and since
QToolBoxes do not appear so popular, it probably won't be used anymore.
Because latex allows to do so, and there is no easy way to achieve this.
This was apparently implemented to allow cycling between the various dash
types, but it was a bad idea bringing no benefit and causing griefs.
Previous fontspec loaded xunicode internally, for recent version, this
is no longer desired. However, we still need it for tipa emulation.
We use fontspec's trick to bypass XeTeX test with LuaTeX.
Now the selection is not done by the inset, but by the MathData
itself. This allows for some code simplification and avoids an
extra redraw.
Additionally, this fixes the selection inside macros, which was broken
by the new MathRow code.
Useful to cache copies of objects, including shared_ptrs. No risks of dangling
pointer, and avoid naked pointers in the source.
Fix memory leak when compiling with Qt5.
Now backspace and delete in text will select non-empty math and text insets
before deleting them. This is consistent with what happens in math already.
This is implemented for InsetText as well but can be disabled in case of
negative feedback.
This can be set for any sort of inset with the new virtual method
Inset::confirmDeletion.
New option "force" for the LFUN_*_DELETE_* commands, that bypasses the
confirmDeletion check.
The special mode used by macros where the macro name is displayed as
grey text in a box is now one of the possible marker types for any
inset. The new code puts the macro name below the text, which means
that only the text below the current line will be moved. This makes
edition much more comfortable.
The marker_type enum has been moved from Inset to InsetMath.
A new BOX_MARKER enum value has been added and is taken care of in
afterMetricsMarkers (renamed from metricsMarkerVertical) and
drawMarkers.
The InsetMath::marker() macro now takes a BufferView pointer as
argument, so that the marker type can depend on editing state.
MathRow::metrics now makes changes to the MathRow object when needed.
The specific metrics/draw code in MathMacro has been removed and
replaced by assertions. Code in addToMathRow and marker is adapted to
reflect the cases where linearization is possible.
From now on \kern and \mkern remain as ERT as long as the length is invalid.
Fixes#10539 (regression at 10c8d51b).
The only way to produce an InsetMathKern now is via parsing (i.e. file opening
or copy-paste). This is because there has never been any sensible way to input a
valid InsetMathKern, but this is another issue.