Scott Kostyshak [Thu, 5 Jan 2023 03:19:01 +0000 (22:19 -0500)]
Additional.lyx: fix "origin" arg of rotate box
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.
Scott Kostyshak [Thu, 5 Jan 2023 02:51:56 +0000 (21:51 -0500)]
Additional.lyx: resave with LyX binary
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).
Thibaut Cuvelier [Sat, 31 Dec 2022 00:47:37 +0000 (01:47 +0100)]
New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing list. Rebased on top of master.
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.
John R Hudson [Fri, 30 Dec 2022 20:01:21 +0000 (20:01 +0000)]
Insert more detail about page layout, Custom Class options KOMA-Script options and using the book document class in the KOMA-Script section of Chapter 3 Document classes of Additional.lyx and delete the section on KOMA-letter V.1.
John R Hudson [Thu, 29 Dec 2022 20:29:36 +0000 (20:29 +0000)]
Insert brief introduction to Chapter 3 Document classes, update the introduction to the AMS document classes section, adding in references to the example files, update the module names used and the Fact, Assumption and Question paragraph styles and mention the (Numbered by Type) modules in the AMS document classes section.
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