summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/create-theorem
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/create-theorem')
-rw-r--r--macros/latex/contrib/create-theorem/code/create-theorem-preset-names-plural.tex1487
-rw-r--r--macros/latex/contrib/create-theorem/code/create-theorem-preset-names.tex (renamed from macros/latex/contrib/create-theorem/create-theorem.sty)1298
-rw-r--r--macros/latex/contrib/create-theorem/code/create-theorem.sty1182
-rw-r--r--macros/latex/contrib/create-theorem/doc/create-theorem-doc.pdf (renamed from macros/latex/contrib/create-theorem/create-theorem-doc.pdf)bin88400 -> 88437 bytes
-rw-r--r--macros/latex/contrib/create-theorem/doc/create-theorem-doc.tex (renamed from macros/latex/contrib/create-theorem/create-theorem-doc.tex)4
5 files changed, 2783 insertions, 1188 deletions
diff --git a/macros/latex/contrib/create-theorem/code/create-theorem-preset-names-plural.tex b/macros/latex/contrib/create-theorem/code/create-theorem-preset-names-plural.tex
new file mode 100644
index 0000000000..572ab51311
--- /dev/null
+++ b/macros/latex/contrib/create-theorem/code/create-theorem-preset-names-plural.tex
@@ -0,0 +1,1487 @@
+%=============================
+% --- Preset Names ---
+%=============================
+
+\NameTheorem { applications }
+ {
+ , heading = {
+ , english = Applications
+ , french = Applications
+ , ngerman = Anwendungen
+ , italian = Applicazioni
+ , portuguese = Aplicações
+ , brazilian = Aplicações
+ , spanish = Aplicaciones
+ , schinese = 应用
+ , tchinese = 應用
+ , japanese = 応用
+ , russian = Приложения
+ }
+ , crefname = {
+ , english = {applications}{applications}
+ , french = [les]{applications}[les]{applications}
+ , ngerman = { {Anwendungen}{Anwendungen}
+ , Nominativ = [die]{Anwendungen}[die]{Anwendungen}
+ , Genitiv = [der]{Anwendungen}[der]{Anwendungen}
+ , Dativ = [den]{Anwendungen}[den]{Anwendungen}
+ , Akkusativ = [die]{Anwendungen}[die]{Anwendungen}
+ }
+ , italian = [le]{applicazioni}[le]{applicazioni}
+ , portuguese = [as]{aplicações}[as]{aplicações}
+ , brazilian = [as]{aplicações}[as]{aplicações}
+ , spanish = [las]{aplicaciones}[las]{aplicaciones}
+ , schinese = {应用}{应用}
+ , tchinese = {應用}{應用}
+ , japanese = {応用}{応用}
+ , russian = {приложения}{приложения}
+ }
+ , Crefname = {
+ , english = {Applications}{Applications}
+ , french = [Les]{applications}[Les]{applications}
+ , ngerman = { {Anwendungen}{Anwendungen}
+ , Nominativ = [Die]{Anwendungen}[Die]{Anwendungen}
+ , Genitiv = [Der]{Anwendungen}[Der]{Anwendungen}
+ , Dativ = [Den]{Anwendungen}[Den]{Anwendungen}
+ , Akkusativ = [Die]{Anwendungen}[Die]{Anwendungen}
+ }
+ , italian = [Le]{applicazioni}[Le]{applicazioni}
+ , portuguese = [As]{aplicações}[As]{aplicações}
+ , brazilian = [As]{aplicações}[As]{aplicações}
+ , spanish = [Las]{aplicaciones}[Las]{aplicaciones}
+ , schinese = {应用}{应用}
+ , tchinese = {應用}{應用}
+ , japanese = {応用}{応用}
+ , russian = {Приложения}{Приложения}
+ }
+ }
+
+\NameTheorem { assertions }
+ {
+ , heading = {
+ , english = Assertions
+ , french = Assertions
+ , ngerman = Assertionen
+ , italian = Asserzioni
+ , portuguese = Asserções
+ , brazilian = Asserções
+ , spanish = Aserciones
+ , schinese = 断言
+ , tchinese = 斷言
+ , japanese = 断言
+ , russian = Утверждения
+ }
+ , crefname = {
+ , english = {assertions}{assertions}
+ , french = [les]{assertions}[les]{assertions}
+ , ngerman = { {Assertionen}{Assertionen}
+ , Nominativ = [die]{Assertionen}[die]{Assertionen}
+ , Genitiv = [der]{Assertionen}[der]{Assertionen}
+ , Dativ = [den]{Assertionen}[den]{Assertionen}
+ , Akkusativ = [die]{Assertionen}[die]{Assertionen}
+ }
+ , italian = [le]{asserzioni}[le]{asserzioni}
+ , portuguese = [as]{asserções}[as]{asserções}
+ , brazilian = [as]{asserções}[as]{asserções}
+ , spanish = [las]{aserciones}[las]{aserciones}
+ , schinese = {断言}{断言}
+ , tchinese = {斷言}{斷言}
+ , japanese = {断言}{断言}
+ , russian = {утверждения}{утверждения}
+ }
+ , Crefname = {
+ , english = {Assertions}{Assertions}
+ , french = [Les]{assertions}[Les]{assertions}
+ , ngerman = { {Assertionen}{Assertionen}
+ , Nominativ = [Die]{Assertionen}[Die]{Assertionen}
+ , Genitiv = [Der]{Assertionen}[Der]{Assertionen}
+ , Dativ = [Den]{Assertionen}[Den]{Assertionen}
+ , Akkusativ = [Die]{Assertionen}[Die]{Assertionen}
+ }
+ , italian = [Le]{asserzioni}[Le]{asserzioni}
+ , portuguese = [As]{asserções}[As]{asserções}
+ , brazilian = [As]{asserções}[As]{asserções}
+ , spanish = [Las]{aserciones}[Las]{aserciones}
+ , schinese = {断言}{断言}
+ , tchinese = {斷言}{斷言}
+ , japanese = {断言}{断言}
+ , russian = {Утверждения}{Утверждения}
+ }
+ }
+
+\NameTheorem { assumptions }
+ {
+ , heading = {
+ , english = Assumptions
+ , french = Suppositions
+ , ngerman = Annahmen
+ , italian = Supposizioni
+ , portuguese = Suposições
+ , brazilian = Suposições
+ , spanish = Suposiciones
+ , schinese = 假定
+ , tchinese = 假定
+ , japanese = 仮定
+ , russian = Предположения
+ }
+ , crefname = {
+ , english = {assumptions}{assumptions}
+ , french = [les]{suppositions}[les]{suppositions}
+ , ngerman = { {Annahmen}{Annahmen}
+ , Nominativ = [die]{Annahmen}[die]{Annahmen}
+ , Genitiv = [der]{Annahmen}[der]{Annahmen}
+ , Dativ = [den]{Annahmen}[den]{Annahmen}
+ , Akkusativ = [die]{Annahmen}[die]{Annahmen}
+ }
+ , italian = [le]{supposizioni}[le]{supposizioni}
+ , portuguese = [as]{suposições}[as]{suposições}
+ , brazilian = [as]{suposições}[as]{suposições}
+ , spanish = [las]{suposiciones}[las]{suposiciones}
+ , schinese = {假定}{假定}
+ , tchinese = {假定}{假定}
+ , japanese = {仮定}{仮定}
+ , russian = {предположения}{предположения}
+ }
+ , Crefname = {
+ , english = {Assumptions}{Assumptions}
+ , french = [Les]{suppositions}[Les]{suppositions}
+ , ngerman = { {Annahmen}{Annahmen}
+ , Nominativ = [Die]{Annahmen}[Die]{Annahmen}
+ , Genitiv = [Der]{Annahmen}[Der]{Annahmen}
+ , Dativ = [Den]{Annahmen}[Den]{Annahmen}
+ , Akkusativ = [Die]{Annahmen}[Die]{Annahmen}
+ }
+ , italian = [le]{supposizioni}[le]{supposizioni}
+ , portuguese = [As]{suposições}[As]{suposições}
+ , brazilian = [As]{suposições}[As]{suposições}
+ , spanish = [Las]{suposiciones}[Las]{suposiciones}
+ , schinese = {假定}{假定}
+ , tchinese = {假定}{假定}
+ , japanese = {仮定}{仮定}
+ , russian = {Предположения}{Предположения}
+ }
+ }
+
+\NameTheorem { axioms }
+ {
+ , heading = {
+ , english = Axioms
+ , french = Axiomes
+ , ngerman = Axiome
+ , italian = Assiomi
+ , portuguese = Axiomas
+ , brazilian = Axiomas
+ , spanish = Axiomas
+ , schinese = 公理
+ , tchinese = 公理
+ , japanese = 公理
+ , russian = Аксиомы
+ }
+ , crefname = {
+ , english = {axioms}{axioms}
+ , french = [les]{axiomes}[les]{axiomes}
+ , ngerman = { {Axiome}{Axiome}
+ , Nominativ = [die]{Axiome}[die]{Axiome}
+ , Genitiv = [der]{Axiome}[der]{Axiome}
+ , Dativ = [den]{Axiomen}[den]{Axiomen}
+ , Akkusativ = [die]{Axiome}[die]{Axiome}
+ }
+ , italian = [gli]{assiomi}[gli]{assiomi}
+ , portuguese = [os]{axiomas}[os]{axiomas}
+ , brazilian = [os]{axiomas}[os]{axiomas}
+ , spanish = [los]{axiomas}[los]{axiomas}
+ , schinese = {公理}{公理}
+ , tchinese = {公理}{公理}
+ , japanese = {公理}{公理}
+ , russian = {аксиомы}{аксиомы}
+ }
+ , Crefname = {
+ , english = {Axioms}{Axioms}
+ , french = [Les]{axiomes}[Les]{axiomes}
+ , ngerman = { {Axiome}{Axiome}
+ , Nominativ = [Die]{Axiome}[Die]{Axiome}
+ , Genitiv = [Der]{Axiome}[Der]{Axiome}
+ , Dativ = [Den]{Axiomen}[Den]{Axiomen}
+ , Akkusativ = [Die]{Axiome}[Die]{Axiome}
+ }
+ , italian = [Gli]{assiomi}[Gli]{assiomi}
+ , portuguese = [Os]{axiomas}[Os]{axiomas}
+ , brazilian = [Os]{axiomas}[Os]{axiomas}
+ , spanish = [Los]{axiomas}[Los]{axiomas}
+ , schinese = {公理}{公理}
+ , tchinese = {公理}{公理}
+ , japanese = {公理}{公理}
+ , russian = {Аксиомы}{Аксиомы}
+ }
+ }
+
+\NameTheorem { claims }
+ {
+ , heading = {
+ , english = Claims
+ , french = Affirmations
+ , ngerman = Behauptungen
+ , italian = Affermazioni
+ , portuguese = Afirmações
+ , brazilian = Afirmações
+ , spanish = Afirmaciones
+ , schinese = 断言
+ , tchinese = 斷言
+ , japanese = 断言
+ , russian = Утверждения
+ }
+ , crefname = {
+ , english = {claims}{claims}
+ , french = [les]{affirmations}[les]{affirmations}
+ , ngerman = { {Behauptungen}{Behauptungen}
+ , Nominativ = [die]{Behauptungen}[die]{Behauptungen}
+ , Genitiv = [der]{Behauptungen}[der]{Behauptungen}
+ , Dativ = [den]{Behauptungen}[den]{Behauptungen}
+ , Akkusativ = [die]{Behauptungen}[die]{Behauptungen}
+ }
+ , italian = [le]{affermazioni}[le]{affermazioni}
+ , portuguese = [as]{afirmações}[as]{afirmações}
+ , brazilian = [as]{afirmações}[as]{afirmações}
+ , spanish = [las]{afirmaciones}[las]{afirmaciones}
+ , schinese = {断言}{断言}
+ , tchinese = {斷言}{斷言}
+ , japanese = {断言}{断言}
+ , russian = {утверждения}{утверждения}
+ }
+ , Crefname = {
+ , english = {Claims}{Claims}
+ , french = [Les]{affirmations}[Les]{affirmations}
+ , ngerman = { {Behauptungen}{Behauptungen}
+ , Nominativ = [Die]{Behauptungen}[Die]{Behauptungen}
+ , Genitiv = [Der]{Behauptungen}[Der]{Behauptungen}
+ , Dativ = [Den]{Behauptungen}[Den]{Behauptungen}
+ , Akkusativ = [Die]{Behauptungen}[Die]{Behauptungen}
+ }
+ , italian = [Le]{affermazioni}[Le]{affermazioni}
+ , portuguese = [As]{afirmações}[As]{afirmações}
+ , brazilian = [As]{afirmações}[As]{afirmações}
+ , spanish = [Las]{afirmaciones}[Las]{afirmaciones}
+ , schinese = {断言}{断言}
+ , tchinese = {斷言}{斷言}
+ , japanese = {断言}{断言}
+ , russian = {Утверждения}{Утверждения}
+ }
+ }
+
+\NameTheorem { commentaries }
+ {
+ , heading = {
+ , english = Commentaries
+ , french = Commentaires
+ , ngerman = Kommentare
+ , italian = Commenti
+ , portuguese = Comentários
+ , brazilian = Comentários
+ , spanish = Comentarios
+ , schinese = 解说
+ , tchinese = 解說
+ , japanese = 解説
+ , russian = Комментарии
+ }
+ , crefname = {
+ , english = {commentaries}{commentaries}
+ , french = [les]{commentaires}[les]{commentaires}
+ , ngerman = { {Kommentare}{Kommentare}
+ , Nominativ = [die]{Kommentare}[die]{Kommentare}
+ , Genitiv = [der]{Kommentare}[der]{Kommentare}
+ , Dativ = [den]{Kommentaren}[den]{Kommentaren}
+ , Akkusativ = [die]{Kommentare}[die]{Kommentare}
+ }
+ , italian = [i]{commenti}[i]{commenti}
+ , portuguese = [os]{comentários}[os]{comentários}
+ , brazilian = [os]{comentários}[os]{comentários}
+ , spanish = [los]{comentarios}[los]{comentarios}
+ , schinese = {解说}{解说}
+ , tchinese = {解說}{解說}
+ , japanese = {解説}{解説}
+ , russian = {комментарии}{комментарии}
+ }
+ , Crefname = {
+ , english = {Commentaries}{Commentaries}
+ , french = [Les]{commentaires}[Les]{commentaires}
+ , ngerman = { {Kommentare}{Kommentare}
+ , Nominativ = [Die]{Kommentare}[Die]{Kommentare}
+ , Genitiv = [Der]{Kommentare}[Der]{Kommentare}
+ , Dativ = [Den]{Kommentaren}[Den]{Kommentaren}
+ , Akkusativ = [Die]{Kommentare}[Die]{Kommentare}
+ }
+ , italian = [I]{commenti}[I]{commenti}
+ , portuguese = [Os]{comentários}[Os]{comentários}
+ , brazilian = [Os]{comentários}[Os]{comentários}
+ , spanish = [Los]{comentarios}[Los]{comentarios}
+ , schinese = {解说}{解说}
+ , tchinese = {解說}{解說}
+ , japanese = {解説}{解説}
+ , russian = {Комментарии}{Комментарии}
+ }
+ }
+
+\NameTheorem { conclusions }
+ {
+ , heading = {
+ , english = Conclusions
+ , french = Conclusions
+ , ngerman = Schlussfolgerungen
+ , italian = Conclusioni
+ , portuguese = Conclusões
+ , brazilian = Conclusões
+ , spanish = Conclusiones
+ , schinese = 结论
+ , tchinese = 結論
+ , japanese = 結論
+ , russian = Выводы
+ }
+ , crefname = {
+ , english = {conclusions}{conclusions}
+ , french = [Les]{conclusions}[Les]{conclusions}
+ , ngerman = { {Schlussfolgerungen}{Schlussfolgerungen}
+ , Nominativ = [die]{Schlussfolgerungen}[die]{Schlussfolgerungen}
+ , Genitiv = [der]{Schlussfolgerungen}[der]{Schlussfolgerungen}
+ , Dativ = [den]{Schlussfolgerungen}[den]{Schlussfolgerungen}
+ , Akkusativ = [die]{Schlussfolgerungen}[die]{Schlussfolgerungen}
+ }
+ , italian = [le]{conclusioni}[le]{conclusioni}
+ , portuguese = [as]{conclusões}[as]{conclusões}
+ , brazilian = [as]{conclusões}[as]{conclusões}
+ , spanish = [las]{conclusiones}[las]{conclusiones}
+ , schinese = {结论}{结论}
+ , tchinese = {結論}{結論}
+ , japanese = {結論}{結論}
+ , russian = {выводы}{выводы}
+ }
+ , Crefname = {
+ , english = {Conclusions}{Conclusions}
+ , french = [Les]{conclusions}[Les]{conclusions}
+ , ngerman = { {Schlussfolgerungen}{Schlussfolgerungen}
+ , Nominativ = [Die]{Schlussfolgerungen}[Die]{Schlussfolgerungen}
+ , Genitiv = [Der]{Schlussfolgerungen}[Der]{Schlussfolgerungen}
+ , Dativ = [Den]{Schlussfolgerungen}[Den]{Schlussfolgerungen}
+ , Akkusativ = [Die]{Schlussfolgerungen}[Die]{Schlussfolgerungen}
+ }
+ , italian = [Le]{conclusioni}[Le]{conclusioni}
+ , portuguese = [As]{conclusões}[As]{conclusões}
+ , brazilian = [As]{conclusões}[As]{conclusões}
+ , spanish = [Las]{conclusiones}[Las]{conclusiones}
+ , schinese = {结论}{结论}
+ , tchinese = {結論}{結論}
+ , japanese = {結論}{結論}
+ , russian = {Выводы}{Выводы}
+ }
+ }
+
+\NameTheorem { conjectures }
+ {
+ , heading = {
+ , english = Conjectures
+ , french = Conjectures
+ , ngerman = Vermutungen
+ , italian = Congetture
+ , portuguese = Conjeturas
+ , brazilian = Conjecturas
+ , spanish = Conjeturas
+ , schinese = 猜想
+ , tchinese = 猜想
+ , japanese = 予想
+ , russian = Гипотезы
+ }
+ , crefname = {
+ , english = {conjectures}{conjectures}
+ , french = [les]{conjectures}[les]{conjectures}
+ , ngerman = { {Vermutungen}{Vermutungen}
+ , Nominativ = [die]{Vermutungen}[die]{Vermutungen}
+ , Genitiv = [der]{Vermutungen}[der]{Vermutungen}
+ , Dativ = [den]{Vermutungen}[den]{Vermutungen}
+ , Akkusativ = [die]{Vermutungen}[die]{Vermutungen}
+ }
+ , italian = [le]{congetture}[le]{congetture}
+ , portuguese = [as]{conjeturas}[as]{conjeturas}
+ , brazilian = [as]{conjecturas}[as]{conjecturas}
+ , spanish = [las]{conjeturas}[las]{conjeturas}
+ , schinese = {猜想}{猜想}
+ , tchinese = {猜想}{猜想}
+ , japanese = {予想}{予想}
+ , russian = {гипотезы}{гипотезы}
+ }
+ , Crefname = {
+ , english = {Conjectures}{Conjectures}
+ , french = [Les]{conjectures}[Les]{conjectures}
+ , ngerman = { {Vermutungen}{Vermutungen}
+ , Nominativ = [Die]{Vermutungen}[Die]{Vermutungen}
+ , Genitiv = [Der]{Vermutungen}[Der]{Vermutungen}
+ , Dativ = [Den]{Vermutungen}[Den]{Vermutungen}
+ , Akkusativ = [Die]{Vermutungen}[Die]{Vermutungen}
+ }
+ , italian = [Le]{congetture}[Le]{congetture}
+ , portuguese = [As]{conjeturas}[As]{conjeturas}
+ , brazilian = [As]{conjecturas}[As]{conjecturas}
+ , spanish = [Las]{conjeturas}[Las]{conjeturas}
+ , schinese = {猜想}{猜想}
+ , tchinese = {猜想}{猜想}
+ , japanese = {予想}{予想}
+ , russian = {Гипотезы}{Гипотезы}
+ }
+ }
+
+\NameTheorem { constructions }
+ {
+ , heading = {
+ , english = Constructions
+ , french = Constructions
+ , ngerman = Konstruktionen
+ , italian = Costruzioni
+ , portuguese = Construções
+ , brazilian = Construções
+ , spanish = Construcciones
+ , schinese = 构造
+ , tchinese = 構造
+ , japanese = 構造
+ , russian = Конструкции
+ }
+ , crefname = {
+ , english = {constructions}{constructions}
+ , french = [les]{constructions}[les]{constructions}
+ , ngerman = { {Konstruktionen}{Konstruktionen}
+ , Nominativ = [die]{Konstruktionen}[die]{Konstruktionen}
+ , Genitiv = [der]{Konstruktionen}[der]{Konstruktionen}
+ , Dativ = [den]{Konstruktionen}[den]{Konstruktionen}
+ , Akkusativ = [die]{Konstruktionen}[die]{Konstruktionen}
+ }
+ , italian = [le]{costruzioni}[le]{costruzioni}
+ , portuguese = [as]{construções}[as]{construções}
+ , brazilian = [as]{construções}[as]{construções}
+ , spanish = [las]{construcciones}[las]{construcciones}
+ , schinese = {构造}{构造}
+ , tchinese = {構造}{構造}
+ , japanese = {構造}{構造}
+ , russian = {конструкции}{конструкции}
+ }
+ , Crefname = {
+ , english = {Constructions}{Constructions}
+ , french = [Les]{constructions}[Les]{constructions}
+ , ngerman = { {Konstruktionen}{Konstruktionen}
+ , Nominativ = [Die]{Konstruktionen}[Die]{Konstruktionen}
+ , Genitiv = [Der]{Konstruktionen}[Der]{Konstruktionen}
+ , Dativ = [Den]{Konstruktionen}[Den]{Konstruktionen}
+ , Akkusativ = [Die]{Konstruktionen}[Die]{Konstruktionen}
+ }
+ , italian = [Le]{costruzioni}[Le]{costruzioni}
+ , portuguese = [As]{construções}[As]{construções}
+ , brazilian = [As]{construções}[As]{construções}
+ , spanish = [Las]{construcciones}[Las]{construcciones}
+ , schinese = {构造}{构造}
+ , tchinese = {構造}{構造}
+ , japanese = {構造}{構造}
+ , russian = {Конструкции}{Конструкции}
+ }
+ }
+
+\NameTheorem { conventions }
+ {
+ , heading = {
+ , english = Conventions
+ , french = Conventions
+ , ngerman = Konventionen
+ , italian = Convenzioni
+ , portuguese = Convenções
+ , brazilian = Convenções
+ , spanish = Convenciones
+ , schinese = 约定
+ , tchinese = 約定
+ , japanese = 慣例
+ , russian = Конвенции
+ }
+ , crefname = {
+ , english = {conventions}{conventions}
+ , french = [les]{conventions}[les]{conventions}
+ , ngerman = { {Konventionen}{Konventionen}
+ , Nominativ = [die]{Konventionen}[die]{Konventionen}
+ , Genitiv = [der]{Konventionen}[der]{Konventionen}
+ , Dativ = [den]{Konventionen}[den]{Konventionen}
+ , Akkusativ = [die]{Konventionen}[die]{Konventionen}
+ }
+ , italian = [le]{convenzioni}[le]{convenzioni}
+ , portuguese = [as]{convenções}[as]{convenções}
+ , brazilian = [as]{convenções}[as]{convenções}
+ , spanish = [las]{convenciones}[las]{convenciones}
+ , schinese = {约定}{约定}
+ , tchinese = {約定}{約定}
+ , japanese = {慣例}{慣例}
+ , russian = {конвенции}{конвенции}
+ }
+ , Crefname = {
+ , english = {Conventions}{Conventions}
+ , french = [Les]{conventions}[Les]{conventions}
+ , ngerman = { {Konventionen}{Konventionen}
+ , Nominativ = [Die]{Konventionen}[Die]{Konventionen}
+ , Genitiv = [Der]{Konventionen}[Der]{Konventionen}
+ , Dativ = [Den]{Konventionen}[Den]{Konventionen}
+ , Akkusativ = [Die]{Konventionen}[Die]{Konventionen}
+ }
+ , italian = [Le]{convenzioni}[Le]{convenzioni}
+ , portuguese = [As]{convenções}[As]{convenções}
+ , brazilian = [As]{convenções}[As]{convenções}
+ , spanish = [Las]{convenciones}[Las]{convenciones}
+ , schinese = {约定}{约定}
+ , tchinese = {約定}{約定}
+ , japanese = {慣例}{慣例}
+ , russian = {Конвенции}{Конвенции}
+ }
+ }
+
+\NameTheorem { corollaries }
+ {
+ , heading = {
+ , english = Corollaries
+ , french = Corollaires
+ , ngerman = Korollare
+ , italian = Corollari
+ , portuguese = Corolários
+ , brazilian = Corolários
+ , spanish = Corolarios
+ , schinese = 推论
+ , tchinese = 推論
+ , japanese = 系
+ , russian = Следствия
+ }
+ , crefname = {
+ , english = {corollaries}{corollaries}
+ , french = [les]{corollaires}[les]{corollaires}
+ , ngerman = { {Korollare}{Korollare}
+ , Nominativ = [die]{Korollare}[die]{Korollare}
+ , Genitiv = [der]{Korollare}[der]{Korollare}
+ , Dativ = [den]{Korollaren}[den]{Korollaren}
+ , Akkusativ = [die]{Korollare}[die]{Korollare}
+ }
+ , italian = [i]{corollari}[i]{corollari}
+ , portuguese = [os]{corolários}[os]{corolários}
+ , brazilian = [os]{corolários}[os]{corolários}
+ , spanish = [los]{corolarios}[los]{corolarios}
+ , schinese = {推论}{推论}
+ , tchinese = {推論}{推論}
+ , japanese = {系}{系}
+ , russian = {следствия}{следствия}
+ }
+ , Crefname = {
+ , english = {Corollaries}{Corollaries}
+ , french = [Les]{corollaires}[Les]{corollaires}
+ , ngerman = { {Korollare}{Korollare}
+ , Nominativ = [Die]{Korollare}[Die]{Korollare}
+ , Genitiv = [Der]{Korollare}[Der]{Korollare}
+ , Dativ = [Den]{Korollaren}[Den]{Korollaren}
+ , Akkusativ = [Die]{Korollare}[Die]{Korollare}
+ }
+ , italian = [I]{corollari}[I]{corollari}
+ , portuguese = [Os]{corolários}[Os]{corolários}
+ , brazilian = [Os]{corolários}[Os]{corolários}
+ , spanish = [Los]{corolarios}[Los]{corolarios}
+ , schinese = {推论}{推论}
+ , tchinese = {推論}{推論}
+ , japanese = {系}{系}
+ , russian = {Следствия}{Следствия}
+ }
+ }
+
+\NameTheorem { definitions }
+ {
+ , heading = {
+ , english = Definitions
+ , french = Définitions
+ , ngerman = Definitionen
+ , italian = Definizioni
+ , portuguese = Definições
+ , brazilian = Definições
+ , spanish = Definiciones
+ , schinese = 定义
+ , tchinese = 定義
+ , japanese = 定義
+ , russian = Определения
+ }
+ , crefname = {
+ , english = {definitions}{definitions}
+ , french = [les]{définitions}[les]{définitions}
+ , ngerman = { {Definitionen}{Definitionen}
+ , Nominativ = [die]{Definitionen}[die]{Definitionen}
+ , Genitiv = [der]{Definitionen}[der]{Definitionen}
+ , Dativ = [den]{Definitionen}[den]{Definitionen}
+ , Akkusativ = [die]{Definitionen}[die]{Definitionen}
+ }
+ , italian = [le]{definizioni}[le]{definizioni}
+ , portuguese = [as]{definições}[as]{definições}
+ , brazilian = [as]{definições}[as]{definições}
+ , spanish = [las]{definiciones}[las]{definiciones}
+ , schinese = {定义}{定义}
+ , tchinese = {定義}{定義}
+ , japanese = {定義}{定義}
+ , russian = {определения}{определения}
+ }
+ , Crefname = {
+ , english = {Definitions}{Definitions}
+ , french = [Les]{définitions}[Les]{définitions}
+ , ngerman = { {Definitionen}{Definitionen}
+ , Nominativ = [Die]{Definitionen}[Die]{Definitionen}
+ , Genitiv = [Der]{Definitionen}[Der]{Definitionen}
+ , Dativ = [Den]{Definitionen}[Den]{Definitionen}
+ , Akkusativ = [Die]{Definitionen}[Die]{Definitionen}
+ }
+ , italian = [Le]{definizioni}[Le]{definizioni}
+ , portuguese = [As]{definições}[As]{definições}
+ , brazilian = [As]{definições}[As]{definições}
+ , spanish = [Las]{definiciones}[Las]{definiciones}
+ , schinese = {定义}{定义}
+ , tchinese = {定義}{定義}
+ , japanese = {定義}{定義}
+ , russian = {Определения}{Определения}
+ }
+ }
+
+\NameTheorem { examples }
+ {
+ , heading = {
+ , english = Examples
+ , french = Exemples
+ , ngerman = Beispiele
+ , italian = Esempi
+ , portuguese = Exemplos
+ , brazilian = Exemplos
+ , spanish = Ejemplos
+ , schinese = 例
+ , tchinese = 例
+ , japanese = 例
+ , russian = Примеры
+ }
+ , crefname = {
+ , english = {examples}{examples}
+ , french = [les]{exemples}[les]{exemples}
+ , ngerman = { {Beispiele}{Beispiele}
+ , Nominativ = [die]{Beispiele}[die]{Beispiele}
+ , Genitiv = [der]{Beispiele}[der]{Beispiele}
+ , Dativ = [den]{Beispielen}[den]{Beispielen}
+ , Akkusativ = [die]{Beispiele}[die]{Beispiele}
+ }
+ , italian = [gli]{esempi}[gli]{esempi}
+ , portuguese = [os]{exemplos}[os]{exemplos}
+ , brazilian = [os]{exemplos}[os]{exemplos}
+ , spanish = [los]{ejemplos}[los]{ejemplos}
+ , schinese = {例}{例}
+ , tchinese = {例}{例}
+ , japanese = {例}{例}
+ , russian = {примеры}{примеры}
+ }
+ , Crefname = {
+ , english = {Examples}{Examples}
+ , french = [Les]{exemples}[Les]{exemples}
+ , ngerman = { {Beispiele}{Beispiele}
+ , Nominativ = [Die]{Beispiele}[Die]{Beispiele}
+ , Genitiv = [Der]{Beispiele}[Der]{Beispiele}
+ , Dativ = [Den]{Beispielen}[Den]{Beispielen}
+ , Akkusativ = [Die]{Beispiele}[Die]{Beispiele}
+ }
+ , italian = [Gli]{esempi}[Gli]{esempi}
+ , portuguese = [Os]{exemplos}[Os]{exemplos}
+ , brazilian = [Os]{exemplos}[Os]{exemplos}
+ , spanish = [Los]{ejemplos}[Los]{ejemplos}
+ , schinese = {例}{例}
+ , tchinese = {例}{例}
+ , japanese = {例}{例}
+ , russian = {Примеры}{Примеры}
+ }
+ }
+
+\NameTheorem { exercises }
+ {
+ , heading = {
+ , english = Exercises
+ , french = Exercices
+ , ngerman = ÜBungen
+ , italian = Esercizi
+ , portuguese = Exercícios
+ , brazilian = Exercícios
+ , spanish = Ejercicios
+ , schinese = 习题
+ , tchinese = 習題
+ , japanese = 練習
+ , russian = Упражнения
+ }
+ , crefname = {
+ , english = {exercises}{exercises}
+ , french = [les]{exercices}[les]{exercices}
+ , ngerman = { {Übungen}{Übungen}
+ , Nominativ = [die]{Übungen}[die]{Übungen}
+ , Genitiv = [der]{Übungen}[der]{Übungen}
+ , Dativ = [den]{Übungen}[den]{Übungen}
+ , Akkusativ = [die]{Übungen}[die]{Übungen}
+ }
+ , italian = [gli]{esercizi}[gli]{esercizi}
+ , portuguese = [os]{exercícios}[os]{exercícios}
+ , brazilian = [os]{exercícios}[os]{exercícios}
+ , spanish = [los]{ejercicios}[los]{ejercicios}
+ , schinese = {习题}{习题}
+ , tchinese = {習題}{習題}
+ , japanese = {練習}{練習}
+ , russian = {упражнения}{упражнения}
+ }
+ , Crefname = {
+ , english = {Exercises}{Exercises}
+ , french = [Les]{exercices}[Les]{exercices}
+ , ngerman = { {Übungen}{Übungen}
+ , Nominativ = [Die]{Übungen}[Die]{Übungen}
+ , Genitiv = [Der]{Übungen}[Der]{Übungen}
+ , Dativ = [Den]{Übungen}[Den]{Übungen}
+ , Akkusativ = [Die]{Übungen}[Die]{Übungen}
+ }
+ , italian = [Gli]{esercizi}[Gli]{esercizi}
+ , portuguese = [Os]{exercícios}[Os]{exercícios}
+ , brazilian = [Os]{exercícios}[Os]{exercícios}
+ , spanish = [Los]{ejercicios}[Los]{ejercicios}
+ , schinese = {习题}{习题}
+ , tchinese = {習題}{習題}
+ , japanese = {練習}{練習}
+ , russian = {Упражнения}{Упражнения}
+ }
+ }
+
+\NameTheorem { facts }
+ {
+ , heading = {
+ , english = Facts
+ , french = Faits
+ , ngerman = Tatsachen
+ , italian = Fatti
+ , portuguese = Factos
+ , brazilian = Fatos
+ , spanish = Hechos
+ , schinese = 事实
+ , tchinese = 事實
+ , japanese = 事実
+ , russian = Факты
+ }
+ , crefname = {
+ , english = {facts}{facts}
+ , french = [les]{faits}[les]{faits}
+ , ngerman = { {Tatsachen}{Tatsachen}
+ , Nominativ = [die]{Tatsachen}[die]{Tatsachen}
+ , Genitiv = [der]{Tatsachen}[der]{Tatsachen}
+ , Dativ = [den]{Tatsachen}[den]{Tatsachen}
+ , Akkusativ = [die]{Tatsachen}[die]{Tatsachen}
+ }
+ , italian = [i]{fatti}[i]{fatti}
+ , portuguese = [os]{factos}[os]{factos}
+ , brazilian = [os]{fatos}[os]{fatos}
+ , spanish = [los]{hechos}[los]{hechos}
+ , schinese = {事实}{事实}
+ , tchinese = {事實}{事實}
+ , japanese = {事実}{事実}
+ , russian = {факты}{факты}
+ }
+ , Crefname = {
+ , english = {Facts}{Facts}
+ , french = [Les]{faits}[Les]{faits}
+ , ngerman = { {Tatsachen}{Tatsachen}
+ , Nominativ = [Die]{Tatsachen}[Die]{Tatsachen}
+ , Genitiv = [Der]{Tatsachen}[Der]{Tatsachen}
+ , Dativ = [Den]{Tatsachen}[Den]{Tatsachen}
+ , Akkusativ = [Die]{Tatsachen}[Die]{Tatsachen}
+ }
+ , italian = [I]{fatti}[I]{fatti}
+ , portuguese = [Os]{factos}[Os]{factos}
+ , brazilian = [Os]{fatos}[Os]{fatos}
+ , spanish = [Los]{hechos}[Los]{hechos}
+ , schinese = {事实}{事实}
+ , tchinese = {事實}{事實}
+ , japanese = {事実}{事実}
+ , russian = {Факты}{Факты}
+ }
+ }
+
+\NameTheorem { hypotheses }
+ {
+ , heading = {
+ , english = Hypotheses
+ , french = Hypothèses
+ , ngerman = Hypothesen
+ , italian = Ipotesi
+ , portuguese = Hipóteses
+ , brazilian = Hipóteses
+ , spanish = Hipótesis
+ , schinese = 假设
+ , tchinese = 假設
+ , japanese = 仮設
+ , russian = Гипотезы
+ }
+ , crefname = {
+ , english = {hypotheses}{hypotheses}
+ , french = [les]{hypothèses}[les]{hypothèses}
+ , ngerman = { {Hypothesen}{Hypothesen}
+ , Nominativ = [die]{Hypothesen}[die]{Hypothesen}
+ , Genitiv = [der]{Hypothesen}[der]{Hypothesen}
+ , Dativ = [den]{Hypothesen}[den]{Hypothesen}
+ , Akkusativ = [die]{Hypothesen}[die]{Hypothesen}
+ }
+ , italian = [le]{ipotesi}[le]{ipotesi}
+ , portuguese = [as]{hipóteses}[as]{hipóteses}
+ , brazilian = [as]{hipóteses}[as]{hipóteses}
+ , spanish = [las]{hipótesis}[las]{hipótesis}
+ , schinese = {假设}{假设}
+ , tchinese = {假設}{假設}
+ , japanese = {仮設}{仮設}
+ , russian = {гипотезы}{гипотезы}
+ }
+ , Crefname = {
+ , english = {Hypotheses}{Hypotheses}
+ , french = [Les]{hypothèses}[Les]{hypothèses}
+ , ngerman = { {Hypothesen}{Hypothesen}
+ , Nominativ = [Die]{Hypothesen}[Die]{Hypothesen}
+ , Genitiv = [Der]{Hypothesen}[Der]{Hypothesen}
+ , Dativ = [Den]{Hypothesen}[Den]{Hypothesen}
+ , Akkusativ = [Die]{Hypothesen}[Die]{Hypothesen}
+ }
+ , italian = [Le]{ipotesi}[Le]{ipotesi}
+ , portuguese = [As]{hipóteses}[As]{hipóteses}
+ , brazilian = [As]{hipóteses}[As]{hipóteses}
+ , spanish = [Las]{hipótesis}[Las]{hipótesis}
+ , schinese = {假设}{假设}
+ , tchinese = {假設}{假設}
+ , japanese = {仮設}{仮設}
+ , russian = {Гипотезы}{Гипотезы}
+ }
+ }
+
+\NameTheorem { lemmas }
+ {
+ , heading = {
+ , english = Lemmas
+ , french = Lemmes
+ , ngerman = Lemmata
+ , italian = Lemmi
+ , portuguese = Lemas
+ , brazilian = Lemas
+ , spanish = Lemas
+ , schinese = 引理
+ , tchinese = 引理
+ , japanese = 補題
+ , russian = Леммы
+ }
+ , crefname = {
+ , english = {Lemmas}{Lemmas}
+ , french = [les]{lemmes}[les]{lemmes}
+ , ngerman = { {Lemmata}{Lemmata}
+ , Nominativ = [die]{Lemmata}[die]{Lemmata}
+ , Genitiv = [der]{Lemmata}[der]{Lemmata}
+ , Dativ = [den]{Lemmata}[den]{Lemmata}
+ , Akkusativ = [die]{Lemmata}[die]{Lemmata}
+ }
+ , italian = [i]{lemmi}[i]{lemmi}
+ , portuguese = [os]{lemas}[os]{lemas}
+ , brazilian = [os]{lemas}[os]{lemas}
+ , spanish = [las]{lemas}[las]{lemas}
+ , schinese = {引理}{引理}
+ , tchinese = {引理}{引理}
+ , japanese = {補題}{補題}
+ , russian = {леммы}{леммы}
+ }
+ , Crefname = {
+ , english = {Lemmas}{Lemmas}
+ , french = [Les]{lemmes}[Les]{lemmes}
+ , ngerman = { {Lemmata}{Lemmata}
+ , Nominativ = [Die]{Lemmata}[Die]{Lemmata}
+ , Genitiv = [Der]{Lemmata}[Der]{Lemmata}
+ , Dativ = [Den]{Lemmata}[Den]{Lemmata}
+ , Akkusativ = [Die]{Lemmata}[Die]{Lemmata}
+ }
+ , italian = [I]{lemmi}[I]{lemmi}
+ , portuguese = [Os]{lemas}[Os]{lemas}
+ , brazilian = [Os]{lemas}[Os]{lemas}
+ , spanish = [las]{lemas}[las]{lemas}
+ , schinese = {引理}{引理}
+ , tchinese = {引理}{引理}
+ , japanese = {補題}{補題}
+ , russian = {Леммы}{Леммы}
+ }
+ }
+
+\NameTheorem { motivations }
+ {
+ , heading = {
+ , english = Motivations
+ , french = Motivations
+ , ngerman = Motivationen
+ , italian = Motivazioni
+ , portuguese = Motivações
+ , brazilian = Motivações
+ , spanish = Motivaciones
+ , schinese = 动机
+ , tchinese = 動機
+ , japanese = 動機
+ , russian = Мотивации
+ }
+ , crefname = {
+ , english = {motivations}{motivations}
+ , french = [les]{motivations}[les]{motivations}
+ , ngerman = { {Motivationen}{Motivationen}
+ , Nominativ = [die]{Motivationen}[die]{Motivationen}
+ , Genitiv = [der]{Motivationen}[der]{Motivationen}
+ , Dativ = [den]{Motivationen}[den]{Motivationen}
+ , Akkusativ = [die]{Motivationen}[die]{Motivationen}
+ }
+ , italian = [le]{motivazioni}[le]{motivazioni}
+ , portuguese = [as]{motivações}[as]{motivações}
+ , brazilian = [as]{motivações}[as]{motivações}
+ , spanish = [las]{motivaciones}[las]{motivaciones}
+ , schinese = {动机}{动机}
+ , tchinese = {動機}{動機}
+ , japanese = {動機}{動機}
+ , russian = {мотивации}{мотивации}
+ }
+ , Crefname = {
+ , english = {Motivations}{Motivations}
+ , french = [Les]{motivations}[Les]{motivations}
+ , ngerman = { {Motivationen}{Motivationen}
+ , Nominativ = [Die]{Motivationen}[Die]{Motivationen}
+ , Genitiv = [Der]{Motivationen}[Der]{Motivationen}
+ , Dativ = [Den]{Motivationen}[Den]{Motivationen}
+ , Akkusativ = [Die]{Motivationen}[Die]{Motivationen}
+ }
+ , italian = [Le]{motivazioni}[Le]{motivazioni}
+ , portuguese = [As]{motivações}[As]{motivações}
+ , brazilian = [As]{motivações}[As]{motivações}
+ , spanish = [Las]{motivaciones}[Las]{motivaciones}
+ , schinese = {动机}{动机}
+ , tchinese = {動機}{動機}
+ , japanese = {動機}{動機}
+ , russian = {Мотивации}{Мотивации}
+ }
+ }
+
+\NameTheorem { notations }
+ {
+ , heading = {
+ , english = Notations
+ , french = Notations
+ , ngerman = Notationen
+ , italian = Notazioni
+ , portuguese = Notações
+ , brazilian = Notações
+ , spanish = Notaciones
+ , schinese = 记号
+ , tchinese = 記號
+ , japanese = 記法
+ , russian = Нотации
+ }
+ , crefname = {
+ , english = {notations}{notations}
+ , french = [les]{notations}[les]{notations}
+ , ngerman = { {Notationen}{Notationen}
+ , Nominativ = [die]{Notationen}[die]{Notationen}
+ , Genitiv = [der]{Notationen}[der]{Notationen}
+ , Dativ = [den]{Notationen}[den]{Notationen}
+ , Akkusativ = [die]{Notationen}[die]{Notationen}
+ }
+ , italian = [le]{notazioni}[le]{notazioni}
+ , portuguese = [as]{notações}[as]{notações}
+ , brazilian = [as]{notações}[as]{notações}
+ , spanish = [las]{notaciones}[las]{notaciones}
+ , schinese = {记号}{记号}
+ , tchinese = {記號}{記號}
+ , japanese = {記法}{記法}
+ , russian = {нотации}{нотации}
+ }
+ , Crefname = {
+ , english = {Notations}{Notations}
+ , french = [Les]{notations}[Les]{notations}
+ , ngerman = { {Notationen}{Notationen}
+ , Nominativ = [Die]{Notationen}[Die]{Notationen}
+ , Genitiv = [Der]{Notationen}[Der]{Notationen}
+ , Dativ = [Den]{Notationen}[Den]{Notationen}
+ , Akkusativ = [Die]{Notationen}[Die]{Notationen}
+ }
+ , italian = [Le]{notazioni}[Le]{notazioni}
+ , portuguese = [As]{notações}[As]{notações}
+ , brazilian = [As]{notações}[As]{notações}
+ , spanish = [Las]{notaciones}[Las]{notaciones}
+ , schinese = {记号}{记号}
+ , tchinese = {記號}{記號}
+ , japanese = {記法}{記法}
+ , russian = {Нотации}{Нотации}
+ }
+ }
+
+\NameTheorem { observations }
+ {
+ , heading = {
+ , english = Observations
+ , french = Observations
+ , ngerman = Beobachtungen
+ , italian = Osservazioni
+ , portuguese = Observações
+ , brazilian = Observações
+ , spanish = Observaciones
+ , schinese = 观察
+ , tchinese = 觀察
+ , japanese = 観察
+ , russian = Наблюдения
+ }
+ , crefname = {
+ , english = {observations}{observations}
+ , french = [les]{observations}[les]{observations}
+ , ngerman = { {Beobachtungen}{Beobachtungen}
+ , Nominativ = [die]{Beobachtungen}[die]{Beobachtungen}
+ , Genitiv = [der]{Beobachtungen}[der]{Beobachtungen}
+ , Dativ = [den]{Beobachtungen}[den]{Beobachtungen}
+ , Akkusativ = [die]{Beobachtungen}[die]{Beobachtungen}
+ }
+ , italian = [le]{osservazioni}[le]{osservazioni}
+ , portuguese = [as]{observações}[as]{observações}
+ , brazilian = [as]{observações}[as]{observações}
+ , spanish = [las]{observaciones}[las]{observaciones}
+ , schinese = {观察}{观察}
+ , tchinese = {觀察}{觀察}
+ , japanese = {観察}{観察}
+ , russian = {наблюдения}{наблюдения}
+ }
+ , Crefname = {
+ , english = {Observations}{Observations}
+ , french = [Les]{observations}[Les]{observations}
+ , ngerman = { {Beobachtungen}{Beobachtungen}
+ , Nominativ = [Die]{Beobachtungen}[Die]{Beobachtungen}
+ , Genitiv = [Der]{Beobachtungen}[Der]{Beobachtungen}
+ , Dativ = [Den]{Beobachtungen}[Den]{Beobachtungen}
+ , Akkusativ = [Die]{Beobachtungen}[Die]{Beobachtungen}
+ }
+ , italian = [Le]{osservazioni}[Le]{osservazioni}
+ , portuguese = [As]{observações}[As]{observações}
+ , brazilian = [As]{observações}[As]{observações}
+ , spanish = [Las]{observaciones}[Las]{observaciones}
+ , schinese = {观察}{观察}
+ , tchinese = {觀察}{觀察}
+ , japanese = {観察}{観察}
+ , russian = {Наблюдения}{Наблюдения}
+ }
+ }
+
+\NameTheorem { postulates }
+ {
+ , heading = {
+ , english = Postulates
+ , french = Postulats
+ , ngerman = Postulate
+ , italian = Postulati
+ , portuguese = Postulados
+ , brazilian = Postulados
+ , spanish = Postulados
+ , schinese = 公设
+ , tchinese = 公設
+ , japanese = 公準
+ , russian = Постулаты
+ }
+ , crefname = {
+ , english = {postulates}{postulates}
+ , french = [les]{postulats}[les]{postulats}
+ , ngerman = { {Postulate}{Postulate}
+ , Nominativ = [die]{Postulate}[die]{Postulate}
+ , Genitiv = [der]{Postulate}[der]{Postulate}
+ , Dativ = [den]{Postulaten}[den]{Postulaten}
+ , Akkusativ = [die]{Postulate}[die]{Postulate}
+ }
+ , italian = [i]{postulati}[i]{postulati}
+ , portuguese = [os]{postulados}[os]{postulados}
+ , brazilian = [os]{postulados}[os]{postulados}
+ , spanish = [los]{postulados}[los]{postulados}
+ , schinese = {公设}{公设}
+ , tchinese = {公設}{公設}
+ , japanese = {公準}{公準}
+ , russian = {постулаты}{постулаты}
+ }
+ , Crefname = {
+ , english = {Postulates}{Postulates}
+ , french = [Les]{postulats}[Les]{postulats}
+ , ngerman = { {Postulate}{Postulate}
+ , Nominativ = [Die]{Postulate}[Die]{Postulate}
+ , Genitiv = [Der]{Postulate}[Der]{Postulate}
+ , Dativ = [Den]{Postulaten}[Den]{Postulaten}
+ , Akkusativ = [Die]{Postulate}[Die]{Postulate}
+ }
+ , italian = [I]{postulati}[I]{postulati}
+ , portuguese = [Os]{postulados}[Os]{postulados}
+ , brazilian = [Os]{postulados}[Os]{postulados}
+ , spanish = [Los]{postulados}[Los]{postulados}
+ , schinese = {公设}{公设}
+ , tchinese = {公設}{公設}
+ , japanese = {公準}{公準}
+ , russian = {Постулаты}{Постулаты}
+ }
+ }
+
+\NameTheorem { problems }
+ {
+ , heading = {
+ , english = Problems
+ , french = Problèmes
+ , ngerman = Probleme
+ , italian = Problemi
+ , portuguese = Problemas
+ , brazilian = Problemas
+ , spanish = Problemas
+ , schinese = 问题
+ , tchinese = 問題
+ , japanese = 問題
+ , russian = Проблемы
+ }
+ , crefname = {
+ , english = {problems}{problems}
+ , french = [les]{problèmes}[les]{problèmes}
+ , ngerman = { {Probleme}{Probleme}
+ , Nominativ = [die]{Probleme}[die]{Probleme}
+ , Genitiv = [der]{Probleme}[der]{Probleme}
+ , Dativ = [den]{Problemen}[den]{Problemen}
+ , Akkusativ = [die]{Probleme}[die]{Probleme}
+ }
+ , italian = [i]{problemi}[i]{problemi}
+ , portuguese = [os]{problemas}[os]{problemas}
+ , brazilian = [os]{problemas}[os]{problemas}
+ , spanish = [los]{problemas}[los]{problemas}
+ , schinese = {问题}{问题}
+ , tchinese = {問題}{問題}
+ , japanese = {問題}{問題}
+ , russian = {проблемы}{проблемы}
+ }
+ , Crefname = {
+ , english = {Problems}{Problems}
+ , french = [Les]{problèmes}[Les]{problèmes}
+ , ngerman = { {Probleme}{Probleme}
+ , Nominativ = [Die]{Probleme}[Die]{Probleme}
+ , Genitiv = [Der]{Probleme}[Der]{Probleme}
+ , Dativ = [Den]{Problemen}[Den]{Problemen}
+ , Akkusativ = [Die]{Probleme}[Die]{Probleme}
+ }
+ , italian = [I]{problemi}[I]{problemi}
+ , portuguese = [Os]{problemas}[Os]{problemas}
+ , brazilian = [Os]{problemas}[Os]{problemas}
+ , spanish = [Los]{problemas}[Los]{problemas}
+ , schinese = {问题}{问题}
+ , tchinese = {問題}{問題}
+ , japanese = {問題}{問題}
+ , russian = {Проблемы}{Проблемы}
+ }
+ }
+
+\NameTheorem { properties }
+ {
+ , heading = {
+ , english = Properties
+ , french = Propriétés
+ , ngerman = Eigenschaften
+ , italian = Proprietà
+ , portuguese = Propriedades
+ , brazilian = Propriedades
+ , spanish = Propiedades
+ , schinese = 性质
+ , tchinese = 性質
+ , japanese = 性質
+ , russian = Имущества
+ }
+ , crefname = {
+ , english = {properties}{properties}
+ , french = [les]{propriétés}[les]{propriétés}
+ , ngerman = { {Eigenschaften}{Eigenschaften}
+ , Nominativ = [die]{Eigenschaften}[die]{Eigenschaften}
+ , Genitiv = [der]{Eigenschaften}[der]{Eigenschaften}
+ , Dativ = [den]{Eigenschaften}[den]{Eigenschaften}
+ , Akkusativ = [die]{Eigenschaften}[die]{Eigenschaften}
+ }
+ , italian = [le]{proprietà}[le]{proprietà}
+ , portuguese = [as]{propriedades}[as]{propriedades}
+ , brazilian = [as]{propriedades}[as]{propriedades}
+ , spanish = [las]{propiedades}[las]{propiedades}
+ , schinese = {性质}{性质}
+ , tchinese = {性質}{性質}
+ , japanese = {性質}{性質}
+ , russian = {имущества}{имущества}
+ }
+ , Crefname = {
+ , english = {Properties}{Properties}
+ , french = [Les]{propriétés}[Les]{propriétés}
+ , ngerman = { {Eigenschaften}{Eigenschaften}
+ , Nominativ = [Die]{Eigenschaften}[Die]{Eigenschaften}
+ , Genitiv = [Der]{Eigenschaften}[Der]{Eigenschaften}
+ , Dativ = [Den]{Eigenschaften}[Den]{Eigenschaften}
+ , Akkusativ = [Die]{Eigenschaften}[Die]{Eigenschaften}
+ }
+ , italian = [Le]{proprietà}[Le]{proprietà}
+ , portuguese = [As]{propriedades}[As]{propriedades}
+ , brazilian = [As]{propriedades}[As]{propriedades}
+ , spanish = [Las]{propiedades}[Las]{propiedades}
+ , schinese = {性质}{性质}
+ , tchinese = {性質}{性質}
+ , japanese = {性質}{性質}
+ , russian = {Имущества}{Имущества}
+ }
+ }
+
+\NameTheorem { propositions }
+ {
+ , heading = {
+ , english = Propositions
+ , french = Propositions
+ , ngerman = Propositionen
+ , italian = Proposte
+ , portuguese = Proposições
+ , brazilian = Proposições
+ , spanish = Proposiciones
+ , schinese = 命题
+ , tchinese = 命題
+ , japanese = 命題
+ , russian = Предложения
+ }
+ , crefname = {
+ , english = {propositions}{propositions}
+ , french = [les]{propositions}[les]{propositions}
+ , ngerman = { {Propositionen}{Propositionen}
+ , Nominativ = [die]{Propositionen}[die]{Propositionen}
+ , Genitiv = [der]{Propositionen}[der]{Propositionen}
+ , Dativ = [den]{Propositionen}[den]{Propositionen}
+ , Akkusativ = [die]{Propositionen}[die]{Propositionen}
+ }
+ , italian = [le]{proposte}[le]{proposte}
+ , portuguese = [as]{proposições}[as]{proposições}
+ , brazilian = [as]{proposições}[as]{proposições}
+ , spanish = [las]{proposiciones}[las]{proposiciones}
+ , schinese = {命题}{命题}
+ , tchinese = {命題}{命題}
+ , japanese = {命題}{命題}
+ , russian = {предложения}{предложения}
+ }
+ , Crefname = {
+ , english = {Propositions}{Propositions}
+ , french = [Les]{propositions}[Les]{propositions}
+ , ngerman = { {Propositionen}{Propositionen}
+ , Nominativ = [Die]{Propositionen}[Die]{Propositionen}
+ , Genitiv = [Der]{Propositionen}[Der]{Propositionen}
+ , Dativ = [Den]{Propositionen}[Den]{Propositionen}
+ , Akkusativ = [Die]{Propositionen}[Die]{Propositionen}
+ }
+ , italian = [Le]{proposte}[Le]{proposte}
+ , portuguese = [As]{proposições}[As]{proposições}
+ , brazilian = [As]{proposições}[As]{proposições}
+ , spanish = [Las]{proposiciones}[Las]{proposiciones}
+ , schinese = {命题}{命题}
+ , tchinese = {命題}{命題}
+ , japanese = {命題}{命題}
+ , russian = {Предложения}{Предложения}
+ }
+ }
+
+\NameTheorem { questions }
+ {
+ , heading = {
+ , english = Questions
+ , french = Questions
+ , ngerman = Fragen
+ , italian = Domande
+ , portuguese = Perguntas
+ , brazilian = Perguntas
+ , spanish = Preguntas
+ , schinese = 问题
+ , tchinese = 問題
+ , japanese = 問題
+ , russian = Вопросы
+ }
+ , crefname = {
+ , english = {questions}{questions}
+ , french = [les]{questions}[les]{questions}
+ , ngerman = { {Fragen}{Fragen}
+ , Nominativ = [die]{Fragen}[die]{Fragen}
+ , Genitiv = [der]{Fragen}[der]{Fragen}
+ , Dativ = [den]{Fragen}[den]{Fragen}
+ , Akkusativ = [die]{Fragen}[die]{Fragen}
+ }
+ , italian = [le]{domande}[le]{domande}
+ , portuguese = [as]{perguntas}[as]{perguntas}
+ , brazilian = [as]{perguntas}[as]{perguntas}
+ , spanish = [las]{preguntas}[las]{preguntas}
+ , schinese = {问题}{问题}
+ , tchinese = {問題}{問題}
+ , japanese = {問題}{問題}
+ , russian = {вопросы}{вопросы}
+ }
+ , Crefname = {
+ , english = {Questions}{Questions}
+ , french = [Les]{questions}[Les]{questions}
+ , ngerman = { {Fragen}{Fragen}
+ , Nominativ = [Die]{Fragen}[Die]{Fragen}
+ , Genitiv = [Der]{Fragen}[Der]{Fragen}
+ , Dativ = [Den]{Fragen}[Den]{Fragen}
+ , Akkusativ = [Die]{Fragen}[Die]{Fragen}
+ }
+ , italian = [Le]{domande}[Le]{domande}
+ , portuguese = [As]{perguntas}[As]{perguntas}
+ , brazilian = [As]{perguntas}[As]{perguntas}
+ , spanish = [Las]{preguntas}[Las]{preguntas}
+ , schinese = {问题}{问题}
+ , tchinese = {問題}{問題}
+ , japanese = {問題}{問題}
+ , russian = {Вопросы}{Вопросы}
+ }
+ }
+
+\NameTheorem { recalls }
+ {
+ , heading = {
+ , english = Recalls
+ , french = Rappels
+ , ngerman = Erinnerungen
+ , italian = Richiami
+ , portuguese = Recordações
+ , brazilian = Recordações
+ , spanish = Recuerdos
+ , schinese = 回顾
+ , tchinese = 回顧
+ , japanese = 回顧
+ , russian = Напоминания
+ }
+ , crefname = {
+ , english = {recalls}{recalls}
+ , french = [les]{rappels}[les]{rappels}
+ , ngerman = { {Erinnerungen}{Erinnerungen}
+ , Nominativ = [die]{Erinnerungen}[die]{Erinnerungen}
+ , Genitiv = [der]{Erinnerungen}[der]{Erinnerungen}
+ , Dativ = [den]{Erinnerungen}[den]{Erinnerungen}
+ , Akkusativ = [die]{Erinnerungen}[die]{Erinnerungen}
+ }
+ , italian = [i]{richiami}[i]{richiami}
+ , portuguese = [as]{recordações}[as]{recordações}
+ , brazilian = [as]{recordações}[as]{recordações}
+ , spanish = [los]{recuerdos}[los]{recuerdos}
+ , schinese = {回顾}{回顾}
+ , tchinese = {回顧}{回顧}
+ , japanese = {回顧}{回顧}
+ , russian = {напоминания}{напоминания}
+ }
+ , Crefname = {
+ , english = {Recalls}{Recalls}
+ , french = [Les]{rappels}[Les]{rappels}
+ , ngerman = { {Erinnerungen}{Erinnerungen}
+ , Nominativ = [Die]{Erinnerungen}[Die]{Erinnerungen}
+ , Genitiv = [Der]{Erinnerungen}[Der]{Erinnerungen}
+ , Dativ = [Den]{Erinnerungen}[Den]{Erinnerungen}
+ , Akkusativ = [Die]{Erinnerungen}[Die]{Erinnerungen}
+ }
+ , italian = [I]{richiami}[I]{richiami}
+ , portuguese = [As]{recordações}[As]{recordações}
+ , brazilian = [As]{recordações}[As]{recordações}
+ , spanish = [Los]{recuerdos}[Los]{recuerdos}
+ , schinese = {回顾}{回顾}
+ , tchinese = {回顧}{回顧}
+ , japanese = {回顧}{回顧}
+ , russian = {Напоминания}{Напоминания}
+ }
+ }
+
+\NameTheorem { remarks }
+ {
+ , heading = {
+ , english = Remarks
+ , french = Remarques
+ , ngerman = Bemerkungen
+ , italian = Commenti
+ , portuguese = Comentários
+ , brazilian = Comentários
+ , spanish = Comentarios
+ , schinese = 备注
+ , tchinese = 備註
+ , japanese = 注釈
+ , russian = Замечания
+ }
+ , crefname = {
+ , english = {remarks}{remarks}
+ , french = [les]{remarques}[les]{remarques}
+ , ngerman = { {Bemerkungen}{Bemerkungen}
+ , Nominativ = [die]{Bemerkungen}[die]{Bemerkungen}
+ , Genitiv = [der]{Bemerkungen}[der]{Bemerkungen}
+ , Dativ = [den]{Bemerkungen}[den]{Bemerkungen}
+ , Akkusativ = [die]{Bemerkungen}[die]{Bemerkungen}
+ }
+ , italian = [i]{commenti}[i]{commenti}
+ , portuguese = [os]{comentários}[os]{comentários}
+ , brazilian = [os]{comentários}[os]{comentários}
+ , spanish = [los]{comentarios}[los]{comentarios}
+ , schinese = {备注}{备注}
+ , tchinese = {備註}{備註}
+ , japanese = {注釈}{注釈}
+ , russian = {замечания}{замечания}
+ }
+ , Crefname = {
+ , english = {Remarks}{Remarks}
+ , french = [Les]{remarques}[Les]{remarques}
+ , ngerman = { {Bemerkungen}{Bemerkungen}
+ , Nominativ = [Die]{Bemerkungen}[Die]{Bemerkungen}
+ , Genitiv = [Der]{Bemerkungen}[Der]{Bemerkungen}
+ , Dativ = [Den]{Bemerkungen}[Den]{Bemerkungen}
+ , Akkusativ = [Die]{Bemerkungen}[Die]{Bemerkungen}
+ }
+ , italian = [I]{commenti}[I]{commenti}
+ , portuguese = [Os]{comentários}[Os]{comentários}
+ , brazilian = [Os]{comentários}[Os]{comentários}
+ , spanish = [Los]{comentarios}[Los]{comentarios}
+ , schinese = {备注}{备注}
+ , tchinese = {備註}{備註}
+ , japanese = {注釈}{注釈}
+ , russian = {Замечания}{Замечания}
+ }
+ }
+
+\NameTheorem { theorems }
+ {
+ , heading = {
+ , english = Theorems
+ , french = Théorèmes
+ , ngerman = Sätze
+ , italian = Teoremi
+ , portuguese = Teoremas
+ , brazilian = Teoremas
+ , spanish = Teoremas
+ , schinese = 定理
+ , tchinese = 定理
+ , japanese = 定理
+ , russian = Теоремы
+ }
+ , crefname = {
+ , english = {theorems}{theorems}
+ , french = [les]{théorèmes}[les]{théorèmes}
+ , ngerman = { {Sätze}{Sätze}
+ , Nominativ = [die]{Sätze}[die]{Sätze}
+ , Genitiv = [der]{Sätze}[der]{Sätze}
+ , Dativ = [den]{Sätzen}[den]{Sätzen}
+ , Akkusativ = [die]{Sätze}[die]{Sätze}
+ }
+ , italian = [i]{teoremi}[i]{teoremi}
+ , portuguese = [os]{teoremas}[os]{teoremas}
+ , brazilian = [os]{teoremas}[os]{teoremas}
+ , spanish = [los]{teoremas}[los]{teoremas}
+ , schinese = {定理}{定理}
+ , tchinese = {定理}{定理}
+ , japanese = {定理}{定理}
+ , russian = {теоремы}{теоремы}
+ }
+ , Crefname = {
+ , english = {Theorems}{Theorems}
+ , french = [Les]{théorèmes}[Les]{théorèmes}
+ , ngerman = { {Sätze}{Sätze}
+ , Nominativ = [Die]{Sätze}[Die]{Sätze}
+ , Genitiv = [Der]{Sätze}[Der]{Sätze}
+ , Dativ = [Den]{Sätzen}[Den]{Sätzen}
+ , Akkusativ = [Die]{Sätze}[Die]{Sätze}
+ }
+ , italian = [I]{teoremi}[I]{teoremi}
+ , portuguese = [Os]{teoremas}[Os]{teoremas}
+ , brazilian = [Os]{teoremas}[Os]{teoremas}
+ , spanish = [Los]{teoremas}[Los]{teoremas}
+ , schinese = {定理}{定理}
+ , tchinese = {定理}{定理}
+ , japanese = {定理}{定理}
+ , russian = {Теоремы}{Теоремы}
+ }
+ }
diff --git a/macros/latex/contrib/create-theorem/create-theorem.sty b/macros/latex/contrib/create-theorem/code/create-theorem-preset-names.tex
index d8e2ffbc35..9df9c0e274 100644
--- a/macros/latex/contrib/create-theorem/create-theorem.sty
+++ b/macros/latex/contrib/create-theorem/code/create-theorem-preset-names.tex
@@ -1,1179 +1,3 @@
-%%
-%% Copyright (C) 2021-2024 by Jinwen XU
-%% ------------------------------------
-%%
-%% This file may be distributed and/or modified under the conditions of
-%% the LaTeX Project Public License, either version 1.3c of this license
-%% or (at your option) any later version. The latest version of this
-%% license is in:
-%%
-%% http://www.latex-project.org/lppl.txt
-%%
-\NeedsTeXFormat{LaTeX2e}[2022-06-01]
-\ProvidesExplPackage
- {create-theorem}
- {2024/02/20} {}
- {Initializing theorem-like environments with multilingual support}
-
-\keys_define:nn { create-theorem }
- {
- , name-as-context .bool_set:N = \l__crthm_regionalref_bool
- , name-as-context .initial:n = { true }
- , name~as~context .bool_set:N = \l__crthm_regionalref_bool
- , name as context .bool_set:N = \l__crthm_regionalref_bool
- , regionalref .bool_set:N = \l__crthm_regionalref_bool
- , name-as-is .bool_set_inverse:N = \l__crthm_regionalref_bool
- , name~as~is .bool_set_inverse:N = \l__crthm_regionalref_bool
- , name as is .bool_set_inverse:N = \l__crthm_regionalref_bool
- , originalref .bool_set_inverse:N = \l__crthm_regionalref_bool
- , name-in-link .bool_set:N = \l__crthm_nameinlink_bool
- , name-in-link .initial:n = { false }
- , name~in~link .bool_set:N = \l__crthm_nameinlink_bool
- , name in link .bool_set:N = \l__crthm_nameinlink_bool
- , no-preset-names .bool_set_inverse:N = \l__crthm_presetname_bool
- , no-preset-names .initial:n = { false }
- , no~preset~names .bool_set_inverse:N = \l__crthm_presetname_bool
- , no preset names .bool_set_inverse:N = \l__crthm_presetname_bool
- , unknown .code:n = {}
- }
-\ProcessKeyOptions [ create-theorem ]
-
-\msg_new:nnn { create-theorem }
- { no-backend }
- { A~backend~(such~as~"amsthm")~~is~needed~to~provide~the~commands~"\iow_char:N \\newtheorem(*)"~and~"\iow_char:N \\theoremstyle"~with~the~usual~behaviour. }
-\cs_if_exist:cF { theoremstyle }
- {
- \msg_error:nn { create-theorem } { no-backend }
- }
-
-\bool_if:NT \l__crthm_nameinlink_bool
- {
- \PassOptionsToPackage { nameinlink } { cleveref }
- }
-\RequirePackage { crefthe }
-\RequirePackage { amsfonts }
-
-\IfPackageLoadedTF { thmtools }
- {
- \cs_gset_eq:NN \crthm_newtheorem:w \thmt@original@newtheorem
- }
- {
- \cs_gset_eq:NN \crthm_newtheorem:w \newtheorem
- }
-
-
-% Users should consider appending their languages to this list as needed,
-% otherwise the naming functionality may not work in monolingual documents.
-\clist_new:N \g_crthm_supported_language_clist
-\clist_gset:Nn \g_crthm_supported_language_clist
- {
- english ,
- french ,
- ngerman ,
- italian ,
- portuguese ,
- brazilian ,
- spanish ,
- schinese ,
- tchinese ,
- japanese ,
- russian ,
- }
-
-\cs_new:Nn \crthm_add_to_language_list:n
- {
- \clist_gput_right:Nn \g_crthm_supported_language_clist { #1 }
- \clist_gremove_duplicates:N \g_crthm_supported_language_clist
- }
-
-\NewDocumentCommand \CreateTheoremAddLanguage { m }
- {
- \crthm_add_to_language_list:n { #1 }
- }
-
-
-\tl_new:N \l__crthm_current_env_tl
-
-\keys_define:nn { create-theorem-naming }
- {
- , heading .code:n = { \crthm_set_name_heading:en { \l__crthm_current_env_tl } { #1 } }
- , heading .value_required:n = true
- , crefname .code:n = { \crthm_set_name_crefname:en { \l__crthm_current_env_tl } { #1 } }
- , crefname .value_required:n = true
- , Crefname .code:n = { \crthm_set_name_Crefname:en { \l__crthm_current_env_tl } { #1 } }
- , Crefname .value_required:n = true
- , heading~style .code:n = { \crthm_set_name_style_heading:en { \l__crthm_current_env_tl } { #1 } }
- , heading~style .value_required:n = true
- , heading-style .meta:n = { heading~style = { #1 } }
- , heading-style .value_required:n = true
- , heading style .meta:n = { heading~style = { #1 } }
- , heading style .value_required:n = true
- , crefname~style .code:n = { \crthm_set_name_style_crefname:en { \l__crthm_current_env_tl } { #1 } }
- , crefname~style .value_required:n = true
- , crefname-style .meta:n = { crefname~style = { #1 } }
- , crefname-style .value_required:n = true
- , crefname style .meta:n = { crefname~style = { #1 } }
- , crefname style .value_required:n = true
- , Crefname~style .code:n = { \crthm_set_name_style_Crefname:en { \l__crthm_current_env_tl } { #1 } }
- , Crefname~style .value_required:n = true
- , Crefname-style .meta:n = { Crefname~style = { #1 } }
- , Crefname-style .value_required:n = true
- , Crefname style .meta:n = { Crefname~style = { #1 } }
- , Crefname style .value_required:n = true
- , numbering~style .code:n = { \crthm_set_name_style_numbering:en { \l__crthm_current_env_tl } { #1 } }
- , numbering~style .value_required:n = true
- , numbering-style .meta:n = { numbering~style = { #1 } }
- , numbering-style .value_required:n = true
- , numbering style .meta:n = { numbering~style = { #1 } }
- , numbering style .value_required:n = true
- , use~name .code:n = { \crthm_set_name_with_existed_names:en { \l__crthm_current_env_tl } { #1 } }
- , use~name .value_required:n = true
- , use-name .meta:n = { use~name = { #1 } }
- , use-name .value_required:n = true
- , use name .meta:n = { use~name = { #1 } }
- , use name .value_required:n = true
- , combined .meta:n = { use~name = { #1 } }
- , combined .value_required:n = true
- , unknown .code:n = {}
- }
-
-\cs_new:Nn \__crthm_set_generic:nnn
- {
- \str_if_in:nnTF { #2 } { = }
- {% key-value definition
- \keyval_parse:nnn
- {}
- { \use:c { __crthm_ #3 :nnn } { #1 } }
- { #2 }
- }
- {% simple definition
- \clist_map_inline:Nn \g_crthm_supported_language_clist
- {
- \use:c { __crthm_ #3 :nnn } { #1 } { ##1 } { #2 }
- }
- }
- }
-
-\cs_new:Nn \crthm_set_name_heading:nn
- % #1 = env name
- % #2 = the settings
- {
- \__crthm_set_generic:nnn { #1 } { #2 } { set_name_heading }
- }
-\cs_generate_variant:Nn \crthm_set_name_heading:nn { en }
-
-\cs_new:Nn \__crthm_set_name_heading:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding heading name
- {
- \tl_if_exist:cF { g_crthm_style_heading_ #1 _ #2 _tl }
- {
- \tl_new:c { g_crthm_style_heading_ #1 _ #2 _tl }
- }
- \tl_gset:cn { g_crthm_name_heading_ #1 _ #2 _tl } { \tl_use:c { g_crthm_style_heading_ #1 _ #2 _tl } { #3 } }
- }
-
-\cs_new:Nn \crthm_set_name_crefname:nn
- % #1 = env name
- % #2 = the settings
- {
- \crthm_set_name_crefname_generic:nnn { #1 } { #2 } { c }
- }
-\cs_generate_variant:Nn \crthm_set_name_crefname:nn { en }
-
-\cs_new:Nn \crthm_set_name_Crefname:nn
- % #1 = env name
- % #2 = the settings
- {
- \crthm_set_name_crefname_generic:nnn { #1 } { #2 } { C }
- }
-\cs_generate_variant:Nn \crthm_set_name_Crefname:nn { en }
-
-\cs_new:Nn \crthm_set_name_crefname_generic:nnn
- % #1 = env name
- % #2 = the settings
- % #3 = c or C
- {
- \__crthm_set_generic:nnn { #1 } { #2 } { set_name_ #3 refname }
- }
-
-\cs_new:Nn \__crthm_set_name_crefname:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
- {
- \str_if_in:nnTF { #3 } { = }
- {
- \crefthe_parse_variant:n { #3 }
- \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #1 } { #2 } } { c }
- }
- {
- \__crthm_set_name_crefname_generic:w { #1 } { #2 } #3 { c }
- }
- }
-
-\cs_new:Nn \__crthm_set_name_Crefname:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding Crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
- {
- \str_if_in:nnTF { #3 } { = }
- {
- \crefthe_parse_variant:n { #3 }
- \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #1 } { #2 } } { C }
- }
- {
- \__crthm_set_name_crefname_generic:w { #1 } { #2 } #3 { C }
- }
- }
-
-\NewExpandableDocumentCommand \__crthm_set_name_crefname_generic:w { m m O{} m O{} m m }
- % #1 = env name
- % #2 = language name
- % #7 = c or C
- {
- % It is assumed that when #3 is empty, so is #5
- \tl_if_blank:eTF { #3 }
- {
- \tl_gset:cn { g_crthm_core_name_ #7 ref_article_singular_ #1 _ #2 _tl } { }
- \tl_gset:cn { g_crthm_core_name_ #7 ref_article_plural_ #1 _ #2 _tl } { }
- \tl_gset:cn { g_crthm_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak }
- \tl_gset:cn { g_crthm_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak }
- }
- {
- \tl_gset:cn { g_crthm_core_name_ #7 ref_article_singular_ #1 _ #2 _tl } { #3 }
- \tl_gset:cn { g_crthm_core_name_ #7 ref_article_plural_ #1 _ #2 _tl } { #5 }
- \tl_gset:cn { g_crthm_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \crefthemark { #3 } }
- \tl_gset:cn { g_crthm_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \crefthemark { #5 } }
- }
-
- \tl_if_exist:cF { g_crthm_style_ #7 refname_ #1 _ #2 _tl }
- {
- \tl_new:c { g_crthm_style_ #7 refname_ #1 _ #2 _tl }
- }
-
- \tl_if_blank:eTF { #4 }
- {
- \tl_gset:cn { g_crthm_name_ #7 ref_singular_ #1 _ #2 _tl } { \nobreak \crefthe_retrieve_space: \nobreak }
- }
- {
- \tl_gset:cn { g_crthm_name_ #7 ref_singular_ #1 _ #2 _tl } { \tl_use:c { g_crthm_style_ #7 refname_ #1 _ #2 _tl } { #4 } }
- }
-
- \tl_if_blank:eTF { #6 }
- {
- \tl_gset:cn { g_crthm_name_ #7 ref_plural_ #1 _ #2 _tl } { \nobreak \crefthe_retrieve_space: \nobreak }
- }
- {
- \tl_gset:cn { g_crthm_name_ #7 ref_plural_ #1 _ #2 _tl } { \tl_use:c { g_crthm_style_ #7 refname_ #1 _ #2 _tl } { #6 } }
- }
-
- \bool_if:NTF \l__crthm_regionalref_bool
- {% "regionalref" mode
- \use:c { __crthm_set_name_ #7 refname_do:nnn } { #1 _crthm_regional } { #1 } { \languagename }
- }
- {% "originalref" mode
- \tl_if_exist:cF { c@ #1 _crthm_original_ #2 }
- {
- \crthm_counter_alias:nn { #1 _crthm_original_ #2 } { #1 }
- \hook_gput_code:nnn { begindocument/before } { crthm }
- {
- \cs_set_eq:cc { the #1 _crthm_original_ #2 } { the #1 }
- }
- }
- \use:c { __crthm_set_name_ #7 refname_do:nnn } { #1 _crthm_original_ #2 } { #1 } { #2 }
- }
- }
-
-\cs_new:Nn \__crthm_set_name_crefname_do:nnn
- % #1 = counter name
- % #2 = env name
- % #3 = language name
- {
- \__crthm_set_name_crefname_do_generic:nnnn { #1 } { #2 } { #3 } { c }
- }
-
-\cs_new:Nn \__crthm_set_name_Crefname_do:nnn
- % #1 = counter name
- % #2 = env name
- % #3 = language name
- {
- \__crthm_set_name_crefname_do_generic:nnnn { #1 } { #2 } { #3 } { C }
- }
-
-\seq_new:N \g__crthm_format_already_set_seq
-
-\cs_new:Nn \__crthm_set_name_crefname_do_generic:nnnn
- % #1 = counter name
- % #2 = env name
- % #3 = language name
- % #4 = c or C
- {
- \tl_gset:cn { #4 ref@ #1 @name }
- {
- \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ #3 _tl }
- \bool_if:NTF \g__crefthe_has_prep_bool
- {
- \tl_use:c { g_crthm_name_ cref_singular_ #2 _ #3 _tl }
- }
- {
- \tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl }
- }
- }
- \tl_gset:cn { #4 ref@ #1 @name@plural }
- { % Use the definite article of the original language,
- % with name's casing depends on the preposition and the article
- \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl }
- \bool_if:NTF \g__crefthe_has_prep_bool
- {
- \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
- }
- {
- \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
- }
- }
-
- \seq_if_in:NnF \g__crthm_format_already_set_seq { #2 _ #3 }
- {
- \@crefdefineallformats { #1 }
- \seq_gput_right:Nn \g__crthm_format_already_set_seq { #2 _ #3 }
- }
-
- \tl_if_exist:cF { g_crthm_number_style_ #2 _tl }
- {
- \tl_new:c { g_crthm_number_style_ #2 _tl }
- }
-
- % Redefine the cref formats so that definite articles are placed outside the hyperlinks
- \crthm_modify_format_according_to_nameinlink:nnn
- { \crthm_define_format_short_version:nnnn { #2 } { #4 ref@ #1 @format } }
- { \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ #3 _tl } }
- {
- \bool_if:NTF \g__crefthe_has_prep_bool
- {
- \tl_use:c { g_crthm_name_ cref_singular_ #2 _ #3 _tl }
- }
- {
- \tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl }
- }
- }
- \crthm_modify_format_according_to_nameinlink:nnn
- { \crthm_define_format_short_version:nnnn { #2 } { #4 ref@ #1 @format@first } }
- { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
- {
- \bool_if:NTF \g__crefthe_has_prep_bool
- {
- \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
- }
- {
- \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
- }
- }
- \cs_set:cpn { #4 ref@ #1 @format@second } ##1##2##3
- {
- \crefpairconjunction
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
- \cs_set:cpn { #4 ref@ #1 @format@middle } ##1##2##3
- {
- \crefmiddleconjunction
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
- \cs_set:cpn { #4 ref@ #1 @format@last } ##1##2##3
- {
- \creflastconjunction
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
-
- \crthm_modify_format_according_to_nameinlink:nnn
- { \crthm_define_format_long_version:nnnn { #2 } { #4 refrange@ #1 @format } }
- { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
- {
- \bool_if:NTF \g__crefthe_has_prep_bool
- {
- \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
- }
- {
- \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
- }
- }
- \crthm_modify_format_according_to_nameinlink:nnn
- { \crthm_define_format_long_version:nnnn { #2 } { #4 refrange@ #1 @format@first } }
- { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
- {
- \bool_if:NTF \g__crefthe_has_prep_bool
- {
- \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
- }
- {
- \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
- }
- }
- \cs_set:cpn { #4 refrange@ #1 @format@second } ##1##2##3##4##5##6
- {
- \crefpairconjunction
- \group_begin:
- \crthm_format_long_generic:nnnnnn
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
- { ##3 } { ##4 } { ##5 } { ##6 }
- \group_end:
- }
- \cs_set:cpn { #4 refrange@ #1 @format@middle } ##1##2##3##4##5##6
- {
- \crefmiddleconjunction
- \group_begin:
- \crthm_format_long_generic:nnnnnn
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
- { ##3 } { ##4 } { ##5 } { ##6 }
- \group_end:
- }
- \cs_set:cpn { #4 refrange@ #1 @format@last } ##1##2##3##4##5##6
- {
- \creflastconjunction
- \group_begin:
- \crthm_format_long_generic:nnnnnn
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
- { ##3 } { ##4 } { ##5 } { ##6 }
- \group_end:
- }
-
- % Redefine the labelcref formats to match the numbering format
- \cs_set:cpn { labelcref@ #1 @format } ##1##2##3
- {
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
- \cs_set_eq:cc { labelcref@ #1 @format@first } { labelcref@ #1 @format }
- \cs_set:cpn { labelcref@ #1 @format@second } ##1##2##3
- {
- \crefpairconjunction
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
- \cs_set:cpn { labelcref@ #1 @format@middle } ##1##2##3
- {
- \crefmiddleconjunction
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
- \cs_set:cpn { labelcref@ #1 @format@last } ##1##2##3
- {
- \creflastconjunction
- \group_begin:
- \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
- \group_end:
- }
-
- \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format } {} {}
- \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format@first } {} {}
- \cs_set:cpn { labelcrefrange@ #1 @format@second } ##1##2##3##4##5##6
- {
- \crefpairconjunction
- \group_begin:
- \crthm_format_long_generic:nnnnnn
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
- { ##3 } { ##4 } { ##5 } { ##6 }
- \group_end:
- }
- \cs_set:cpn { labelcrefrange@ #1 @format@middle } ##1##2##3##4##5##6
- {
- \crefmiddleconjunction
- \group_begin:
- \crthm_format_long_generic:nnnnnn
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
- { ##3 } { ##4 } { ##5 } { ##6 }
- \group_end:
- }
- \cs_set:cpn { labelcrefrange@ #1 @format@last } ##1##2##3##4##5##6
- {
- \creflastconjunction
- \group_begin:
- \crthm_format_long_generic:nnnnnn
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
- { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
- { ##3 } { ##4 } { ##5 } { ##6 }
- \group_end:
- }
- }
-
-\cs_new:Nn \crthm_modify_format_according_to_nameinlink:nnn
- % #1 = the macro (and argument) to be used
- % #2 = content always before the hyperlink beginning mark
- % #3 = content before or after the hyperlink beginning mark, depending on whether nameinlink=true
- {
- \bool_if:NTF \l__crthm_nameinlink_bool
- {
- #1 { #2 } { #3 }
- }
- {
- #1 { #2 #3 \nobreakspace } { }
- }
- }
-
-\cs_new:Nn \crthm_define_format_short_version:nnnn
- % #1 = name of the environment
- % #2 = name of the format command
- % #3 = content before the hyperlink beginning mark
- % #4 = content after the hyperlink beginning mark
- {
- \cs_if_exist:cF { crthm_format_ #2 :nnn }
- {
- \cs_new:cn { crthm_format_ #2 :nnn }
- {
- { #3 } ##2 { #4 }
- \tl_if_blank:nF { #4 } { \nobreakspace }
- { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } } ##3
- }
- \cs_set_eq:cc { #2 } { crthm_format_ #2 :nnn }
- }
- }
-\cs_new:Nn \crthm_define_format_long_version:nnnn
- % #1 = name of the environment
- % #2 = name of the format command
- % #3 = content before the hyperlink beginning mark
- % #4 = content after the hyperlink beginning mark
- {
- \cs_if_exist:cF { crthm_format_ #2 :nnnnnn }
- {
- \cs_new:cn { crthm_format_ #2 :nnnnnn }
- {
- { #3 } ##3 { #4 }
- \tl_if_blank:nF { #4 } { \nobreakspace } \crefrangepreconjunction
- { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } }
- ##4 \crefrangeconjunction
- ##5 { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##2 } } ##6
- \crefrangepostconjunction
- }
- \cs_set_eq:cc { #2 } { crthm_format_ #2 :nnnnnn }
- }
- }
-
-\cs_new:Nn \crthm_format_short_generic:nnn
- {
- #2 { #1 } #3
- }
-\cs_new:Nn \crthm_format_long_generic:nnnnnn
- {
- \crefrangepreconjunction
- #3 { #1 } #4
- \crefrangeconjunction
- #5 { #2 } #6
- \crefrangepostconjunction
- }
-
-
-\cs_new:Nn \crthm_set_name_style_heading:nn
- % #1 = env name
- % #2 = the settings
- {
- \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_heading }
- }
-\cs_generate_variant:Nn \crthm_set_name_style_heading:nn { en }
-
-\cs_new:Nn \__crthm_set_name_style_heading:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding heading style
- {
- \tl_gset:cn { g_crthm_style_heading_ #1 _ #2 _tl } { \normalfont #3 }
- }
-
-\cs_new:Nn \crthm_set_name_style_crefname:nn
- % #1 = env name
- % #2 = the settings
- {
- \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_crefname }
- }
-\cs_generate_variant:Nn \crthm_set_name_style_crefname:nn { en }
-
-\cs_new:Nn \__crthm_set_name_style_crefname:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding crefname style
- {
- \tl_gset:cn { g_crthm_style_crefname_ #1 _ #2 _tl } { \normalfont #3 }
- }
-
-\cs_new:Nn \crthm_set_name_style_Crefname:nn
- % #1 = env name
- % #2 = the settings
- {
- \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_Crefname }
- }
-\cs_generate_variant:Nn \crthm_set_name_style_Crefname:nn { en }
-
-\cs_new:Nn \__crthm_set_name_style_Crefname:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding Crefname style
- {
- \tl_gset:cn { g_crthm_style_Crefname_ #1 _ #2 _tl } { \normalfont #3 }
- }
-
-\cs_new:Nn \crthm_set_name_style_numbering:nn
- % #1 = env name
- % #2 = the settings
- {
- \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_numbering }
- }
-\cs_generate_variant:Nn \crthm_set_name_style_numbering:nn { en }
-
-\cs_new:Nn \__crthm_set_name_style_numbering:nnn
- % #1 = env name
- % #2 = language name
- % #3 = corresponding numbering style
- {
- \tl_gset:cn { g_crthm_number_style_ #1 _tl } { \normalfont #3 }
- }
-
-
-\tl_new:N \g_crthm_combined_name_sep_tl
-\tl_gset:Nn \g_crthm_combined_name_sep_tl { - }
-
-\cs_new:Nn \crthm_set_name_with_existed_names:nn
- % #1 = env name
- % #2 = list of existed environments
- {
- \clist_map_inline:Nn \g_crthm_supported_language_clist
- { % ##1 = language name
- \seq_gclear_new:c { g_crthm_name_heading_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_cref_article_singular_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_cref_article_plural_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_cref_singular_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_cref_plural_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_Cref_article_singular_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_Cref_article_plural_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_Cref_singular_ #1 _ ##1 _seq }
- \seq_gclear_new:c { g_crthm_name_Cref_plural_ #1 _ ##1 _seq }
- \bool_set_true:N \l_tmpa_bool
- \regex_split:nnN { \s* ; \s* } { #2 } { \l_tmpa_seq }
- \seq_map_inline:Nn \l_tmpa_seq
- { % ####1 = existed environments
- % Here we use the definite article of the last environment as that of the combined environment
- % Uncomment the lines below if you wish to use the definite article of the first environment
- % \bool_if:NT \l_tmpa_bool
- % {
- \tl_gset_eq:cc { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl } { g_crthm_core_name_cref_article_singular_ ####1 _ ##1 _tl }
- \tl_gset_eq:cc { g_crthm_saved_name_cref_article_plural_ #1 _ ##1 _tl } { g_crthm_core_name_cref_article_plural_ ####1 _ ##1 _tl }
- \tl_gset_eq:cc { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl } { g_crthm_core_name_Cref_article_singular_ ####1 _ ##1 _tl }
- \tl_gset_eq:cc { g_crthm_saved_name_Cref_article_plural_ #1 _ ##1 _tl } { g_crthm_core_name_Cref_article_plural_ ####1 _ ##1 _tl }
- % \bool_set_false:N \l_tmpa_bool
- % }
- \seq_gput_right:cn { g_crthm_name_heading_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_heading_ ####1 _ ##1 _tl } }
- \seq_gput_right:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_cref_singular_ ####1 _ ##1 _tl } }
- \seq_gput_right:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_cref_plural_ ####1 _ ##1 _tl } }
- \seq_gput_right:cn { g_crthm_name_Cref_singular_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_Cref_singular_ ####1 _ ##1 _tl } }
- \seq_gput_right:cn { g_crthm_name_Cref_plural_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_Cref_plural_ ####1 _ ##1 _tl } }
- % set the numbering style to be the same as the last environment
- \tl_gset_eq:cc { g_crthm_number_style_ #1 _tl } { g_crthm_number_style_ ####1 _tl }
- }
- % set heading name for the combined environment
- \tl_gset:cn { g_crthm_name_heading_ #1 _ ##1 _tl } { \seq_use:cn { g_crthm_name_heading_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- % set crefname for the combined environment
- \tl_if_empty:cTF { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl }
- {
- \__crthm_set_name_crefname:nnn { #1 } { ##1 }
- {
- { \seq_use:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- { \seq_use:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- }
- }
- {
- \__crthm_set_name_crefname:nnn { #1 } { ##1 }
- {
- [ \tl_use:c { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl } ]
- { \seq_use:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- [ \tl_use:c { g_crthm_saved_name_cref_article_plural_ #1 _ ##1 _tl } ]
- { \seq_use:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- }
- }
- % set Crefname for the combined environment
- \tl_if_empty:cTF { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl }
- {
- \__crthm_set_name_Crefname:nnn { #1 } { ##1 }
- {
- { \seq_use:cn { g_crthm_name_Cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- { \seq_use:cn { g_crthm_name_Cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- }
- }
- {
- \__crthm_set_name_Crefname:nnn { #1 } { ##1 }
- {
- [ \tl_use:c { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl } ]
- { \seq_use:cn { g_crthm_name_Cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- [ \tl_use:c { g_crthm_saved_name_Cref_article_plural_ #1 _ ##1 _tl } ]
- { \seq_use:cn { g_crthm_name_Cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
- }
- }
- }
- }
-\cs_generate_variant:Nn \crthm_set_name_with_existed_names:nn { en }
-
-
-\NewDocumentCommand \NameTheorem { m m }
- {
- \crthm_name_theorem:nn { #1 } { #2 }
- }
-
-\cs_new:Nn \crthm_name_theorem:nn
- {
- \tl_set:Nn \l__crthm_current_env_tl { #1 }
- \cs_if_exist:cF { c@ #1 }
- {
- \newcounter { #1 }
- }
- \keys_set:nn { create-theorem-naming } { #2 }
- }
-
-
-\tl_new:N \l__crthm_current_lang_tl
-
-\keys_define:nn { create-theorem-naming-per-language }
- {
- , heading .code:n = { \crthm_set_name_per_lang_heading:en { \l__crthm_current_lang_tl } { #1 } }
- , heading .value_required:n = true
- , crefname .code:n = { \crthm_set_name_per_lang_crefname:en { \l__crthm_current_lang_tl } { #1 } }
- , crefname .value_required:n = true
- , Crefname .code:n = { \crthm_set_name_per_lang_Crefname:en { \l__crthm_current_lang_tl } { #1 } }
- , Crefname .value_required:n = true
- , unknown .code:n = {}
- }
-
-\cs_new:Nn \crthm_set_name_per_lang_heading:nn
- % #1 = language name
- % #2 = the settings
- {
- \keyval_parse:nnn
- {}
- { \use:c { __crthm_set_name_per_lang_heading:nnn } { #1 } }
- { #2 }
- }
-\cs_generate_variant:Nn \crthm_set_name_per_lang_heading:nn { en }
-
-\cs_new:Nn \__crthm_set_name_per_lang_heading:nnn
- % #1 = language name
- % #2 = env name
- % #3 = corresponding heading name
- {
- \tl_if_exist:cF { g_crthm_style_heading_ #2 _ #1 _tl }
- {
- \tl_new:c { g_crthm_style_heading_ #2 _ #1 _tl }
- }
- \tl_gset:cn { g_crthm_name_heading_ #2 _ #1 _tl } { \tl_use:c { g_crthm_style_heading_ #2 _ #1 _tl } { #3 } }
- }
-
-\cs_new:Nn \crthm_set_name_per_lang_crefname:nn
- % #1 = language name
- % #2 = the settings
- {
- \crthm_set_name_per_lang_crefname_generic:nnn { #1 } { #2 } { c }
- }
-\cs_generate_variant:Nn \crthm_set_name_per_lang_crefname:nn { en }
-
-\cs_new:Nn \crthm_set_name_per_lang_Crefname:nn
- % #1 = language name
- % #2 = the settings
- {
- \crthm_set_name_per_lang_crefname_generic:nnn { #1 } { #2 } { C }
- }
-\cs_generate_variant:Nn \crthm_set_name_per_lang_Crefname:nn { en }
-
-\cs_new:Nn \crthm_set_name_per_lang_crefname_generic:nnn
- % #1 = language name
- % #2 = the settings
- % #3 = c or C
- {
- \keyval_parse:nnn
- {}
- { \use:c { __crthm_set_name_per_lang_ #3 refname:nnn } { #1 } }
- { #2 }
- }
-
-\cs_new:Nn \__crthm_set_name_per_lang_crefname:nnn
- % #1 = language name
- % #2 = env name
- % #3 = corresponding crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
- {
- \str_if_in:nnTF { #3 } { = }
- {
- \crefthe_parse_variant:n { #3 }
- \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #2 } { #1 } } { c }
- }
- {
- \__crthm_set_name_crefname_generic:w { #2 } { #1 } #3 { c }
- }
- }
-
-\cs_new:Nn \__crthm_set_name_per_lang_Crefname:nnn
- % #1 = language name
- % #2 = env name
- % #3 = corresponding Crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
- {
- \str_if_in:nnTF { #3 } { = }
- {
- \crefthe_parse_variant:n { #3 }
- \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #2 } { #1 } } { C }
- }
- {
- \__crthm_set_name_crefname_generic:w { #2 } { #1 } #3 { C }
- }
- }
-
-
-\NewDocumentCommand \NameTheorems { m m }
- {
- \crthm_name_theorems:nn { #1 } { #2 }
- }
-
-\cs_new:Nn \crthm_name_theorems:nn
- {
- \tl_set:Nn \l__crthm_current_lang_tl { #1 }
- \crthm_add_to_language_list:n { #1 }
- \keys_set:nn { create-theorem-naming-per-language } { #2 }
- }
-
-
-\tl_const:Nn \c__crthm_qedsymbol_tl { \Box }
-\bool_new:N \l__crthm_creating_qed_bool
-\tl_new:N \l__crthm_creating_qed_tl
-\bool_new:N \l__crthm_creating_apply_style_bool
-\tl_new:N \l__crthm_creating_apply_style_tl
-\bool_new:N \l__crthm_creating_numberless_bool
-\bool_new:N \l__crthm_creating_create_starred_bool
-\bool_new:N \l__crthm_creating_copy_existed_bool
-\tl_new:N \l__crthm_creating_copy_existed_tl
-\keys_define:nn { create-theorem-creating }
- {
- , name .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
- , name .value_required:n = true
- , name~style .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
- , name~style .value_required:n = true
- , name-style .meta:n = { name~style = { #1 } }
- , name-style .value_required:n = true
- , name style .meta:n = { name~style = { #1 } }
- , name style .value_required:n = true
- , use~name .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { use~name = #1 } }
- , use~name .value_required:n = true
- , use-name .meta:n = { use~name = { #1 } }
- , use-name .value_required:n = true
- , use name .meta:n = { use~name = { #1 } }
- , use name .value_required:n = true
- , combined .meta:n = { use~name = { #1 } }
- , combined .value_required:n = true
- , style .code:n = { \bool_set_true:N \l__crthm_creating_apply_style_bool
- \tl_set:Nn \l__crthm_creating_apply_style_tl { #1 } }
- , style .value_required:n = true
- , apply~style .meta:n = { style = { #1 } }
- , apply~style .value_required:n = true
- , apply-style .meta:n = { style = { #1 } }
- , apply-style .value_required:n = true
- , apply style .meta:n = { style = { #1 } }
- , apply style .value_required:n = true
- , qed .code:n = { \bool_set_true:N \l__crthm_creating_qed_bool
- \tl_set:Nn \l__crthm_creating_qed_tl { #1 } }
- , qed .default:n = \c__crthm_qedsymbol_tl
- , qed~symbol .meta:n = { qed = #1 }
- , qed~symbol .default:n = \c__crthm_qedsymbol_tl
- , qed-symbol .meta:n = { qed = #1 }
- , qed-symbol .default:n = \c__crthm_qedsymbol_tl
- , qed symbol .meta:n = { qed = #1 }
- , qed symbol .default:n = \c__crthm_qedsymbol_tl
- , numberless .bool_set:N = \l__crthm_creating_numberless_bool
- , create~starred~version .bool_set:N = \l__crthm_creating_create_starred_bool
- , create-starred-version .meta:n = { create~starred~version }
- , create starred version .meta:n = { create~starred~version }
- , create~numberless~version .meta:n = { create~starred~version }
- , create-numberless-version .meta:n = { create~starred~version }
- , create numberless version .meta:n = { create~starred~version }
- , copy~existed .code:n = { \bool_set_true:N \l__crthm_creating_copy_existed_bool
- \tl_set:Nn \l__crthm_creating_copy_existed_tl { #1 } }
- , copy~existed .value_required:n = true
- , copy-existed .meta:n = { copy~existed = { #1 } }
- , copy-existed .value_required:n = true
- , copy existed .meta:n = { copy~existed = { #1 } }
- , copy existed .value_required:n = true
- , quiet .bool_set:N = \l__crthm_creating_quiet_bool
- , quiet .initial:n = { false }
- , unknown .code:n = {}
- }
-
-\keys_define:nn { create-theorem-creating / counter-management }
- {
- , parent~counter .code:n = { \crthm_counter_within:en { \l__crthm_current_env_tl } { #1 } }
- , parent~counter .value_required:n = true
- , parent-counter .meta:n = { parent~counter = { #1 } }
- , parent-counter .value_required:n = true
- , parent counter .meta:n = { parent~counter = { #1 } }
- , parent counter .value_required:n = true
- , number~within .meta:n = { parent~counter = { #1 } }
- , number~within .value_required:n = true
- , number-within .meta:n = { parent~counter = { #1 } }
- , number-within .value_required:n = true
- , number within .meta:n = { parent~counter = { #1 } }
- , number within .value_required:n = true
- , shared~counter .code:n = { \crthm_counter_alias:en { \l__crthm_current_env_tl } { #1 } }
- , shared~counter .value_required:n = true
- , shared-counter .meta:n = { shared~counter = { #1 } }
- , shared-counter .value_required:n = true
- , shared counter .meta:n = { shared~counter = { #1 } }
- , shared counter .value_required:n = true
- , number~like .meta:n = { shared~counter = { #1 } }
- , number~like .value_required:n = true
- , number-like .meta:n = { shared~counter = { #1 } }
- , number-like .value_required:n = true
- , number like .meta:n = { shared~counter = { #1 } }
- , number like .value_required:n = true
- , unknown .code:n = {}
- }
-
-
-\NewDocumentCommand \CreateTheorem { m m }
- {
- \clist_map_inline:nn { #1 }
- {
- \crthm_create_theorem:nn { ##1 } { #2 }
- }
- }
-
-\msg_new:nnn { create-theorem }
- { env-not-created }
- { The~theorem-like~environment~"#1"~cannot~be~created,~an~environment~with~the~same~name~has~already~existed. }
-
-\msg_new:nnn { create-theorem }
- { env-not-named }
- { The~theorem-like~environment~"#1"~cannot~be~created,~you~have~to~name~it~before~initialization. }
-
-\cs_new:Nn \crthm_create_theorem:nn
- % #1 = env name
- % #2 = options
- {
- \tl_set:Nn \l__crthm_current_env_tl { #1 }
- \bool_set_false:N \l__crthm_creating_apply_style_bool
- \bool_set_false:N \l__crthm_creating_numberless_bool
- \bool_set_false:N \l__crthm_creating_qed_bool
- \bool_set_false:N \l__crthm_creating_create_starred_bool
- \bool_set_false:N \l__crthm_creating_copy_existed_bool
- \keys_set:nn { create-theorem-creating } { #2 }
- \bool_if:NTF \l__crthm_creating_copy_existed_bool
- {
- \__crthm_copy_env:ee { \l__crthm_current_env_tl } { \l__crthm_creating_copy_existed_tl }
- \bool_if:NT \l__crthm_creating_create_starred_bool
- {
- \__crthm_copy_env:ee { \l__crthm_current_env_tl * } { \l__crthm_creating_copy_existed_tl * }
- }
- }
- {
- \cs_if_exist:cTF { #1 }
- {
- \bool_if:NF \l__crthm_creating_quiet_bool
- {
- \msg_warning:nnn { create-theorem } { env-not-created } { #1 }
- }
- }
- {
- \cs_if_exist:cTF { c@ #1 }
- {
- \IfPackageLoadedTF { ntheorem }
- {
- \bool_if:NT \l__crthm_creating_qed_bool
- {
- \theoremsymbol { \ensuremath { \l__crthm_creating_qed_tl } }
- }
- } {}
- \group_begin:
- \bool_if:NTF \l__crthm_creating_apply_style_bool
- {
- \exp_args:No \theoremstyle { \l__crthm_creating_apply_style_tl }
- }
- {
- \tl_if_exist:cT { c_crthm_theorem_style_preset_ #1 _tl }
- {
- \exp_args:Nv \theoremstyle { c_crthm_theorem_style_preset_ #1 _tl }
- }
- }
- \bool_if:NTF \l__crthm_creating_numberless_bool
- {
- \crthm_newtheorem:w*{ #1 _crthm_regional } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
- }
- {
- \crthm_newtheorem:w { #1 _crthm_regional } [#1] { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
- }
- \bool_if:NT \l__crthm_creating_create_starred_bool
- {
- \crthm_newtheorem:w*{ #1 * } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
- }
- \group_end:
- \IfPackageLoadedTF { ntheorem }
- {
- \bool_if:NT \l__crthm_creating_qed_bool
- {
- \theoremsymbol { }
- }
- } {}
- \NewDocumentEnvironment { #1 } { O{} }
- % In "regionalref" mode, the counter received by the referencing system is "#1 _crthm_regional"
- % while in "originalref" mode, the counter received is "#1 _crthm_original_\languagename"
- {
- \tl_if_blank:nTF { ##1 }
- {
- \begin{ #1 _crthm_regional }
- }
- {
- \begin{ #1 _crthm_regional }[{##1}]
- }
- \bool_if:NF \l__crthm_regionalref_bool
- {
- \addtocounter { #1 _crthm_original_\languagename } { -1 }
- \refstepcounter { #1 _crthm_original_\languagename }
- }
- }
- {
- \end{ #1 _crthm_regional }
- }
- \keys_set:nn { create-theorem-creating / counter-management } { #2 }
-
- \IfPackageLoadedTF { amsthm }
- {
- \bool_if:NT \l__crthm_creating_qed_bool
- {
- \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { \l__crthm_creating_qed_tl } } \pushQED{\qed} }
- \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /end } { crthm } { \popQED }
- \bool_if:NT \l__crthm_creating_create_starred_bool
- {
- \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl * /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { \l__crthm_creating_qed_tl } } \pushQED{\qed} }
- \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl * /end } { crthm } { \popQED }
- }
- }
- } {}
- }
- {
- \msg_error:nnn { create-theorem } { env-not-named } { #1 }
- }
- }
- }
- }
-
-\cs_new:Nn \__crthm_copy_env:nn
- {
- \cs_set_eq:cc { #1 } { #2 }
- \cs_set_eq:cc { end #1 } { end #2 }
- }
-\cs_generate_variant:Nn \__crthm_copy_env:nn { ee }
-
-\cs_new:Nn \crthm_counter_within:nn
- {
- \counterwithin { #1 } { #2 }
- }
-\cs_generate_variant:Nn \crthm_counter_within:nn { en }
-
-\cs_new:Nn \crthm_counter_alias:nn
- {
- \cs_if_exist:cTF { c@ #2 }
- {
- \cs_gset_eq:cc { c@ #1 } { c@ #2 }
- \cs_gset_eq:cc { the #1 } { the #2 }
- \cs_gset_eq:cc { theH #1 } { theH #2 }
- \cs_gset_eq:cc { p@ #1 } { p@ #2 }
- \cs_gset_eq:cc { cl@ #1 } { cl@ #2 }
- }
- {
- \@nocounterr { #2 }
- }
- }
-\cs_generate_variant:Nn \crthm_counter_alias:nn { en }
-
-
-\keys_define:nn { create-theorem-setting }
- {
- , name .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
- , name .value_required:n = true
- , name~style .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
- , name~style .value_required:n = true
- , name-style .meta:n = { name~style = { #1 } }
- , name-style .value_required:n = true
- , name style .meta:n = { name~style = { #1 } }
- , name style .value_required:n = true
- , qed .code:n = {
- \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { #1 } } }
- }
- , qed .default:n = \c__crthm_qedsymbol_tl
- , qed~symbol .meta:n = { qed = #1 }
- , qed~symbol .default:n = \c__crthm_qedsymbol_tl
- , qed-symbol .meta:n = { qed = #1 }
- , qed-symbol .default:n = \c__crthm_qedsymbol_tl
- , qed symbol .meta:n = { qed = #1 }
- , qed symbol .default:n = \c__crthm_qedsymbol_tl
- , parent~counter .code:n = { \crthm_counter_within:en { \l__crthm_current_env_tl } { #1 } }
- , parent~counter .value_required:n = true
- , parent-counter .meta:n = { parent~counter = { #1 } }
- , parent-counter .value_required:n = true
- , parent counter .meta:n = { parent~counter = { #1 } }
- , parent counter .value_required:n = true
- , number~within .meta:n = { parent~counter = { #1 } }
- , number~within .value_required:n = true
- , number-within .meta:n = { parent~counter = { #1 } }
- , number-within .value_required:n = true
- , number within .meta:n = { parent~counter = { #1 } }
- , number within .value_required:n = true
- , shared~counter .code:n = { \crthm_counter_alias:en { \l__crthm_current_env_tl } { #1 } }
- , shared~counter .value_required:n = true
- , shared-counter .meta:n = { shared~counter = { #1 } }
- , shared-counter .value_required:n = true
- , shared counter .meta:n = { shared~counter = { #1 } }
- , shared counter .value_required:n = true
- , number~like .meta:n = { shared~counter = { #1 } }
- , number~like .value_required:n = true
- , number-like .meta:n = { shared~counter = { #1 } }
- , number-like .value_required:n = true
- , number like .meta:n = { shared~counter = { #1 } }
- , number like .value_required:n = true
- , unknown .code:n = {}
- }
-
-
-\NewDocumentCommand \SetTheorem { m m }
- {
- \clist_map_inline:nn { #1 }
- {
- \prop_if_in:NnTF \l_crthm_binding_prop { ##1 }
- {
- \prop_get:NnN \l_crthm_binding_prop { ##1 } \l__crthm_current_env_tl
- }
- {
- \tl_set:Nn \l__crthm_current_env_tl { ##1 }
- }
- \keys_set:nn { create-theorem-setting } { #2 }
- }
- }
-
-\prop_new:N \l_crthm_binding_prop
-\NewDocumentCommand \SetTheoremBinding { m m }
- {
- \clist_map_inline:nn { #1 }
- {
- \prop_put:Nxx \l_crthm_binding_prop { ##1 } { #2 }
- }
- }
-
-
-\bool_if:NF \l__crthm_presetname_bool { \endinput }
-
-
%=============================
% --- Preset Names ---
%=============================
@@ -1443,6 +267,59 @@
}
}
+\NameTheorem { commentary }
+ {
+ , heading = {
+ , english = Commentary
+ , french = Commentaire
+ , ngerman = Kommentar
+ , italian = Commento
+ , portuguese = Comentário
+ , brazilian = Comentário
+ , spanish = Comentario
+ , schinese = 解说
+ , tchinese = 解說
+ , japanese = 解説 % コメント
+ , russian = Комментарий
+ }
+ , crefname = {
+ , english = {commentary}{commentaries}
+ , french = [le]{commentaire}[les]{commentaires}
+ , ngerman = { {Kommentar}{Kommentare}
+ , Nominativ = [der]{Kommentar}[die]{Kommentare}
+ , Genitiv = [des]{Kommentars}[der]{Kommentare}
+ , Dativ = [dem]{Kommentar}[den]{Kommentaren}
+ , Akkusativ = [den]{Kommentar}[die]{Kommentare}
+ }
+ , italian = [il]{commento}[i]{commenti}
+ , portuguese = [o]{comentário}[os]{comentários}
+ , brazilian = [o]{comentário}[os]{comentários}
+ , spanish = [el]{comentario}[los]{comentarios}
+ , schinese = {解说}{解说}
+ , tchinese = {解說}{解說}
+ , japanese = {解説}{解説}
+ , russian = {комментарий}{комментарии}
+ }
+ , Crefname = {
+ , english = {Commentary}{Commentaries}
+ , french = [Le]{commentaire}[Les]{commentaires}
+ , ngerman = { {Kommentar}{Kommentare}
+ , Nominativ = [Der]{Kommentar}[Die]{Kommentare}
+ , Genitiv = [Des]{Kommentars}[Der]{Kommentare}
+ , Dativ = [Dem]{Kommentar}[Den]{Kommentaren}
+ , Akkusativ = [Den]{Kommentar}[Die]{Kommentare}
+ }
+ , italian = [Il]{commento}[I]{commenti}
+ , portuguese = [O]{comentário}[Os]{comentários}
+ , brazilian = [O]{comentário}[Os]{comentários}
+ , spanish = [El]{comentario}[Los]{comentarios}
+ , schinese = {解说}{解说}
+ , tchinese = {解說}{解說}
+ , japanese = {解説}{解説}
+ , russian = {Комментарий}{Комментарии}
+ }
+ }
+
\NameTheorem { conclusion }
{
, heading = {
@@ -1824,8 +701,8 @@
, portuguese = Exercício
, brazilian = Exercício
, spanish = Ejercicio
- , schinese = 练习
- , tchinese = 練習
+ , schinese = 习题
+ , tchinese = 習題
, japanese = 練習
, russian = Упражнение
}
@@ -1842,8 +719,8 @@
, portuguese = [o]{exercício}[os]{exercícios}
, brazilian = [o]{exercício}[os]{exercícios}
, spanish = [el]{ejercicio}[los]{ejercicios}
- , schinese = {练习}{练习}
- , tchinese = {練習}{練習}
+ , schinese = {习题}{习题}
+ , tchinese = {習題}{習題}
, japanese = {練習}{練習}
, russian = {упражнение}{упражнения}
}
@@ -1860,8 +737,8 @@
, portuguese = [O]{exercício}[Os]{exercícios}
, brazilian = [O]{exercício}[Os]{exercícios}
, spanish = [El]{ejercicio}[Los]{ejercicios}
- , schinese = {练习}{练习}
- , tchinese = {練習}{練習}
+ , schinese = {习题}{习题}
+ , tchinese = {習題}{習題}
, japanese = {練習}{練習}
, russian = {Упражнение}{Упражнения}
}
@@ -2026,6 +903,59 @@
}
}
+\NameTheorem { motivation }
+ {
+ , heading = {
+ , english = Motivation
+ , french = Motivation
+ , ngerman = Motivation
+ , italian = Motivazione
+ , portuguese = Motivação
+ , brazilian = Motivação
+ , spanish = Motivacion
+ , schinese = 动机
+ , tchinese = 動機
+ , japanese = 動機 % モチベーション
+ , russian = Мотивация
+ }
+ , crefname = {
+ , english = {motivation}{motivations}
+ , french = [la]{motivation}[les]{motivations}
+ , ngerman = { {Motivation}{Motivationen}
+ , Nominativ = [die]{Motivation}[die]{Motivationen}
+ , Genitiv = [der]{Motivation}[der]{Motivationen}
+ , Dativ = [der]{Motivation}[den]{Motivationen}
+ , Akkusativ = [die]{Motivation}[die]{Motivationen}
+ }
+ , italian = [la]{motivazione}[le]{motivazioni}
+ , portuguese = [a]{motivação}[as]{motivações}
+ , brazilian = [a]{motivação}[as]{motivações}
+ , spanish = [la]{motivacion}[las]{motivaciones}
+ , schinese = {动机}{动机}
+ , tchinese = {動機}{動機}
+ , japanese = {動機}{動機}
+ , russian = {мотивация}{мотивации}
+ }
+ , Crefname = {
+ , english = {Motivation}{Motivations}
+ , french = [La]{motivation}[Les]{motivations}
+ , ngerman = { {Motivation}{Motivationen}
+ , Nominativ = [Die]{Motivation}[Die]{Motivationen}
+ , Genitiv = [Der]{Motivation}[Der]{Motivationen}
+ , Dativ = [Der]{Motivation}[Den]{Motivationen}
+ , Akkusativ = [Die]{Motivation}[Die]{Motivationen}
+ }
+ , italian = [La]{motivazione}[Le]{motivazioni}
+ , portuguese = [A]{motivação}[As]{motivações}
+ , brazilian = [A]{motivação}[As]{motivações}
+ , spanish = [La]{motivacion}[Las]{motivaciones}
+ , schinese = {动机}{动机}
+ , tchinese = {動機}{動機}
+ , japanese = {動機}{動機}
+ , russian = {Мотивация}{Мотивации}
+ }
+ }
+
\NameTheorem { notation }
{
, heading = {
@@ -2563,7 +1493,3 @@
\NameTheorem { corollary-definition } { combined = { corollary ; definition } }
\NameTheorem { proposition-definition } { combined = { proposition ; definition } }
\NameTheorem { theorem-definition } { combined = { theorem ; definition } }
-
-\endinput
-%%
-%% End of file `create-theorem.sty'.
diff --git a/macros/latex/contrib/create-theorem/code/create-theorem.sty b/macros/latex/contrib/create-theorem/code/create-theorem.sty
new file mode 100644
index 0000000000..355e7a6211
--- /dev/null
+++ b/macros/latex/contrib/create-theorem/code/create-theorem.sty
@@ -0,0 +1,1182 @@
+%%
+%% Copyright (C) 2021-2024 by Jinwen XU
+%% ------------------------------------
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+\ProvidesExplPackage
+ {create-theorem}
+ {2024/02/20a} {}
+ {Initializing theorem-like environments with multilingual support}
+
+\keys_define:nn { create-theorem }
+ {
+ , name-as-context .bool_set:N = \l__crthm_regionalref_bool
+ , name-as-context .initial:n = { true }
+ , name~as~context .bool_set:N = \l__crthm_regionalref_bool
+ , name as context .bool_set:N = \l__crthm_regionalref_bool
+ , regionalref .bool_set:N = \l__crthm_regionalref_bool
+ , name-as-is .bool_set_inverse:N = \l__crthm_regionalref_bool
+ , name~as~is .bool_set_inverse:N = \l__crthm_regionalref_bool
+ , name as is .bool_set_inverse:N = \l__crthm_regionalref_bool
+ , originalref .bool_set_inverse:N = \l__crthm_regionalref_bool
+ , name-in-link .bool_set:N = \l__crthm_nameinlink_bool
+ , name-in-link .initial:n = { false }
+ , name~in~link .bool_set:N = \l__crthm_nameinlink_bool
+ , name in link .bool_set:N = \l__crthm_nameinlink_bool
+ , no-preset-names .bool_set_inverse:N = \l__crthm_presetname_bool
+ , no-preset-names .initial:n = { false }
+ , no~preset~names .bool_set_inverse:N = \l__crthm_presetname_bool
+ , no preset names .bool_set_inverse:N = \l__crthm_presetname_bool
+ , unknown .code:n = {}
+ }
+\ProcessKeyOptions [ create-theorem ]
+
+\msg_new:nnn { create-theorem }
+ { no-backend }
+ { A~backend~(such~as~"amsthm")~~is~needed~to~provide~the~commands~"\iow_char:N \\newtheorem(*)"~and~"\iow_char:N \\theoremstyle"~with~the~usual~behaviour. }
+\cs_if_exist:cF { theoremstyle }
+ {
+ \msg_error:nn { create-theorem } { no-backend }
+ }
+
+\bool_if:NT \l__crthm_nameinlink_bool
+ {
+ \PassOptionsToPackage { nameinlink } { cleveref }
+ }
+\RequirePackage { crefthe }
+\RequirePackage { amsfonts }
+
+\IfPackageLoadedTF { thmtools }
+ {
+ \cs_gset_eq:NN \crthm_newtheorem:w \thmt@original@newtheorem
+ }
+ {
+ \cs_gset_eq:NN \crthm_newtheorem:w \newtheorem
+ }
+
+
+% Users should consider appending their languages to this list as needed,
+% otherwise the naming functionality may not work in monolingual documents.
+\clist_new:N \g_crthm_supported_language_clist
+\clist_gset:Nn \g_crthm_supported_language_clist
+ {
+ english ,
+ french ,
+ ngerman ,
+ italian ,
+ portuguese ,
+ brazilian ,
+ spanish ,
+ schinese ,
+ tchinese ,
+ japanese ,
+ russian ,
+ }
+
+\cs_new:Nn \crthm_add_to_language_list:n
+ {
+ \clist_gput_right:Nn \g_crthm_supported_language_clist { #1 }
+ \clist_gremove_duplicates:N \g_crthm_supported_language_clist
+ }
+
+\NewDocumentCommand \CreateTheoremAddLanguage { m }
+ {
+ \crthm_add_to_language_list:n { #1 }
+ }
+
+
+\tl_new:N \l__crthm_current_env_tl
+
+\keys_define:nn { create-theorem-naming }
+ {
+ , heading .code:n = { \crthm_set_name_heading:en { \l__crthm_current_env_tl } { #1 } }
+ , heading .value_required:n = true
+ , crefname .code:n = { \crthm_set_name_crefname:en { \l__crthm_current_env_tl } { #1 } }
+ , crefname .value_required:n = true
+ , Crefname .code:n = { \crthm_set_name_Crefname:en { \l__crthm_current_env_tl } { #1 } }
+ , Crefname .value_required:n = true
+ , heading~style .code:n = { \crthm_set_name_style_heading:en { \l__crthm_current_env_tl } { #1 } }
+ , heading~style .value_required:n = true
+ , heading-style .meta:n = { heading~style = { #1 } }
+ , heading-style .value_required:n = true
+ , heading style .meta:n = { heading~style = { #1 } }
+ , heading style .value_required:n = true
+ , crefname~style .code:n = { \crthm_set_name_style_crefname:en { \l__crthm_current_env_tl } { #1 } }
+ , crefname~style .value_required:n = true
+ , crefname-style .meta:n = { crefname~style = { #1 } }
+ , crefname-style .value_required:n = true
+ , crefname style .meta:n = { crefname~style = { #1 } }
+ , crefname style .value_required:n = true
+ , Crefname~style .code:n = { \crthm_set_name_style_Crefname:en { \l__crthm_current_env_tl } { #1 } }
+ , Crefname~style .value_required:n = true
+ , Crefname-style .meta:n = { Crefname~style = { #1 } }
+ , Crefname-style .value_required:n = true
+ , Crefname style .meta:n = { Crefname~style = { #1 } }
+ , Crefname style .value_required:n = true
+ , numbering~style .code:n = { \crthm_set_name_style_numbering:en { \l__crthm_current_env_tl } { #1 } }
+ , numbering~style .value_required:n = true
+ , numbering-style .meta:n = { numbering~style = { #1 } }
+ , numbering-style .value_required:n = true
+ , numbering style .meta:n = { numbering~style = { #1 } }
+ , numbering style .value_required:n = true
+ , use~name .code:n = { \crthm_set_name_with_existed_names:en { \l__crthm_current_env_tl } { #1 } }
+ , use~name .value_required:n = true
+ , use-name .meta:n = { use~name = { #1 } }
+ , use-name .value_required:n = true
+ , use name .meta:n = { use~name = { #1 } }
+ , use name .value_required:n = true
+ , combined .meta:n = { use~name = { #1 } }
+ , combined .value_required:n = true
+ , unknown .code:n = {}
+ }
+
+\cs_new:Nn \__crthm_set_generic:nnn
+ {
+ \str_if_in:nnTF { #2 } { = }
+ {% key-value definition
+ \keyval_parse:nnn
+ {}
+ { \use:c { __crthm_ #3 :nnn } { #1 } }
+ { #2 }
+ }
+ {% simple definition
+ \clist_map_inline:Nn \g_crthm_supported_language_clist
+ {
+ \use:c { __crthm_ #3 :nnn } { #1 } { ##1 } { #2 }
+ }
+ }
+ }
+
+\cs_new:Nn \crthm_set_name_heading:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \__crthm_set_generic:nnn { #1 } { #2 } { set_name_heading }
+ }
+\cs_generate_variant:Nn \crthm_set_name_heading:nn { en }
+
+\cs_new:Nn \__crthm_set_name_heading:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding heading name
+ {
+ \tl_if_exist:cF { g_crthm_style_heading_ #1 _ #2 _tl }
+ {
+ \tl_new:c { g_crthm_style_heading_ #1 _ #2 _tl }
+ }
+ \tl_gset:cn { g_crthm_name_heading_ #1 _ #2 _tl } { \tl_use:c { g_crthm_style_heading_ #1 _ #2 _tl } { #3 } }
+ }
+
+\cs_new:Nn \crthm_set_name_crefname:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \crthm_set_name_crefname_generic:nnn { #1 } { #2 } { c }
+ }
+\cs_generate_variant:Nn \crthm_set_name_crefname:nn { en }
+
+\cs_new:Nn \crthm_set_name_Crefname:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \crthm_set_name_crefname_generic:nnn { #1 } { #2 } { C }
+ }
+\cs_generate_variant:Nn \crthm_set_name_Crefname:nn { en }
+
+\cs_new:Nn \crthm_set_name_crefname_generic:nnn
+ % #1 = env name
+ % #2 = the settings
+ % #3 = c or C
+ {
+ \__crthm_set_generic:nnn { #1 } { #2 } { set_name_ #3 refname }
+ }
+
+\cs_new:Nn \__crthm_set_name_crefname:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
+ {
+ \str_if_in:nnTF { #3 } { = }
+ {
+ \crefthe_parse_variant:n { #3 }
+ \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #1 } { #2 } } { c }
+ }
+ {
+ \__crthm_set_name_crefname_generic:w { #1 } { #2 } #3 { c }
+ }
+ }
+
+\cs_new:Nn \__crthm_set_name_Crefname:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding Crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
+ {
+ \str_if_in:nnTF { #3 } { = }
+ {
+ \crefthe_parse_variant:n { #3 }
+ \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #1 } { #2 } } { C }
+ }
+ {
+ \__crthm_set_name_crefname_generic:w { #1 } { #2 } #3 { C }
+ }
+ }
+
+\NewExpandableDocumentCommand \__crthm_set_name_crefname_generic:w { m m O{} m O{} m m }
+ % #1 = env name
+ % #2 = language name
+ % #7 = c or C
+ {
+ % It is assumed that when #3 is empty, so is #5
+ \tl_if_blank:eTF { #3 }
+ {
+ \tl_gset:cn { g_crthm_core_name_ #7 ref_article_singular_ #1 _ #2 _tl } { }
+ \tl_gset:cn { g_crthm_core_name_ #7 ref_article_plural_ #1 _ #2 _tl } { }
+ \tl_gset:cn { g_crthm_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak }
+ \tl_gset:cn { g_crthm_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \nobreak \crefthemark { \crefthe_retrieve_space: } \nobreak }
+ }
+ {
+ \tl_gset:cn { g_crthm_core_name_ #7 ref_article_singular_ #1 _ #2 _tl } { #3 }
+ \tl_gset:cn { g_crthm_core_name_ #7 ref_article_plural_ #1 _ #2 _tl } { #5 }
+ \tl_gset:cn { g_crthm_name_ #7 ref_article_singular_ #1 _ #2 _tl } { \crefthemark { #3 } }
+ \tl_gset:cn { g_crthm_name_ #7 ref_article_plural_ #1 _ #2 _tl } { \crefthemark { #5 } }
+ }
+
+ \tl_if_exist:cF { g_crthm_style_ #7 refname_ #1 _ #2 _tl }
+ {
+ \tl_new:c { g_crthm_style_ #7 refname_ #1 _ #2 _tl }
+ }
+
+ \tl_if_blank:eTF { #4 }
+ {
+ \tl_gset:cn { g_crthm_name_ #7 ref_singular_ #1 _ #2 _tl } { \nobreak \crefthe_retrieve_space: \nobreak }
+ }
+ {
+ \tl_gset:cn { g_crthm_name_ #7 ref_singular_ #1 _ #2 _tl } { \tl_use:c { g_crthm_style_ #7 refname_ #1 _ #2 _tl } { #4 } }
+ }
+
+ \tl_if_blank:eTF { #6 }
+ {
+ \tl_gset:cn { g_crthm_name_ #7 ref_plural_ #1 _ #2 _tl } { \nobreak \crefthe_retrieve_space: \nobreak }
+ }
+ {
+ \tl_gset:cn { g_crthm_name_ #7 ref_plural_ #1 _ #2 _tl } { \tl_use:c { g_crthm_style_ #7 refname_ #1 _ #2 _tl } { #6 } }
+ }
+
+ \bool_if:NTF \l__crthm_regionalref_bool
+ {% "regionalref" mode
+ \use:c { __crthm_set_name_ #7 refname_do:nnn } { #1 _crthm_regional } { #1 } { \languagename }
+ }
+ {% "originalref" mode
+ \tl_if_exist:cF { c@ #1 _crthm_original_ #2 }
+ {
+ \crthm_counter_alias:nn { #1 _crthm_original_ #2 } { #1 }
+ \hook_gput_code:nnn { begindocument/before } { crthm }
+ {
+ \cs_set_eq:cc { the #1 _crthm_original_ #2 } { the #1 }
+ }
+ }
+ \use:c { __crthm_set_name_ #7 refname_do:nnn } { #1 _crthm_original_ #2 } { #1 } { #2 }
+ }
+ }
+
+\cs_new:Nn \__crthm_set_name_crefname_do:nnn
+ % #1 = counter name
+ % #2 = env name
+ % #3 = language name
+ {
+ \__crthm_set_name_crefname_do_generic:nnnn { #1 } { #2 } { #3 } { c }
+ }
+
+\cs_new:Nn \__crthm_set_name_Crefname_do:nnn
+ % #1 = counter name
+ % #2 = env name
+ % #3 = language name
+ {
+ \__crthm_set_name_crefname_do_generic:nnnn { #1 } { #2 } { #3 } { C }
+ }
+
+\seq_new:N \g__crthm_format_already_set_seq
+
+\cs_new:Nn \__crthm_set_name_crefname_do_generic:nnnn
+ % #1 = counter name
+ % #2 = env name
+ % #3 = language name
+ % #4 = c or C
+ {
+ \tl_gset:cn { #4 ref@ #1 @name }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ #3 _tl }
+ \bool_if:NTF \g__crefthe_has_prep_bool
+ {
+ \tl_use:c { g_crthm_name_ cref_singular_ #2 _ #3 _tl }
+ }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl }
+ }
+ }
+ \tl_gset:cn { #4 ref@ #1 @name@plural }
+ { % Use the definite article of the original language,
+ % with name's casing depends on the preposition and the article
+ \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl }
+ \bool_if:NTF \g__crefthe_has_prep_bool
+ {
+ \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
+ }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
+ }
+ }
+
+ \seq_if_in:NnF \g__crthm_format_already_set_seq { #2 _ #3 }
+ {
+ \@crefdefineallformats { #1 }
+ \seq_gput_right:Nn \g__crthm_format_already_set_seq { #2 _ #3 }
+ }
+
+ \tl_if_exist:cF { g_crthm_number_style_ #2 _tl }
+ {
+ \tl_new:c { g_crthm_number_style_ #2 _tl }
+ }
+
+ % Redefine the cref formats so that definite articles are placed outside the hyperlinks
+ \crthm_modify_format_according_to_nameinlink:nnn
+ { \crthm_define_format_short_version:nnnn { #2 } { #4 ref@ #1 @format } }
+ { \tl_use:c { g_crthm_name_ #4 ref_article_singular_ #2 _ #3 _tl } }
+ {
+ \bool_if:NTF \g__crefthe_has_prep_bool
+ {
+ \tl_use:c { g_crthm_name_ cref_singular_ #2 _ #3 _tl }
+ }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_singular_ #2 _ #3 _tl }
+ }
+ }
+ \crthm_modify_format_according_to_nameinlink:nnn
+ { \crthm_define_format_short_version:nnnn { #2 } { #4 ref@ #1 @format@first } }
+ { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
+ {
+ \bool_if:NTF \g__crefthe_has_prep_bool
+ {
+ \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
+ }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
+ }
+ }
+ \cs_set:cpn { #4 ref@ #1 @format@second } ##1##2##3
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { #4 ref@ #1 @format@middle } ##1##2##3
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { #4 ref@ #1 @format@last } ##1##2##3
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+
+ \crthm_modify_format_according_to_nameinlink:nnn
+ { \crthm_define_format_long_version:nnnn { #2 } { #4 refrange@ #1 @format } }
+ { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
+ {
+ \bool_if:NTF \g__crefthe_has_prep_bool
+ {
+ \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
+ }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
+ }
+ }
+ \crthm_modify_format_according_to_nameinlink:nnn
+ { \crthm_define_format_long_version:nnnn { #2 } { #4 refrange@ #1 @format@first } }
+ { \tl_use:c { g_crthm_name_ #4 ref_article_plural_ #2 _ #3 _tl } }
+ {
+ \bool_if:NTF \g__crefthe_has_prep_bool
+ {
+ \tl_use:c { g_crthm_name_ cref_plural_ #2 _ #3 _tl }
+ }
+ {
+ \tl_use:c { g_crthm_name_ #4 ref_plural_ #2 _ #3 _tl }
+ }
+ }
+ \cs_set:cpn { #4 refrange@ #1 @format@second } ##1##2##3##4##5##6
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { #4 refrange@ #1 @format@middle } ##1##2##3##4##5##6
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { #4 refrange@ #1 @format@last } ##1##2##3##4##5##6
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+
+ % Redefine the labelcref formats to match the numbering format
+ \cs_set:cpn { labelcref@ #1 @format } ##1##2##3
+ {
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set_eq:cc { labelcref@ #1 @format@first } { labelcref@ #1 @format }
+ \cs_set:cpn { labelcref@ #1 @format@second } ##1##2##3
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcref@ #1 @format@middle } ##1##2##3
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcref@ #1 @format@last } ##1##2##3
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_short_generic:nnn { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } } { ##2 } { ##3 }
+ \group_end:
+ }
+
+ \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format } {} {}
+ \crthm_define_format_long_version:nnnn { #2 } { labelcrefrange@ #1 @format@first } {} {}
+ \cs_set:cpn { labelcrefrange@ #1 @format@second } ##1##2##3##4##5##6
+ {
+ \crefpairconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcrefrange@ #1 @format@middle } ##1##2##3##4##5##6
+ {
+ \crefmiddleconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ \cs_set:cpn { labelcrefrange@ #1 @format@last } ##1##2##3##4##5##6
+ {
+ \creflastconjunction
+ \group_begin:
+ \crthm_format_long_generic:nnnnnn
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##1 } }
+ { \tl_use:c { g_crthm_number_style_ #2 _tl } { ##2 } }
+ { ##3 } { ##4 } { ##5 } { ##6 }
+ \group_end:
+ }
+ }
+
+\cs_new:Nn \crthm_modify_format_according_to_nameinlink:nnn
+ % #1 = the macro (and argument) to be used
+ % #2 = content always before the hyperlink beginning mark
+ % #3 = content before or after the hyperlink beginning mark, depending on whether nameinlink=true
+ {
+ \bool_if:NTF \l__crthm_nameinlink_bool
+ {
+ #1 { #2 } { #3 }
+ }
+ {
+ #1 { #2 #3 \nobreakspace } { }
+ }
+ }
+
+\cs_new:Nn \crthm_define_format_short_version:nnnn
+ % #1 = name of the environment
+ % #2 = name of the format command
+ % #3 = content before the hyperlink beginning mark
+ % #4 = content after the hyperlink beginning mark
+ {
+ \cs_if_exist:cF { crthm_format_ #2 :nnn }
+ {
+ \cs_new:cn { crthm_format_ #2 :nnn }
+ {
+ { #3 } ##2 { #4 }
+ \tl_if_blank:nF { #4 } { \nobreakspace }
+ { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } } ##3
+ }
+ \cs_set_eq:cc { #2 } { crthm_format_ #2 :nnn }
+ }
+ }
+\cs_new:Nn \crthm_define_format_long_version:nnnn
+ % #1 = name of the environment
+ % #2 = name of the format command
+ % #3 = content before the hyperlink beginning mark
+ % #4 = content after the hyperlink beginning mark
+ {
+ \cs_if_exist:cF { crthm_format_ #2 :nnnnnn }
+ {
+ \cs_new:cn { crthm_format_ #2 :nnnnnn }
+ {
+ { #3 } ##3 { #4 }
+ \tl_if_blank:nF { #4 } { \nobreakspace } \crefrangepreconjunction
+ { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##1 } }
+ ##4 \crefrangeconjunction
+ ##5 { \tl_use:c { g_crthm_number_style_ #1 _tl } { ##2 } } ##6
+ \crefrangepostconjunction
+ }
+ \cs_set_eq:cc { #2 } { crthm_format_ #2 :nnnnnn }
+ }
+ }
+
+\cs_new:Nn \crthm_format_short_generic:nnn
+ {
+ #2 { #1 } #3
+ }
+\cs_new:Nn \crthm_format_long_generic:nnnnnn
+ {
+ \crefrangepreconjunction
+ #3 { #1 } #4
+ \crefrangeconjunction
+ #5 { #2 } #6
+ \crefrangepostconjunction
+ }
+
+
+\cs_new:Nn \crthm_set_name_style_heading:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_heading }
+ }
+\cs_generate_variant:Nn \crthm_set_name_style_heading:nn { en }
+
+\cs_new:Nn \__crthm_set_name_style_heading:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding heading style
+ {
+ \tl_gset:cn { g_crthm_style_heading_ #1 _ #2 _tl } { \normalfont #3 }
+ }
+
+\cs_new:Nn \crthm_set_name_style_crefname:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_crefname }
+ }
+\cs_generate_variant:Nn \crthm_set_name_style_crefname:nn { en }
+
+\cs_new:Nn \__crthm_set_name_style_crefname:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding crefname style
+ {
+ \tl_gset:cn { g_crthm_style_crefname_ #1 _ #2 _tl } { \normalfont #3 }
+ }
+
+\cs_new:Nn \crthm_set_name_style_Crefname:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_Crefname }
+ }
+\cs_generate_variant:Nn \crthm_set_name_style_Crefname:nn { en }
+
+\cs_new:Nn \__crthm_set_name_style_Crefname:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding Crefname style
+ {
+ \tl_gset:cn { g_crthm_style_Crefname_ #1 _ #2 _tl } { \normalfont #3 }
+ }
+
+\cs_new:Nn \crthm_set_name_style_numbering:nn
+ % #1 = env name
+ % #2 = the settings
+ {
+ \__crthm_set_generic:nnn { #1 } { #2 } { set_name_style_numbering }
+ }
+\cs_generate_variant:Nn \crthm_set_name_style_numbering:nn { en }
+
+\cs_new:Nn \__crthm_set_name_style_numbering:nnn
+ % #1 = env name
+ % #2 = language name
+ % #3 = corresponding numbering style
+ {
+ \tl_gset:cn { g_crthm_number_style_ #1 _tl } { \normalfont #3 }
+ }
+
+
+\tl_new:N \g_crthm_combined_name_sep_tl
+\tl_gset:Nn \g_crthm_combined_name_sep_tl { - }
+
+\cs_new:Nn \crthm_set_name_with_existed_names:nn
+ % #1 = env name
+ % #2 = list of existed environments
+ {
+ \clist_map_inline:Nn \g_crthm_supported_language_clist
+ { % ##1 = language name
+ \seq_gclear_new:c { g_crthm_name_heading_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_cref_article_singular_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_cref_article_plural_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_cref_singular_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_cref_plural_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_Cref_article_singular_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_Cref_article_plural_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_Cref_singular_ #1 _ ##1 _seq }
+ \seq_gclear_new:c { g_crthm_name_Cref_plural_ #1 _ ##1 _seq }
+ \bool_set_true:N \l_tmpa_bool
+ \regex_split:nnN { \s* ; \s* } { #2 } { \l_tmpa_seq }
+ \seq_map_inline:Nn \l_tmpa_seq
+ { % ####1 = existed environments
+ % Here we use the definite article of the last environment as that of the combined environment
+ % Uncomment the lines below if you wish to use the definite article of the first environment
+ % \bool_if:NT \l_tmpa_bool
+ % {
+ \tl_gset_eq:cc { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl } { g_crthm_core_name_cref_article_singular_ ####1 _ ##1 _tl }
+ \tl_gset_eq:cc { g_crthm_saved_name_cref_article_plural_ #1 _ ##1 _tl } { g_crthm_core_name_cref_article_plural_ ####1 _ ##1 _tl }
+ \tl_gset_eq:cc { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl } { g_crthm_core_name_Cref_article_singular_ ####1 _ ##1 _tl }
+ \tl_gset_eq:cc { g_crthm_saved_name_Cref_article_plural_ #1 _ ##1 _tl } { g_crthm_core_name_Cref_article_plural_ ####1 _ ##1 _tl }
+ % \bool_set_false:N \l_tmpa_bool
+ % }
+ \seq_gput_right:cn { g_crthm_name_heading_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_heading_ ####1 _ ##1 _tl } }
+ \seq_gput_right:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_cref_singular_ ####1 _ ##1 _tl } }
+ \seq_gput_right:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_cref_plural_ ####1 _ ##1 _tl } }
+ \seq_gput_right:cn { g_crthm_name_Cref_singular_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_Cref_singular_ ####1 _ ##1 _tl } }
+ \seq_gput_right:cn { g_crthm_name_Cref_plural_ #1 _ ##1 _seq } { \tl_use:c { g_crthm_name_Cref_plural_ ####1 _ ##1 _tl } }
+ % set the numbering style to be the same as the last environment
+ \tl_gset_eq:cc { g_crthm_number_style_ #1 _tl } { g_crthm_number_style_ ####1 _tl }
+ }
+ % set heading name for the combined environment
+ \tl_gset:cn { g_crthm_name_heading_ #1 _ ##1 _tl } { \seq_use:cn { g_crthm_name_heading_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ % set crefname for the combined environment
+ \tl_if_empty:cTF { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl }
+ {
+ \__crthm_set_name_crefname:nnn { #1 } { ##1 }
+ {
+ { \seq_use:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ { \seq_use:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ }
+ }
+ {
+ \__crthm_set_name_crefname:nnn { #1 } { ##1 }
+ {
+ [ \tl_use:c { g_crthm_saved_name_cref_article_singular_ #1 _ ##1 _tl } ]
+ { \seq_use:cn { g_crthm_name_cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ [ \tl_use:c { g_crthm_saved_name_cref_article_plural_ #1 _ ##1 _tl } ]
+ { \seq_use:cn { g_crthm_name_cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ }
+ }
+ % set Crefname for the combined environment
+ \tl_if_empty:cTF { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl }
+ {
+ \__crthm_set_name_Crefname:nnn { #1 } { ##1 }
+ {
+ { \seq_use:cn { g_crthm_name_Cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ { \seq_use:cn { g_crthm_name_Cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ }
+ }
+ {
+ \__crthm_set_name_Crefname:nnn { #1 } { ##1 }
+ {
+ [ \tl_use:c { g_crthm_saved_name_Cref_article_singular_ #1 _ ##1 _tl } ]
+ { \seq_use:cn { g_crthm_name_Cref_singular_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ [ \tl_use:c { g_crthm_saved_name_Cref_article_plural_ #1 _ ##1 _tl } ]
+ { \seq_use:cn { g_crthm_name_Cref_plural_ #1 _ ##1 _seq } { \g_crthm_combined_name_sep_tl } }
+ }
+ }
+ }
+ }
+\cs_generate_variant:Nn \crthm_set_name_with_existed_names:nn { en }
+
+
+\NewDocumentCommand \NameTheorem { m m }
+ {
+ \crthm_name_theorem:nn { #1 } { #2 }
+ }
+
+\cs_new:Nn \crthm_name_theorem:nn
+ {
+ \tl_set:Nn \l__crthm_current_env_tl { #1 }
+ \cs_if_exist:cF { c@ #1 }
+ {
+ \newcounter { #1 }
+ }
+ \keys_set:nn { create-theorem-naming } { #2 }
+ }
+
+
+\tl_new:N \l__crthm_current_lang_tl
+
+\keys_define:nn { create-theorem-naming-per-language }
+ {
+ , heading .code:n = { \crthm_set_name_per_lang_heading:en { \l__crthm_current_lang_tl } { #1 } }
+ , heading .value_required:n = true
+ , crefname .code:n = { \crthm_set_name_per_lang_crefname:en { \l__crthm_current_lang_tl } { #1 } }
+ , crefname .value_required:n = true
+ , Crefname .code:n = { \crthm_set_name_per_lang_Crefname:en { \l__crthm_current_lang_tl } { #1 } }
+ , Crefname .value_required:n = true
+ , unknown .code:n = {}
+ }
+
+\cs_new:Nn \crthm_set_name_per_lang_heading:nn
+ % #1 = language name
+ % #2 = the settings
+ {
+ \keyval_parse:nnn
+ {}
+ { \use:c { __crthm_set_name_per_lang_heading:nnn } { #1 } }
+ { #2 }
+ }
+\cs_generate_variant:Nn \crthm_set_name_per_lang_heading:nn { en }
+
+\cs_new:Nn \__crthm_set_name_per_lang_heading:nnn
+ % #1 = language name
+ % #2 = env name
+ % #3 = corresponding heading name
+ {
+ \tl_if_exist:cF { g_crthm_style_heading_ #2 _ #1 _tl }
+ {
+ \tl_new:c { g_crthm_style_heading_ #2 _ #1 _tl }
+ }
+ \tl_gset:cn { g_crthm_name_heading_ #2 _ #1 _tl } { \tl_use:c { g_crthm_style_heading_ #2 _ #1 _tl } { #3 } }
+ }
+
+\cs_new:Nn \crthm_set_name_per_lang_crefname:nn
+ % #1 = language name
+ % #2 = the settings
+ {
+ \crthm_set_name_per_lang_crefname_generic:nnn { #1 } { #2 } { c }
+ }
+\cs_generate_variant:Nn \crthm_set_name_per_lang_crefname:nn { en }
+
+\cs_new:Nn \crthm_set_name_per_lang_Crefname:nn
+ % #1 = language name
+ % #2 = the settings
+ {
+ \crthm_set_name_per_lang_crefname_generic:nnn { #1 } { #2 } { C }
+ }
+\cs_generate_variant:Nn \crthm_set_name_per_lang_Crefname:nn { en }
+
+\cs_new:Nn \crthm_set_name_per_lang_crefname_generic:nnn
+ % #1 = language name
+ % #2 = the settings
+ % #3 = c or C
+ {
+ \keyval_parse:nnn
+ {}
+ { \use:c { __crthm_set_name_per_lang_ #3 refname:nnn } { #1 } }
+ { #2 }
+ }
+
+\cs_new:Nn \__crthm_set_name_per_lang_crefname:nnn
+ % #1 = language name
+ % #2 = env name
+ % #3 = corresponding crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
+ {
+ \str_if_in:nnTF { #3 } { = }
+ {
+ \crefthe_parse_variant:n { #3 }
+ \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #2 } { #1 } } { c }
+ }
+ {
+ \__crthm_set_name_crefname_generic:w { #2 } { #1 } #3 { c }
+ }
+ }
+
+\cs_new:Nn \__crthm_set_name_per_lang_Crefname:nnn
+ % #1 = language name
+ % #2 = env name
+ % #3 = corresponding Crefname {..}{..} or [..]{..}[..]{..}, or a set of crefnames for different variants
+ {
+ \str_if_in:nnTF { #3 } { = }
+ {
+ \crefthe_parse_variant:n { #3 }
+ \crefthe_pass_variant_to:n { \__crthm_set_name_crefname_generic:w { #2 } { #1 } } { C }
+ }
+ {
+ \__crthm_set_name_crefname_generic:w { #2 } { #1 } #3 { C }
+ }
+ }
+
+
+\NewDocumentCommand \NameTheorems { m m }
+ {
+ \crthm_name_theorems:nn { #1 } { #2 }
+ }
+
+\cs_new:Nn \crthm_name_theorems:nn
+ {
+ \tl_set:Nn \l__crthm_current_lang_tl { #1 }
+ \crthm_add_to_language_list:n { #1 }
+ \keys_set:nn { create-theorem-naming-per-language } { #2 }
+ }
+
+
+\tl_const:Nn \c__crthm_qedsymbol_tl { \Box }
+\bool_new:N \l__crthm_creating_qed_bool
+\tl_new:N \l__crthm_creating_qed_tl
+\bool_new:N \l__crthm_creating_apply_style_bool
+\tl_new:N \l__crthm_creating_apply_style_tl
+\bool_new:N \l__crthm_creating_numberless_bool
+\bool_new:N \l__crthm_creating_create_starred_bool
+\bool_new:N \l__crthm_creating_copy_existed_bool
+\tl_new:N \l__crthm_creating_copy_existed_tl
+\keys_define:nn { create-theorem-creating }
+ {
+ , name .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
+ , name .value_required:n = true
+ , name~style .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
+ , name~style .value_required:n = true
+ , name-style .meta:n = { name~style = { #1 } }
+ , name-style .value_required:n = true
+ , name style .meta:n = { name~style = { #1 } }
+ , name style .value_required:n = true
+ , use~name .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { use~name = #1 } }
+ , use~name .value_required:n = true
+ , use-name .meta:n = { use~name = { #1 } }
+ , use-name .value_required:n = true
+ , use name .meta:n = { use~name = { #1 } }
+ , use name .value_required:n = true
+ , combined .meta:n = { use~name = { #1 } }
+ , combined .value_required:n = true
+ , style .code:n = { \bool_set_true:N \l__crthm_creating_apply_style_bool
+ \tl_set:Nn \l__crthm_creating_apply_style_tl { #1 } }
+ , style .value_required:n = true
+ , apply~style .meta:n = { style = { #1 } }
+ , apply~style .value_required:n = true
+ , apply-style .meta:n = { style = { #1 } }
+ , apply-style .value_required:n = true
+ , apply style .meta:n = { style = { #1 } }
+ , apply style .value_required:n = true
+ , qed .code:n = { \bool_set_true:N \l__crthm_creating_qed_bool
+ \tl_set:Nn \l__crthm_creating_qed_tl { #1 } }
+ , qed .default:n = \c__crthm_qedsymbol_tl
+ , qed~symbol .meta:n = { qed = #1 }
+ , qed~symbol .default:n = \c__crthm_qedsymbol_tl
+ , qed-symbol .meta:n = { qed = #1 }
+ , qed-symbol .default:n = \c__crthm_qedsymbol_tl
+ , qed symbol .meta:n = { qed = #1 }
+ , qed symbol .default:n = \c__crthm_qedsymbol_tl
+ , numberless .bool_set:N = \l__crthm_creating_numberless_bool
+ , create~starred~version .bool_set:N = \l__crthm_creating_create_starred_bool
+ , create-starred-version .meta:n = { create~starred~version }
+ , create starred version .meta:n = { create~starred~version }
+ , create~numberless~version .meta:n = { create~starred~version }
+ , create-numberless-version .meta:n = { create~starred~version }
+ , create numberless version .meta:n = { create~starred~version }
+ , copy~existed .code:n = { \bool_set_true:N \l__crthm_creating_copy_existed_bool
+ \tl_set:Nn \l__crthm_creating_copy_existed_tl { #1 } }
+ , copy~existed .value_required:n = true
+ , copy-existed .meta:n = { copy~existed = { #1 } }
+ , copy-existed .value_required:n = true
+ , copy existed .meta:n = { copy~existed = { #1 } }
+ , copy existed .value_required:n = true
+ , quiet .bool_set:N = \l__crthm_creating_quiet_bool
+ , quiet .initial:n = { false }
+ , unknown .code:n = {}
+ }
+
+\keys_define:nn { create-theorem-creating / counter-management }
+ {
+ , parent~counter .code:n = { \crthm_counter_within:en { \l__crthm_current_env_tl } { #1 } }
+ , parent~counter .value_required:n = true
+ , parent-counter .meta:n = { parent~counter = { #1 } }
+ , parent-counter .value_required:n = true
+ , parent counter .meta:n = { parent~counter = { #1 } }
+ , parent counter .value_required:n = true
+ , number~within .meta:n = { parent~counter = { #1 } }
+ , number~within .value_required:n = true
+ , number-within .meta:n = { parent~counter = { #1 } }
+ , number-within .value_required:n = true
+ , number within .meta:n = { parent~counter = { #1 } }
+ , number within .value_required:n = true
+ , shared~counter .code:n = { \crthm_counter_alias:en { \l__crthm_current_env_tl } { #1 } }
+ , shared~counter .value_required:n = true
+ , shared-counter .meta:n = { shared~counter = { #1 } }
+ , shared-counter .value_required:n = true
+ , shared counter .meta:n = { shared~counter = { #1 } }
+ , shared counter .value_required:n = true
+ , number~like .meta:n = { shared~counter = { #1 } }
+ , number~like .value_required:n = true
+ , number-like .meta:n = { shared~counter = { #1 } }
+ , number-like .value_required:n = true
+ , number like .meta:n = { shared~counter = { #1 } }
+ , number like .value_required:n = true
+ , unknown .code:n = {}
+ }
+
+
+\NewDocumentCommand \CreateTheorem { m m }
+ {
+ \clist_map_inline:nn { #1 }
+ {
+ \crthm_create_theorem:nn { ##1 } { #2 }
+ }
+ }
+
+\msg_new:nnn { create-theorem }
+ { env-not-created }
+ { The~theorem-like~environment~"#1"~cannot~be~created,~an~environment~with~the~same~name~has~already~existed. }
+
+\msg_new:nnn { create-theorem }
+ { env-not-named }
+ { The~theorem-like~environment~"#1"~cannot~be~created,~you~have~to~name~it~before~initialization. }
+
+\cs_new:Nn \crthm_create_theorem:nn
+ % #1 = env name
+ % #2 = options
+ {
+ \tl_set:Nn \l__crthm_current_env_tl { #1 }
+ \bool_set_false:N \l__crthm_creating_apply_style_bool
+ \bool_set_false:N \l__crthm_creating_numberless_bool
+ \bool_set_false:N \l__crthm_creating_qed_bool
+ \bool_set_false:N \l__crthm_creating_create_starred_bool
+ \bool_set_false:N \l__crthm_creating_copy_existed_bool
+ \keys_set:nn { create-theorem-creating } { #2 }
+ \bool_if:NTF \l__crthm_creating_copy_existed_bool
+ {
+ \__crthm_copy_env:ee { \l__crthm_current_env_tl } { \l__crthm_creating_copy_existed_tl }
+ \bool_if:NT \l__crthm_creating_create_starred_bool
+ {
+ \__crthm_copy_env:ee { \l__crthm_current_env_tl * } { \l__crthm_creating_copy_existed_tl * }
+ }
+ }
+ {
+ \cs_if_exist:cTF { #1 }
+ {
+ \bool_if:NF \l__crthm_creating_quiet_bool
+ {
+ \msg_warning:nnn { create-theorem } { env-not-created } { #1 }
+ }
+ }
+ {
+ \cs_if_exist:cTF { c@ #1 }
+ {
+ \IfPackageLoadedTF { ntheorem }
+ {
+ \bool_if:NT \l__crthm_creating_qed_bool
+ {
+ \theoremsymbol { \ensuremath { \l__crthm_creating_qed_tl } }
+ }
+ } {}
+ \group_begin:
+ \bool_if:NTF \l__crthm_creating_apply_style_bool
+ {
+ \exp_args:No \theoremstyle { \l__crthm_creating_apply_style_tl }
+ }
+ {
+ \tl_if_exist:cT { c_crthm_theorem_style_preset_ #1 _tl }
+ {
+ \exp_args:Nv \theoremstyle { c_crthm_theorem_style_preset_ #1 _tl }
+ }
+ }
+ \bool_if:NTF \l__crthm_creating_numberless_bool
+ {
+ \crthm_newtheorem:w*{ #1 _crthm_regional } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ }
+ {
+ \crthm_newtheorem:w { #1 _crthm_regional } [#1] { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ }
+ \bool_if:NT \l__crthm_creating_create_starred_bool
+ {
+ \crthm_newtheorem:w*{ #1 * } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ }
+ \group_end:
+ \IfPackageLoadedTF { ntheorem }
+ {
+ \bool_if:NT \l__crthm_creating_qed_bool
+ {
+ \theoremsymbol { }
+ }
+ } {}
+ \NewDocumentEnvironment { #1 } { O{} }
+ % In "regionalref" mode, the counter received by the referencing system is "#1 _crthm_regional"
+ % while in "originalref" mode, the counter received is "#1 _crthm_original_\languagename"
+ {
+ \tl_if_blank:nTF { ##1 }
+ {
+ \begin{ #1 _crthm_regional }
+ }
+ {
+ \begin{ #1 _crthm_regional }[{##1}]
+ }
+ \bool_if:NF \l__crthm_regionalref_bool
+ {
+ \addtocounter { #1 _crthm_original_\languagename } { -1 }
+ \refstepcounter { #1 _crthm_original_\languagename }
+ }
+ }
+ {
+ \end{ #1 _crthm_regional }
+ }
+ \keys_set:nn { create-theorem-creating / counter-management } { #2 }
+
+ \IfPackageLoadedTF { amsthm }
+ {
+ \bool_if:NT \l__crthm_creating_qed_bool
+ {
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { \l__crthm_creating_qed_tl } } \pushQED{\qed} }
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /end } { crthm } { \popQED }
+ \bool_if:NT \l__crthm_creating_create_starred_bool
+ {
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl * /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { \l__crthm_creating_qed_tl } } \pushQED{\qed} }
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl * /end } { crthm } { \popQED }
+ }
+ }
+ } {}
+ }
+ {
+ \msg_error:nnn { create-theorem } { env-not-named } { #1 }
+ }
+ }
+ }
+ }
+
+\cs_new:Nn \__crthm_copy_env:nn
+ {
+ \cs_set_eq:cc { #1 } { #2 }
+ \cs_set_eq:cc { end #1 } { end #2 }
+ }
+\cs_generate_variant:Nn \__crthm_copy_env:nn { ee }
+
+\cs_new:Nn \crthm_counter_within:nn
+ {
+ \counterwithin { #1 } { #2 }
+ }
+\cs_generate_variant:Nn \crthm_counter_within:nn { en }
+
+\cs_new:Nn \crthm_counter_alias:nn
+ {
+ \cs_if_exist:cTF { c@ #2 }
+ {
+ \cs_gset_eq:cc { c@ #1 } { c@ #2 }
+ \cs_gset_eq:cc { the #1 } { the #2 }
+ \cs_gset_eq:cc { theH #1 } { theH #2 }
+ \cs_gset_eq:cc { p@ #1 } { p@ #2 }
+ \cs_gset_eq:cc { cl@ #1 } { cl@ #2 }
+ }
+ {
+ \@nocounterr { #2 }
+ }
+ }
+\cs_generate_variant:Nn \crthm_counter_alias:nn { en }
+
+
+\keys_define:nn { create-theorem-setting }
+ {
+ , name .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
+ , name .value_required:n = true
+ , name~style .code:n = { \exp_args:Ne \NameTheorem { \l__crthm_current_env_tl } { #1 } }
+ , name~style .value_required:n = true
+ , name-style .meta:n = { name~style = { #1 } }
+ , name-style .value_required:n = true
+ , name style .meta:n = { name~style = { #1 } }
+ , name style .value_required:n = true
+ , qed .code:n = {
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { #1 } } }
+ }
+ , qed .default:n = \c__crthm_qedsymbol_tl
+ , qed~symbol .meta:n = { qed = #1 }
+ , qed~symbol .default:n = \c__crthm_qedsymbol_tl
+ , qed-symbol .meta:n = { qed = #1 }
+ , qed-symbol .default:n = \c__crthm_qedsymbol_tl
+ , qed symbol .meta:n = { qed = #1 }
+ , qed symbol .default:n = \c__crthm_qedsymbol_tl
+ , parent~counter .code:n = { \crthm_counter_within:en { \l__crthm_current_env_tl } { #1 } }
+ , parent~counter .value_required:n = true
+ , parent-counter .meta:n = { parent~counter = { #1 } }
+ , parent-counter .value_required:n = true
+ , parent counter .meta:n = { parent~counter = { #1 } }
+ , parent counter .value_required:n = true
+ , number~within .meta:n = { parent~counter = { #1 } }
+ , number~within .value_required:n = true
+ , number-within .meta:n = { parent~counter = { #1 } }
+ , number-within .value_required:n = true
+ , number within .meta:n = { parent~counter = { #1 } }
+ , number within .value_required:n = true
+ , shared~counter .code:n = { \crthm_counter_alias:en { \l__crthm_current_env_tl } { #1 } }
+ , shared~counter .value_required:n = true
+ , shared-counter .meta:n = { shared~counter = { #1 } }
+ , shared-counter .value_required:n = true
+ , shared counter .meta:n = { shared~counter = { #1 } }
+ , shared counter .value_required:n = true
+ , number~like .meta:n = { shared~counter = { #1 } }
+ , number~like .value_required:n = true
+ , number-like .meta:n = { shared~counter = { #1 } }
+ , number-like .value_required:n = true
+ , number like .meta:n = { shared~counter = { #1 } }
+ , number like .value_required:n = true
+ , unknown .code:n = {}
+ }
+
+
+\NewDocumentCommand \SetTheorem { m m }
+ {
+ \clist_map_inline:nn { #1 }
+ {
+ \prop_if_in:NnTF \l_crthm_binding_prop { ##1 }
+ {
+ \prop_get:NnN \l_crthm_binding_prop { ##1 } \l__crthm_current_env_tl
+ }
+ {
+ \tl_set:Nn \l__crthm_current_env_tl { ##1 }
+ }
+ \keys_set:nn { create-theorem-setting } { #2 }
+ }
+ }
+
+\prop_new:N \l_crthm_binding_prop
+\NewDocumentCommand \SetTheoremBinding { m m }
+ {
+ \clist_map_inline:nn { #1 }
+ {
+ \prop_put:Nxx \l_crthm_binding_prop { ##1 } { #2 }
+ }
+ }
+
+
+\bool_if:NT \l__crthm_presetname_bool
+ {
+ \input { create-theorem-preset-names }
+ \input { create-theorem-preset-names-plural }
+ }
+
+\endinput
+%%
+%% End of file `create-theorem.sty'.
diff --git a/macros/latex/contrib/create-theorem/create-theorem-doc.pdf b/macros/latex/contrib/create-theorem/doc/create-theorem-doc.pdf
index 6534126f29..b62eea4455 100644
--- a/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
+++ b/macros/latex/contrib/create-theorem/doc/create-theorem-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/create-theorem/create-theorem-doc.tex b/macros/latex/contrib/create-theorem/doc/create-theorem-doc.tex
index 888767dad7..532796dd52 100644
--- a/macros/latex/contrib/create-theorem/create-theorem-doc.tex
+++ b/macros/latex/contrib/create-theorem/doc/create-theorem-doc.tex
@@ -108,7 +108,7 @@
\begin{document}
\def\PackageVersion{2024/02/20}
-\def\PackageSubVersion{}
+\def\PackageSubVersion{a}
\title{\createtheorempackage{}\\\smallskip\itshape Initializing and configuring theorem-like environments, with multilingual support}
\author{Jinwen XU}
@@ -335,7 +335,7 @@ Supported keys are:
\end{itemize}
\begin{tip}
- The names for the following environments have been preset: \texttt{application}, \texttt{assertion}, \texttt{assumption}, \texttt{axiom}, \texttt{claim}, \texttt{conclusion}, \texttt{conjecture}, \texttt{construction}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{postulate}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{recall}, \texttt{remark} and \texttt{theorem}. If you are fine with the preset names, then there is no need to specify the key \textquote{\commandoption{name}} while creating them, otherwise you shall have to use the package option \textquote{\packageoption{no preset names}} to disable the presets and then define your own ones.
+ The names for the following environments (and their plural forms) have been preset: \texttt{application}, \texttt{assertion}, \texttt{assumption}, \texttt{axiom}, \texttt{claim}, \texttt{commentary}, \texttt{conclusion}, \texttt{conjecture}, \texttt{construction}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{motivation}, \texttt{notation}, \texttt{observation}, \texttt{postulate}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{recall}, \texttt{remark} and \texttt{theorem}. If you are fine with the preset names, then there is no need to specify the key \textquote{\commandoption{name}} while creating them, otherwise you shall have to use the package option \textquote{\packageoption{no preset names}} to disable the presets and then define your own ones.
\end{tip}
\medskip