Revert to the strategy used at 8f86ee74 but not using mathedWordList
because it may be still uninitialized at load time. Instead, use the
globalMacros method for getting the same info.
There was a thinko at 8ec91e80, because globalMacros always returns
null for user defined macros.
It may happen that mathedWordList is not still updated at load time,
so we would still be using a bogus pointer. Better fetching the
necessary info from the global macro table.
The math macros system is quite complex. Macros are updated during
metrics calculation, so a missing update is very likely to cause a
crash. This commit tries to assure that they are updated at export
time, which also happens when the table of contents is updated.
Moreover, in order to circumvent a possible missing update, when
a math macro is detected we try to avoid using the sym_ member
of the MacroData class, as it may contain bogus values.
Load required package textcomp.
Replace call to non-existent packages textcyr and textgreek with the backup definition of the commands as done by LyX export.
Do not load marvosym (clash with pifont) (LyX does not load the package either).
Remove invalid command \\ascii.
On export, a macro defined in ERT (or not defined at all) is left
in the same environment it is entered. So, don't explicitly insert
it in an ensuremath environment when it is entered in a textmode one.
From Günter [1]:
the difference is the textcommand for ETB which changed from
{\ascii\ETB} to
0x21a8 "\\ETB" "ascii" "force=utf8" # UP DOWN
ARROW WITH BASE
because the former resulted in
l.513 \ascii
\ETB{}
! Undefined control sequence.
[1]
https://www.mail-archive.com/search?l=mid&q=nr48qn%242gb%241%40blaine.gmane.org
Fix problems revealed by hand-compiling an examining the test samples in autotests/export/Unicode-characters/:
* new definitions
* fixed definitions
* "force=utf8" when required
* some IPA symbols fail without the "extraipa" package
* fix direction of "textcommaaboveright"
A math-mode command entered in a text-mode environment is wrapped
in an ensuremath inset, as well as a text-mode command entered in a
math-mode environment is wrapped in a text inset. Who doesn't like
the extra insets can always dissolve them and rely on the wrapping
performed on export.
If the first character in the first cell of an aligned math environment is
'[', and the environment does not use top or bottom vertical alignment,
then LyX did write the '[' unprotected so that it got misinterpreted as
optional argument, both when reading the .lyx file in LyX and when reading
the .tex file in LaTeX => data loss!
The fix is to output an empty optional argument in this case, which is
interpreted as default alignment both by LyX and LaTeX. It would also be
possible to output \[ in the first cell instead, but this would be more
difficult to implement.
The \multicolumn command allows to set vertical lines for individual rows.
These are not yet displayed, but if they are supported one day, the code in
a27ff13663 needs to be adjusted. This change hints at the adjustment.
This is a fixup to commit 39329935. The two fixes are
* add forgotten offset `y' when drawing the line
* in order to have a continuous vertical line, draw from the offset of
the previous row.
Fixes bug #10363.
The window title is built from the current file name and its
mofidication state. We use our own code instead of the automatic title
bar provided when windowFileName() is set because
1/ Qt does not keep the full path name
2/ Qt does not yield a nice application name
The "read only" and "version control" status are shown in the status bar:
* for read only we use the tab read only emblem (with the right size)
* for version control, we show the name of the backend (using a new
vcname() method of the backend).
The iconText() of the view is not updated anymore, since this is
deprecated in Qt5.
Now the external material file dialog shows the file types defined in the
template again. Before this fix it did only show "All files (*)".
I don't know what the old syntax was supposed to do or whether it ever worked
with boost::regex, but with std::regex the new one is correct.
As noted in the log, this commit was a bit radical and needs some
adjustments (which was expected, actually).
Let InsetText do their own background drawing.
Fixes bug #10359.
Before, it could have been the case that
lyx -e pdf2 file.lyx
had exit code 0 even though file.lyx includes a file that exits with
error. If compiled in the GUI a warning was given, but from the
command line exit code it would seem there was no problem. The exit
code for this case is now non-zero and the word "Warning" is now
removed from the message because it should be treated as an error.
An exception is thrown from InsetInclude and is caught in
Buffer::makeLaTeXFile() and added to the error list.
The (similar) use case at #8840 is also fixed by this commit.
buffer-zoom-out can actually zoom in (by giving a positive number as
the argument), so it should only be disabled at the minimum zoom
level if it is indeed zooming out.
Similarly, buffer-zoom-in can zoom out, so it should be disabled if
the user is at the minimum zoom and it is called to zoom out.
This commit amends 8884c404.
Replace the member reference to FuncRequest in Action.cpp with a
shared_ptr. Compared to copying the FuncRequest, the shared_ptr has two
advantages:
* Recreating the menu each time creates a lot of new actions, so we avoid a lot
of copies.
* FuncRequest can remain forward-declared in Action.h.
The field prettyname can accept Unicode and therefore must be parsed into a
docstring.
Little simplification of the code on the way.
* For other fields, either a validator should be set to prevent non-ascii input
in the preferences, or they should be transformed into docstring too.
When breaking paragraph in an empty top-level paragraph, nothing
happens on screen but yet there is an undo step because the layout is
reset to what it already was.
Avoid this case.
Fixes bug #10089.
Single quotes are special to our parser and must be either escaped or
quoted if they are part of a filename, otherwise they are stripped out.
See #10342.