From 3ecc00c27119bc47ba26b518b7d26c00b69599df Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Fri, 18 Jun 2021 03:01:13 +0000
Subject: CTAN sync 202106180301

---
 macros/latex/contrib/projlib/ProjLib.dtx | 117 +++++++++++++++++++------------
 1 file changed, 74 insertions(+), 43 deletions(-)

(limited to 'macros/latex/contrib/projlib/ProjLib.dtx')

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
-- 
cgit v1.2.3

