Previously, when closing font tags, only the previous character's font was used. However, if that character is deleted, it had no change of having the right font tags opened/closed. Hence, look further to compare the font of the current character to output with the font of the previously output character.
A similar patch would be required for LyXHTML, but it will come later. The main impact is that some text isn't output in XHTML (like DocBook before this patch).
The code isn't as clean as it could be. I avoided touching anything not related to DocBook, as the release of 2.4 is nearing, while leaving comments for parts to improve for the next release cycle. Given that the code compiles, there are no risks for TeX or XHTML outputs; for DocBook, less content is skipped, which is a net improvement for users.
With the current settings, a theorem with several paragraphs will have several wrapper tags (i.e. two `<db:figure>`, with one paragraph each, one next to the other when it's the same theorem), while there should be only one (one `<db:figure>` with two paragraphs).
It makes me wonder whether DocBookWrapperMergeWithPrevious should be the default value. I don't see a case where it would be set to `false` with a wrapper tag, but the test suite isn't developed enough to make the change with peace of mind (i.e. remove the parameter `DocBookWrapperMergeWithPrevious` and consider it is always `true` in the code).
For the record, the current code also works with two subsequent theorems with two paragraphs each (see new test case).
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.
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).
DocBook comes in another commit, as the modifications are not required to keep the code compilable.
A semicolon is no more used between an index term and the places it appears, because some languages need a space before it and others not: this wasn't handled at all. With a dash, this problem disappears.
With an updated TeX Live 2022, LuaTeX no longer gives a missing
symbol for this test file (manual inspection confirms the symbols
are correctly displayed).
This is important for commands like !`, that are equivalent to \textexclamdown. However, ! is matched earlier, because the logic works with prefixes, hence the output doesn't make sense.
Use cases from #12352. The files correspond to
mwe-remove-bottom.23.lyx and mwe-remove-top.23.lyx. The only
differences are that I changed to FreeSans and FreeSerif for the
fonts.
Start a new directory of cprotect tests. There are many situations
where cprotect is needed so we can add files covering various
situations as we find them.
This particular test covers the case of special characters in URL
insets in footnotes.
Noto Sans Tibetan was not actually a sans font. On newer systems the
font is now Noto Serif Tibetan.
See, e.g., the package 'fonts-noto-core' in Ubuntu 21.04.
This change also fixes compilation of
supported-languages_polyglossia-XeTeX.lyx on Ubuntu 21.10.