summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/projlib/PJLthm.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/projlib/PJLthm.sty')
-rw-r--r--Master/texmf-dist/tex/latex/projlib/PJLthm.sty48
1 files changed, 43 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/projlib/PJLthm.sty b/Master/texmf-dist/tex/latex/projlib/PJLthm.sty
index 22caa085b79..c3adb950c7b 100644
--- a/Master/texmf-dist/tex/latex/projlib/PJLthm.sty
+++ b/Master/texmf-dist/tex/latex/projlib/PJLthm.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{PJLthm}
- [2021/05/20 Theorem setup and configuration]
+ [2021/05/25 Theorem setup and configuration]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -38,19 +38,57 @@
\PassOptionsToPackage{nameinlink}{cleveref}
\RequirePackage{cleveref}
+\NewDocumentCommand{\NameTheorem}{omm}{%
+ \protected@edef\PJLthm@temp{#2}%
+ \expandafter\IfEndWith\expandafter{\PJLthm@temp}{*}{%
+ \expandafter\StrGobbleRight\expandafter{\PJLthm@temp}{1}[\PJLthm@temp]%
+ }{}%
+ \IfValueTF{#1}{%
+ \lowercase{\IfStrEqCase{#1}}{%
+ {cn}{\def\PJL@temp@abbr{CN}}%
+ {chinese}{\def\PJL@temp@abbr{CN}}%
+ {schinese}{\def\PJL@temp@abbr{CN}}%
+ {simplifiedchinese}{\def\PJL@temp@abbr{CN}}%
+ {tc}{\def\PJL@temp@abbr{TC}}%
+ {tchinese}{\def\PJL@temp@abbr{TC}}%
+ {traditionalchinese}{\def\PJL@temp@abbr{TC}}%
+ {jp}{\def\PJL@temp@abbr{JP}}%
+ {japanese}{\def\PJL@temp@abbr{JP}}%
+ {en}{\def\PJL@temp@abbr{EN}}%
+ {english}{\def\PJL@temp@abbr{EN}}%
+ {fr}{\def\PJL@temp@abbr{FR}}%
+ {french}{\def\PJL@temp@abbr{FR}}%
+ {de}{\def\PJL@temp@abbr{DE}}%
+ {ngerman}{\def\PJL@temp@abbr{DE}}%
+ {german}{\def\PJL@temp@abbr{DE}}%
+ {ru}{\def\PJL@temp@abbr{RU}}%
+ {russian}{\def\PJL@temp@abbr{RU}}%
+ }%
+ \expandafter\def\csname\PJLthm@temp name\PJL@temp@abbr\endcsname{#3}%
+ }{%
+ \expandafter\def\csname\PJLthm@temp nameEN\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameFR\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameDE\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameCN\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameTC\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameJP\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameRU\endcsname{#3}%
+ }%
+}
+
\RequirePackage{xstring}
\newcommand\PassFirstToSecond[2]{#2{#1}}%
\NewDocumentCommand{\CreateTheorem}{sm}{%
\begingroup
- \protected@edef\temp{#2}%
- \expandafter\IfEndWith\expandafter{\temp}{*}{%
- \expandafter\StrGobbleRight\expandafter{\temp}{1}[\temp]%
+ \protected@edef\PJLthm@temp{#2}%
+ \expandafter\IfEndWith\expandafter{\PJLthm@temp}{*}{%
+ \expandafter\StrGobbleRight\expandafter{\PJLthm@temp}{1}[\PJLthm@temp]%
\PassFirstToSecond{*}%
}{%
\PassFirstToSecond{}%
}%
{\expandafter\PassFirstToSecond%
- \expandafter{\temp}{\endgroup\InnerCreateTheorem{#1}}}%
+ \expandafter{\PJLthm@temp}{\endgroup\InnerCreateTheorem{#1}}}%
}%
\if@PJLthm@regionalref
\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{%