-
Notifications
You must be signed in to change notification settings - Fork 0
/
lyx-theorems.patch
7246 lines (7175 loc) · 191 KB
/
lyx-theorems.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 4a6333ca5fbc37e25da383cf4fb2b25ba0c7759e Mon Sep 17 00:00:00 2001
From: Udi Fogiel <[email protected]>
Date: Wed, 21 Sep 2022 07:19:54 +0000
Subject: [PATCH] On branch master Your branch is up to date with
'origin/master'. Changes to be committed: new file:
autotests/export/docbook/theorems-thmtools.lyx - a test file for docbook
export new file: autotests/export/docbook/theorems-thmtools.xml -
output of the docbook test file deleted:
lib/layouts/theorems-ams-bytype.inc modified:
lib/layouts/theorems-ams-bytype.module deleted:
lib/layouts/theorems-ams-chap-bytype.inc modified:
lib/layouts/theorems-ams-chap-bytype.module modified:
lib/layouts/theorems-ams-extended-bytype.module modified:
lib/layouts/theorems-ams-extended-chap-bytype.module modified:
lib/layouts/theorems-ams-extended.module deleted:
lib/layouts/theorems-ams.inc modified: lib/layouts/theorems-ams.module
deleted: lib/layouts/theorems-bytype.inc modified:
lib/layouts/theorems-bytype.module modified:
lib/layouts/theorems-chap-bytype.module modified:
lib/layouts/theorems-chap.module new file:
lib/layouts/theorems-extended.inc new file:
lib/layouts/theorems-labels.inc modified:
lib/layouts/theorems-named.module deleted:
lib/layouts/theorems-order.inc modified:
lib/layouts/theorems-proof-std.inc modified:
lib/layouts/theorems-proof.inc modified:
lib/layouts/theorems-sec-bytype.module modified:
lib/layouts/theorems-sec.module deleted:
lib/layouts/theorems-starred-equivalents.inc deleted:
lib/layouts/theorems-starred.inc deleted:
lib/layouts/theorems-starred.module modified:
lib/layouts/theorems-std.module new file:
lib/layouts/theorems-thmtools.module modified: lib/layouts/theorems.inc
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.
---
.../export/docbook/theorems-thmtools.lyx | 624 ++
.../export/docbook/theorems-thmtools.xml | 64 +
lib/layouts/theorems-ams-bytype.inc | 341 -
lib/layouts/theorems-ams-bytype.module | 25 +-
lib/layouts/theorems-ams-chap-bytype.inc | 436 -
lib/layouts/theorems-ams-chap-bytype.module | 28 +-
.../theorems-ams-extended-bytype.module | 452 +-
.../theorems-ams-extended-chap-bytype.module | 498 +-
lib/layouts/theorems-ams-extended.module | 445 +-
lib/layouts/theorems-ams.inc | 329 -
lib/layouts/theorems-ams.module | 17 +-
lib/layouts/theorems-bytype.inc | 336 -
lib/layouts/theorems-bytype.module | 67 +-
lib/layouts/theorems-chap-bytype.module | 193 +-
lib/layouts/theorems-chap.module | 50 +-
lib/layouts/theorems-extended.inc | 422 +
lib/layouts/theorems-labels.inc | 136 +
lib/layouts/theorems-named.module | 71 +-
lib/layouts/theorems-order.inc | 83 -
lib/layouts/theorems-proof-std.inc | 68 +-
lib/layouts/theorems-proof.inc | 1 +
lib/layouts/theorems-sec-bytype.module | 145 +-
lib/layouts/theorems-sec.module | 49 +-
lib/layouts/theorems-starred-equivalents.inc | 88 -
lib/layouts/theorems-starred.inc | 319 -
lib/layouts/theorems-starred.module | 16 -
lib/layouts/theorems-std.module | 47 +-
lib/layouts/theorems-thmtools.module | 783 ++
lib/layouts/theorems.inc | 399 +-
po/ar.gmo | Bin 436881 -> 432961 bytes
po/ar.po | 8044 ++++++++--------
po/bg.gmo | Bin 333401 -> 528805 bytes
po/bg.po | 5937 ++++++------
po/cs.gmo | Bin 497837 -> 493383 bytes
po/cs.po | 8107 ++++++++--------
po/de.gmo | Bin 629364 -> 628852 bytes
po/de.po | 834 +-
po/el.gmo | Bin 380254 -> 375183 bytes
po/el.po | 8055 ++++++++--------
po/en.po | 7691 ++++++++--------
po/es.gmo | Bin 443569 -> 439490 bytes
po/es.po | 8091 ++++++++--------
po/eu.gmo | Bin 498542 -> 494312 bytes
po/eu.po | 8081 ++++++++--------
po/fi.gmo | Bin 295544 -> 292412 bytes
po/fi.po | 8053 ++++++++--------
po/fr.gmo | Bin 632379 -> 631535 bytes
po/fr.po | 854 +-
po/he.gmo | Bin 238914 -> 236191 bytes
po/he.po | 8048 ++++++++--------
po/hu.gmo | Bin 300888 -> 296934 bytes
po/hu.po | 8079 ++++++++--------
po/ia.gmo | Bin 574277 -> 569397 bytes
po/ia.po | 8087 ++++++++--------
po/id.gmo | Bin 582787 -> 577842 bytes
po/id.po | 8096 ++++++++--------
po/it.po | 1309 +--
po/ja.gmo | Bin 520662 -> 516249 bytes
po/ja.po | 8079 ++++++++--------
po/nb.gmo | Bin 408114 -> 404195 bytes
po/nb.po | 8089 ++++++++--------
po/nl.gmo | Bin 557043 -> 552643 bytes
po/nl.po | 8089 ++++++++--------
po/nn.gmo | Bin 324238 -> 320498 bytes
po/nn.po | 8095 ++++++++--------
po/pl.gmo | Bin 322263 -> 318223 bytes
po/pl.po | 8087 ++++++++--------
po/pt_BR.gmo | Bin 502603 -> 606757 bytes
po/pt_BR.po | 8105 ++++++++--------
po/pt_PT.gmo | Bin 397576 -> 393482 bytes
po/pt_PT.po | 8096 ++++++++--------
po/ru.gmo | Bin 753296 -> 746700 bytes
po/ru.po | 8090 ++++++++--------
po/sk.gmo | Bin 602257 -> 613598 bytes
po/sk.po | 7256 +++++++--------
po/sv.gmo | Bin 484553 -> 480359 bytes
po/sv.po | 8086 ++++++++--------
po/tr.gmo | Bin 206743 -> 203438 bytes
po/tr.po | 8067 ++++++++--------
po/uk.gmo | Bin 631065 -> 625604 bytes
po/uk.po | 8109 +++++++++--------
po/zh_CN.gmo | Bin 462377 -> 458524 bytes
po/zh_CN.po | 8076 ++++++++--------
po/zh_TW.gmo | Bin 378445 -> 374682 bytes
po/zh_TW.po | 8080 ++++++++--------
85 files changed, 114987 insertions(+), 101315 deletions(-)
create mode 100644 autotests/export/docbook/theorems-thmtools.lyx
create mode 100644 autotests/export/docbook/theorems-thmtools.xml
delete mode 100644 lib/layouts/theorems-ams-bytype.inc
delete mode 100644 lib/layouts/theorems-ams-chap-bytype.inc
delete mode 100644 lib/layouts/theorems-ams.inc
delete mode 100644 lib/layouts/theorems-bytype.inc
create mode 100644 lib/layouts/theorems-extended.inc
create mode 100644 lib/layouts/theorems-labels.inc
delete mode 100644 lib/layouts/theorems-order.inc
delete mode 100644 lib/layouts/theorems-starred-equivalents.inc
delete mode 100644 lib/layouts/theorems-starred.inc
delete mode 100644 lib/layouts/theorems-starred.module
create mode 100644 lib/layouts/theorems-thmtools.module
diff --git a/autotests/export/docbook/theorems-thmtools.lyx b/autotests/export/docbook/theorems-thmtools.lyx
new file mode 100644
index 0000000000..083ecd2a89
--- /dev/null
+++ b/autotests/export/docbook/theorems-thmtools.lyx
@@ -0,0 +1,624 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 609
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\begin_preamble
+% Added by lyx2lyx
+\setlength{\parskip}{\smallskipamount}
+\setlength{\parindent}{0pt}
+\end_preamble
+\use_default_options true
+\begin_modules
+theorems-thmtools
+\end_modules
+\maintain_unincluded_children no
+\language english
+\language_package default
+\inputencoding auto-legacy
+\fontencoding auto
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_roman_osf false
+\font_sans_osf false
+\font_typewriter_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format default
+\output_sync 1
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\spacing single
+\use_hyperref true
+\pdf_title "Thmtools Module"
+\pdf_author "Udi Fogiel"
+\pdf_subject "test file for the thmtools module "
+\pdf_keywords "thmtools, module, test"
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder true
+\pdf_colorlinks true
+\pdf_backref false
+\pdf_pdfusetitle true
+\pdf_quoted_options "linkcolor=blue"
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date true
+\justification true
+\use_refstyle 1
+\use_minted 0
+\use_lineno 0
+\branch blind
+\selected 1
+\filename_suffix 0
+\color background background
+\end_branch
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tablestyle default
+\bullet 0 0 2 -1
+\tracking_changes false
+\output_changes false
+\change_bars false
+\postpone_fragile_content false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\docbook_table_output 0
+\docbook_mathml_prefix 1
+\end_header
+
+\begin_body
+
+\begin_layout Claim
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Claim*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Conjecture
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Conjecture*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Corollary
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Corollary*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Definition
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Definition*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Example
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Example*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Exercise
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Exercise*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Fact
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Fact*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Lemma
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Lemma*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Problem
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Problem*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Proposition
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Proposition*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Remark
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Theorem
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Theorem*
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+Dummy Note
+\end_layout
+
+\end_inset
+
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Case
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Proof
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Separator plain
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Flex List of Theorems
+status open
+
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/autotests/export/docbook/theorems-thmtools.xml b/autotests/export/docbook/theorems-thmtools.xml
new file mode 100644
index 0000000000..ef0e8fc1be
--- /dev/null
+++ b/autotests/export/docbook/theorems-thmtools.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This DocBook file was created by LyX 2.4.0dev
+ See https://www.lyx.org/ for more information -->
+<article xml:lang="en_US" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude" version="5.2">
+<title>Untitled Document</title>
+<note role='claim'>
+Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+</note>
+<note role='claim'>
+Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.
+</note>
+<para role='conjecture'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='conjecture'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='corollary'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='corollary'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='definition'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='definition'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<informalexample>
+<para>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+</informalexample>
+<informalexample>
+<para>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+</informalexample>
+<para role='exercise'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='exercise'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='fact'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='fact'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='lemma'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='lemma'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='problem'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='problem'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='proposition'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='proposition'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<note role='theorem'>
+<para>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+</note>
+<para role='theorem'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='theorem'>Dummy Note
+Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='cases'>Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+<para role='proof'>Dummy Text, Dummy Text, Dummy Text, Dummy Text.</para>
+</article>
\ No newline at end of file
diff --git a/lib/layouts/theorems-ams-bytype.inc b/lib/layouts/theorems-ams-bytype.inc
deleted file mode 100644
index 90e997fc03..0000000000
--- a/lib/layouts/theorems-ams-bytype.inc
+++ /dev/null
@@ -1,341 +0,0 @@
-# Original Author : David L. Johnson <[email protected]>
-# Probably broken by Jean-Marc Lasgouttes <[email protected]>
-# modified and modularized by Emmanuel GUREGHIAN <[email protected]>
-# Tinkered with Sep. '07 by Paul Rubin <[email protected]>
-# Modularized Jan 08 by Richard Kimberly Heck <[email protected]>
-# Hacked June '09 by Paul Rubin <[email protected]> to use separate counters
-
-# The environments defined are :
-# - Theorem
-# - Corollary
-# - Lemma
-# - Proposition
-# - Conjecture
-# - Fact
-# - Definition
-# - Example
-# - Problem
-# - Exercise
-# - Solution
-# - Remark
-# - Claim
-# - Case (by inclusion)
-
-Format 95
-
-Input theorems-counters-bytype.inc
-
-OutlinerName thm "Definitions & Theorems"
-
-Style Theorem
- Category Reasoning
- Margin First_Dynamic
- LatexType Environment
- LatexName thm
- NextNoIndent 1
- ResetArgs 1
- AddToToc thm
- IsTocCaption 1
- Argument 1
- LabelString "Additional Theorem Text"
- Tooltip "Additional text appended to the theorem header"
- IsTocCaption 1
- EndArgument
- LabelSep xx
- ParIndent MMM
- ParSkip 0.4
- ItemSep 0.2
- TopSep 0.7
- BottomSep 0.7
- ParSep 0.3
- Align Block
- AlignPossible Left
- LabelType Static
- LabelCounter theorem
- LabelString "Theorem \thetheorem."
- Font
- Shape Italic
- Size Normal
- EndFont
- LabelFont
- Shape Up
- Series Bold
- EndFont
- Preamble
- \theoremstyle{plain}
- \newtheorem{thm}{\protect\theoremname}
- EndPreamble
- LangPreamble
- \providecommand{\theoremname}{_(Theorem)}
- EndLangPreamble
- BabelPreamble
- \addto\captions$$lang{\renewcommand{\theoremname}{_(Theorem)}}
- EndBabelPreamble
- Requires amsthm
- DocBookTag para
- DocBookAttr role='theorem'
-End
-
-
-Style Corollary
- CopyStyle Theorem
- LatexName cor
- LabelString "Corollary \thecorollary."
- Preamble
- \theoremstyle{plain}
- \newtheorem{cor}{\protect\corollaryname}
- EndPreamble
- LabelCounter corollary
- LangPreamble
- \providecommand{\corollaryname}{_(Corollary)}
- EndLangPreamble
- BabelPreamble
- \addto\captions$$lang{\renewcommand{\corollaryname}{_(Corollary)}}
- EndBabelPreamble
- DocBookTag para
- DocBookAttr role='corollary'
-End
-
-
-Style Lemma
- CopyStyle Theorem
- LatexName lem
- LabelString "Lemma \thelemma."
- Preamble
- \theoremstyle{plain}
- \newtheorem{lem}{\protect\lemmaname}
- EndPreamble
- LangPreamble
- \providecommand{\lemmaname}{_(Lemma)}
- EndLangPreamble
- BabelPreamble
- \addto\captions$$lang{\renewcommand{\lemmaname}{_(Lemma)}}
- EndBabelPreamble
- LabelCounter lemma
- DocBookTag para
- DocBookAttr role='lemma'
-End
-
-
-Style Proposition
- CopyStyle Theorem
- LatexName prop
- LabelString "Proposition \theproposition."
- Preamble
- \theoremstyle{plain}
- \newtheorem{prop}{\protect\propositionname}
- EndPreamble
- LangPreamble
- \providecommand{\propositionname}{_(Proposition)}
- EndLangPreamble
- BabelPreamble
- \addto\captions$$lang{\renewcommand{\propositionname}{_(Proposition)}}
- EndBabelPreamble
- LabelCounter proposition
- DocBookTag para
- DocBookAttr role='proposition'
-End
-
-
-Style Conjecture
- CopyStyle Theorem