Scott Kostyshak [Thu, 29 Dec 2022 02:56:18 +0000 (21:56 -0500)]
Fix compiler warning -Wstring-plus-int
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.
John R Hudson [Wed, 28 Dec 2022 14:11:07 +0000 (14:11 +0000)]
Insert entries for Custom Footer/Header Text and Landscape Document Mode and update the existing entry for Multiple Columns to match the new layout in Chapter 4 Modules of Additional.lyx
John R Hudson [Tue, 27 Dec 2022 17:26:44 +0000 (17:26 +0000)]
Insert entries for Noweb, Rnw and Sweave in Chapter 4 Modules of Additional.lyx and make consequential updates to the Literate Programming section in the same document
Thibaut Cuvelier [Tue, 27 Dec 2022 15:52:51 +0000 (16:52 +0100)]
XML: overhaul the tag-comparison operators.
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).
Thibaut Cuvelier [Thu, 22 Dec 2022 03:38:36 +0000 (04:38 +0100)]
DocBook: add support for DocBookGenerateTitle.
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).
Thibaut Cuvelier [Mon, 26 Dec 2022 01:45:03 +0000 (02:45 +0100)]
DocBook: for computing font changes, simplify code by removing state evolution from iteration to iteration. This surely makes the code slightly slower (although the compiler should be smart enough), but (much) easier to reason about.
Thibaut Cuvelier [Mon, 26 Dec 2022 20:21:52 +0000 (21:21 +0100)]
layout2layout: improve coding style.
Useless parentheses (not helping with readability either) and semicolon. Redo indentation to be consistent throughout the file. Also, fix typos along the way.
John R Hudson [Mon, 26 Dec 2022 19:06:04 +0000 (19:06 +0000)]
Insert four entries for Floats & Captions modules, four entries for Foot- and Endnotes modules and two entries for Leisure, Sports and Music modules into Chapter 4 Modules of Additional.lyx.
* 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.
Thibaut Cuvelier [Fri, 23 Dec 2022 01:16:08 +0000 (02:16 +0100)]
LyXHTML: switch the doctype to (X)HTML5 and only output XML entities.
This is a new take on c8e2c17a that was reverted at da67bde61af 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.
John R Hudson [Sat, 24 Dec 2022 12:25:54 +0000 (12:25 +0000)]
Insert entries for Section boxes, Variable-width minipages, Fix Computer Modern Fonts, LaTeX Kernel fixes, Minimalistic Insets and Title and Preamble Hacks into Chapter 4 Modules of Additional.lyx
Thibaut Cuvelier [Thu, 22 Dec 2022 03:10:25 +0000 (04:10 +0100)]
XML: improve formatting of error message for unrecognised tag type.
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' -->