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
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).
The new parameter allows more flexibility when encoding some elements that have a poor mapping in DocBook, like theorems. The major use is to wrap the environment in a generic container, figure, which requires a title (but none is available).
* disambiguate "Other" label
* Add accelerator
* Add tooltip to "Other" widget
* Amend tooltip of "Web" widget (since "other" now seems to have taken
part of its function)
Missing return in `specialCharKindToXMLEntity`. Previously, the
functions that were merged into `specialCharKindToXMLEntity` did not
return any kind of error in case an unknown special character is met
(enumerated value). This behaviour is preserved.
This is a new take on c8e2c17a that was reverted at da67bde61a due to entities no more recognised by the browsers. Corresponding thread on the mailing list: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg213179.html
This patch is a huge cleanup overall, by removing the distinction between HTML and XML entities (the latter arrived due to the DocBook support).
In InsetListingParams, I also changed the mechanism that relied on " to use an XML entity to be consistent with the rest of the code, mostly in case someone looks for HTML entities and wonders why they are still there.
Also, perform the URL fixing magic for DocBook and XHTML.
As it was, it was impossible to enter e.g. "tel:" type links. Now
choosing the "Other" type just outputs the URL as given.
Also, the addition of "http" or "file" was not being done for
DocBook and XHTML. Now it is.
This adds a warning icon to either the tab header or the panel stack
entry item if a widget on the panel/stack has invalid content.
Particularly helpful to get aware of such content on other tabs/panes
than the one currently selected.
Before, there was always a space after the tag, even when there were no attributes. Now, the space is output conditionally, so that the output makes more sense.
Before, one space too many for the tag name (title), casting doubt on whether the code had this space hard coded or not:
<!-- Output Error: Unrecognised tag type 'para' for 'title ' -->
After, no such space:
<!-- Output Error: Unrecognised tag type 'para' for 'title' -->
Remove some special cases that I do not really understand and
streamline the cases.
Also make sure that there is only one code path for centering.
Fixes bug #12491.
Instead of having to add and individually test the versions to check
for, we store the current version and test on that with a specific
function isAvailableAtLeastFrom(package, year, month, day)
Currently only used for the LaTeX version, but could also be extended
for package versions.
If the main language does not require the inputenc package, but a
secondary language does, inputenc needs to be loaded as well
(without options)
Also simplify the code a bit.
- new function to list bibtex databases
- citation-insert returns the list of undefined keys
if the request comes from the LyX server
Original patch from Benjamin Piwowarski (2012!).
Modified and updated by Riki Heck and myself.
File switches with documents are done via \inputencoding.
Other than with fontenc, these do not need to be laoded via options
beforehand.
Also, out current code loaded the additional languages' encoding last,
which might result in wrong encoding settings.
This restores the previous behavior of runCommand().
When the child process could not be properly terminated the
error "RunCommand: could not terminate child process" was being
issued. However, in fb7b7e52 there was a misinterpretation
between this condition and the exit status of the child and
these two different errors were mixed up. They are now
disentangled again.
Apostrophes were being converted inside code-like areas, like LilyPond insets. This patch fixes tests that started to fail:
Processing `./60/lily-95ee389a.ly'
Parsing...
././60/lily-95ee389a.ly:7:12: error: undefined character or shorthand: &
\relative c
’’ { g a b c}
This is similar to what LaTeX does in its output.
See the (long) discussion in ticket #11244. Port of ad3e6c69b2 for DocBook.
This patch requires delaying entire strings instead of just characters, so that the DocBook code path can be as similar to the XHTML one as possible.