summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/projlib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-06-18 03:01:13 +0000
committerNorbert Preining <norbert@preining.info>2021-06-18 03:01:13 +0000
commit3ecc00c27119bc47ba26b518b7d26c00b69599df (patch)
treedb60a75c06403ca74ed76bc3339d80958159ae3e /macros/latex/contrib/projlib
parent5f3280db1e6f333f79e9930e5609d3f5175d5af7 (diff)
CTAN sync 202106180301
Diffstat (limited to 'macros/latex/contrib/projlib')
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin226031 -> 226676 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.tex38
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin142661 -> 141933 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.tex40
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx117
-rw-r--r--macros/latex/contrib/projlib/ProjLib.ins2
-rw-r--r--macros/latex/contrib/projlib/README.md12
7 files changed, 123 insertions, 86 deletions
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index 0e513e7abd..7c3d32aef4 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-cn.tex b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
index dfc162bea3..426944dffc 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
@@ -1,10 +1,10 @@
%! TEX program = xelatex
-\documentclass[allowbf,regionalref]{lebhart}
+\documentclass[allowbf,regionalref,puretext]{lebhart}
%%================================
%% 引入工具集
%%================================
-\usepackage{PJLtoolkit}
+\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
@@ -32,7 +32,7 @@
}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib
+ {color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,PJLdate,ProjLib
}
}
\lstnewenvironment{code}%
@@ -61,10 +61,11 @@
%%================================
%% 名称
%%================================
+\providecommand{\ProjLibPackage}{\textsf{ProjLib}}
\providecommand{\PJLtoolkit}{\textsf{PJLtoolkit}}
\providecommand{\PJLamssim}{\textsf{PJLamssim}}
\providecommand{\PJLauthor}{\textsf{PJLauthor}}
-\providecommand{\PJLdatestr}{\textsf{PJLdate}}
+\providecommand{\PJLdatePackage}{\textsf{PJLdate}}
\providecommand{\PJLdraft}{\textsf{PJLdraft}}
\providecommand{\PJLlang}{\textsf{PJLlang}}
\providecommand{\PJLlogo}{\textsf{PJLlogo}}
@@ -78,43 +79,44 @@
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/06/07}}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/06/17}}
\date{2021年6月,北京}
\maketitle
\begin{abstract}
- \ProjLib{} 工具集之设计目的为简化 \LaTeX{} 文档撰写前的准备工作。只需要加载 \PJLtoolkit{},多语言设置就已准备就绪,定理类环境已被设置好可供直接使用,并且引入了一系列辅助功能。
+ \ProjLib{} 工具集之设计目的为简化 \LaTeX{} 文档撰写前的准备工作。只需要加载 \ProjLibPackage{},多语言设置就已准备就绪,定理类环境已被设置好可供直接使用,并且引入了一系列辅助功能。
\end{abstract}
% \tableofcontents
-\section{PJLtoolkit}
+\section{主宏包}
\subsection{如何加载}
只需要在导言部分加入这一行即可:
\begin{code}
- \usepackage{PJLtoolkit}
+ \usepackage{ProjLib}
\end{code}
\begin{tip}[注意事项]
- 由于其内部使用了 \textsf{cleveref},\PJLtoolkit{} 需要放在 \textsf{varioref}、\textsf{hyperref} 的后面。
+ 由于其内部使用了 \textsf{cleveref},\ProjLibPackage{} 需要放在 \textsf{varioref}、\textsf{hyperref} 的后面。
\end{tip}
\medskip
\subsection{选项}
-\PJLtoolkit{} 提供下列选项以供选择:
+\ProjLibPackage{} 提供下列选项以供选择:
\begin{itemize}
\item \texttt{draft} 或 \texttt{fast}
\begin{itemize}
\item 快速模式。功能会适当缩减,但能够提高编译速度,建议在撰写阶段使用。
\end{itemize}
- \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum}
+ \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} $|$ \texttt{useosf}
\begin{itemize}
\item 字体选项。顾名思义,会加载相应名称的字体。
+ \item \texttt{useosf} 选项用来启用“旧式”数字。
\end{itemize}
\item \texttt{author}
\begin{itemize}
@@ -162,7 +164,7 @@
\subsection{PJLdate}
-\PJLdatestr{} 提供了 \lstinline|\PJLdate|\meta{yyyy-mm-dd} 命令,以将 \meta{yyyy-mm-dd} 转换为当前语言的日期格式显示。例如,在当前的中文语境下,\lstinline|\PJLdate{2022-04-01}| 会被显示为“\PJLdate{2022-04-01}”,而在英文语境下则会被显示为“\UseOtherLanguage{English}{\PJLdate{2022-04-01}}”。
+\PJLdatePackage{} 提供了 \lstinline|\PLdate|\meta{yyyy-mm-dd} (或 \lstinline|\PJLdate|\meta{yyyy-mm-dd}) 命令,以将 \meta{yyyy-mm-dd} 转换为当前语言的日期格式显示。例如,在当前的中文语境下,\lstinline|\PLdate{2022-04-01}| 会被显示为“\PJLdate{2022-04-01}”,而在英文语境下则会被显示为“\UseOtherLanguage{English}{\PJLdate{2022-04-01}}”。
关于如何选定语言,请参阅关于 \PJLlang{} 的小节。
@@ -389,13 +391,13 @@
\subsection{标准文档类}
-在标准文档类中,通常只需简要设置页面尺寸、超链接,再载入 \PJLtoolkit{},即可直接开始写作。下面是一段完整的示例。
+在标准文档类中,通常只需简要设置页面尺寸、超链接,再载入 \ProjLibPackage{},即可直接开始写作。下面是一段完整的示例。
\begin{code}
\documentclass{article}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino
+\usepackage[palatino]{ProjLib} % Load the toolkit and use font Palatino
\UseLanguage{French} % Use French from here
@@ -424,20 +426,20 @@ Référence du théorème: \cref{thm:abc} % It is recommended to use clever refe
\end{code}
\bigskip
-如果使用了 \PJLamssim{},那么文章中就可以采用 \AmS{} 文档类的写法 (当然,此时原始的写法也是成立的,因此始终添加 \texttt{amssim} 这一参数通常是没有问题的)。此时上文引入 \PJLtoolkit{} 的那一行应该写为:
+如果使用了 \PJLamssim{},那么文章中就可以采用 \AmS{} 文档类的写法 (当然,此时原始的写法也是成立的,因此始终添加 \texttt{amssim} 这一参数通常是没有问题的)。此时上文引入 \ProjLibPackage{} 的那一行应该写为:
\begin{code}
-\usepackage[amssim,palatino]{PJLtoolkit}
+\usepackage[amssim,palatino]{ProjLib}
\end{code}
\clearpage
\subsection{\texorpdfstring{\AmS{}}{AMS} 文档类}
-在 \AmS{} 文档类中,通常只需简要设置页面尺寸、超链接,再载入 \PJLtoolkit{},即可直接开始写作。下面是一段完整的示例。
+在 \AmS{} 文档类中,通常只需简要设置页面尺寸、超链接,再载入 \ProjLibPackage{},即可直接开始写作。下面是一段完整的示例。
\begin{code}
\documentclass{amsart}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino
+\usepackage[palatino]{ProjLib} % Load the toolkit and use font Palatino
\UseLanguage{French} % Use French from here
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index cce553440a..47ba1e28f6 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-en.tex b/macros/latex/contrib/projlib/ProjLib-doc-en.tex
index 4cbffde7fa..707cf5c8d4 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.tex
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.tex
@@ -1,10 +1,10 @@
%! TEX program = xelatex
-\documentclass[allowbf,regionalref]{lebhart}
+\documentclass[allowbf,regionalref,puretext]{lebhart}
%%================================
%% Import toolkit
%%================================
-\usepackage{PJLtoolkit}
+\usepackage{ProjLib}
\usepackage{longtable} % breakable tables
\usepackage{hologo} % more TeX logo
@@ -30,7 +30,7 @@
}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib
+ {color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,PJLdate,ProjLib
}
}
\lstnewenvironment{code}%
@@ -59,10 +59,11 @@
%%================================
%% 名称
%%================================
+\providecommand{\ProjLibPackage}{\textsf{ProjLib}}
\providecommand{\PJLtoolkit}{\textsf{PJLtoolkit}}
\providecommand{\PJLamssim}{\textsf{PJLamssim}}
\providecommand{\PJLauthor}{\textsf{PJLauthor}}
-\providecommand{\PJLdatestr}{\textsf{PJLdate}}
+\providecommand{\PJLdatePackage}{\textsf{PJLdate}}
\providecommand{\PJLdraft}{\textsf{PJLdraft}}
\providecommand{\PJLlang}{\textsf{PJLlang}}
\providecommand{\PJLlogo}{\textsf{PJLlogo}}
@@ -76,43 +77,44 @@
\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen Xu}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/06/07}}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/06/17}}
\date{June 2021, Beijing}
\maketitle
\begin{abstract}
- The \ProjLib{} toolkit is designed to simplify the preparation before writing \LaTeX{} documents. With \PJLtoolkit{} loaded, you no longer need to set up the theorem-like environments nor configure the appropriate multilingual settings. Additionally, a series of auxiliary functionalities are introduced.
+ The \ProjLib{} toolkit is designed to simplify the preparation before writing \LaTeX{} documents. With \ProjLibPackage{} loaded, you no longer need to set up the theorem-like environments nor configure the appropriate multilingual settings. Additionally, a series of auxiliary functionalities are introduced.
\end{abstract}
% \tableofcontents
-\section{PJLtoolkit}
+\section{The main package}
\subsection{How to load it}
Just add the following line to your preamble:
\begin{code}
- \usepackage{PJLtoolkit}
+ \usepackage{ProjLib}
\end{code}
\begin{tip}[Attention]
- Since \textsf{cleveref} is used internally, \PJLtoolkit{} needs to be placed after \textsf{varioref} and \textsf{hyperref}.
+ Since \textsf{cleveref} is used internally, \ProjLibPackage{} needs to be placed after \textsf{varioref} and \textsf{hyperref}.
\end{tip}
\medskip
\subsection{Options}
-\PJLtoolkit{} offers the following options:
+\ProjLibPackage{} offers the following options:
\begin{itemize}
\item \texttt{draft} or \texttt{fast}
\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} $|$ \texttt{useosf}
\begin{itemize}
- \item Font options. As the name suggest, font with corresponding name will be loaded.
+ \item Font options. As the name 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{author}
\begin{itemize}
@@ -160,7 +162,7 @@ The mutual order of \lstinline|\address|, \lstinline|\curraddr| and \lstinline|\
\subsection{PJLdate}
-\PJLdatestr{} offers the \lstinline|\PJLdate|\meta{yyyy-mm-dd} macro to convert \meta{yyyy-mm-dd} into the date format of the currently selected language. For example, in current English context, \lstinline|\PJLdate{2022-04-01}| would become ``\PJLdate{2022-04-01}'', while in French context as ``\UseOtherLanguage{French}{\PJLdate{2022-04-01}}''.
+\PJLdatePackage{} offers the \lstinline|\PLdate|\meta{yyyy-mm-dd} (or \lstinline|\PJLdate|\meta{yyyy-mm-dd}) macro to convert \meta{yyyy-mm-dd} into the date format of the currently selected language. For example, in current English context, \lstinline|\PLdate{2022-04-01}| would become ``\PLdate{2022-04-01}'', while in French context as ``\UseOtherLanguage{French}{\PLdate{2022-04-01}}''.
For details on how to select a language, please refer to the section on \PJLlang{}.
@@ -388,13 +390,13 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm
\subsection{Standard classes}
-In standard classes, one usually only need to configure the page size, hyperlinks and load \PJLtoolkit{} before actually start writing the document. Below is a complete example.
+In standard classes, one usually only need to configure the page size, hyperlinks and load \ProjLibPackage{} before actually start writing the document. Below is a complete example.
\begin{code}
\documentclass{article}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino
+\usepackage[palatino]{ProjLib} % Load the toolkit and use font Palatino
\UseLanguage{French} % Use French from here
@@ -423,20 +425,20 @@ Référence du théorème: \cref{thm:abc} % It is recommended to use clever refe
\end{code}
\bigskip
-If \PJLamssim{} is loaded, then one can adopt the \AmS{} writing style in the document (of course, the original way is also valid, so always adding the option \texttt{amssim} usually does not cause problems). This way, the line that introduces \PJLtoolkit{} should be written as:
+If \PJLamssim{} is loaded, then one can adopt the \AmS{} writing style in the document (of course, the original way is also valid, so always adding the option \texttt{amssim} usually does not cause problems). This way, the line that introduces \ProjLibPackage{} should be written as:
\begin{code}
-\usepackage[amssim,palatino]{PJLtoolkit}
+\usepackage[amssim,palatino]{ProjLib}
\end{code}
\clearpage
\subsection{The \texorpdfstring{\AmS{}}{AMS} classes}
-In \AmS{} classes, one usually only need to configure the page size, hyperlinks and load \PJLtoolkit{} before actually start writing the document. Below is a complete example.
+In \AmS{} classes, one usually only need to configure the page size, hyperlinks and load \ProjLibPackage{} before actually start writing the document. Below is a complete example.
\begin{code}
\documentclass{amsart}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino
+\usepackage[palatino]{ProjLib} % Load the toolkit and use font Palatino
\UseLanguage{French} % Use French from here
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 5abd7bf8b5..52dd38e55b 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -16,49 +16,54 @@
%</driver>
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
%
+%<*ProjLib>
+\ProvidesPackage{ProjLib}
+ [2021/06/17 The collective interface of ProjLib toolkit]
+%</ProjLib>
+%
%<*PJLamssim>
\ProvidesPackage{PJLamssim}
- [2021/06/07 Simulate some features of amsart]
+ [2021/06/17 Simulate some features of amsart]
%</PJLamssim>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/06/07 Enhanced author information block]
+ [2021/06/17 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/06/07 Convert yyyy-mm-dd to normal datetime format]
+ [2021/06/17 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/06/07 Some useful macros for the draft stage]
+ [2021/06/17 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/06/07 Multi-language configuration]
+ [2021/06/17 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/06/07 The ProjLib logo]
+ [2021/06/17 The ProjLib logo]
%</PJLlogo>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/06/07 Paper style configuration]
+ [2021/06/17 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/06/07 Theorem setup and configuration]
+ [2021/06/17 Theorem setup and configuration]
%</PJLthm>
%
%<*PJLtoolkit>
\ProvidesPackage{PJLtoolkit}
- [2021/06/07 Collective interface of ProjLib Toolkit]
+ [2021/06/17 Collective interface of ProjLib Toolkit]
%</PJLtoolkit>
%
\RequirePackage{kvoptions}
@@ -173,9 +178,15 @@
\ifx\@date\@empty\vspace{-2\baselineskip}%
\else\@date\fi%
\ifx\PJL@dedicatory\@empty\else%
- \par\vspace{-\parskip}\bigskip%
- {\itshape\PJL@dedicatory}\fi}
- {}{\FAIL}
+ \ifx\@date\@empty\vspace{2\baselineskip}\fi%
+ \par\vspace{-\parskip}\bigskip%
+ {\itshape\PJL@dedicatory}%
+ \ifx\@date\@empty%
+ \vspace{-1.7\baselineskip}%
+ \vspace{-\parskip}%
+ \fi%
+ \fi%
+}{}{\FAIL}
% Add keywords to maketitle
\pretocmd{\maketitle}{%
\ifx\PJL@keywords\@empty\else%
@@ -317,6 +328,7 @@
\if@PJLdate@draft
\@PJLdate@fasttrue
\fi
+\DeclareDocumentCommand{\PLdate}{}{\PJLdate}
\if@PJLdate@fast\let\PJLdate\relax\endinput\fi
\RequirePackage{PJLlang}
@@ -591,41 +603,49 @@
}
\RequirePackage{setspace}
-%
+% Line spacing configuration
\def\PJL@config@linespacing{\setstretch{1.00}}
\def\PJL@config@CJKlinespacing{\onehalfspacing}
\newcommand{\PJLsetlinespacing}[1]{\renewcommand{\PJL@config@linespacing}{#1}}
\newcommand{\PJLsetCJKlinespacing}[1]{\renewcommand{\PJL@config@CJKlinespacing}{#1}}
+% Parindent configuration
+\def\PJL@config@parindent{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{1.5em}}}
+\def\PJL@config@CJKparindent{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{2em}}}
+\newcommand{\PJLsetparindent}[1]{\renewcommand{\PJL@config@parindent}{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{#1}}}}
+\newcommand{\PJLsetCJKparindent}[1]{\renewcommand{\PJL@config@CJKparindent}{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{#1}}}}
+% All-in-all configuration
+\def\PJL@config@CJK{\PJL@config@CJKlinespacing\PJL@config@CJKparindent}
+\def\PJL@config@Latin{\PJL@config@linespacing\PJL@config@parindent}
%
\newcommand{\UseLanguageCORE}[1]{%
\PJLlang@langconfig@common%
\lowercase{\IfStrEqCase{#1}}{%
- {cn}{\PJL@config@CJKlinespacing\PJLlang@langconfig@chinese}%
- {chinese}{\PJL@config@CJKlinespacing\PJLlang@langconfig@chinese}%
- {schinese}{\PJL@config@CJKlinespacing\PJLlang@langconfig@chinese}%
- {simplifiedchinese}{\PJL@config@CJKlinespacing\PJLlang@langconfig@chinese}%
- {tc}{\PJL@config@CJKlinespacing\PJLlang@langconfig@tchinese}%
- {tchinese}{\PJL@config@CJKlinespacing\PJLlang@langconfig@tchinese}%
- {traditionalchinese}{\PJL@config@CJKlinespacing\PJLlang@langconfig@tchinese}%
- {jp}{\PJL@config@CJKlinespacing\PJLlang@langconfig@japanese}%
- {japanese}{\PJL@config@CJKlinespacing\PJLlang@langconfig@japanese}%
- {en}{\PJL@config@linespacing\PJLlang@langconfig@english}%
- {english}{\PJL@config@linespacing\PJLlang@langconfig@english}%
- {fr}{\PJL@config@linespacing\PJLlang@langconfig@french}%
- {french}{\PJL@config@linespacing\PJLlang@langconfig@french}%
- {de}{\PJL@config@linespacing\PJLlang@langconfig@german}%
- {ngerman}{\PJL@config@linespacing\PJLlang@langconfig@german}%
- {german}{\PJL@config@linespacing\PJLlang@langconfig@german}%
- {it}{\PJL@config@linespacing\PJLlang@langconfig@italian}%
- {italian}{\PJL@config@linespacing\PJLlang@langconfig@italian}%
- {pt}{\PJL@config@linespacing\PJLlang@langconfig@portuguese}%
- {portuguese}{\PJL@config@linespacing\PJLlang@langconfig@portuguese}%
- {br}{\PJL@config@linespacing\PJLlang@langconfig@brazilian}%
- {brazilian}{\PJL@config@linespacing\PJLlang@langconfig@brazilian}%
- {es}{\PJL@config@linespacing\PJLlang@langconfig@spanish}%
- {spanish}{\PJL@config@linespacing\PJLlang@langconfig@spanish}%
- {ru}{\PJL@config@linespacing\PJLlang@langconfig@russian}%
- {russian}{\PJL@config@linespacing\PJLlang@langconfig@russian}%
+ {cn}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
+ {chinese}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
+ {schinese}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
+ {simplifiedchinese}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
+ {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}%
}%
}
\newcommand{\UseLanguage}[1]{%
@@ -789,9 +809,11 @@
\pagecolor{paper}
\PJLglobalcolor{maintext}
+\AtEndPreamble{
\ifdefined\tcbset%
\tcbset{colupper=maintext,collower=maintext}
\fi
+}
%</PJLpaper>
%
%<*PJLthm>
@@ -1477,7 +1499,7 @@
}
%</PJLthm>
%
-%<*PJLtoolkit>
+%<*ProjLib,PJLtoolkit>
\SetupKeyvalOptions{
family = @PJLtoolkit,
prefix = @PJLtoolkit@,
@@ -1488,6 +1510,7 @@
\DeclareBoolOption[false]{amssim}
\DeclareBoolOption[false]{nothms}
\DeclareBoolOption[false]{regionalref}
+\DeclareBoolOption[false]{useosf}
\DeclareBoolOption[false]{palatino}
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
@@ -1541,6 +1564,7 @@
\RequirePackage{newpxmath}
\let\openbox\relax
\PJLsetlinespacing{\setstretch{1.07}}
+ \if@PJLtoolkit@useosf\useosf\fi
\fi
\if@PJLtoolkit@times
@@ -1550,11 +1574,14 @@
\RequirePackage{newtxmath}
\let\openbox\relax
\PJLsetlinespacing{\setstretch{1.00}}
+ \if@PJLtoolkit@useosf\useosf\fi
\fi
\if@PJLtoolkit@garamond
\RequirePackage{amssymb}
- \PassOptionsToPackage{lining}{ebgaramond}
+ \if@PJLtoolkit@useosf\else
+ \PassOptionsToPackage{lining}{ebgaramond}
+ \fi
\RequirePackage{ebgaramond-maths}
\RequirePackage{ebgaramond}
% \RequirePackage{garamondlibre}
@@ -1566,6 +1593,9 @@
% \RequirePackage{mathpazo}
% \RequirePackage[sansmath]{libertinust1math}
\ifPDFTeX
+ \if@PJLtoolkit@useosf
+ \PassOptionsToPackage{osf}{biolinum}
+ \fi
\RequirePackage{biolinum}
\renewcommand*\familydefault{\biolinum@family}
\else
@@ -1574,7 +1604,8 @@
\setmainfont{LinBiolinum_R.otf}[
BoldFont = LinBiolinum_RB.otf ,
ItalicFont = LinBiolinum_RI.otf ,
- BoldItalicFont = LinBiolinum_RBO.otf ]
+ BoldItalicFont = LinBiolinum_RBO.otf,
+ \if@PJLtoolkit@useosf Numbers = OldStyle\fi ]
\fi
\PJLsetlinespacing{\setstretch{1.05}}
\RequirePackage[italic,defaultmathsizes]{mathastext}
@@ -1583,6 +1614,6 @@
\fi
\RequirePackage{microtype}
-%</PJLtoolkit>
+%</ProjLib,PJLtoolkit>
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/projlib/ProjLib.ins b/macros/latex/contrib/projlib/ProjLib.ins
index d51b90e70d..a0d0c5099d 100644
--- a/macros/latex/contrib/projlib/ProjLib.ins
+++ b/macros/latex/contrib/projlib/ProjLib.ins
@@ -39,6 +39,7 @@ and version 1.3c or later is part of all distributions of LaTeX version
\def\mypreamble{\copyright\lppllicense}
\usepreamble\mypreamble
+\generate{\file{ProjLib.sty}{\from{ProjLib.dtx}{ProjLib}}}
\generate{\file{PJLamssim.sty}{\from{ProjLib.dtx}{PJLamssim}}}
\generate{\file{PJLauthor.sty}{\from{ProjLib.dtx}{PJLauthor}}}
\generate{\file{PJLdate.sty}{\from{ProjLib.dtx}{PJLdate}}}
@@ -55,6 +56,7 @@ and version 1.3c or later is part of all distributions of LaTeX version
\Msg{* To finish the installation you have to move the following *}
\Msg{* files into a directory searched by TeX: *}
\Msg{* *}
+\Msg{* ProjLib.sty *}
\Msg{* PJLamssim.sty *}
\Msg{* PJLauthor.sty *}
\Msg{* PJLdate.sty *}
diff --git a/macros/latex/contrib/projlib/README.md b/macros/latex/contrib/projlib/README.md
index 59d887b3be..8a38c50415 100644
--- a/macros/latex/contrib/projlib/README.md
+++ b/macros/latex/contrib/projlib/README.md
@@ -6,7 +6,7 @@
## Introduction
-`ProjLib` is a collection of tools that help you write LaTeX document. With `PJLtoolkit` loaded, you no longer need to set up the theorem-like environments nor to manually configure the appropriate multilingual settings. In addition, a series of auxiliary functionalities are introduced.
+`ProjLib` is a collection of tools that help you write LaTeX document. With package `ProjLib` loaded (note that it is case-sensitive), you no longer need to set up the theorem-like environments nor to manually configure the appropriate multilingual settings. In addition, a series of auxiliary functionalities are introduced.
The collection includes:
1. `PJLamssim.sty`
@@ -15,7 +15,7 @@ The collection includes:
- Enhanced author information block
- Offers `\address`, `\curraddr` and `\email`
1. `PJLdate.sty`
- - Offers a macro `\PJLdate` to convert `yyyy-mm-dd` to normal datetime format, with multi-language support
+ - Offers a macro `\PLdate` (or `\PJLdate`) to convert `yyyy-mm-dd` to normal datetime format, with multi-language support
1. `PJLdraft.sty`
- Useful macros during the draft stage: `\dnf` and `\needgraph`, with multi-language support
1. `PJLlang.sty`
@@ -30,7 +30,7 @@ The collection includes:
- Theorem setup and configuration
- Offers a macro `\CreateTheorem` for creating theorem-like environments with multi-language support
- Preset environments include: `assumption`, `axiom`, `conjecture`, `convention`, `corollary`, `definition`, `definition-proposition`, `definition-theorem`, `example`, `exercise`, `fact`, `hypothesis`, `lemma`, `notation`, `observation`, `problem`, `property`, `proposition`, `question`, `remark`, `theorem`, and the corresponding unnumbered version with an asterisk `*` in the name.
-1. `PJLtoolkit.sty`, *the all-in-one solution*
+1. `PJLtoolkit.sty` (this is the internal name of the `ProjLib` package)
- A collective interface of ProjLib Toolkit, loading all the packages above
- Provide some pre-defined font configuration
@@ -47,11 +47,11 @@ latex ProjLib.ins
\documentclass{amsart}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
-\usepackage[palatino]{PJLtoolkit}
+\usepackage[palatino]{ProjLib}
%% You can also comment the above lines and try the following (require xelatex or lualatex):
% \documentclass[a4paper,allowbf]{lebhart}
-% \usepackage{PJLtoolkit}
+% \usepackage{ProjLib}
%% Using \UseLanguage to select language, by default "English" is selected
\UseLanguage{French} % Use French from here
@@ -65,7 +65,7 @@ latex ProjLib.ins
\author{Auteur 1}
\address{Adresse 1}
\email{\href{Courriel 2}{Courriel 2}}
-\date{\PJLdate{2022-04-01}}
+\date{\PLdate{2022-04-01}}
\subjclass{*****}
\keywords{...}