diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/projlib/PJLthm.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLthm.sty | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/projlib/PJLthm.sty b/Master/texmf-dist/tex/latex/projlib/PJLthm.sty index bd9fb06472a..f4070b90412 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/07/27 Theorem setup and configuration] + [2021/07/30 Theorem setup and configuration] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{% @@ -26,10 +26,15 @@ } \DeclareBoolOption[false]{nothms} \DeclareBoolOption[false]{nothmnum} +\DeclareStringOption{thmnum}[PJL@thmnum@default] \DeclareBoolOption[false]{draft} \DeclareBoolOption[false]{fast} -\DeclareBoolOption[false]{regionalref} +\DeclareBoolOption[true]{regionalref} +\DeclareBoolOption[false]{originalref} \ProcessKeyvalOptions*\relax +\if@PJLthm@originalref + \@PJLthm@regionalreffalse +\fi \if@PJLthm@draft \@PJLthm@fasttrue \fi @@ -508,6 +513,18 @@ }{ \newaliascnt{PJLthm@highest}{section} } +\NewDocumentCommand{\CreateTheorem@thmnum}{m}{ + \expandafter\ifstrempty\expandafter{\@PJLthm@thmnum}{ + \CreateTheorem{#1}<PJLthm@highest> + }{ + \expandafter\ifstrequal\expandafter{\@PJLthm@thmnum}{PJL@thmnum@default}{ + \CreateTheorem{#1} + }{ + \CreateTheorem{#1}<\@PJLthm@thmnum> + } + } +} +\AtEndPreamble{ \if@PJLthm@nothms\else \if@PJLthm@nothmnum \CreateTheorem*{theorem} @@ -520,7 +537,7 @@ \CreateTheorem*{fact} \CreateTheorem*{conjecture} \else -\CreateTheorem{theorem}<PJLthm@highest> +\CreateTheorem@thmnum{theorem} \CreateTheorem{lemma}[theorem] \CreateTheorem{proposition}[theorem] \CreateTheorem{corollary}[theorem] @@ -580,14 +597,22 @@ \CreateTheorem*{remark} \CreateTheorem*{observation} \else -\CreateTheorem{remark}<PJLthm@highest> -\CreateTheorem{observation}<PJLthm@highest> +\CreateTheorem@thmnum{remark} +\CreateTheorem@thmnum{observation} \fi \CreateTheorem*{remark*} \CreateTheorem*{observation*} \fi +} -\numberwithin{equation}{PJLthm@highest} +\expandafter\ifstrempty\expandafter{\@PJLthm@thmnum}{ + \numberwithin{equation}{PJLthm@highest} +}{ + \expandafter\ifstrequal\expandafter{\@PJLthm@thmnum}{PJL@thmnum@default}{ + }{ + \numberwithin{equation}{\@PJLthm@thmnum} + } +} \gappto{\PJLlang@langconfig@chinese}{% \crefname{equation}{式}{式}% |