Commit Graph

45199 Commits

Author SHA1 Message Date
Thibaut Cuvelier
26e6b1c209 LyXHTML and DocBook: encode language codes as BCP47. 2023-01-07 03:31:40 +01:00
Thibaut Cuvelier
96023697f5 Amend 16a1aa99
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).
2023-01-07 03:06:44 +01:00
Thibaut Cuvelier
3cf8ced72e Make formatting of DocBook changes more similar to surrounding code.
Spaces between if and condition.
2023-01-07 02:56:40 +01:00
Scott Kostyshak
ec02df2bb9 ctests: uninvert a lyx2lyx test thanks to fix
Thanks to the fix at d89a4848, the roundtrip now converges.

This reverts commit 83c72a3ece.
2023-01-06 14:06:06 -05:00
Jean-Marc Lasgouttes
9dd716da3a Row breaking: keep unused tail for later (instead of assertion)
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.
2023-01-06 16:02:29 +01:00
Jean-Marc Lasgouttes
cb3de88cc4 Fixup dcef1a9c: better handling of front-of-string splitting
When splitting a string leads to a break before the first character, the
best is to declare that splitting failed.

Fixes bug #12617.
2023-01-06 15:56:54 +01:00
Juergen Spitzmueller
d89a48483e Add missing revert routine to lyx_2_0.py 2023-01-06 14:40:25 +01:00
Scott Kostyshak
bee08b19ee Typo in a comment 2023-01-05 23:33:16 -05:00
Stephan Witt
bbc2270972 #12523 check for existence of usable Python interpreter
- 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
2023-01-06 00:32:09 +01:00
Scott Kostyshak
83c72a3ece ctests: invert a bug from old routine
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.
2023-01-05 12:55:54 -05:00
Kornel Benko
0f7f61b29e Fix "origin" in KOMA-Script_Book.lyx 2023-01-05 16:24:00 +01:00
Jean-Marc Lasgouttes
7c5bad56c4 Add information to Row::operator<< 2023-01-05 11:56:56 +01:00
Richard Kimberly Heck
30189332c8 Fix minor bug mentioned in #10827 2023-01-04 23:23:30 -05:00
Richard Kimberly Heck
04025d0259 Fix compilation problem 2023-01-04 23:04:02 -05:00
Scott Kostyshak
cb27aaa826 Additional.lyx: address scrbook error re old font
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.
2023-01-04 22:36:23 -05:00
Scott Kostyshak
6e45bf2da7 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.
2023-01-04 22:20:59 -05:00
Scott Kostyshak
0677c161a1 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).
2023-01-04 22:11:18 -05:00
Scott Kostyshak
3c8a5d4dad Additional.lyx: rm English variant switches
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.
2023-01-04 22:10:05 -05:00
Pavel Sanda
3e97b90b40 Add note about deprecated layouts. 2023-01-04 22:13:38 +01:00
Pavel Sanda
d1080b0352 * Additional.lyx : Final remarks from John Hudson 2023-01-04 21:59:39 +01:00
John R Hudson
b2c2a7aaa3 Update entries for Foils, Slides and Reports in Chapter 3 Document classes and do final tidying up of Additional.lyx 2023-01-03 19:18:33 +01:00
Richard Kimberly Heck
1567a7e3b8 Ignore python cache 2023-01-03 12:49:28 -05:00
John R Hudson
ead6a5beb9 Insert entries for Tufte, frletter, G-Brief and lettre into Chapter 3 Document classes of Additional.lyx 2023-01-02 20:37:19 +01:00
Pavel Sanda
03b4502260 Forgotten files 2023-01-01 22:36:04 +01:00
John R Hudson
be362357ec Add KOMA-Script_Book.lyx and associated BibTeX file and CC logo to examples/Books and update Makefile.am 2023-01-01 22:29:14 +01:00
Thibaut Cuvelier
017588973f Revert "New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing list. Rebased on top of master."
This reverts commit 42c2a25fb8.
2022-12-31 11:28:56 +01:00
Thibaut Cuvelier
42c2a25fb8 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.
2022-12-31 01:56:51 +01:00
Stephan Witt
102a68dd6a Care for Qt5 LTS support for macos 2022-12-30 23:37:54 +01:00
John R Hudson
dce99c1398 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. 2022-12-30 23:32:30 +01:00
Stephan Witt
a10844a531 Care for weird Qt6 package install location of developer tools (moc, uic etc). 2022-12-30 12:08:55 +01:00
Stephan Witt
cc607af469 Make code sign operation the final step of package build. 2022-12-30 12:08:55 +01:00
John R Hudson
39d040b2a7 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. 2022-12-30 09:29:42 +01:00
Scott Kostyshak
09e25ca5b7 Fix compiler warning -Wstring-plus-int
Similar to d44eaa97.
2022-12-29 16:25:42 -05:00
John R Hudson
d63c9f8016 Insert entries for Hanging Paragraphs, Initials, Hyphenatable Text Markup and Logical Markup in Chapter 4 Modules of Additional.lyx 2022-12-29 15:12:50 +01:00
Juergen Spitzmueller
38c118b02d Fix output of tex2lyx messages in runtests.py 2022-12-29 15:10:05 +01:00
Juergen Spitzmueller
a5115d4e4a tex2lyx: Also factor out error and debug messages 2022-12-29 09:37:00 +01:00
Scott Kostyshak
d44eaa9713 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.
2022-12-28 21:58:30 -05:00
jpc
0faead1719 Solve shortcut conflicts in fr.po 2022-12-28 18:05:37 +01:00
John R Hudson
2d9ff0d718 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 2022-12-28 16:34:14 +01:00
Juergen Spitzmueller
9ecc30174a Factor out tex2lyx warnings and add -q option (#11328) 2022-12-28 16:29:38 +01:00
Juergen Spitzmueller
9047d60c5a tex2lyx: exit earlier if input file could not be found
In particular, do not write an empty .lyx file (#12339)
2022-12-28 14:05:23 +01:00
Juergen Spitzmueller
992e3aec88 Support suffix-less tex file input in tex2lyx (#12340) 2022-12-28 13:35:12 +01:00
Thibaut Cuvelier
7a67302c01 Amend febd1855eb: fix compilability 2022-12-28 12:57:45 +01:00
Juergen Spitzmueller
abe7adc8af Update tex2lyx tests again 2022-12-28 12:32:39 +01:00
Juergen Spitzmueller
b3a1caa9b9 Update tex2lyx tests after 7868929aac 2022-12-28 12:32:39 +01:00
Juergen Spitzmueller
32b5d253d1 tex2lyx: consider utf8 default encoding in newer LaTeX 2022-12-28 12:32:39 +01:00
John R Hudson
9df0e943db Insert entries for the sixteen Maths modules into Chapter 4 Modules of Additional.lyx 2022-12-28 12:23:13 +01:00
Juergen Spitzmueller
2dafc6af0d Fix indentation 2022-12-28 10:58:36 +01:00
Juergen Spitzmueller
7868929aac tex2lyx: put adjacent comment lines in one ERT inset (#4797) 2022-12-28 09:40:22 +01:00
Thibaut Cuvelier
8b5bfa971b Amend febd1855eb: fix compilability of tex2lyx 2022-12-28 02:33:11 +01:00