diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-21 21:07:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-21 21:07:18 +0000 |
commit | 8d97569eaa82e23d5db1b06d836f42f61035afaf (patch) | |
tree | d8749cc3b346c9308ba9bd2834e3533c63791bc1 | |
parent | 984f1bad8feb2cc586047e3304f76aae83618498 (diff) |
projlib (21may21)
git-svn-id: svn://tug.org/texlive/trunk@59296 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf | bin | 222025 -> 222934 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf | bin | 145010 -> 143188 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex | 24 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/projlib/ProjLib.dtx | 94 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLamssim.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLauthor.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLdate.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLdraft.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLlang.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLlogo.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLpaper.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLthm.sty | 67 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/projlib/PJLtoolkit.sty | 7 |
14 files changed, 186 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf Binary files differindex 760b4b99c8c..090fa0463bf 100644 --- a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex index dfbedaf7269..65c2f0ac2c5 100644 --- a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex @@ -78,7 +78,7 @@ \title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南} \author{许锦文} -\thanks{对应版本.~~\texttt{\ProjLib{}~2021/05/19}} +\thanks{对应版本.~~\texttt{\ProjLib{}~2021/05/20}} \date{2021年5月,北京} \maketitle @@ -124,9 +124,9 @@ \begin{itemize} \item 加载 \PJLamssim{}。关于其详细功能,请参阅有关这一宏包的小节。 \end{itemize} - \item \texttt{nothms} + \item \texttt{nothms}、\texttt{regionalref} \begin{itemize} - \item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。 + \item 来自 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。 \end{itemize} \end{itemize} 另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \PJLpaper{} 的 \texttt{paperstyle} 和 \texttt{preview} 等。详细信息可以参阅对应的小节。 @@ -271,6 +271,10 @@ \begin{itemize} \item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。 \end{itemize} + \item \texttt{regionalref} + \begin{itemize} + \item 在智能引用时,定理类环境的名称随当前语言而变化(默认情况下,引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem)。在 \texttt{fast} 模式下,这一选项默认启用。 + \end{itemize} \end{itemize} 预设的定理类环境包括:\texttt{assumption}、\texttt{axiom}、\texttt{conjecture}、\texttt{convention}、\texttt{corollary}、\texttt{definition}、\texttt{definition-proposition}、\texttt{definition-theorem}、\texttt{example}、\texttt{exercise}、\texttt{fact}、\texttt{hypothesis}、\texttt{lemma}、\texttt{notation}、\texttt{problem}、\texttt{property}、\texttt{proposition}、\texttt{question}、\texttt{remark}、\texttt{theorem},以及相应的带有星号 \lstinline|*| 的无编号版本。这些定理类环境在显示时会依据当前语言而相应变化,例如在中文模式下 \texttt{theorem} 会显示为“定理”,而在英文模式下则会显示为“Theorem”。关于如何选定语言,请参阅关于 \PJLlang{} 的小节。 @@ -346,17 +350,17 @@ \end{proofidea} -\bigskip +\medskip \section{目前存在的问题} -\begin{itemize}[itemsep=1em] +\begin{itemize}[itemsep=.6em] \item \PJLauthor{} 仍然处于初步阶段,在很多方面还远远比不上相对成熟的 \textsf{authblk}。 \item \PJLlang{}:针对 \textsf{polyglossia} 的设置仍然存在许多问题,因此现在主要功能都是通过 \textsf{babel} 实现的。 \item \PJLpaper{} 的 \texttt{preview} 功能主要是通过 \textsf{geometry} 宏包实现的,因此在 \textsc{\textsf{Koma}} 文档类中效果不好。 \item \PJLthm{} 对于定理类环境的编号与样式设定目前还无法由用户更改。 \item \PJLthm{}:智能引用针对所有 \PJLlang{} 已支持语言的本地化尚不完整,主要是中文、日文与俄文。 \item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。 - \item 代码中有许多可优化之处,有些部分耗时过长,特别是 \PJLthm{} 对定理类环境的定义。 + \item 代码中仍有许多可优化之处,有些部分耗时过长,特别是 \PJLthm{} 对定理类环境的定义。 \end{itemize} diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf Binary files differindex 9f651971aa8..f4ebb70a967 100644 --- a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex index 82a1aeda3b6..b89c62a6609 100644 --- a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex @@ -76,7 +76,7 @@ \title{\ProjLib{}~~Toolkit\\[.3\baselineskip]\normalsize User Manual} \author{Jinwen Xu} -\thanks{Corresponding to: \texttt{\ProjLib{}~2021/05/19}} +\thanks{Corresponding to: \texttt{\ProjLib{}~2021/05/20}} \date{May 2021, Beijing} \maketitle @@ -110,7 +110,7 @@ Just add the following line to your preamble: \begin{itemize} \item Fast mode. The functionality is appropriately reduced to get faster compilation speed, recommended to use during the writing phase. \end{itemize} - \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} + \item \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{biolinum} \begin{itemize} \item Font options. As the name suggest, font with corresponding name will be loaded. \end{itemize} @@ -122,9 +122,9 @@ Just add the following line to your preamble: \begin{itemize} \item Load \PJLamssim{}. For more information about its functionality, see the section on this package. \end{itemize} - \item \texttt{nothms} + \item \texttt{nothms}, \texttt{regionalref} \begin{itemize} - \item The theorem-like environments will not be defined. You should use this option if you wish to apply your own theorem styles. + \item Options from \PJLthm{}, please refer to the section on this package for details. \end{itemize} \end{itemize} In addition, there are also some options of the components that can (and should) be passed as global options of the document class, such as \texttt{paperstyle} and \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding section. @@ -246,7 +246,7 @@ For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make al \begin{itemize} \item Set the paper color style. The options available for \meta{paper style name} are: \texttt{yellow}, \texttt{dark} and \texttt{nord}. \end{itemize} - \item \texttt{yellowpaper}、\texttt{darkpaper}、\texttt{nordpaper} + \item \texttt{yellowpaper}, \texttt{darkpaper}, \texttt{nordpaper} \begin{itemize} \item Set the paper color style. The effect is the same as \texttt{paperstyle} with the corresponding \meta{paper style name} specified. \end{itemize} @@ -261,11 +261,15 @@ It is recommended to pass these options as global options of the document class. \subsection{PJLthm} \PJLthm{} offers the configuration of theorem-like environments. It has the following option: -% \vspace{-.3\baselineskip} + \begin{itemize} \item \texttt{nothms} \begin{itemize} - \item The theorem-like environments will not be defined. You should use this option if you wish to apply your own theorem styles. + \item The theorem-like environments will not be defined. You may use this option if you wish to apply your own theorem styles. + \end{itemize} + \item \texttt{regionalref} + \begin{itemize} + \item When referencing, the name of the theorem-like environment changes with the current language (by default, the name will always remain the same; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''). In \texttt{fast} mode, this option is automatically enabled. \end{itemize} \end{itemize} @@ -287,7 +291,7 @@ If you need to define a new theorem-like environment, you must first define the If you want to define an environment with an asterisk \lstinline|*| after the name, you don't need to write an asterisk in the \meta{name of environment} above. See the example below. \end{remind} -\medskip +\clearpage% \medskip And then define this environment in one of following five ways: \begin{itemize} \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}| @@ -354,11 +358,11 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm \item \PJLthm{}: The numbering and theorem-style settings of the theorem-like environments cannot be accessed by the user at present. \item \PJLthm{}: The localization of \textsf{cleveref} is not yet complete for all supported languages of \PJLlang{}, especially for Chinese, Japanese and Russian. \item The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur. - \item There are many things that can be optimized in the code. Some codes take too long to run, especially the definition of theorem-like environments in \PJLthm{}. + \item There are still many things that can be optimized in the code. Some takes too long to run, especially the definition of theorem-like environments in \PJLthm{}. \end{itemize} -\clearpage +\medskip % \clearpage \section{Usage example} \subsection{Standard classes} diff --git a/Master/texmf-dist/source/latex/projlib/ProjLib.dtx b/Master/texmf-dist/source/latex/projlib/ProjLib.dtx index 94e4aa5d8eb..12abe0328e6 100644 --- a/Master/texmf-dist/source/latex/projlib/ProjLib.dtx +++ b/Master/texmf-dist/source/latex/projlib/ProjLib.dtx @@ -18,47 +18,47 @@ % %<*PJLamssim> \ProvidesPackage{PJLamssim} - [2021/05/19 Simulate some features of amsart] + [2021/05/20 Simulate some features of amsart] %</PJLamssim> % %<*PJLauthor> \ProvidesPackage{PJLauthor} - [2021/05/19 Enhanced author information block] + [2021/05/20 Enhanced author information block] %</PJLauthor> % %<*PJLdate> \ProvidesPackage{PJLdate} - [2021/05/19 Convert yyyy-mm-dd to normal datetime format] + [2021/05/20 Convert yyyy-mm-dd to normal datetime format] %</PJLdate> % %<*PJLdraft> \ProvidesPackage{PJLdraft} - [2021/05/19 Some useful macros for the draft stage] + [2021/05/20 Some useful macros for the draft stage] %</PJLdraft> % %<*PJLlang> \ProvidesPackage{PJLlang} - [2021/05/19 Multi-language configuration] + [2021/05/20 Multi-language configuration] %</PJLlang> % %<*PJLlogo> \ProvidesPackage{PJLlogo} - [2021/05/19 The ProjLib logo] + [2021/05/20 The ProjLib logo] %</PJLlogo> % %<*PJLpaper> \ProvidesPackage{PJLpaper} - [2021/05/19 Paper style configuration] + [2021/05/20 Paper style configuration] %</PJLpaper> % %<*PJLthm> \ProvidesPackage{PJLthm} - [2021/05/19 Theorem setup and configuration] + [2021/05/20 Theorem setup and configuration] %</PJLthm> % %<*PJLtoolkit> \ProvidesPackage{PJLtoolkit} - [2021/05/19 Collective interface of ProjLib Toolkit] + [2021/05/20 Collective interface of ProjLib Toolkit] %</PJLtoolkit> % \RequirePackage{kvoptions} @@ -764,7 +764,12 @@ prefix = @PJLthm@ } \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{fast} +\DeclareBoolOption[false]{regionalref} \ProcessKeyvalOptions*\relax +\if@PJLthm@fast + \@PJLthm@regionalreftrue +\fi \RequirePackage{PJLlang} \RequirePackage{amsmath,amsthm} @@ -787,6 +792,69 @@ {\expandafter\PassFirstToSecond% \expandafter{\temp}{\endgroup\InnerCreateTheorem{#1}}}% }% +\if@PJLthm@regionalref +\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{% +% #1 = star or no star +% #2 = name of environment +% #3 = emptiness or star to append to name of environment +% #4 = numbered like +% #5 = numbered within +% #6 = existed environment + \IfBooleanTF{#1}{% + \IfValueTF{#4} + {\@firstoftwo} + {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}% + }{% + \IfValueTF{#4} + {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}{ + \@secondoftwo} + }% + {% + \GenericError{}% + {\string\CreateTheorem\space syntax error\on@line}{% + You cannot call the starred variant with optional argument,\MessageBreak + nor call the unstarred variant with several optional arguments.}% + {}% + }{% + \IfValueTF{#6}{% + \IfBooleanTF{#1}{% + \ifcsmacro{#2#3}% + {\renewenvironment{#2#3}{\begin{#6*}}{\end{#6*}}}% + {\newenvironment{#2#3}{\begin{#6*}}{\end{#6*}}}% + }{% + \ifcsmacro{#2#3}% + {\renewenvironment{#2#3}{\begin{#6}}{\end{#6}}}% + {\newenvironment{#2#3}{\begin{#6}}{\end{#6}}}% + } + }{% + \IfBooleanTF{#1}{% + \newtheorem*{#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname} + }{% + \IfValueTF{#5}{% + \newtheorem{PJL#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname}[#5]% + \newaliascnt{#2#3}{PJL#2#3}% + }{% + \IfValueTF{#4}{% + \newtheorem{PJL#2#3}[#4]{\csname#2name\csname\languagename ABBR\endcsname\endcsname} + }{% + \newtheorem{PJL#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname} + \newaliascnt{#2#3}{PJL#2#3}% + }% + }% + \crefname{PJL#2#3}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + \Crefname{PJL#2#3}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + \NewDocumentEnvironment{#2#3}{} + {\begin{PJL#2#3}} + {\end{PJL#2#3}} + }% + }% + }% +}% +\else \NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{% % #1 = star or no star % #2 = name of environment @@ -853,7 +921,7 @@ \NewDocumentEnvironment{#2#3}{} {\csname#2\csname\languagename ABBR\endcsname#3\endcsname}% {\csname end#2\csname\languagename ABBR\endcsname#3\endcsname}% - } + }% }% }% \NewDocumentCommand{\CreateTheoremNumberedLikeAliasCounter}{mmm}{% @@ -867,6 +935,7 @@ {\csname#1name#2\endcsname}% {\csname#1name#2\endcsname}% }% +\fi %% English theorems names \def\theoremnameEN{Theorem} @@ -1158,6 +1227,7 @@ \DeclareBoolOption[false]{author} \DeclareBoolOption[false]{amssim} \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{regionalref} \DeclareBoolOption[false]{palatino} \DeclareBoolOption[false]{times} \DeclareBoolOption[false]{garamond} @@ -1170,10 +1240,14 @@ \PassOptionsToPackage{fast}{PJLdate} \PassOptionsToPackage{fast}{PJLdraft} \PassOptionsToPackage{fast}{PJLlogo} + \PassOptionsToPackage{fast}{PJLthm} \fi \if@PJLtoolkit@nothms \PassOptionsToPackage{nothms}{PJLthm} \fi +\if@PJLtoolkit@regionalref + \PassOptionsToPackage{regionalref}{PJLthm} +\fi \if@PJLtoolkit@author \RequirePackage{PJLauthor} diff --git a/Master/texmf-dist/tex/latex/projlib/PJLamssim.sty b/Master/texmf-dist/tex/latex/projlib/PJLamssim.sty index e3a754b72a6..e3c7e2ed190 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLamssim.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLamssim.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLamssim} - [2021/05/19 Simulate some features of amsart] + [2021/05/20 Simulate some features of amsart] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \ifdefined\subjclass\endinput\fi diff --git a/Master/texmf-dist/tex/latex/projlib/PJLauthor.sty b/Master/texmf-dist/tex/latex/projlib/PJLauthor.sty index 8f121efe2f1..016516fcc37 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLauthor.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLauthor.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLauthor} - [2021/05/19 Enhanced author information block] + [2021/05/20 Enhanced author information block] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \ifdefined\subjclass\endinput\fi diff --git a/Master/texmf-dist/tex/latex/projlib/PJLdate.sty b/Master/texmf-dist/tex/latex/projlib/PJLdate.sty index 5e55304d49d..7d983536d9b 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLdate.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLdate.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLdate} - [2021/05/19 Convert yyyy-mm-dd to normal datetime format] + [2021/05/20 Convert yyyy-mm-dd to normal datetime format] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{ diff --git a/Master/texmf-dist/tex/latex/projlib/PJLdraft.sty b/Master/texmf-dist/tex/latex/projlib/PJLdraft.sty index 4d90172d10f..adca7c6294a 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLdraft.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLdraft.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLdraft} - [2021/05/19 Some useful macros for the draft stage] + [2021/05/20 Some useful macros for the draft stage] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{ diff --git a/Master/texmf-dist/tex/latex/projlib/PJLlang.sty b/Master/texmf-dist/tex/latex/projlib/PJLlang.sty index 13911df82f8..4b1b86b7ade 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLlang.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLlang.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLlang} - [2021/05/19 Multi-language configuration] + [2021/05/20 Multi-language configuration] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{% diff --git a/Master/texmf-dist/tex/latex/projlib/PJLlogo.sty b/Master/texmf-dist/tex/latex/projlib/PJLlogo.sty index 685c98af621..3546d060bc3 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLlogo.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLlogo.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLlogo} - [2021/05/19 The ProjLib logo] + [2021/05/20 The ProjLib logo] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{ diff --git a/Master/texmf-dist/tex/latex/projlib/PJLpaper.sty b/Master/texmf-dist/tex/latex/projlib/PJLpaper.sty index eb7ee9d55bd..f46d155cc87 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLpaper.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLpaper.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLpaper} - [2021/05/19 Paper style configuration] + [2021/05/20 Paper style configuration] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \RequirePackage{ifthen} diff --git a/Master/texmf-dist/tex/latex/projlib/PJLthm.sty b/Master/texmf-dist/tex/latex/projlib/PJLthm.sty index 36f7d640682..22caa085b79 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/19 Theorem setup and configuration] + [2021/05/20 Theorem setup and configuration] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{% @@ -25,7 +25,12 @@ prefix = @PJLthm@ } \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{fast} +\DeclareBoolOption[false]{regionalref} \ProcessKeyvalOptions*\relax +\if@PJLthm@fast + \@PJLthm@regionalreftrue +\fi \RequirePackage{PJLlang} \RequirePackage{amsmath,amsthm} @@ -47,6 +52,63 @@ {\expandafter\PassFirstToSecond% \expandafter{\temp}{\endgroup\InnerCreateTheorem{#1}}}% }% +\if@PJLthm@regionalref +\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{% + \IfBooleanTF{#1}{% + \IfValueTF{#4} + {\@firstoftwo} + {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}% + }{% + \IfValueTF{#4} + {\IfValueTF{#5}{\@firstoftwo}{\@secondoftwo}}{ + \@secondoftwo} + }% + {% + \GenericError{}% + {\string\CreateTheorem\space syntax error\on@line}{% + You cannot call the starred variant with optional argument,\MessageBreak + nor call the unstarred variant with several optional arguments.}% + {}% + }{% + \IfValueTF{#6}{% + \IfBooleanTF{#1}{% + \ifcsmacro{#2#3}% + {\renewenvironment{#2#3}{\begin{#6*}}{\end{#6*}}}% + {\newenvironment{#2#3}{\begin{#6*}}{\end{#6*}}}% + }{% + \ifcsmacro{#2#3}% + {\renewenvironment{#2#3}{\begin{#6}}{\end{#6}}}% + {\newenvironment{#2#3}{\begin{#6}}{\end{#6}}}% + } + }{% + \IfBooleanTF{#1}{% + \newtheorem*{#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname} + }{% + \IfValueTF{#5}{% + \newtheorem{PJL#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname}[#5]% + \newaliascnt{#2#3}{PJL#2#3}% + }{% + \IfValueTF{#4}{% + \newtheorem{PJL#2#3}[#4]{\csname#2name\csname\languagename ABBR\endcsname\endcsname} + }{% + \newtheorem{PJL#2#3}{\csname#2name\csname\languagename ABBR\endcsname\endcsname} + \newaliascnt{#2#3}{PJL#2#3}% + }% + }% + \crefname{PJL#2#3}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + \Crefname{PJL#2#3}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + {\csname#2name\csname\languagename ABBR\endcsname\endcsname}% + \NewDocumentEnvironment{#2#3}{} + {\begin{PJL#2#3}} + {\end{PJL#2#3}} + }% + }% + }% +}% +\else \NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{% \IfBooleanTF{#1}{% \IfValueTF{#4} @@ -107,7 +169,7 @@ \NewDocumentEnvironment{#2#3}{} {\csname#2\csname\languagename ABBR\endcsname#3\endcsname}% {\csname end#2\csname\languagename ABBR\endcsname#3\endcsname}% - } + }% }% }% \NewDocumentCommand{\CreateTheoremNumberedLikeAliasCounter}{mmm}{% @@ -121,6 +183,7 @@ {\csname#1name#2\endcsname}% {\csname#1name#2\endcsname}% }% +\fi %% English theorems names \def\theoremnameEN{Theorem} diff --git a/Master/texmf-dist/tex/latex/projlib/PJLtoolkit.sty b/Master/texmf-dist/tex/latex/projlib/PJLtoolkit.sty index 5c36253c938..f935e4893f9 100644 --- a/Master/texmf-dist/tex/latex/projlib/PJLtoolkit.sty +++ b/Master/texmf-dist/tex/latex/projlib/PJLtoolkit.sty @@ -17,7 +17,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2020-10-01] \ProvidesPackage{PJLtoolkit} - [2021/05/19 Collective interface of ProjLib Toolkit] + [2021/05/20 Collective interface of ProjLib Toolkit] \RequirePackage{kvoptions} \RequirePackage{etoolbox} \SetupKeyvalOptions{ @@ -29,6 +29,7 @@ \DeclareBoolOption[false]{author} \DeclareBoolOption[false]{amssim} \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{regionalref} \DeclareBoolOption[false]{palatino} \DeclareBoolOption[false]{times} \DeclareBoolOption[false]{garamond} @@ -41,10 +42,14 @@ \PassOptionsToPackage{fast}{PJLdate} \PassOptionsToPackage{fast}{PJLdraft} \PassOptionsToPackage{fast}{PJLlogo} + \PassOptionsToPackage{fast}{PJLthm} \fi \if@PJLtoolkit@nothms \PassOptionsToPackage{nothms}{PJLthm} \fi +\if@PJLtoolkit@regionalref + \PassOptionsToPackage{regionalref}{PJLthm} +\fi \if@PJLtoolkit@author \RequirePackage{PJLauthor} |