When the cursor had idx > 0 (since math-display does merging anyways),
reset cursor to the start of the inset. This looks less strange than
setting it at the end.
Now at least the basic case of a displayed equation with cursor
somewhere at top-level is handled correctly.
The math-display lfun operates at top level in the math inset.
Therefore, when the cursor is in an inner inset, it will after the
lfun be moved at top level. Unfortunately, there is no way that I know
f to detect this in Inset::doDispatch.
Even if we could, as things stand, it is difficult to keep the cursor in the
inner inset, especially if the inner inset moves : this happens for
example when moving from eqnarray to inline maths.
Therefore this fix is the best I can think of now.
Fixes part of bug #9664.
This fixes bug #9615.
The "notermination" flag tells LyX, that terminating an LICR macro with {} is
not necessary. This is normally the case for all macros with non-alphabetical
name (e.g. \{).
However, combining diacritical characters are converted to *accent macros*,
which expect an argument (the base character).
In Unicode, the base character precedes the combining character,
in LaTeX the combining character precedes the base character.
LyX changes the order of the two characters to get this right,
e.g. "x" + "combining tilde" becomes "\~{x}".
In the special case there is no preceding character (e.g. at the start of the
document or a paragraph), Unicode shows the combining diacritical character
without base character.
The replacement is currently not "terminated" (e.g. "\~"), because of the
"notermination=text" flags in "unicodesymbols".
The accent macros take the *following* character as base character, which is
clearly not intended.
In case of a paragraph consisting of just one combining diacritical character,
LaTeX compilation fails with an error.
With the patch, LyX writes the accent macros with an empty argument,
e.g. "\~{}", the output is similar to the view in the GUI with the diacritical
character on its own, not on the follwoing character.
We do not currently have any Arabic documents, but when we do, these
fonts will be used for the tests that use system fonts.
They can be installed on Debian-type systems from the
'fonts-sil-scheherazade' package.
Both marvosym and bbding define the "Cross" macro.
To prevent a compilation error due to conflicting definitions,
we undefine the "Cross" macro if both packages are required.
It turns out that it is always better using the copy of the MacroData
for updating the macro_ pointer to avoid problems related to the cursor
position.
* Take into account the filesystem encoding for the zip export on *nix
such that the representation of filenames in the zip archive is not
mangled, when possible. This only concerns the way filenames are displayed
as their creation in the filesystem was nevertheless correct.
* On Windows, try to obtain the command line parameters from the wide char
representation by directly accessing the platform APIs through ctypes.
This allows to also deal with filenames not exactly representable using
the current code page and corrects a bug resulting in silently dropping
those kind of filenames.
This effectively makes the horizontal size policy "minimum", which
makes it clear that there is no advantage for this widget of
increasing the horizontal size past the minimum, allowing other
GUI elements to use the horizontal space if useful.
This change for caseCB is consistent with wordsCB and searchbackCB.
This can happen when a macro is copied and then the document where
it is defined is closed. In this case, the macro survives in the
cut stack but the the buffer pointer is dangling.
Now the minibuffer toolbar is "auto" by default. It is opened by
command-execute (M-x) and closed when the command is executed without error.
* make lyx::dispatch return a DispatchResult struct
* there is a new MINIBUFFER type of toolbar, that can be used for this use.
* remove special handling of M-x in minnibuffer; Escape can be used instead. Fix focus in this case.
* when minibuffer toolbar is "auto", make the toolbar close itself after
- a command has been executed without error
- an empty command has been executed
- the Escape key has been used
The 'using namespace std' at the top of the file makes it quite difficult to
understand which abs is used: double std::abs<double>(double) or
int ::abs(int)? Now it is explicit, and the code does not change in subtle
ways if somebody removes the using statement.
The horizontal size policy is now set to "MinimumExpanding", which
means that sizeHint() is enforced as a minimum, but that the widget
can make use of extra available space.
Before, the size policy was ignored, and often resulted in a
scrunched pane that had to have its size manually increased.
The symptom of the bug is that the preference could be incorrectly
displayed (based on the value of the statusbar preference).
This seems to have been a copy/paste mistake introduced in 214f7ed2.
The MacroData pointer is updated by MathData::metrics() which is not
called when selecting a math inset with instant preview for math on.
Thus, we have to update it in the copy constructor otherwise a crash
is almost assured when hitting Ctrl+C.
If latex fails to generate any output, the forked process was not removed.
Now, if a snippet was changed a new one was started but, if also the zoom was
changed, things went awry because the 2 concurrent processes were asked to
process again the same snippet. Previously this would have simply caused a
waste of resources because the changed snippet would have not been regenerated.
Also reset the guard due to the early exit.
If the zoom factor is changed right while the previews are being
regenerated, the refreshPreviews() method is a no-op. So, reschedule
the refresh until everything is ready.
Relying on the fact that the timer is not active anymore does not
guarantee that the previews at the correct zoom are ready because
the regeneration process may take several seconds and during this
time the zoom factor may be changed again. So, we need an additional
guard for assuring that everything has settled down.
Instead of redefining \usepackage for avoiding the microtype package
when generating previews in dvi mode, the draft option can be used
for disabling it. This also allows to somewhat simplify the
fix_latex_file function.
We only look once for the definition of the same macro, but we have
to always check its arguments when the same macro appears more than
once in a math inset. So, move earlier this check.