summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-12 03:01:55 +0000
committerNorbert Preining <norbert@preining.info>2021-08-12 03:01:55 +0000
commita19bf62ec5fa04167fc9480e22cd235ec53b3e41 (patch)
treec485e2c2ed76a135e970688963b3b2d6cce51083 /macros/latex
parent78510518401cc9b3aced4cf291ecb7730591091d (diff)
CTAN sync 202108120301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/colorist/colorart.cls3
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls3
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.pdfbin93925 -> 93927 bytes
-rw-r--r--macros/latex/contrib/colorist/colorist-doc.tex20
-rw-r--r--macros/latex/contrib/colorist/colorist.sty19
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx14
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin584709 -> 584709 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex4
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin97753 -> 98049 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex15
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty25
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls3
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls3
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin310187 -> 311756 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin190948 -> 191210 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-fr.pdfbin192733 -> 192902 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc.dtx49
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx287
18 files changed, 226 insertions, 219 deletions
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 446fa868ad..e44367a8ca 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorart}
- [2021/08/09 A colorful article style]
+ [2021/08/11 A colorful article style]
\def\colorclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -34,6 +34,7 @@
\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
+\DeclareStringOption{thmnum}[PJL@thmnum@default]
\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index 711916d899..e07b345a91 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{colorbook}
- [2021/08/09 A colorful book style]
+ [2021/08/11 A colorful book style]
\def\colorclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -34,6 +34,7 @@
\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
+\DeclareStringOption{thmnum}[PJL@thmnum@default]
\newif\if@colorclass@bfivepaper\@colorclass@bfivepaperfalse
\DeclareVoidOption{b5paper}{\@colorclass@bfivepapertrue}
diff --git a/macros/latex/contrib/colorist/colorist-doc.pdf b/macros/latex/contrib/colorist/colorist-doc.pdf
index bf1291a619..b803b85010 100644
--- a/macros/latex/contrib/colorist/colorist-doc.pdf
+++ b/macros/latex/contrib/colorist/colorist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/colorist/colorist-doc.tex b/macros/latex/contrib/colorist/colorist-doc.tex
index dfebcdfda3..c6da8832a0 100644
--- a/macros/latex/contrib/colorist/colorist-doc.tex
+++ b/macros/latex/contrib/colorist/colorist-doc.tex
@@ -91,9 +91,9 @@
%%================================
\begin{document}
-\title{\colorist{}, write your articles or books in a colorful way}
+\title{{\normalfont\bfseries\color{maintext}\colorist{}}\\write your articles or books in a colorful way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\colorist{} 2021/08/09}}
+\thanks{Corresponding to: \texttt{\colorist{} 2021/08/11}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{August 2021, Beijing}
@@ -384,11 +384,15 @@ In the next section, we will go through the options available.
\end{itemize}
\item \texttt{puretext} or \texttt{nothms}
\begin{itemize}
- \item Pure text mode. Does not load theorem-like environments.
+ \item Pure text mode. Do not load theorem-like environments.
+ \end{itemize}
+ \item \texttt{delaythms}
+ \begin{itemize}
+ \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
\end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
\end{itemize}
\item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
@@ -410,7 +414,6 @@ Additionally, \colorart{} and \colorbook{} offers the following options:
\end{itemize}
\end{itemize}
-\clearpage
\LevelOneTitle{Instructions by topic}
\LevelTwoTitle{Language configuration}
@@ -597,10 +600,11 @@ You can use \lstinline|\dnf| to mark the unfinished part. For example:
Similarly, there is \lstinline|\needgraph| :
\begin{itemize}
- \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
+ \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>
+\clearpage
+ The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
\end{itemize}
-\clearpage
\LevelTwoTitle{Title, abstract and keywords}
\colorart{} has both the features of standard classes and that of the \AmS{} classes.
@@ -651,7 +655,7 @@ The author information can contain multiple groups, written as:
Among them, the mutual order of \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| is not important.
-\clearpage
+\bigskip
\LevelOneTitle{Known issues}
\begin{itemize}[itemsep=.6em]
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index 0374aec614..348f23ee1a 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{colorist}
- [2021/08/09 A colorful style for articles and books]
+ [2021/08/11 A colorful style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -28,6 +28,7 @@
\DeclareBoolOption[false]{fast}
\DeclareBoolOption[false]{puretext}
\DeclareBoolOption[false]{nothms}
+\DeclareBoolOption[false]{delaythms}
\DeclareBoolOption[false]{nothmnum}
\DeclareStringOption{thmnum}[colorist@thmnum@default]
\DeclareBoolOption[true]{regionalref}
@@ -170,13 +171,13 @@
\gappto{\PJLlang@langconfig@common}{%
\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}%
}
-\gappto{\PJLlang@langconfig@schinese}{%
+\gappto{\PJLlang@langconfig@CN}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
-\gappto{\PJLlang@langconfig@tchinese}{%
+\gappto{\PJLlang@langconfig@TC}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
-\gappto{\PJLlang@langconfig@japanese}{%
+\gappto{\PJLlang@langconfig@JP}{%
\renewcommand{\partstring}{第~\thepart~部}%
}
@@ -400,7 +401,7 @@
\setlist[itemize]{leftmargin=*}
\gappto{\PJLlang@langconfig@common}{\setlist[itemize,1]{label=\textcolor{maintext!25}{$\bullet$}}}
-\gappto{\PJLlang@langconfig@french}{\setlist[itemize,1]{label=\textcolor{maintext!50}{---}}}
+\gappto{\PJLlang@langconfig@FR}{\setlist[itemize,1]{label=\textcolor{maintext!50}{---}}}
\setlist[itemize,2]{label=\textcolor{maintext!27}{--}}
\setlist[itemize,3]{label=\textcolor{maintext!27}{\texttt{*}}}
@@ -747,7 +748,7 @@
\expandafter\def\csname definition-propositionnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\propositionnameRU}
\expandafter\def\csname definition-theoremnameRU\endcsname{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries{Определение}-\theoremnameRU}
-\AtEndPreamble{
+\def\colorist@definethms{
\if@colorist@nothms\else
\theoremstyle{basic}
\if@colorist@nothmnum
@@ -829,6 +830,12 @@
\fi
}
+\if@colorist@delaythms
+ \AtEndPreamble{\colorist@definethms}
+\else
+ \colorist@definethms
+\fi
+
\theoremstyle{simple}
\creflabelformat{PJLtheorem}{#2{\normalfont\colorist@sffamily\color{orange}\conditionalbfseries#1}#3}
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 9d4005db90..39acbc59f9 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -8,7 +8,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/08/10}{1.28K}
+\ProvidesExplClass{easybook}{2021/08/11}{1.28L}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -292,7 +292,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/08/10}{1.28K}
+\ProvidesExplPackage{easybase}{2021/08/11}{1.28L}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
@@ -619,7 +619,7 @@
\exp_args:Nc \NewDocumentCommand { eb@mark@#1@label@layout }
{O{\use:c { CTEXthe#1 }}m}
{\tl_set:cn { eb@mark@#1@label } {##1##2}}
- \cs_new:cpn { eb_mark_#1_if_name:n } ##1
+ \cs_new:cpn { eb_mark_#1_name_parse:n } ##1
{
\tl_if_in:nnTF {##1} { [ }
{ \use:c { eb@mark@#1@label@layout }##1 }
@@ -664,11 +664,11 @@
subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1,
subsec-mark .initial:n =
{ \CTEXifname{\eb@mark@subsection@label}{}#1 },
- chap-label .code:n = \eb_mark_chapter_if_name:n {#1},
+ chap-label .code:n = \eb_mark_chapter_name_parse:n {#1},
chap-label .initial:n = \hspace{1em},
- sec-label .code:n = \eb_mark_section_if_name:n {#1},
+ sec-label .code:n = \eb_mark_section_name_parse:n {#1},
sec-label .initial:n = \hspace{0.5em},
- subsec-label .code:n = \eb_mark_subsection_if_name:n {#1},
+ subsec-label .code:n = \eb_mark_subsection_name_parse:n {#1},
subsec-label .initial:n = \hspace{0.5em},
headrule .tl_gset:N = \headrule,
@@ -2396,7 +2396,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/10}{1.28K}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/11}{1.28L}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index a9f86a7487..2c45fb8204 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 5266be103c..1bb507066c 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -11,8 +11,8 @@
{
name = easybook,
title = EASYBOOK 使用手册,
- version = v1.28K,
- date = 2021/08/10,
+ version = v1.28L,
+ date = 2021/08/11,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = quee123@foxmail.com,
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
index 151b45a41a..4beabecc19 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.pdf
+++ b/macros/latex/contrib/minimalist/minimalist-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.tex b/macros/latex/contrib/minimalist/minimalist-doc.tex
index b3ead54ad1..6238f7b93b 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ b/macros/latex/contrib/minimalist/minimalist-doc.tex
@@ -1,4 +1,4 @@
-\documentclass[English,Chinese,French,classical]{minimart}
+\documentclass[classical]{minimart}
\linenumbers % Enable line numbers
@@ -98,7 +98,7 @@
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\minimalist{} 2021/08/08a}}
+\thanks{Corresponding to: \texttt{\minimalist{} 2021/08/11}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{August 2021, Beijing}
@@ -193,6 +193,7 @@ Référence du théorème: \cref{thm:abc}
If you find this example a little complicated, don't worry. Let's now look at this example piece by piece.
+\medskip
\LevelThreeTitle{Initialization}
\medskip
@@ -391,11 +392,15 @@ In the next section, we will go through the options available.
\end{itemize}
\item \texttt{puretext} or \texttt{nothms}
\begin{itemize}
- \item Pure text mode. Does not load theorem-like environments.
+ \item Pure text mode. Do not load theorem-like environments.
+ \end{itemize}
+ \item \texttt{delaythms}
+ \begin{itemize}
+ \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
\end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
\end{itemize}
\item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
@@ -404,7 +409,7 @@ In the next section, we will go through the options available.
\end{itemize}
\end{itemize}
-\clearpage
+\bigskip
Additionally, \minimart{} and \minimbook{} offers the following options:
\begin{itemize}
\item \texttt{a4paper} or \texttt{b5paper}
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index 04aba94b43..1892b05e4a 100644
--- a/macros/latex/contrib/minimalist/minimalist.sty
+++ b/macros/latex/contrib/minimalist/minimalist.sty
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{minimalist}
- [2021/08/08a A simple and clear style for articles and books]
+ [2021/08/11 A simple and clear style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -28,6 +28,7 @@
\DeclareBoolOption[false]{fast}
\DeclareBoolOption[false]{puretext}
\DeclareBoolOption[false]{nothms}
+\DeclareBoolOption[false]{delaythms}
\DeclareBoolOption[false]{nothmnum}
\DeclareStringOption{thmnum}[minimalist@thmnum@default]
\DeclareBoolOption[true]{regionalref}
@@ -89,7 +90,7 @@
\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape}
\newcommand{\secfont}{\conditionalbfseries\minimalist@titlefontshape}
\newcommand{\subsecfont}{\conditionalbfseries\minimalist@titlefontshape}
-\newcommand{\subsubsecfont}{\conditionalbfseries\minimalist@titlefontshape\itshape}
+\newcommand{\subsubsecfont}{\conditionalbfseries\minimalist@titlefontshape}
\fi
%%================================
@@ -252,13 +253,13 @@
\gappto{\PJLlang@langconfig@common}{%
\renewcommand{\partstring}{\MakeUppercase{{\partname~\protect\thepart}}}%
}
-\gappto{\PJLlang@langconfig@schinese}{%
+\gappto{\PJLlang@langconfig@CN}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
-\gappto{\PJLlang@langconfig@tchinese}{%
+\gappto{\PJLlang@langconfig@TC}{%
\renewcommand{\partstring}{第~\thepart~部分}%
}
-\gappto{\PJLlang@langconfig@japanese}{%
+\gappto{\PJLlang@langconfig@JP}{%
\renewcommand{\partstring}{第~\thepart~部}%
}
@@ -491,7 +492,7 @@
\setlist[itemize]{leftmargin=*}
\gappto{\PJLlang@langconfig@common}{\setlist[itemize,1]{label=\textcolor{maintext!25}{$\bullet$}}}
-\gappto{\PJLlang@langconfig@french}{\setlist[itemize,1]{label=\textcolor{maintext!50}{---}}}
+\gappto{\PJLlang@langconfig@FR}{\setlist[itemize,1]{label=\textcolor{maintext!50}{---}}}
\setlist[itemize,2]{label=\textcolor{maintext!27}{--}}
\setlist[itemize,3]{label=\textcolor{maintext!27}{\texttt{*}}}
@@ -702,8 +703,10 @@
\pretocmd{\remarknameES}{\itshape}{}{\FAIL}
\pretocmd{\observationnameES}{\itshape}{}{\FAIL}
-\AtEndPreamble{
+
\theoremstyle{simple}
+
+\def\minimalist@definethms{
\if@minimalist@nothms\else
\if@minimalist@nothmnum
\CreateTheorem*{theorem}
@@ -780,6 +783,12 @@
\fi
}
+\if@minimalist@delaythms
+ \AtEndPreamble{\minimalist@definethms}
+\else
+ \minimalist@definethms
+\fi
+
\ifbool{IsBook}{}{%
%%================================
@@ -852,7 +861,7 @@
\LocallyStopLineNumbers%
\vspace{-\baselineskip}%
\begin{center}%
- \textsc{\conditionalbfseries\small\abstractname}\\%
+ \textsc{\conditionalbfseries\minimalist@titlefontshape\small\abstractname}\\%
\vspace{-.3\baselineskip}%
\begin{minipage}[t]{.833\textwidth}%
\vspace{0pt}%
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 11d6858055..b35e37468c 100644
--- a/macros/latex/contrib/minimalist/minimart.cls
+++ b/macros/latex/contrib/minimalist/minimart.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{minimart}
- [2021/08/08a A simple and clear article style]
+ [2021/08/11 A simple and clear article style]
\def\minimclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -36,6 +36,7 @@
\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
+\DeclareStringOption{thmnum}[PJL@thmnum@default]
\newif\if@minimclass@bfivepaper\@minimclass@bfivepaperfalse
\DeclareVoidOption{b5paper}{\@minimclass@bfivepapertrue}
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index 6a3caba3a8..0c50b2bb81 100644
--- a/macros/latex/contrib/minimalist/minimbook.cls
+++ b/macros/latex/contrib/minimalist/minimbook.cls
@@ -17,7 +17,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesClass{minimbook}
- [2021/08/08a A simple and clear book style]
+ [2021/08/11 A simple and clear book style]
\def\minimclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -36,6 +36,7 @@
\DeclareBoolOption[false]{noto}
\DeclareBoolOption[false]{biolinum}
\DeclareBoolOption[false]{customfont}
+\DeclareStringOption{thmnum}[PJL@thmnum@default]
\newif\if@minimclass@bfivepaper\@minimclass@bfivepaperfalse
\DeclareVoidOption{b5paper}{\@minimclass@bfivepapertrue}
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index 69dee3c60b..ac7811c2cf 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index 314e907b00..2e0e84a54c 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
index fe6acb9c57..83efca0ee5 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc.dtx b/macros/latex/contrib/projlib/ProjLib-doc.dtx
index c228578a01..8c54844a7f 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc.dtx
+++ b/macros/latex/contrib/projlib/ProjLib-doc.dtx
@@ -90,7 +90,6 @@
%% Names
%%================================
\providecommand{\ProjLibPackage}{\mbox{\textsf{ProjLib}}}
-\providecommand{\PJLtoolkit}{\mbox{\textsf{PJLtoolkit}}}
\providecommand{\PJLauthor}{\mbox{\textsf{PJLauthor}}}
\providecommand{\PJLdatePackage}{\mbox{\textsf{PJLdate}}}
\providecommand{\PJLdraft}{\mbox{\textsf{PJLdraft}}}
@@ -108,7 +107,7 @@
%<*ProjLib-doc-cn>
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/08/07a}}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/08/11}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{2021年8月,北京}
%</ProjLib-doc-cn>
@@ -116,7 +115,7 @@
%<*ProjLib-doc-en>
\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/08/07a}}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/08/11}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{August 2021, Beijing}
%</ProjLib-doc-en>
@@ -124,7 +123,7 @@
%<*ProjLib-doc-fr>
\title{La boîte à outils~\,\ProjLib{}\\[.3\baselineskip]\normalsize Manuel d'utilisation}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\ProjLib{}~2021/08/07a}}
+\thanks{Correspondant à : \texttt{\ProjLib{}~2021/08/11}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{Août 2021, à Pékin}
%</ProjLib-doc-fr>
@@ -600,7 +599,7 @@ Les environnements de type théorème couramment utilisés ont été prédéfini
\item 字体选项。顾名思义,会加载相应名称的字体。
\item \texttt{useosf} 选项用来启用“旧式”数字。
\end{itemize}
- \item \texttt{nothms}、\texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}、\texttt{regionalref}、\texttt{originalref}
+ \item \texttt{nothms}、\texttt{delaythms}、\texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}、\texttt{regionalref}、\texttt{originalref}
\begin{itemize}
\item 来自用于设置定理类环境的组件 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。
\end{itemize}
@@ -630,7 +629,7 @@ Les environnements de type théorème couramment utilisés ont été prédéfini
\item Font options. As the names suggest, font with corresponding name will be loaded.
\item The \texttt{useosf} option is used to enable the old-style figures.
\end{itemize}
- \item \texttt{nothms}, \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}, \texttt{regionalref}, \texttt{originalref}
+ \item \texttt{nothms}, \texttt{delaythms}, \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}, \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
\item Options from the component \PJLthm{} used for setting theorem-like environments, please refer to the section on this package for details.
\end{itemize}
@@ -660,7 +659,7 @@ In addition, there are also some options of the components that should be passed
\item Options de police. Comme les noms l'indiquent, la police avec le nom correspondant sera utilisée.
\item L'option \texttt{useosf} est pour activer les chiffres à l'ancienne.
\end{itemize}
- \item \texttt{nothms}, \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}, \texttt{regionalref}, \texttt{originalref}
+ \item \texttt{nothms}, \texttt{delaythms}, \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}, \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
\item Options du composant \PJLthm{} utilisé pour définir des environnements de type théorème, veuillez vous référer à la section sur ce package pour plus de détails.
\end{itemize}
@@ -697,11 +696,11 @@ De plus, il existe également certaines options des composants qui doivent être
%</ProjLib-doc-cn>
%
%<*ProjLib-doc-en>
-\subsection{Main function}
+\subsection{Main functions}
%</ProjLib-doc-en>
%
%<*ProjLib-doc-fr>
-\subsection{Fonction principale}
+\subsection{Fonctions principales}
%</ProjLib-doc-fr>
%<*ProjLib-doc-cn>
@@ -958,9 +957,13 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\begin{itemize}
\item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。
\end{itemize}
+ \item \texttt{delaythms}
+ \begin{itemize}
+ \item 将定理类环境设定推迟到导言结尾。如果你希望定理类环境跟随自定义计数器编号,则应考虑这一选项。
+ \end{itemize}
\item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item 使定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
+ \item 使定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。其中 \meta{counter} 应该是自带的计数器 (如 \texttt{subsection}) 或在导言部分自定义的计数器 (在启用 \texttt{delaythms} 选项的情况下)。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。
\end{itemize}
\item \texttt{regionalref}、\texttt{originalref}
\begin{itemize}
@@ -995,6 +998,7 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\vspace{-.15\baselineskip}%
其中,\meta{language name} 可参阅关于 \PJLlang{} 的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
+\bigskip
然后用下面五种方式之一定义这一环境:
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
@@ -1041,6 +1045,7 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
\end{code}
+\clearpage\noindent
可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示 (具体样式与所在的文档类有关) :
\begin{proofidea*}
@@ -1063,9 +1068,13 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\begin{itemize}
\item 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{delaythms}
+ \begin{itemize}
+ \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
+ \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble. If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
+ \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
\end{itemize}
\item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
@@ -1170,9 +1179,13 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm
\begin{itemize}
\item Les environnements de type théorème ne seront pas définis. Vous pouvez utiliser cette option si vous souhaitez appliquer vos propres styles de théorème.
\end{itemize}
+ \item \texttt{delaythms}
+ \begin{itemize}
+ \item Reportez la définition des environnements de type théorème à la fin du préambule. Utilisez cette option si vous souhaitez que les environnements soient numérotés dans un compteur personnalisé.
+ \end{itemize}
\item \texttt{nothmnum}, \texttt{thmnum} ou \texttt{thmnum=}\meta{counter}
\begin{itemize}
- \item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule. Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
+ \item Les environnements de type théorème ne seront pas numérotés / numérotés dans l'ordre 1, 2, 3... / numérotés dans \meta{counter}. Ici, \meta{counter} doit être un compteur intégré (tel que \texttt{subsection}) ou un compteur défini dans le préambule (avec l'option \texttt{delaythms} activée). Si aucune option n'est utilisée, ils seront numérotés dans \texttt{chapter} (livre) ou \texttt{section} (article).
\end{itemize}
\item \texttt{regionalref}, \texttt{originalref}
\begin{itemize}
@@ -1200,19 +1213,19 @@ Ensuite, créez cet environnement de l'une des cinq manières suivantes :
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
\begin{itemize}
- \item Définir un environnement non numéroté \meta{name of environment}
+ \item Définir un environnement \meta{name of environment} non numéroté
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
\begin{itemize}
- \item Définir un environnement numéroté \meta{name of environment}, numéroté dans l'ordre 1, 2, 3, \dots
+ \item Définir un environnement \meta{name of environment} numéroté dans l'ordre 1, 2, 3, \dots
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
\begin{itemize}
- \item Définir un environnement numéroté \meta{name of environment}, qui partage le compteur \meta{numbered like}
+ \item Définir un environnement \meta{name of environment} numéroté, qui partage le compteur \meta{numbered like}
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
\begin{itemize}
- \item Définir un environnement numéroté \meta{name of environment}, numéroté dans le compteur \meta{numbered within}
+ \item Définir un environnement \meta{name of environment} numéroté dans le compteur \meta{numbered within}
\end{itemize}
\item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
\lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
@@ -1261,11 +1274,11 @@ définit un environnement non numéroté \lstinline|proofidea*| et un environnem
%</ProjLib-doc-cn>
%
%<*ProjLib-doc-en>
-\subsection{Secondary function}
+\subsection{Secondary functions}
%</ProjLib-doc-en>
%
%<*ProjLib-doc-fr>
-\subsection{Fonction secondaire}
+\subsection{Fonctions secondaires}
%</ProjLib-doc-fr>
%<*ProjLib-doc-cn>
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index ee03498a47..930ff18847 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -18,47 +18,47 @@
%
%<*ProjLib>
\ProvidesPackage{ProjLib}
- [2021/08/07a The collective interface of ProjLib toolkit]
+ [2021/08/11 The collective interface of ProjLib toolkit]
%</ProjLib>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/08/07a Enhanced author information block]
+ [2021/08/11 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/08/07a Convert yyyy-mm-dd to normal datetime format]
+ [2021/08/11 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/08/07a Some useful macros for the draft stage]
+ [2021/08/11 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/08/07a Multi-language configuration]
+ [2021/08/11 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/08/07a The ProjLib logo]
+ [2021/08/11 The ProjLib logo]
%</PJLlogo>
%
%<*PJLmath>
\ProvidesPackage{PJLmath}
- [2021/08/07a Useful math macros and shortcuts]
+ [2021/08/11 Useful math macros and shortcuts]
%</PJLmath>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/08/07a Paper style configuration]
+ [2021/08/11 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/08/07a Theorem setup and configuration]
+ [2021/08/11 Theorem setup and configuration]
%</PJLthm>
%
%# 下面两行引入宏包的代码是所有文件共用的。
@@ -411,19 +411,19 @@
\gappto{\PJLlang@langconfig@common}{%
\let\@DTMdate\@DTMdate@PJLoriginal%
}
-\gappto{\PJLlang@langconfig@schinese}{%
+\gappto{\PJLlang@langconfig@CN}{%
\renewcommand*{\@DTMdate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate%
\zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
}%
}
-\gappto{\PJLlang@langconfig@tchinese}{%
+\gappto{\PJLlang@langconfig@TC}{%
\renewcommand*{\@DTMdate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate%
\zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
}%
}
-\gappto{\PJLlang@langconfig@japanese}{%
+\gappto{\PJLlang@langconfig@JP}{%
\renewcommand*{\@DTMdate}[1]{%
\expandafter\@dtm@parsedate#1\@dtm@endparsedate%
\zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
@@ -664,6 +664,77 @@
\newcommand\japaneseABBR{JP}
\newcommand\russianABBR{RU}
+%# 将字符串转换为相应的缩写
+%# Convert a string to the corresponding abbreviation
+\ExplSyntaxOn
+% See https://tex.stackexchange.com/a/610146
+\NewExpandableDocumentCommand{\StrToABBR}{m}
+ {
+ \str_case_e:nn { \str_foldcase:n { #1 } }
+ {
+ {cn} {CN}
+ {chinese} {CN}
+ {schinese} {CN}
+ {simplifiedchinese} {CN}
+ {tc} {TC}
+ {tchinese} {TC}
+ {traditionalchinese} {TC}
+ {jp} {JP}
+ {japanese} {JP}
+ {en} {EN}
+ {english} {EN}
+ {fr} {FR}
+ {french} {FR}
+ {de} {DE}
+ {ngerman} {DE}
+ {it} {IT}
+ {italian} {IT}
+ {pt} {PT}
+ {portuguese} {PT}
+ {br} {BR}
+ {brazilian} {BR}
+ {es} {ES}
+ {spanish} {ES}
+ {german} {DE}
+ {ru} {RU}
+ {russian} {RU}
+ }
+ }
+
+\NewExpandableDocumentCommand{\StrToTYPE}{m}
+ {
+ \str_case_e:nn { \str_foldcase:n { #1 } }
+ {
+ {cn} {CJK}
+ {chinese} {CJK}
+ {schinese} {CJK}
+ {simplifiedchinese} {CJK}
+ {tc} {CJK}
+ {tchinese} {CJK}
+ {traditionalchinese} {CJK}
+ {jp} {CJK}
+ {japanese} {CJK}
+ {en} {Latin}
+ {english} {Latin}
+ {fr} {Latin}
+ {french} {Latin}
+ {de} {Latin}
+ {ngerman} {Latin}
+ {it} {Latin}
+ {italian} {Latin}
+ {pt} {Latin}
+ {portuguese} {Latin}
+ {br} {Latin}
+ {brazilian} {Latin}
+ {es} {Latin}
+ {spanish} {Latin}
+ {german} {Latin}
+ {ru} {Latin}
+ {russian} {Latin}
+ }
+ }
+\ExplSyntaxOff
+
%# 在 pdfLaTeX 编译时载入编码设置
%# Load the encoding settings when pdfLaTeX is used
\RequirePackage{iftex}
@@ -723,7 +794,7 @@
%# 各个语言的设置
%# The configuration for each language
-\newcommand{\PJLlang@langconfig@schinese}{%
+\newcommand{\PJLlang@langconfig@CN}{%
\def\abstractname{摘要}%
\def\proofname{证明}%
\def\contentsname{目录}%
@@ -738,7 +809,7 @@
\let\today\zhtoday%
\renewcommand{\languagename}{schinese}%
}
-\newcommand{\PJLlang@langconfig@tchinese}{%
+\newcommand{\PJLlang@langconfig@TC}{%
\def\abstractname{摘要}%
\def\proofname{證明}%
\def\contentsname{目錄}%
@@ -753,72 +824,42 @@
\let\today\zhtoday%
\renewcommand{\languagename}{tchinese}%
}
-\newcommand{\PJLlang@langconfig@japanese}{%
+\newcommand{\PJLlang@langconfig@JP}{%
\selectlanguage{japanese}%
}
-\newcommand{\PJLlang@langconfig@english}{%
+\newcommand{\PJLlang@langconfig@EN}{%
\selectlanguage{english}%
}
-\newcommand{\PJLlang@langconfig@french}{%
+\newcommand{\PJLlang@langconfig@FR}{%
\selectlanguage{french}%
% The line below is currently only needed for 'babel', but also works with 'polyglossia'
\def\frenchpartname{Partie}%
}
-\newcommand{\PJLlang@langconfig@german}{%
+\newcommand{\PJLlang@langconfig@DE}{%
\selectlanguage{ngerman}%
}
-\newcommand{\PJLlang@langconfig@italian}{%
+\newcommand{\PJLlang@langconfig@IT}{%
\selectlanguage{italian}%
}
-\newcommand{\PJLlang@langconfig@portuguese}{%
+\newcommand{\PJLlang@langconfig@PT}{%
\selectlanguage{portuguese}%
}
-\newcommand{\PJLlang@langconfig@brazilian}{%
+\newcommand{\PJLlang@langconfig@BR}{%
\selectlanguage{brazilian}%
}
-\newcommand{\PJLlang@langconfig@spanish}{%
+\newcommand{\PJLlang@langconfig@ES}{%
\selectlanguage{spanish}%
}
-\newcommand{\PJLlang@langconfig@russian}{%
+\newcommand{\PJLlang@langconfig@RU}{%
\selectlanguage{russian}%
}
%# 用于增加语言设置的用户指令 AddLanguageSetting
%# User command for adding language settings
-\RequirePackage{xstring}
\NewDocumentCommand\AddLanguageSetting{d()m}{%
\IfNoValueTF{#1}%
{\gappto{\PJLlang@langconfig@common}{#2}}%
- {%
- \lowercase{\IfStrEqCase{#1}}{%
- {cn}{\gappto{\PJLlang@langconfig@schinese}{#2}}%
- {chinese}{\gappto{\PJLlang@langconfig@schinese}{#2}}%
- {schinese}{\gappto{\PJLlang@langconfig@schinese}{#2}}%
- {simplifiedchinese}{\gappto{\PJLlang@langconfig@schinese}{#2}}%
- {tc}{\gappto{\PJLlang@langconfig@tchinese}{#2}}%
- {tchinese}{\gappto{\PJLlang@langconfig@tchinese}{#2}}%
- {traditionalchinese}{\gappto{\PJLlang@langconfig@tchinese}{#2}}%
- {jp}{\gappto{\PJLlang@langconfig@japanese}{#2}}%
- {japanese}{\gappto{\PJLlang@langconfig@japanese}{#2}}%
- {en}{\gappto{\PJLlang@langconfig@english}{#2}}%
- {english}{\gappto{\PJLlang@langconfig@english}{#2}}%
- {fr}{\gappto{\PJLlang@langconfig@french}{#2}}%
- {french}{\gappto{\PJLlang@langconfig@french}{#2}}%
- {de}{\gappto{\PJLlang@langconfig@german}{#2}}%
- {ngerman}{\gappto{\PJLlang@langconfig@german}{#2}}%
- {it}{\gappto{\PJLlang@langconfig@italian}{#2}}%
- {italian}{\gappto{\PJLlang@langconfig@italian}{#2}}%
- {pt}{\gappto{\PJLlang@langconfig@portuguese}{#2}}%
- {portuguese}{\gappto{\PJLlang@langconfig@portuguese}{#2}}%
- {br}{\gappto{\PJLlang@langconfig@brazilian}{#2}}%
- {brazilian}{\gappto{\PJLlang@langconfig@brazilian}{#2}}%
- {es}{\gappto{\PJLlang@langconfig@spanish}{#2}}%
- {spanish}{\gappto{\PJLlang@langconfig@spanish}{#2}}%
- {german}{\gappto{\PJLlang@langconfig@german}{#2}}%
- {ru}{\gappto{\PJLlang@langconfig@russian}{#2}}%
- {russian}{\gappto{\PJLlang@langconfig@russian}{#2}}%
- }%
- }%
+ {\expandafter\gappto\expandafter{\csname PJLlang@langconfig@\StrToABBR{#1}\endcsname}{#2}}%
}
\RequirePackage{setspace}
@@ -841,40 +882,14 @@
%
%# UseLanguage 的核心部分,只能在正文中使用
%# The core part of UseLanguage, can be used only in the main text, not preamble
-\newcommand{\UseLanguageCORE}[1]{%
+\NewDocumentCommand{\UseLanguageCORE}{m}{%
\PJLlang@langconfig@common%
- \lowercase{\IfStrEqCase{#1}}{%
- {cn}{\PJL@config@CJK\PJLlang@langconfig@schinese}%
- {chinese}{\PJL@config@CJK\PJLlang@langconfig@schinese}%
- {schinese}{\PJL@config@CJK\PJLlang@langconfig@schinese}%
- {simplifiedchinese}{\PJL@config@CJK\PJLlang@langconfig@schinese}%
- {tc}{\PJL@config@CJK\PJLlang@langconfig@tchinese}%
- {tchinese}{\PJL@config@CJK\PJLlang@langconfig@tchinese}%
- {traditionalchinese}{\PJL@config@CJK\PJLlang@langconfig@tchinese}%
- {jp}{\PJL@config@CJK\PJLlang@langconfig@japanese}%
- {japanese}{\PJL@config@CJK\PJLlang@langconfig@japanese}%
- {en}{\PJL@config@Latin\PJLlang@langconfig@english}%
- {english}{\PJL@config@Latin\PJLlang@langconfig@english}%
- {fr}{\PJL@config@Latin\PJLlang@langconfig@french}%
- {french}{\PJL@config@Latin\PJLlang@langconfig@french}%
- {de}{\PJL@config@Latin\PJLlang@langconfig@german}%
- {ngerman}{\PJL@config@Latin\PJLlang@langconfig@german}%
- {german}{\PJL@config@Latin\PJLlang@langconfig@german}%
- {it}{\PJL@config@Latin\PJLlang@langconfig@italian}%
- {italian}{\PJL@config@Latin\PJLlang@langconfig@italian}%
- {pt}{\PJL@config@Latin\PJLlang@langconfig@portuguese}%
- {portuguese}{\PJL@config@Latin\PJLlang@langconfig@portuguese}%
- {br}{\PJL@config@Latin\PJLlang@langconfig@brazilian}%
- {brazilian}{\PJL@config@Latin\PJLlang@langconfig@brazilian}%
- {es}{\PJL@config@Latin\PJLlang@langconfig@spanish}%
- {spanish}{\PJL@config@Latin\PJLlang@langconfig@spanish}%
- {ru}{\PJL@config@Latin\PJLlang@langconfig@russian}%
- {russian}{\PJL@config@Latin\PJLlang@langconfig@russian}%
- }%
+ \csname PJL@config@\StrToTYPE{#1}\endcsname%
+ \csname PJLlang@langconfig@\StrToABBR{#1}\endcsname%
}
%# 用于选定语言的 UseLanguage
%# Macro for selecting language
-\newcommand{\UseLanguage}[1]{%
+\NewDocumentCommand{\UseLanguage}{m}{%
\ifx\@onlypreamble\@notprerr%
\UseLanguageCORE{#1}%
\else%
@@ -883,56 +898,17 @@
}
%# 用于局部选定语言的 UseOtherLanguage
%# Macro for selecting language locally
-\newcommand{\UseOtherLanguage}[2]{%
+\NewDocumentCommand{\UseOtherLanguage}{mm}{%
\begingroup\begingroup%
\PJLlang@langconfig@common%
- \lowercase{\IfStrEqCase{#1}}{%
- {cn}{\PJLlang@langconfig@schinese}%
- {chinese}{\PJLlang@langconfig@schinese}%
- {schinese}{\PJLlang@langconfig@schinese}%
- {simplifiedchinese}{\PJLlang@langconfig@schinese}%
- {tc}{\PJLlang@langconfig@tchinese}%
- {tchinese}{\PJLlang@langconfig@tchinese}%
- {traditionalchinese}{\PJLlang@langconfig@tchinese}%
- {jp}{\PJLlang@langconfig@japanese}%
- {japanese}{\PJLlang@langconfig@japanese}%
- {en}{\PJLlang@langconfig@english}%
- {english}{\PJLlang@langconfig@english}%
- {fr}{\PJLlang@langconfig@french}%
- {french}{\PJLlang@langconfig@french}%
- {de}{\PJLlang@langconfig@german}%
- {ngerman}{\PJLlang@langconfig@german}%
- {german}{\PJLlang@langconfig@german}%
- {it}{\PJLlang@langconfig@italian}%
- {italian}{\PJLlang@langconfig@italian}%
- {pt}{\PJLlang@langconfig@portuguese}%
- {portuguese}{\PJLlang@langconfig@portuguese}%
- {br}{\PJLlang@langconfig@brazilian}%
- {brazilian}{\PJLlang@langconfig@brazilian}%
- {es}{\PJLlang@langconfig@spanish}%
- {spanish}{\PJLlang@langconfig@spanish}%
- {ru}{\PJLlang@langconfig@russian}%
- {russian}{\PJLlang@langconfig@russian}%
- }%
+ \csname PJLlang@langconfig@\StrToABBR{#1}\endcsname%
#2%
\endgroup\endgroup%
}
%# 运行默认语言的设置
%# Execute the configuration of the main language
-\IfStrEqCase{\PJLlang@mainlang}{%
- {EN}{\UseLanguage{EN}}%
- {FR}{\UseLanguage{FR}}%
- {DE}{\UseLanguage{DE}}%
- {IT}{\UseLanguage{IT}}%
- {PT}{\UseLanguage{PT}}%
- {BR}{\UseLanguage{BR}}%
- {ES}{\UseLanguage{ES}}%
- {CN}{\UseLanguage{CN}}%
- {TC}{\UseLanguage{TC}}%
- {JP}{\UseLanguage{JP}}%
- {RU}{\UseLanguage{RU}}%
-}
+\expandafter\UseLanguage\expandafter{\PJLlang@mainlang}
%</PJLlang>
%
%<*PJLlogo>
@@ -1393,6 +1369,9 @@
%# 不建立定理类环境
%# Do not setup theorem-like environments
\DeclareBoolOption[false]{nothms}
+%# 推迟建立定理类环境
+%# Delay the setup of theorem-like environments to the end of the preamble
+\DeclareBoolOption[false]{delaythms}
%# 不编号定理类环境
%# Do not number theorem-like environments
\DeclareBoolOption[false]{nothmnum}
@@ -1436,34 +1415,8 @@
\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}}%
- {it}{\def\PJL@temp@abbr{IT}}%
- {italian}{\def\PJL@temp@abbr{IT}}%
- {pt}{\def\PJL@temp@abbr{PT}}%
- {portuguese}{\def\PJL@temp@abbr{PT}}%
- {br}{\def\PJL@temp@abbr{BR}}%
- {brazilian}{\def\PJL@temp@abbr{BR}}%
- {es}{\def\PJL@temp@abbr{ES}}%
- {spanish}{\def\PJL@temp@abbr{ES}}%
- {ru}{\def\PJL@temp@abbr{RU}}%
- {russian}{\def\PJL@temp@abbr{RU}}%
- }%
+ \expandafter\def\expandafter\PJL@temp@abbr\expandafter%
+ {\expandafter\StrToABBR\expandafter{#1}}%
\expandafter\def\csname\PJLthm@temp name\PJL@temp@abbr\endcsname{#3}%
}{%
\expandafter\def\csname\PJLthm@temp nameEN\endcsname{#3}%
@@ -1975,9 +1928,10 @@
}
}
}
+
%# 建立定理类环境
%# Setup theorem-like environments
-\AtEndPreamble{
+\def\PJLthm@definethms{
\if@PJLthm@nothms\else
\if@PJLthm@nothmnum
\CreateTheorem*{theorem}
@@ -2056,7 +2010,6 @@
\CreateTheorem*{remark*}
\CreateTheorem*{observation*}
\fi
-}
%# 按照 thmnum 决定公式如何编号
%# Number the equations with respect to thmnum
@@ -2072,9 +2025,17 @@
}
}
+} % End of \PJLthm@definethms
+
+\if@PJLthm@delaythms
+ \AtEndPreamble{\PJLthm@definethms}
+\else
+ \PJLthm@definethms
+\fi
+
%# 一些 cref 的本地化
%# Some localization of cref
-\gappto{\PJLlang@langconfig@schinese}{%
+\gappto{\PJLlang@langconfig@CN}{%
\crefname{equation}{式}{式}%
\crefname{figure}{图}{图}%
\crefname{table}{表}{表}%
@@ -2091,7 +2052,7 @@
\def\creflastgroupconjunction{~和~}%
\def\crefrangeconjunction{~}%
}
-\gappto{\PJLlang@langconfig@tchinese}{%
+\gappto{\PJLlang@langconfig@TC}{%
\crefname{equation}{式}{式}%
\crefname{figure}{圖}{圖}%
\crefname{table}{表}{表}%
@@ -2108,7 +2069,7 @@
\def\creflastgroupconjunction{~與~}%
\def\crefrangeconjunction{~}%
}
-\gappto{\PJLlang@langconfig@japanese}{%
+\gappto{\PJLlang@langconfig@JP}{%
\crefname{equation}{式}{式}%
\crefname{figure}{図}{図}%
\crefname{table}{表}{表}%
@@ -2125,7 +2086,7 @@
\def\creflastgroupconjunction{~と~}%
\def\crefrangeconjunction{〜}%
}
-\gappto{\PJLlang@langconfig@russian}{%
+\gappto{\PJLlang@langconfig@RU}{%
\crefname{equation}{уравнение}{уравнения}%
\crefname{figure}{рис.}{рис.}%
\crefname{table}{таблица}{таблицы}%
@@ -2142,7 +2103,7 @@
\def\creflastgroupconjunction{~и~}%
\def\crefrangeconjunction{~\textasciitilde~}%
}
-\gappto{\PJLlang@langconfig@portuguese}{%
+\gappto{\PJLlang@langconfig@PT}{%
\crefname{equation}{eq.}{eqs.}%
\crefname{figure}{fig.}{figs.}%
\crefname{table}{tabela}{tabelas}%
@@ -2173,6 +2134,7 @@
\DeclareBoolOption[false]{author}
\DeclareBoolOption[false]{amsfashion}
\DeclareBoolOption[false]{nothms}
+\DeclareBoolOption[false]{delaythms}
\DeclareBoolOption[false]{nothmnum}
\DeclareStringOption{thmnum}[PJL@thmnum@default]
\DeclareBoolOption[true]{regionalref}
@@ -2207,6 +2169,9 @@
\if@ProjLib@nothms
\PassOptionsToPackage{nothms}{PJLthm}
\fi
+\if@ProjLib@delaythms
+ \PassOptionsToPackage{delaythms}{PJLthm}
+\fi
\if@ProjLib@nothmnum
\PassOptionsToPackage{nothmnum}{PJLthm}
\fi