Instead of asserting when there are unprocessed row elements (which,
as I understand it, should almost never happen), play safe and keep
them for later processing.
Related to bug #12617.
- present appropriate alert message in case of missing Python
- add the option to quit LyX immediately
- recheck for Python interpreter on reconfigure if it was missing
A test from a recent file, KOMA-Script_Book.lyx, uncovered this
issue. It is an old routine so not critical to fix.
The following is the diff that prevents convergence:
\begin_inset Newpage cleardoublepage
\end_inset
\end_layout
\begin_layout Standard
If convert_bibtex_clearpage(document) in lyx_2_0.py is commented out, then
the test passes.
Replace \bf with \bfseries.
The error was as follows:
! Class scrbook Error: undefined old font command `\bf'.
This change is consistent with 3cecd4d3.
After this change (and the previous commits), the ctests for
Additional.lyx pass again.
The argument must specify "origin=...". Although that is confusing
(because the argument's name is "origin" so it might be expected
that this is done automatically), this is consistent with the use of
rotate box in our Embedded Objects manual.
After editing with the external sed command in the previous commit,
now resave with the LyX binary. This eliminates unnecessary language
switches (e.g., no need to switch from "English" to "English" now
that the intermediate switch to "British" is gone).
Use the following command to automate the process:
sed -i "/^\\\lang \(american\|british\)$/d" Additional.lyx
The next commit will just resave the file with LyX, so as to clean
up the file contents after the external command from this commit.
I've modified all the non-AMS theorem modules so they would be independent of packages. currently
the code support \theoremstyle, but only with definition, plain and remark.
I'v added a new theorem module that support the thmtools \listoftheorems.
I've modified the syntax of all theorem modules, such that it would be easier to
create a new one, or maintaining the ones that exists. Instead of using \newtheorem
in the preamble of a lyaout, I wrote \lyx@newtheorem, and in each module I've defiened
\lyx@newtheorem as fitted. This way, there is only need in the files thorems-base, and theorems-extended,
instead of an .inc file for each module.
I've added theorems-labels.inc, a file that suppose to be included in a "Numbered by type" module,
to change the Label and the LabelCounter of the layouts in theorems-base.inc.
Note that in this configuration, all non-AMS modules will clash with the AMS ones, and so as the
proof versions. theorems-proof-std.inc suppose to be in the non-AMS while theorems-proof.inc
should be included only in AMS variants.
Warning was as follows:
src/tex2lyx/Parser.cpp:898:39: error: adding 'uint32_t' (aka 'unsigned int') to a string does not append to the string [-Werror,-Wstring-plus-int]
warning_message("ignoring a char: " + static_cast<uint32_t>(c));
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/tex2lyx/Parser.cpp:898:39: note: use array indexing to silence this warning
warning_message("ignoring a char: " + static_cast<uint32_t>(c));
^
& [ ]
1 error generated.
First and foremost, this patch implements the latest best practices in C++ (i.e. comparison operators are not member functions).
The main objective of this rewrite is to have these operators callable in slightly more general contexts (*this->asFontTag() == *rhs.asFontTag() yielded an error because no member function could be called). This feature is no more required.
The rewrite took place in the context of https://www.lyx.org/trac/ticket/12585. The first iteration was using more complex code to circumvent XMLStream in DocBook (see details in the bug above and in the mailing list), while this one uses XMLStream fully. The bug was due to font tags being considered equal when they were not, due to the comparison done only on the XML tag and not on the actual font change (XML attributes can complement the tag for various font changes).