summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-06 03:00:52 +0000
committerNorbert Preining <norbert@preining.info>2021-07-06 03:00:52 +0000
commit109a435244c29109322bcd46386301f6c62d4061 (patch)
tree13a621b9870dcf81bf4c6e38410f6ee4b0fb54f3 /macros/latex
parent500adb5fa10a924ea571a0d9d7754ed17dab5dbf (diff)
CTAN sync 202107060300
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx26
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin558968 -> 558963 bytes
-rw-r--r--macros/latex/contrib/huawei/huawei.cls11
-rw-r--r--macros/latex/contrib/huawei/huawei.pdfbin336211 -> 336511 bytes
-rw-r--r--macros/latex/contrib/huawei/huawei.tex4
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.pdfbin82444 -> 84066 bytes
-rw-r--r--macros/latex/contrib/minimalist/minimalist-doc.tex12
-rw-r--r--macros/latex/contrib/minimalist/minimalist.sty46
-rw-r--r--macros/latex/contrib/minimalist/minimart.cls4
-rw-r--r--macros/latex/contrib/minimalist/minimbook.cls4
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin267673 -> 267496 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.tex12
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin179576 -> 179525 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.tex12
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx340
-rw-r--r--macros/latex/contrib/tableof/README.md85
-rw-r--r--macros/latex/contrib/tableof/tableof.dtx275
-rw-r--r--macros/latex/contrib/tableof/tableof.ins35
-rw-r--r--macros/latex/contrib/tableof/tableof.pdfbin56333 -> 58824 bytes
-rw-r--r--macros/latex/contrib/titlesec/README.md7
-rw-r--r--macros/latex/contrib/titlesec/titleps.pdfbin134006 -> 134024 bytes
-rw-r--r--macros/latex/contrib/titlesec/titleps.sty4
-rw-r--r--macros/latex/contrib/titlesec/titleps.tex6
-rw-r--r--macros/latex/contrib/titlesec/titlesec.pdfbin490706 -> 491378 bytes
-rw-r--r--macros/latex/contrib/titlesec/titlesec.sty11
-rw-r--r--macros/latex/contrib/titlesec/titlesec.tex29
-rw-r--r--macros/latex/contrib/titlesec/titletoc.sty6
27 files changed, 576 insertions, 353 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index f519420c42..1086c6ffb0 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,7 +28,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/04\hskip\ccwd\relax v1.26r\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/05\hskip\ccwd\relax v1.26s\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -158,7 +158,7 @@
% floatpage = <true|(false)>
% \end{syntax}
% 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
-% \changes{v1.26r}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
+% \changes{v1.26s}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
% \end{function}
%
% \subsection{article 模式}
@@ -240,7 +240,7 @@
% \tn{EBeforeAddBitoc*}\marg{加入目录英文标题前的代码}
% \end{syntax}
% \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。
-% \changes{v1.26r}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
+% \changes{v1.26s}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
% \end{function}
%
% \tn{EBeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。
@@ -255,7 +255,7 @@
% \ \oarg{水平偏移}\parg{下标代码}
% \end{syntax}
% 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
-% \changes{v1.26r}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
+% \changes{v1.26s}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
% \end{function}
%
% 垂直和水平偏移默认值都是 0 pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。\tn{textsuperscript} 和 \tn{textsubscript} 命令已被重新定义并且分别等价于 \tn{super} 和 \tn{sub},如果您需要使用它们的原始定义创建新命令,则可以使用 \tn{spb@textsuperscript@save} 和 \tn{spb@textsubscript@save} 命令。
@@ -306,7 +306,7 @@
% \tn{DeclareThemeColor}\{<风格名称>,<ctex@frame>,<ctex@emph>,<ctex@verb>\}
% \end{syntax}
% 可以使用 \tn{DeclareThemeColor} 命令声明新的主题颜色,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成主题颜色。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
-% \changes{v1.26r}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
+% \changes{v1.26s}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
% \end{function}
% \item[color-all] 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[multoc] 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
@@ -371,7 +371,7 @@
% \tn{DeclareLinkColor}\{<风格名称>,<ctex@link>,<ctex@url>,<ctex@cite>\}
% \end{syntax}
% 可以使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成超链接颜色。
-% \changes{v1.26r}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
+% \changes{v1.26s}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
% \end{function}
% \item[linkcol-all] 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[linktoc] 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
@@ -492,7 +492,7 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{thmset/...}
% \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-% \changes{v1.26r}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
+% \changes{v1.26s}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
% \end{function}
%
% \begin{optdesc}
@@ -519,7 +519,7 @@
% 文档类已预置 8 个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。
% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EBNewTheorem}。}
-% \changes{v1.26r}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
+% \changes{v1.26s}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -625,7 +625,7 @@
% \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
% \end{syntax}
% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
-% \changes{v1.26r}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
+% \changes{v1.26s}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
% \end{function}
%
% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 + 号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
@@ -963,7 +963,7 @@
% \tn{EBUseCounter*}\oarg{父计数器}\parg{编号|(arabic)}\marg{计数器}\marg{内容}\oarg{分隔符|(.)}\parg{数值}
% \end{syntax}
% \tn{newcounter} 是 \LaTeX 自带的创建计数器命令,\tn{EBUseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \tn{the}\meta{父计数器}\meta{分隔符}\tn{the}\meta{计数器}\meta{内容} 输出当前内容。
-% \changes{v1.26r}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
+% \changes{v1.26s}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
% \end{function}
%
% 需要注意的是 \tn{EBUseCounter} 仅具有 \textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。
@@ -1150,7 +1150,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/04}{1.26r}
+\ProvidesExplClass{easybook}{2021/07/05}{1.26s}
{Typeset Chinese books or notes}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1398,7 +1398,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/04}{1.26r}
+\ProvidesExplPackage{easybase}{2021/07/05}{1.26s}
{Typeset Chinese books or notes}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
@@ -3131,7 +3131,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/04}{1.26r}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/05}{1.26s}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index d43e951819..2e4f2c9a77 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/huawei/huawei.cls b/macros/latex/contrib/huawei/huawei.cls
index fd0203571e..fa0ce1537c 100644
--- a/macros/latex/contrib/huawei/huawei.cls
+++ b/macros/latex/contrib/huawei/huawei.cls
@@ -21,7 +21,7 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{huawei}[2021/06/26 0.7.0 Template for Huawei Documents]
+\ProvidesClass{huawei}[2021/07/05 0.7.2 Template for Huawei Documents]
\newif\ifnosecurity
\DeclareOption{nosecurity}{\nosecuritytrue}
@@ -80,7 +80,7 @@
\noexpand\setstretch{\fpeval{(#1)*(\baselinestretch)}}%
}\x%
}
-\RequirePackage[maxnames=1,minnames=1,natbib=true,style=ieee,doi=false,url=false,isbn=false,isbn=false]{biblatex}
+\RequirePackage[maxnames=1,minnames=1,natbib=true,citestyle=numeric,bibstyle=numeric,doi=false,url=false,isbn=false,isbn=false]{biblatex}
\RequirePackage[table]{xcolor}
\definecolor{huawei-red}{HTML}{CF0A2C}
\definecolor{huawei-black}{HTML}{232527}
@@ -151,6 +151,7 @@
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyfoot[L]{
+ \LeftHuaweiBar{}
\ifauthordraft%
\begin{textblock}{14}[0.5,0.5](8,8)%
\tikz \node[minimum width=14\TPHorizModule] {%
@@ -210,8 +211,8 @@
\renewcommand\maketitle{%
\vspace*{18pt}
{\bfseries{\Huge\thetitle}}
- \\[6pt]
\ifx\thesubtitle\empty\else%
+ \\[6pt]
{\color{gray!50!black}\large\thesubtitle}
\fi
\\[18pt]
@@ -233,11 +234,11 @@
\ifx\theauthor\empty\else
\ifnobrand\else%
\ifx\theid\empty\else
- \;/ {\theid}
+ $\;$/ {\theid}
\fi
\fi
\fi
- \fi\newline
+ \fi
\vspace{2em}
}
diff --git a/macros/latex/contrib/huawei/huawei.pdf b/macros/latex/contrib/huawei/huawei.pdf
index 3c77d7e895..63a83ce57d 100644
--- a/macros/latex/contrib/huawei/huawei.pdf
+++ b/macros/latex/contrib/huawei/huawei.pdf
Binary files differ
diff --git a/macros/latex/contrib/huawei/huawei.tex b/macros/latex/contrib/huawei/huawei.tex
index 4a78656c98..8bf1d94619 100644
--- a/macros/latex/contrib/huawei/huawei.tex
+++ b/macros/latex/contrib/huawei/huawei.tex
@@ -29,9 +29,9 @@
\begin{document}
\maketitle
-\ff{Version: 0.7.0}
+\ff{Version: 0.7.2}
\newline
-\ff{Date: 2021/06/26}
+\ff{Date: 2021/07/05}
\section{Overview}
diff --git a/macros/latex/contrib/minimalist/minimalist-doc.pdf b/macros/latex/contrib/minimalist/minimalist-doc.pdf
index be01de81a5..3d851d2c4f 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 3cd02c792e..92bf11fcd8 100644
--- a/macros/latex/contrib/minimalist/minimalist-doc.tex
+++ b/macros/latex/contrib/minimalist/minimalist-doc.tex
@@ -38,7 +38,7 @@
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
{linenumbers,nolinenumbers,subsection,subsubsection,href,
- color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib
+ color,NameTheorem,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PLdate,ProjLib,qedhere
}
}
\lstnewenvironment{code}%
@@ -85,8 +85,8 @@
\title{\minimalist{}, write your articles or books in a simple and clear way}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\minimalist{} 2021/06/30}}
-\date{June 2021, Beijing}
+\thanks{Corresponding to: \texttt{\minimalist{} 2021/07/05}}
+\date{July 2021, Beijing}
\maketitle
@@ -334,6 +334,7 @@ The effect is as follows:
The \lstinline|proofidea| environment.
\end{proofidea}
+\clearpage
\subsection{Draft mark}
You can use \lstinline|\dnf| to mark the unfinished part. For example:
@@ -382,7 +383,7 @@ or written in the way of \AmS{} classes:
\maketitle
\end{code}
-\medskip
+\clearpage
The author information can contain multiple groups, written as:
\begin{code}
@@ -409,6 +410,9 @@ In \lstinline|\section| or \lstinline|\subsection| , if you wish to add footnote
\end{itemize}
This is a disadvantage brought about by the underline decoration of the title.
+\subsection{On the QED symbols}
+Since the font in the theorem-like environments is the same as that of the main text, in order to indicate where the environments end, a hollow QED symbol \simpleqedsymbol{} is placed at the end of the theorem-like environments. However, if your theorem ends with an equation or list (itemize, enumerate, description, etc.), this symbol cannot be automatically placed in the correct position. In this case, you need to manually add a \lstinline|\qedhere| at the end of your equation or the last entry of your list to make the QED symbol appear at the end of the line.
+
\section{Known issues}
diff --git a/macros/latex/contrib/minimalist/minimalist.sty b/macros/latex/contrib/minimalist/minimalist.sty
index e4bdbcd605..6b11172530 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/06/30 A simple and clear style for articles and books]
+ [2021/07/05 A simple and clear style for articles and books]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
@@ -50,12 +50,13 @@
\newif\ifIsBook
\ifdefined\c@chapter\IsBooktrue\else\IsBookfalse\fi
-\def\minimalist@titlefontshape{}
-
%%================================
%% Title fonts
%%================================
\RequirePackage{anyfontsize}
+
+\def\minimalist@titlefontshape{}
+
\if@minimalist@classical
\newcommand{\partfont}{\conditionalbfseries\minimalist@titlefontshape}
\newcommand{\chapfont}{\conditionalbfseries\minimalist@titlefontshape}
@@ -81,7 +82,9 @@
\RequirePackage{geometry}
\RequirePackage{fancyhdr}
\RequirePackage{extramarks}
+
\AtEndPreamble{\fancyhfoffset{0pt}}
+
\fancypagestyle{fancy}{
\fancyhf{}
\if@twoside
@@ -97,6 +100,7 @@
\renewcommand{\headrulewidth}{0pt}
}
\pagestyle{fancy}
+
\fancypagestyle{plain}{
\fancyhf{}
\if@twoside
@@ -161,7 +165,7 @@
\fi
}
%%================================
-%% Line spacing
+%% Languages and line spacing
%%================================
\RequirePackage{PJLlang}
\PJLsetlinespacing{\setstretch{1.07}}
@@ -210,6 +214,7 @@
\def\LocallyStopLineNumbers{\LNturnsONfalse%
\ifLineNumbers\LNturnsONtrue\fi\nolinenumbers}
\def\ResumeLineNumbers{\ifLNturnsON\linenumbers\fi}
+
\pretocmd{\tableofcontents}{\LocallyStopLineNumbers}{}{\FAIL}
\apptocmd{\tableofcontents}{\ResumeLineNumbers}{}{\FAIL}
\pretocmd{\thebibliography}{\LocallyStopLineNumbers}{}{\FAIL}
@@ -453,11 +458,21 @@
%% Lists
%%================================
\RequirePackage{enumitem}
-\setlist{noitemsep,leftmargin=2em}
-\gappto{\PJLlang@langconfig@common}{\renewcommand\labelitemi{\textcolor{maintext!25}{$\bullet$}}}
-\gappto{\PJLlang@langconfig@french}{\renewcommand\labelitemi{\textcolor{maintext!50}{---}}}
-\renewcommand\labelitemii{\textcolor{maintext!27}{--}}
-\renewcommand\labelitemiii{\textcolor{maintext!27}{\texttt{*}}}
+\setlist{noitemsep}
+\setlist[enumerate]{labelsep=*, leftmargin=*}
+\setlist[enumerate,1]{label = \arabic*.,
+ ref = \arabic*}
+\setlist[enumerate,2]{label = \emph{\alph*}),
+ ref = \theenumi.\emph{\alph*}}
+\setlist[enumerate,3]{label = (\roman*),
+ ref = \theenumii.\roman*}
+\setlist[description]{font=\normalfont\conditionalbfseries}
+
+\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}{---}}}
+\setlist[itemize,2]{label=\textcolor{maintext!27}{--}}
+\setlist[itemize,3]{label=\textcolor{maintext!27}{\texttt{*}}}
%%================================
%% Blank page
@@ -504,8 +519,9 @@
\color{maintext!50!paper}\thmnote{\ensuremath{(\text{#3})}~~}%
\pushQED{\qed}%
}
- \def\@endtheorem{\popQED\endtrivlist\@endpefalse
- \global\let\qedsymbol\qedsymbolOriginal}
+ \def\@endtheorem{\global\let\qedsymbol\simpleqedsymbol%
+ \popQED\endtrivlist\@endpefalse
+ \global\let\qedsymbol\qedsymbolOriginal}
\fi
\renewcommand{\qedsymbol}{%
@@ -525,7 +541,6 @@
\PassOptionsToPackage{nothms}{PJLthm}
\RequirePackage{PJLthm}
-%% Adjust English theorems names
\pretocmd{\theoremnameEN}{\textsc}{}{\FAIL}
\pretocmd{\lemmanameEN}{\textsc}{}{\FAIL}
\pretocmd{\propositionnameEN}{\textsc}{}{\FAIL}
@@ -546,7 +561,6 @@
\pretocmd{\remarknameEN}{\itshape}{}{\FAIL}
\pretocmd{\observationnameEN}{\itshape}{}{\FAIL}
-%% Adjust French theorems names
\pretocmd{\theoremnameFR}{\textsc}{}{\FAIL}
\pretocmd{\lemmanameFR}{\textsc}{}{\FAIL}
\pretocmd{\propositionnameFR}{\textsc}{}{\FAIL}
@@ -567,7 +581,6 @@
\pretocmd{\remarknameFR}{\itshape}{}{\FAIL}
\pretocmd{\observationnameFR}{\itshape}{}{\FAIL}
-%% Adjust German theorems names
\pretocmd{\theoremnameDE}{\textsc}{}{\FAIL}
\pretocmd{\lemmanameDE}{\textsc}{}{\FAIL}
\pretocmd{\propositionnameDE}{\textsc}{}{\FAIL}
@@ -588,7 +601,6 @@
\pretocmd{\remarknameDE}{\itshape}{}{\FAIL}
\pretocmd{\observationnameDE}{\itshape}{}{\FAIL}
-%% Adjust Italian theorems names
\pretocmd{\theoremnameIT}{\textsc}{}{\FAIL}
\pretocmd{\lemmanameIT}{\textsc}{}{\FAIL}
\pretocmd{\propositionnameIT}{\textsc}{}{\FAIL}
@@ -609,7 +621,6 @@
\pretocmd{\remarknameIT}{\itshape}{}{\FAIL}
\pretocmd{\observationnameIT}{\itshape}{}{\FAIL}
-%% Adjust Portuguese theorems names
\pretocmd{\theoremnamePT}{\textsc}{}{\FAIL}
\pretocmd{\lemmanamePT}{\textsc}{}{\FAIL}
\pretocmd{\propositionnamePT}{\textsc}{}{\FAIL}
@@ -630,7 +641,6 @@
\pretocmd{\remarknamePT}{\itshape}{}{\FAIL}
\pretocmd{\observationnamePT}{\itshape}{}{\FAIL}
-%% Adjust Brazilian theorems names
\pretocmd{\theoremnameBR}{\textsc}{}{\FAIL}
\pretocmd{\lemmanameBR}{\textsc}{}{\FAIL}
\pretocmd{\propositionnameBR}{\textsc}{}{\FAIL}
@@ -651,7 +661,6 @@
\pretocmd{\remarknameBR}{\itshape}{}{\FAIL}
\pretocmd{\observationnameBR}{\itshape}{}{\FAIL}
-%% Adjust Spanish theorems names
\pretocmd{\theoremnameES}{\textsc}{}{\FAIL}
\pretocmd{\lemmanameES}{\textsc}{}{\FAIL}
\pretocmd{\propositionnameES}{\textsc}{}{\FAIL}
@@ -672,7 +681,6 @@
\pretocmd{\remarknameES}{\itshape}{}{\FAIL}
\pretocmd{\observationnameES}{\itshape}{}{\FAIL}
-%% Theorem environments
\theoremstyle{simple}
\ifbool{IsBook}{
\newaliascnt{highest}{chapter}
diff --git a/macros/latex/contrib/minimalist/minimart.cls b/macros/latex/contrib/minimalist/minimart.cls
index 2b5878477c..592cd146a2 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/06/30 A simple and clear article style]
+ [2021/07/05 A simple and clear article style]
\def\minimclass@baseclass{article}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -44,6 +44,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\minimclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\minimclass@baseclass}
+
\if@minimclass@draft
\@minimclass@fasttrue
\fi
@@ -178,7 +179,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}
diff --git a/macros/latex/contrib/minimalist/minimbook.cls b/macros/latex/contrib/minimalist/minimbook.cls
index 5c57b174b1..7f5ed51750 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/06/30 A simple and clear book style]
+ [2021/07/05 A simple and clear book style]
\def\minimclass@baseclass{book}
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
@@ -44,6 +44,7 @@
\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{\minimclass@baseclass}}
\ProcessKeyvalOptions*\relax
\LoadClass{\minimclass@baseclass}
+
\if@minimclass@draft
\@minimclass@fasttrue
\fi
@@ -178,7 +179,6 @@
\def\PJL@font@alreadyset{}
-%% Minor improvements
\PassOptionsToPackage{verbose=silent}{microtype}
\RequirePackage{microtype}
\PassOptionsToPackage{all}{nowidow}
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index 84ce6d7fb5..eefacd79be 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 223b832807..e4bb3b47f5 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex
@@ -81,8 +81,8 @@
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/06/28}}
-\date{2021年6月,北京}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/07/05}}
+\date{2021年7月,北京}
\maketitle
@@ -124,13 +124,13 @@
\begin{itemize}
\item 来自 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。
\end{itemize}
- \item \texttt{author}
+ \item \texttt{amsfashion}
\begin{itemize}
- \item 加载 \PJLauthor{}。关于其详细功能,请参阅有关这一宏包的小节。
+ \item 允许 \AmS{} 文档类的写法。与 \texttt{amssim} 选项相同。
\end{itemize}
- \item \texttt{amssim}
+ \item \texttt{author}、\texttt{amssim}
\begin{itemize}
- \item 加载 \PJLamssim{}。关于其详细功能,请参阅有关这一宏包的小节。
+ \item 加载 \PJLauthor{} 或 \PJLamssim{}。关于其详细功能,请参阅有关相关宏包的小节。
\end{itemize}
\end{itemize}
另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{CN} / \texttt{chinese} / \texttt{Chinese} 等语言选项 (来自 \PJLlang{}),\texttt{paperstyle} 和 \texttt{preview} 等纸张选项 (来自 \PJLpaper{})。详细信息可以参阅对应的小节。
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index 7fccf5e976..f5885ec06d 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 e55aa8c095..6b4dcb53af 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.tex
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.tex
@@ -79,8 +79,8 @@
\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen Xu}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/06/28}}
-\date{June 2021, Beijing}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/07/05}}
+\date{July 2021, Beijing}
\maketitle
@@ -122,13 +122,13 @@ Just add the following line to your preamble:
\begin{itemize}
\item Options from \PJLthm{}, please refer to the section on this package for details.
\end{itemize}
- \item \texttt{author}
+ \item \texttt{amsfashion}
\begin{itemize}
- \item Load \PJLauthor{}. For more information about its functionality, see the section on this package.
+ \item Allow the user to write document in the \AmS{} fashion. Same as the option \texttt{amssim}.
\end{itemize}
- \item \texttt{amssim}
+ \item \texttt{author}, \texttt{amssim}
\begin{itemize}
- \item Load \PJLamssim{}. For more information about its functionality, see the section on this package.
+ \item Load \PJLauthor{} or \PJLamssim{}. For more information about their functionality, see the section on the corresponding package.
\end{itemize}
\end{itemize}
In addition, there are also some options of the components that should be passed as global options of your document class, such as the language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French} etc.\,of \PJLlang{}, \\and \texttt{paperstyle}, \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding sections.
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 33c97fd57f..c5f2773071 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -18,71 +18,80 @@
%
%<*ProjLib>
\ProvidesPackage{ProjLib}
- [2021/06/28 The collective interface of ProjLib toolkit]
+ [2021/07/05 The collective interface of ProjLib toolkit]
%</ProjLib>
%
%<*PJLamssim>
\ProvidesPackage{PJLamssim}
- [2021/06/28 Simulate some features of amsart]
+ [2021/07/05 Simulate some features of amsart]
%</PJLamssim>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/06/28 Enhanced author information block]
+ [2021/07/05 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/06/28 Convert yyyy-mm-dd to normal datetime format]
+ [2021/07/05 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/06/28 Some useful macros for the draft stage]
+ [2021/07/05 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/06/28 Multi-language configuration]
+ [2021/07/05 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/06/28 The ProjLib logo]
+ [2021/07/05 The ProjLib logo]
%</PJLlogo>
%
%<*PJLmath>
\ProvidesPackage{PJLmath}
- [2021/06/28 Useful math macros and shortcuts]
+ [2021/07/05 Useful math macros and shortcuts]
%</PJLmath>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/06/28 Paper style configuration]
+ [2021/07/05 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/06/28 Theorem setup and configuration]
+ [2021/07/05 Theorem setup and configuration]
%</PJLthm>
%
%<*PJLtoolkit>
\ProvidesPackage{PJLtoolkit}
- [2021/06/28 Collective interface of ProjLib Toolkit]
+ [2021/07/05 Collective interface of ProjLib Toolkit]
%</PJLtoolkit>
%
+%# 下面两行引入宏包的代码是所有文件共用的。
+%# The following two lines are common to all files.
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
%
%<*PJLamssim>
+%# 在 AMS 文档类中不执行任何操作
+%# Do nothing if AMS class detected
\ifdefined\subjclass\endinput\fi
+%# 使用 PJLauthor 的作者块功能
+%# Use `PJLauthor`'s author block function
\RequirePackage{PJLauthor}
\RequirePackage{calc}
+%# 设定带条件的加粗
+%# Set the conditional bold face
\providecommand{\conditionalbfseries}{\bfseries}
-% keywords
+%# 关键词的标签
+%# keywords' label
\def\keywordsnameEN{\textsc{Key words and phrases}}
\def\keywordsnameFR{\textsc{Mots et phrases clés}}
\def\keywordsnameDE{\textsc{Schlüsselwörter und Phrasen}}
@@ -95,18 +104,18 @@
\def\keywordsnameJP{キーワード}
\def\keywordsnameRU{Ключевые слова и фразы}
-\ifdefined\keywords\else
- \def\PJL@keywords{}
- \newcommand*{\keywords}[1]{\def\PJL@keywords{#1}}
-\fi
+%# 关键词
+%# keywords
+\def\PJL@keywords{}
+\providecommand*{\keywords}[1]{\def\PJL@keywords{#1}}
-% dedicatory
-\ifdefined\dedicatory\else
- \def\PJL@dedicatory{}
- \newcommand*{\dedicatory}[1]{\def\PJL@dedicatory{#1}}
-\fi
+%# 献给
+%# dedicatory
+\def\PJL@dedicatory{}
+\providecommand*{\dedicatory}[1]{\def\PJL@dedicatory{#1}}
-% \thanks: behave like article-style when in \author, and ams-style (no marker) when outside
+%# 致谢,在 \author 中使用时呈现为 article 风格,在外面单独用是则呈现为 AMS 风格
+%# \thanks: behave like article-style when in \author, and ams-style (no marker) when outside
\AtEndPreamble{
% In case that \@author changes again
\let\footnotemark@PJLoriginal\footnotemark%
@@ -138,7 +147,8 @@
% \apptocmd{\@author}{\let\footnotemark\relax}{}{\FAIL}
}
-%% Modify abstract to allow it before maketitle
+%# 重定义 abstract 环境以允许其出现在 maketitle 的前面
+%# Modify abstract to allow it before maketitle
\let\abstract@PJLoriginal\abstract%
\let\endabstract@PJLoriginal\endabstract%
\newif\if@PJLamssim@maketitle\@PJLamssim@maketitlefalse
@@ -176,9 +186,11 @@
\fi%
}
-%% Modify maketitle
+%# 修改 maketitle 以包含上面的诸多改动
+%# Modify maketitle to reflect the modifications above
\AtEndPreamble{%
-% Add dedicatory to @maketitle
+%## 将 dedicatory 添加进 \@maketitle
+%## Add dedicatory to \@maketitle
\patchcmd{\@maketitle}{\@date}{%
\ifx\@date\@empty\vspace{-2\baselineskip}%
\else\@date\fi%
@@ -192,14 +204,16 @@
\fi%
\fi%
}{}{\FAIL}
-% Add keywords to maketitle
+%## 将 keywords 添加进 \maketitle
+%## Add keywords to \maketitle
\pretocmd{\maketitle}{%
\ifx\PJL@keywords\@empty\else%
\PJL@prethanks{{\protect\conditionalbfseries%
\csname keywordsname\csname\languagename ABBR\endcsname\endcsname.}%
~\PJL@keywords}%
\fi}{}{\FAIL}
-% Add abstract to maketitle
+%## 将 abstract 添加进 \maketitle
+%## Add abstract to \maketitle
\apptocmd{\maketitle}{%
\if@PJLamssim@absbefore%
\begin{abstract@PJLoriginal}%
@@ -216,11 +230,14 @@
\global\let\keywords\relax
\global\@PJLamssim@maketitletrue
}{}{\FAIL}
-% Disbale the \newpage in maketitle
+%##- 这段未被采用的代码将使 maketitle 中的 \newpage 失效
+%##- Disbale the \newpage in maketitle
% \let\maketitle@PJLoriginal=\maketitle
% \renewcommand*{\maketitle}{{\let\newpage\relax\maketitle@PJLoriginal}}
}
+%# 定义 \subjclass,这段代码改编自 AMS 文档类
+%# Define \subjclass, the code is adopted from AMS classes
\newcommand*\subjclass[2][2020]{%
\def\@subjclass{#2}%
\@ifundefined{subjclassname@#1}{%
@@ -243,13 +260,15 @@
%</PJLamssim>
%
%<*PJLauthor>
+%# 在 AMS 文档类中不执行任何操作
+%# Do nothing if AMS class detected
\ifdefined\subjclass\endinput\fi
-\RequirePackage{PJLlang}
-
%%================================
%% Font and style
%%================================
+%# 各个作者信息元素的字体
+%# Font of the elements in the author block
\def\PJLauthor@font@author{\normalsize\normalfont\scshape}
\def\PJLauthor@font@address{\small\normalfont\itshape}
\def\PJLauthor@font@curraddr{\small\normalfont\itshape}
@@ -258,27 +277,34 @@
%%================================
%% Lengths
%%================================
-% Space between author and address
+%# author 和 address 之间的距离
+%# Space between author and address
\newlength{\PJLauthor@length@innersep}
\setlength{\PJLauthor@length@innersep}{.3\baselineskip}
-
-% Space between different author blocks
+%# 两个作者块之间的距离
+%# Space between different author blocks
\newlength{\PJLauthor@length@sep}
\setlength{\PJLauthor@length@sep}{.5\baselineskip}
-
-% Space between affiliation and date
+%# 作者块和日期之间的距离
+%# Space between affiliation and date
\newlength{\PJLauthor@length@aftersep}
\setlength{\PJLauthor@length@aftersep}{.3\baselineskip}
%%================================
%% The macros
%%================================
+%# 用来记录当前是否有附加作者信息,以便调整距离
+%# To record whether there's affiliation so as to adjust the vertical space
\newif\if@PJLauthor@affilon
+%# 作者
+%# author
\renewcommand*{\author}[1]{%
\gappto\@author{\phantom{A}\\[-\baselineskip]%
\vspace{\PJLauthor@length@sep}%
\PJLauthor@font@author{#1}\\\phantom{}
\@PJLauthor@affilonfalse}}
+%# 地址
+%# address
\providecommand*{\address}[1]{%
\gappto\@author{\phantom{A}\\[-\baselineskip]%
\if@PJLauthor@affilon\else%
@@ -287,6 +313,8 @@
\@PJLauthor@affilontrue%
\PJLauthor@font@address{#1}\\\phantom{}}%
}
+%# 当前地址
+%# curraddr
\providecommand*{\curraddr}[1]{%
\gappto\@author{\phantom{A}\\[-\baselineskip]%
\if@PJLauthor@affilon\else%
@@ -295,6 +323,8 @@
\@PJLauthor@affilontrue%
\PJLauthor@font@curraddr{#1}\\\phantom{}}%
}
+%# 电子邮箱
+%# email
\providecommand*{\email}[1]{%
\gappto\@author{\phantom{A}\\[-\baselineskip]%
\if@PJLauthor@affilon\else%
@@ -307,9 +337,15 @@
%%================================
%% Adjustment
%%================================
+%# 去除 maketitle 中默认对 author 的处理
+%# Remove the tabular around \@author in maketitle
\patchcmd{\@maketitle}{\begin{tabular}[t]{c}}{}{}{}
\patchcmd{\@maketitle}{\end{tabular}}{}{}{}
-\def\@author{} % Remove "No \author given."
+%# 下面这一行是为了避免错误 "No \author given."
+%# The follwing line is for avoiding the error "No \author given."
+\def\@author{}
+%# 修正作者块的前后等距离
+%# Adjust the spacing before and after the author block
\pretocmd{\@maketitle}{%
\pretocmd{\@author}{\vspace{-\PJLauthor@length@sep}}{}{\FAIL}%
\apptocmd{\@author}{%
@@ -323,29 +359,51 @@
%</PJLauthor>
%
%<*PJLdate>
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{
family = @PJLdate,
prefix = @PJLdate@,
}
+%# 草稿模式或快速模式
+%# Draft mode or fast mode
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
+%# 下面的代码设定了选项之间的关系
+%# The following code sets the relationship between options
\if@PJLdate@draft
\@PJLdate@fasttrue
\fi
+%# 将 PJLdate 与 PLdate 等同
+%# To make PLdate and PJLdate equivalent
\DeclareDocumentCommand{\PLdate}{}{\PJLdate}
+%# 快速模式下直接输出原日期字符串
+%# Directly output the original date string in fast mode
\if@PJLdate@fast\let\PJLdate\relax\endinput\fi
+%# 载入多语言支持
+%# Load multi-language support
\RequirePackage{PJLlang}
-% The following line is for "authblk"
+%# 下面一行是为了避免使用 authblk 时产生的错误
+%# The following line is for "authblk"
\robustify\@latex@warning@no@line
+
+%# 消除一些警告
+%# Eliminate some warnings
\RequirePackage{silence}
\WarningFilter*{datetime2}{Date-Time Language Module}
+%# 分别引入负责西文日期和 CJK 日期的宏包
+%# Use packages resp. for western date and CJK date
\PassOptionsToPackage{fr-FR,en-US}{datetime2}
\RequirePackage{datetime2}
\RequirePackage{zhnumber}
+%# 在 CJK 模式下将 DTMdate 定义为 zhdate
+%# Maps DTMdate to zhdate in CJK context
\let\@DTMdate@PJLoriginal\@DTMdate
\gappto{\PJLlang@langconfig@common}{%
\let\@DTMdate\@DTMdate@PJLoriginal%
@@ -368,27 +426,46 @@
\zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
}%
}
+
+%# 提供命令 PJLdate
+%# Provide the macro PJLdate
\providecommand*{\PJLdate}[1]{\DTMdate{#1}}
%</PJLdate>
%
%<*PJLdraft>
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{
family = @PJLdraft,
prefix = @PJLdraft@,
}
+%# 草稿模式或快速模式
+%# Draft mode or fast mode
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
+%# 下面的代码设定了选项之间的关系
+%# The following code sets the relationship between options
\if@PJLdraft@draft
\@PJLdraft@fasttrue
\fi
+%# 载入多语言支持
+%# Load multi-language support
\RequirePackage{PJLlang}
+%# 载入颜色支持
+%# Load support for colors
\RequirePackage{xcolor}
+%# 命令中的默认字体
+%# Default font in the macro
\def\dnfFont{\ttfamily}
\def\needgraphFont{\ttfamily}
+%# 命令中的文字
+%# Text in the macro
\def\dnfTextEN{To be finished}
\def\needgraphTextEN{A graph is needed here}
\def\dnfTextFR{Pas encore fini}
@@ -412,15 +489,21 @@
\def\dnfTextRU{Не закончен}
\def\needgraphTextRU{Еще нужна картинка}
+%# 命令中的颜色
+%# Default color in the macro
\definecolor{dnfColor}{RGB}{21,122,20}
\definecolor{needgraphColor}{RGB}{70,130,180}
\if@PJLdraft@fast
+%# 快速模式用 fbox 定义
+%# Use fbox in fast mode
\newcommand{\plainBox}[2][-paper]{\textcolor{#1}{%
\setlength{\fboxsep}{1.5pt}%
\setlength{\fboxrule}{1.2pt}%
\fbox{#2}}}
\else
+%# 正常模式用 tcolorbox 定义
+%# Use tcolorbox in normal mode
\PassOptionsToPackage{many}{tcolorbox}
\RequirePackage{tcolorbox}
\newtcbox{\plainBox}[1][-paper]{enhanced jigsaw,%
@@ -431,9 +514,13 @@
}
\fi
+%# 命令中的计数器
+%# Counters for the macro
\newcounter{dnfcnt}
\newcounter{needgraphcnt}
+%# 尚未完成的标记
+%# Mark for ``did not finish''
\NewDocumentCommand{\dnf}{d<>}{%
\noindent\plainBox[dnfColor]%
{\normalfont\dnfFont\bfseries\small%
@@ -441,6 +528,8 @@
\stepcounter{dnfcnt}~\#\thednfcnt%
\IfNoValueF{#1}{\,: #1}}%
}
+%# 需要图片的标记
+%# Mark for ``Graph needed''
\NewDocumentCommand{\needgraph}{d<>}{%
\begin{center}%
\plainBox[needgraphColor]%
@@ -453,12 +542,18 @@
%</PJLdraft>
%
%<*PJLlang>
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{%
family = @PJLlang,
prefix = @PJLlang@
}
+%# 使用 polyglossia 而不是 babel 进行设置,目前还不完善
+%# Use polyglossia instead of babel
\DeclareBoolOption[false]{polyglossia}
+%# 用于记录该语言是否被启用
+%# To record whether the language is enabled in the document
\newif\if@PJLlang@enable@all\@PJLlang@enable@alltrue
\newif\if@PJLlang@enable@EN\@PJLlang@enable@ENfalse
\newif\if@PJLlang@enable@FR\@PJLlang@enable@FRfalse
@@ -471,7 +566,11 @@
\newif\if@PJLlang@enable@TC\@PJLlang@enable@TCfalse
\newif\if@PJLlang@enable@JP\@PJLlang@enable@JPfalse
\newif\if@PJLlang@enable@RU\@PJLlang@enable@RUfalse
+%# 用来存储要传递给babel的选项
+%# To store the option list to pass to babel
\def\PJLlang@babeloptions{}
+%# 语言选项:启用该语言并添加相应的 babel 参数
+%# The language options: enable the corresponding language and add the corresponding options to babel
\DeclareVoidOption{EN}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}\gpreto{\PJLlang@babeloptions}{,english}}
\DeclareVoidOption{english}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}\gpreto{\PJLlang@babeloptions}{,english}}
\DeclareVoidOption{English}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}\gpreto{\PJLlang@babeloptions}{,english}}
@@ -512,10 +611,16 @@
\DeclareVoidOption{RU}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}\gpreto{\PJLlang@babeloptions}{,russian}}
\DeclareVoidOption{russian}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}\gpreto{\PJLlang@babeloptions}{,russian}}
\DeclareVoidOption{Russian}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}\gpreto{\PJLlang@babeloptions}{,russian}}
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
+%# 默认语言:英语
+%# Default main language: English
\providecommand{\PJLlang@mainlang}{EN}
+%# 启用全部支持的语言
+%# Enable all supported language
\if@PJLlang@enable@all
\@PJLlang@enable@ENtrue
\@PJLlang@enable@FRtrue
@@ -530,6 +635,8 @@
\@PJLlang@enable@RUtrue
\fi
+%# 语言名称的缩写
+%# Abbreviation of language name
\newcommand\englishABBR{EN}
\newcommand\frenchABBR{FR}
\newcommand\ngermanABBR{DE}
@@ -542,6 +649,8 @@
\newcommand\japaneseABBR{JP}
\newcommand\russianABBR{RU}
+%# 在 pdfLaTeX 编译时载入编码设置
+%# Load the encoding settings when pdfLaTeX is used
\RequirePackage{iftex}
\ifPDFTeX
\RequirePackage[T1]{fontenc}
@@ -549,6 +658,8 @@
\fi
\if@PJLlang@polyglossia
+%# polyglossia 对应的设置
+%# Configure with `polyglossia`
\RequirePackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[frenchpart=false]{french}
@@ -564,6 +675,8 @@
\WarningFilter{polyglossia}{Asking to add empty feature to latin font(Script="CJK" to scripttag "")}
\fi
\else
+%# babel 对应的设置
+%# Configure with `babel`
\if@PJLlang@enable@all
\ifPDFTeX\else
\PassOptionsToPackage{japanese,russian}{babel}
@@ -578,7 +691,9 @@
\frenchsetup{PartNameFull=false}
\fi
\fi
-%
+
+%# 本地化 \today
+%# Localize \today
\let\today@PJLoriginal\today
\newcommand{\PJLlang@langconfig@common}{%
\ifdefined\DTMtoday%
@@ -587,6 +702,9 @@
\let\today\today@PJLoriginal%
\fi%
}
+
+%# 各个语言的设置
+%# The configuration for each language
\newcommand{\PJLlang@langconfig@chinese}{%
\def\abstractname{摘要}%
\def\proofname{证明}%
@@ -647,6 +765,8 @@
\selectlanguage{russian}%
}
+%# 用于增加语言设置的用户指令 AddLanguageSetting
+%# User command for adding language settings
\RequirePackage{xstring}
\NewDocumentCommand\AddLanguageSetting{d()m}{%
\IfNoValueTF{#1}%
@@ -684,20 +804,25 @@
}
\RequirePackage{setspace}
-% Line spacing configuration
+%# 行距的设置
+%# 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
+%# 缩进的设置
+%# 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
+%# 合并设置
+%# All-in-all configuration
\def\PJL@config@CJK{\PJL@config@CJKlinespacing\PJL@config@CJKparindent}
\def\PJL@config@Latin{\PJL@config@linespacing\PJL@config@parindent}
%
+%# UseLanguage 的核心部分,只能在正文中使用
+%# The core part of UseLanguage, can be used only in the main text, not preamble
\newcommand{\UseLanguageCORE}[1]{%
\PJLlang@langconfig@common%
\lowercase{\IfStrEqCase{#1}}{%
@@ -729,6 +854,8 @@
{russian}{\PJL@config@Latin\PJLlang@langconfig@russian}%
}%
}
+%# 用于选定语言的 UseLanguage
+%# Macro for selecting language
\newcommand{\UseLanguage}[1]{%
\ifx\@onlypreamble\@notprerr%
\UseLanguageCORE{#1}%
@@ -736,6 +863,8 @@
\AfterEndPreamble{\UseLanguageCORE{#1}}%
\fi%
}
+%# 用于局部选定语言的 UseOtherLanguage
+%# Macro for selecting language locally
\newcommand{\UseOtherLanguage}[2]{%
\begingroup%
\PJLlang@langconfig@common%
@@ -771,6 +900,8 @@
\endgroup%
}
+%# 运行默认语言的设置
+%# Execute the configuration of the main language
\IfStrEqCase{\PJLlang@mainlang}{%
{EN}{\UseLanguage{EN}}%
{FR}{\UseLanguage{FR}}%
@@ -787,18 +918,30 @@
%</PJLlang>
%
%<*PJLlogo>
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{
family = @PJLlogo,
prefix = @PJLlogo@,
}
+%# 草稿模式或快速模式
+%# Draft mode or fast mode
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
+%# 下面的代码设定了选项之间的关系
+%# The following code sets the relationship between options
\if@PJLlogo@draft
\@PJLlogo@fasttrue
\fi
+%# 快速模式下直接输出字符串 ProjLib
+%# Directly output the string ``ProjLib'' in fast mode
\if@PJLlogo@fast\def\ProjLib{{\normalfont ProjLib}}\endinput\fi
+%# 以下选取字体并定义 Logo
+%# Below select the font and define the logo
\RequirePackage{xcolor}
\RequirePackage{graphicx}
\ifdefined\fontspec
@@ -836,6 +979,8 @@
%</PJLlogo>
%
%<*PJLmath>
+%# 载入常用数学宏包
+%# Load commonly used math packages
\RequirePackage{mathtools}
\RequirePackage{mathrsfs}
\@ifpackageloaded{unicode-math}{}{\RequirePackage{amssymb}}
@@ -843,6 +988,8 @@
%%================================
%% Shorthands
%%================================
+%# 常见代数结构的捷径
+%# Shortcuts for commonly used algebraic structures
\def\N{\ensuremath{\mathbb{N}}}
\def\Z{\ensuremath{\mathbb{Z}}}
\def\Q{\ensuremath{\mathbb{Q}}}
@@ -851,6 +998,8 @@
\def\F{\ensuremath{\mathbb{F}}}
\def\A{\ensuremath{\mathbb{A}}}
+%# mathbb 的捷径
+%# Shortcuts for blackboard bold face
\def\bb#1{\ensuremath{\mathbb{#1}}}
\def\bbA{\ensuremath{\mathbb{A}}}
\def\bbB{\ensuremath{\mathbb{B}}}
@@ -879,6 +1028,8 @@
\def\bbY{\ensuremath{\mathbb{Y}}}
\def\bbZ{\ensuremath{\mathbb{Z}}}
+%# mathcal 的捷径
+%# Shortcuts for calligraphic shape
\def\mc#1{\ensuremath{\mathcal{#1}}}
\def\mcA{\ensuremath{\mathcal{A}}}
\def\mcB{\ensuremath{\mathcal{B}}}
@@ -935,6 +1086,8 @@
\def\calY{\ensuremath{\mathcal{Y}}}
\def\calZ{\ensuremath{\mathcal{Z}}}
+%# mathfrak 的捷径
+%# Shortcuts for Fraktur shape
\def\mf#1{\ensuremath{\mathfrak{#1}}}
\def\mfa{\ensuremath{\mathfrak{a}}}
\def\mfb{\ensuremath{\mathfrak{b}}}
@@ -1043,6 +1196,8 @@
\def\frakY{\ensuremath{\mathfrak{Y}}}
\def\frakZ{\ensuremath{\mathfrak{Z}}}
+%# mathscr 的捷径
+%# Shortcuts for script shape
\def\ms#1{\ensuremath{\mathscr{#1}}}
\def\msA{\ensuremath{\mathscr{A}}}
\def\msB{\ensuremath{\mathscr{B}}}
@@ -1102,6 +1257,9 @@
%%================================
%% General symbols
%%================================
+\providecommand{\abs}[1]{\lvert#1\rvert}
+\providecommand{\norm}[1]{\lVert#1\rVert}
+
\providecommand*{\injection}{\ensuremath{\hookrightarrow}}
\providecommand*{\surjection}{\ensuremath{\twoheadrightarrow}}
\providecommand*{\bijection}{\ensuremath{\xrightarrow{\sim}}}
@@ -1127,6 +1285,8 @@
%<*PJLpaper>
\RequirePackage{ifthen}
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{%
family = @PJLpaper,
prefix = @PJLpaper@,
@@ -1134,11 +1294,16 @@
}
\DeclareStringOption[normal]{paperstyle}
+%# 几种纸张颜色的选项
+%# Several options of different paper color style
\DeclareVoidOption{yellowpaper}{\kvsetkeys{@PJLpaper}{paperstyle=yellow}}
\DeclareVoidOption{darkpaper}{\kvsetkeys{@PJLpaper}{paperstyle=dark}}
\DeclareVoidOption{nordpaper}{\kvsetkeys{@PJLpaper}{paperstyle=nord}}
+%# 预览模式:减去边框
+%# Preview mode: crop the edge
\DeclareBoolOption[false]{preview}
-
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
%%================================
@@ -1189,6 +1354,8 @@
\color{#1}\global\let\default@color\current@color
}
+%# 设置纸张颜色、文字颜色
+%# Set the paper and text color
\pagecolor{paper}
\PJLglobalcolor{maintext}
\AtEndPreamble{
@@ -1199,16 +1366,30 @@
%</PJLpaper>
%
%<*PJLthm>
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{%
family = @PJLthm,
prefix = @PJLthm@
}
+%# 不建立定理类环境
+%# Do not setup theorem-like environments
\DeclareBoolOption[false]{nothms}
+%# 不编号定理类环境
+%# Do not number theorem-like environments
\DeclareBoolOption[false]{nothmnum}
+%# 草稿模式或快速模式
+%# Draft mode or fast mode
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
+%# 引用的名称将随当前语言的不同而改变
+%# Reference name will change with the current language
\DeclareBoolOption[false]{regionalref}
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
+%# 下面的代码设定了选项之间的关系
+%# The following code sets the relationship between options
\if@PJLthm@draft
\@PJLthm@fasttrue
\fi
@@ -1222,7 +1403,8 @@
\PassOptionsToPackage{nameinlink}{cleveref}
\RequirePackage{cleveref}
-% Macro for naming theorems
+%# 用于命名定理类环境的用户命令
+%# Macro for naming theorems
\NewDocumentCommand{\NameTheorem}{omm}{%
\protected@edef\PJLthm@temp{#2}%
\expandafter\IfEndWith\expandafter{\PJLthm@temp}{*}{%
@@ -1273,7 +1455,8 @@
}%
}
-% Macro for creating theorems
+%# 用于创建定理类环境的用户命令
+%# Macro for creating theorems
\RequirePackage{xstring}
\newcommand\PassFirstToSecond[2]{#2{#1}}%
\NewDocumentCommand{\CreateTheorem}{sm}{%
@@ -1483,7 +1666,8 @@
}%
\fi
-%% English theorems names
+%# 英文定理名称
+%# English theorems names
\def\theoremnameEN{{Theorem}}
\def\lemmanameEN{{Lemma}}
\def\propositionnameEN{{Proposition}}
@@ -1506,7 +1690,8 @@
\expandafter\def\csname definition-propositionnameEN\endcsname{\definitionnameEN-\propositionnameEN}
\expandafter\def\csname definition-theoremnameEN\endcsname{\definitionnameEN-\theoremnameEN}
-%% French theorems names
+%# 法语定理名称
+%# French theorems names
\def\theoremnameFR{{Théorème}}
\def\lemmanameFR{{Lemme}}
\def\propositionnameFR{{Proposition}}
@@ -1529,7 +1714,8 @@
\expandafter\def\csname definition-propositionnameFR\endcsname{\definitionnameFR-\propositionnameFR}
\expandafter\def\csname definition-theoremnameFR\endcsname{\definitionnameFR-\theoremnameFR}
-%% German theorems names
+%# 德语定理名称
+%# German theorems names
\def\theoremnameDE{{Satz}}
\def\lemmanameDE{{Lemma}}
\def\propositionnameDE{{Proposition}}
@@ -1552,7 +1738,8 @@
\expandafter\def\csname definition-propositionnameDE\endcsname{\definitionnameDE-\propositionnameDE}
\expandafter\def\csname definition-theoremnameDE\endcsname{\definitionnameDE-\theoremnameDE}
-%% Italian theorems names
+%# 意大利语定理名称
+%# Italian theorems names
\def\theoremnameIT{{Teorema}}
\def\lemmanameIT{{Lemma}}
\def\propositionnameIT{{Proposizione}}
@@ -1575,7 +1762,8 @@
\expandafter\def\csname definition-propositionnameIT\endcsname{\definitionnameIT-\propositionnameIT}
\expandafter\def\csname definition-theoremnameIT\endcsname{\definitionnameIT-\theoremnameIT}
-%% Portuguese theorems names
+%# 葡萄牙语定理名称
+%# Portuguese theorems names
\def\theoremnamePT{{Teorema}}
\def\lemmanamePT{{Lema}}
\def\propositionnamePT{{Proposição}}
@@ -1598,7 +1786,8 @@
\expandafter\def\csname definition-propositionnamePT\endcsname{\definitionnamePT-\propositionnamePT}
\expandafter\def\csname definition-theoremnamePT\endcsname{\definitionnamePT-\theoremnamePT}
-%% Brazilian theorems names
+%# 巴西葡萄牙语定理名称
+%# Brazilian theorems names
\def\theoremnameBR{{Teorema}}
\def\lemmanameBR{{Lema}}
\def\propositionnameBR{{Proposição}}
@@ -1621,7 +1810,8 @@
\expandafter\def\csname definition-propositionnameBR\endcsname{\definitionnameBR-\propositionnameBR}
\expandafter\def\csname definition-theoremnameBR\endcsname{\definitionnameBR-\theoremnameBR}
-%% Spanish theorems names
+%# 西班牙语定理名称
+%# Spanish theorems names
\def\theoremnameES{{Teorema}}
\def\lemmanameES{{Lema}}
\def\propositionnameES{{Proposición}}
@@ -1644,7 +1834,8 @@
\expandafter\def\csname definition-propositionnameES\endcsname{\definitionnameES-\propositionnameES}
\expandafter\def\csname definition-theoremnameES\endcsname{\definitionnameES-\theoremnameES}
-%% Chinese theorems names
+%# 中文定理名称
+%# Chinese theorems names
\def\theoremnameCN{{定理}}
\def\lemmanameCN{{引理}}
\def\propositionnameCN{{命题}}
@@ -1689,7 +1880,8 @@
\expandafter\def\csname definition-propositionnameTC\endcsname{\definitionnameTC-\propositionnameTC}
\expandafter\def\csname definition-theoremnameTC\endcsname{\definitionnameTC-\theoremnameTC}
-%% Japanese theorems names
+%# 日文定理名称
+%# Japanese theorems names
\def\theoremnameJP{{定理}}
\def\lemmanameJP{{補題}}
\def\propositionnameJP{{命題}}
@@ -1712,7 +1904,8 @@
\expandafter\def\csname definition-propositionnameJP\endcsname{\definitionnameJP-\propositionnameJP}
\expandafter\def\csname definition-theoremnameJP\endcsname{\definitionnameJP-\theoremnameJP}
-%% Russian theorems names
+%# 俄文定理名称
+%# Russian theorems names
\def\theoremnameRU{{Теорема}} % Теоре́ма
\def\lemmanameRU{{Лемма}} % Ле́мма
\def\propositionnameRU{{Предложение}} % Предложе́ние
@@ -1735,14 +1928,17 @@
\expandafter\def\csname definition-propositionnameRU\endcsname{\definitionnameRU-\propositionnameRU}
\expandafter\def\csname definition-theoremnameRU\endcsname{\definitionnameRU-\theoremnameRU}
+%# 判断最高级别的标题是 section 还是 chapter
+%# Detect the highest level of title: section or chapter?
\newif\ifPJLthm@IsBook
\ifdefined\c@chapter\PJLthm@IsBooktrue\else\PJLthm@IsBookfalse\fi
-%% Theorem environments
\ifbool{PJLthm@IsBook}{
\newaliascnt{PJLthm@highest}{chapter}
}{
\newaliascnt{PJLthm@highest}{section}
}
+%# 建立定理类环境
+%# Setup theorem-like environments
\if@PJLthm@nothms\else
\if@PJLthm@nothmnum
\CreateTheorem*{theorem}
@@ -1824,7 +2020,8 @@
\numberwithin{equation}{PJLthm@highest}
-% Some localization of cref
+%# 一些 cref 的本地化
+%# Some localization of cref
\gappto{\PJLlang@langconfig@chinese}{%
\crefname{equation}{式}{式}%
\crefname{figure}{图}{图}%
@@ -1913,6 +2110,8 @@
%</PJLthm>
%
%<*ProjLib,PJLtoolkit>
+%# 这段代码定义了宏包中的选项。
+%# This code defines the options in the package.
\SetupKeyvalOptions{
family = @PJLtoolkit,
prefix = @PJLtoolkit@,
@@ -1920,6 +2119,7 @@
\DeclareBoolOption[false]{draft}
\DeclareBoolOption[false]{fast}
\DeclareBoolOption[false]{author}
+\DeclareBoolOption[false]{amsfashion}
\DeclareBoolOption[false]{amssim}
\DeclareBoolOption[false]{nothms}
\DeclareBoolOption[false]{nothmnum}
@@ -1929,10 +2129,21 @@
\DeclareBoolOption[false]{times}
\DeclareBoolOption[false]{garamond}
\DeclareBoolOption[false]{biolinum}
+%# 处理选项
+%# Process options
\ProcessKeyvalOptions*\relax
+
+%# 下面的代码设定了选项之间的关系
+%# The following code sets the relationship between options
\if@PJLtoolkit@draft
\@PJLtoolkit@fasttrue
\fi
+\if@PJLtoolkit@amsfashion
+ \@PJLtoolkit@amssimtrue
+\fi
+
+%# 向组件传递一些参数
+%# Pass some options to the components
\if@PJLtoolkit@fast
\PassOptionsToPackage{fast}{PJLdate}
\PassOptionsToPackage{fast}{PJLdraft}
@@ -1949,12 +2160,16 @@
\PassOptionsToPackage{regionalref}{PJLthm}
\fi
+%# 加载不默认载入的组件
+%# Load those components not by default loaded
\if@PJLtoolkit@author
\RequirePackage{PJLauthor}
\fi
\if@PJLtoolkit@amssim
\RequirePackage{PJLamssim}
\fi
+%# 加载组件
+%# Load the components
\RequirePackage{PJLdate}
\RequirePackage{PJLdraft}
\RequirePackage{PJLlogo}
@@ -1962,14 +2177,9 @@
\RequirePackage{PJLpaper}
\RequirePackage{PJLthm}
-% \RequirePackage{iftex}
-% \ifPDFTeX
-% \RequirePackage[T1]{fontenc}
-% \RequirePackage{inputenc}
-% \fi
+%# 配置字体选项
+%# Configure the font options below
%
-% \RequirePackage{mathtools}
-
% \PJL@font@alreadyset should contain the current font name
% A message can then be shown as: Font "(font name)" has been set
\ifdefined\PJL@font@alreadyset\else
@@ -2029,8 +2239,12 @@
\RequirePackage[italic,defaultmathsizes]{mathastext}
\fi
+%# 结束字体选项的配置
+%# End of the configuration of font options
\fi
+%# 使用 microtype 优化排版细节
+%# Use `microtype` to get details better
\RequirePackage{microtype}
%</ProjLib,PJLtoolkit>
diff --git a/macros/latex/contrib/tableof/README.md b/macros/latex/contrib/tableof/README.md
index 16bf9ca2d3..fa5ea8d72b 100644
--- a/macros/latex/contrib/tableof/README.md
+++ b/macros/latex/contrib/tableof/README.md
@@ -1,56 +1,40 @@
-Abstract
-========
+tableof
+=======
- Package: tableof (Tables of tagged contents)
-- Version: 1.4b (2018/10/02)
+- Version: 1.4c (2021/07/05)
- License: LPPL 1.3c
-- Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
-
-The commands `\toftagstart`, `\toftagstop`, `\toftagthis`, `\tofuntagthis`
-are used to tag chapters, sections or any other sectioning units destined
-to end up in the table(s) of contents. Then:
-
- \nexttocwithtags{req. 1, req. 2, ... }{excl. 1, excl. 2, ... }
- \tableofcontents % or equivalent command
-
-specifies which tags are to be required and which ones are to be
-excluded from the typeset TOC.
-
-For documents with classes where `\tableofcontents` is only single-use,
-the package provides:
+- Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
- \tableoftaggedcontents{req. 1, req. 2, ... }{excl. 1, excl. 2, ... }
+Provides `\toftagstart{}`, `\toftagstop{}`, `\toftagthis{}`, `\tofuntagthis{}`
+to tag chapters, sections or any other sectioning units destined to end up in
+the table(s) of contents. Then each one of
-which does not have this restriction.
+ \tableof{required tags}
+ or \tablenotof{excluded tags}
+ or \tableoftaggedcontents{required tags}{excluded tags}
+typesets a table of contents (with no heading) obeying the conditions. These
+macros can each be used multiple times in the document with varying arguments.
-Installation
-============
-
-For extracting the style file:
-
- latex tableof.dtx
-
-Files `tableof.sty`, `tableof.ins` and `tableoftest.tex` are generated on
-the first latex run. Move `tableof.sty` to a suitable location within the
-TeX installation:
-
- tableof.sty -> <TDS>/tex/latex/tableof/
-
-To produce the documentation:
-
- latex tableof.dtx (a second time)
- dvipdfmx tableof.dvi
+If the document contains no usage of `\tableofcontents`, the preamble should
+also contain an additional `\AtBeginDocument{\tofOpenTocFileForWrite}`.
-`tableof.ins` is for TeX distributions expecting it.
+The main `\tableofcontents` can also be influenced by tags like this:
-`tableoftest.tex` is an example of use of the package commands. Run
-latex twice on it to see examples of tagged tables of contents.
+ \nexttocwithtags{required tags}{excluded tags}
+ \tableofcontents
+Depending on the document class and packages `\tableofcontents` however may be
+usable only once, contrarily to the `\tableof{}` et al. package macros.
Change History
==============
+* v1.4c (2021/07/05) additional efforts for `biblatex` compatibility.
+ Allow style file extraction via `etex`, reword the abstract. Use utf8
+ source encoding.
+
* v1.4b (2018/10/02) fix to bug when a document ended with `\clearpage`
before the `\end{document}`. `tableof` now requires `atveryend` package.
@@ -67,12 +51,31 @@ Change History
* v1.0 (2012/12/06) first release.
+Installation
+============
+
+Extractions:
+
+ etex tableof.dtx
+
+Move `tableof.sty` to a suitable location within the TeX installation:
+
+ tableof.sty -> <TDS>/tex/latex/tableof/
+
+The `tableoftest.tex` file is provided as an example of use of the package.
+
+To generate the documentation, execute:
+
+ latexmk tableof.dtx
+ dvipdfmx tableof.dvi
+
+
License
=======
This Work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License,
- version 1.3c. This version of this license is in
+ conditions of the version 1.3c of the LaTeX Project Public License.
+ This version of this license is in
<http://www.latex-project.org/lppl/lppl-1-3c.txt>
diff --git a/macros/latex/contrib/tableof/tableof.dtx b/macros/latex/contrib/tableof/tableof.dtx
index 34a881d1e8..bd7a435cef 100644
--- a/macros/latex/contrib/tableof/tableof.dtx
+++ b/macros/latex/contrib/tableof/tableof.dtx
@@ -1,94 +1,65 @@
-% -*- coding: iso-latin-1; -*-
+% -*- coding: utf-8; -*-
%<*none>
-{\def\doctimestamp {Time-stamp: <02-10-2018 11:43:43 CEST>}%
+{\def\doctimestamp {Time-stamp: <05-07-2021 14:42:11 CEST>}%
\def\getdtxtimestamp #1 <#2 #3 #4>{#2 at #3 #4}%
\xdef\tofdtxtimestamp {\expandafter\getdtxtimestamp\doctimestamp }}%
-\def\docdate{2018/10/02}
%</none>
%%
%% Package: tableof
-%% Version: 1.4b (2018/10/02)
+%% Version: 1.4c (2021/07/05)
%% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
+%% Copyright (C) 2012, 2013, 2015, 2018, 2021 Jean-Francois Burnol <jfbu at free dot fr>
%%
+% See README.md for installation instructions
+%
% This Work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either
-% version 1.3c of this license. This version of this license is in
+% conditions of the version 1.3c of the LaTeX Project Public License.
+% This version of this license is in
% http://www.latex-project.org/lppl/lppl-1-3c.txt
% and version 1.3 or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% The Author of this Work is: Jean-Francois Burnol <jfbu at free dot fr>
-%
-% Installation:
-% ============
-%
-% latex tableof.dtx
-%
-% `tableof.sty`, `tableof.ins` and `tableoftest.tex` are generated
-% on the first latex run. Move `tableof.sty` to a suitable
-% location within the TeX installation:
-%
-% tableof.sty -> <TDS>/tex/latex/tableof/
-%
-% `tableof.ins` is for TeX distributions expecting it.
-%
-% `tableoftest.tex` is an example of use of the package commands. Run
-% latex twice on it to see examples of tagged tables of contents.
-%
-% To generate the documentation, run once more latex on tableof.dtx,
-% then run dvipdfmx on tableof.dvi
-%
-%<*ins>
+%<*none>
\def\pkgname {tableof}
-\def\pkgdate {2018/10/02}
-\def\pkgversion {v1.4b}
+\def\pkgdate {2021/07/05}
+\def\pkgversion {v1.4c}
\def\pkgdescription {Tables of tagged contents (JFB)}
-%</ins>
-%<*none>
-\ProvidesFile{\pkgname.dtx}%
- [\pkgname source and documentation (\tofdtxtimestamp)]
\begingroup
\input docstrip.tex
\askforoverwritefalse
\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
\string\ProvidesPackage{\pkgname}^^J%
\space[\pkgdate\space\pkgversion\space\pkgdescription]}
-\generate{\nopreamble
-\file{\pkgname.ins}{\from{\pkgname.dtx}{ins}}
-\usepreamble\defaultpreamble
+\generate{\usepreamble\defaultpreamble
\file{\pkgname test.tex}{\from{\pkgname.dtx}{test}}
\usepreamble\pkgpreamble
\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
\endgroup
+\ifdefined\documentclass\else
+\newlinechar13 \catcode13 12 \immediate\write128{%
+********************************************************************
+*
+* To finish the installation you have to move the following
+* file into a repertory searched by TeX:
+*
+* \space\space\space\space tableof.sty
+*
+* To produce the tableof.pdf documentation, run "latexmk"
+* on tableof.dtx then "dvipdfmx" on tableof.dvi
+* (or latex thrice then dvipdfmx)
+*
+* Notice that this will again extract tableof.sty in the current
+* repertory.
+*
+* Happy TeXing!
+*
+********************************************************************}%
+\endinput\expandafter\end\fi%
+\ProvidesFile{\pkgname.dtx}%
+ [\pkgname source and documentation (\tofdtxtimestamp)]
\iffalse
%</none>
-%<*ins>
-%-------------------------------------------------------------------------------
-%% This file `tableof.ins' is provided for compatibility with TeX
-%% distributions expecting to find it for installation of `tableof.sty'.
-%%
-%% As usual `tex tableof.ins' produces `tableof.sty' from the source
-%% `tableof.dtx'
-%%
-%% (an already existing `tableof.sty' in the same repertory will be
-%% overwritten)
-%%
-%% Move `tableof.sty' to a suitable location within the TeX installation:
-%% tableof.sty -> <TDS>/tex/latex/tableof/
-%%
-%% The generated auxiliary files may be discarded.
-%%
-\input docstrip.tex
-\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space\pkgversion\space\pkgdescription]}
-\generate{\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
-\endbatchfile
-%-------------------------------------------------------------------------------
-%</ins>
%<*test>
%-------------------------------------------------------------------------------
%% This file `tableoftest.tex' serves to demontrate the use of the
@@ -111,7 +82,7 @@
\section*{\string\tableof\{\}}
\tableof{}
\section*{\string\tableof\lowast\{A,B,C,D,E,F\}}
-% vrifions que c'est bon avec les espaces: (1.3 de 2015/02/11)
+% vérifions que c'est bon avec les espaces: (1.3 de 2015/02/11)
\tableof*{ A, B,C , D , E, F }
\section*{\string\tableof\{A\}}
\tableof{A}
@@ -262,12 +233,12 @@ A,B,C
\PassOptionsToPackage{dvipdfm}{geometry}
\PassOptionsToPackage{bookmarks=true}{hyperref}
\PassOptionsToPackage{dvipdfmx-outline-open}{hyperref}
- \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
+% obsolete
+% \PassOptionsToPackage{dvipdfmx-outline-open}{bookmark}
%
\makeatother
\documentclass[a4paper,fontsize=11pt,abstract]{scrdoc}
\pagestyle{headings}
-\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[hscale=0.66,vscale=0.76]{geometry}
@@ -329,13 +300,14 @@ A,B,C
\usepackage[english]{babel}
-\usepackage[pdfencoding=pdfdoc]{hyperref}
+% pdfencoding = unicode maintenant défaut
+\usepackage{hyperref}
\hypersetup{%
linktoc=all,%
breaklinks=true,%
hidelinks,%
-pdfauthor={Jean-Fran\c cois Burnol},%
+pdfauthor={Jean-François Burnol},%
pdftitle={The tableof package},%
pdfsubject={LaTeX, table of contents},%
pdfkeywords={LaTeX, table of contents},%
@@ -368,7 +340,7 @@ pdfpagemode=UseOutlines}
\texorpdfstring{{\color{niceone}\ttfamily\bfseries etoc}}
{etoc}\xspace}
-\frenchspacing
+%\frenchspacing
\renewcommand\familydefault\sfdefault
@@ -379,33 +351,40 @@ pdfpagemode=UseOutlines}
\begin{center}
{\normalfont\Large The \tableof package}\\
- \textsc{Jean-Franois Burnol}\par
+ \bigskip
\footnotesize \ttfamily
- jfbu (at) free (dot) fr\\
Package version: \pkgversion\ (\pkgdate)\\
- Documentation generated from the source file\\
- with timestamp ``\tofdtxtimestamp''
+ Documentation generated from tableof.dtx
+ with timestamp \tofdtxtimestamp\\
+ \textcopyright 2012, 2013, 2015, 2018, 2021 Jean-François Burnol
+ <jfbu (at) free (dot) fr>
\end{center}
\begin{abstract}
-The commands \csa{toftagstart}, \csa{toftagstop}, \csa{toftagthis},
-\csa{tofuntagthis} are used to tag chapters, sections or any other sectioning
-units destined to end up in the table(s) of contents. Then:
-\begin{quote}
- \csa{nexttocwithtags}\{req. 1, req. 2, ...\}\{excl. 1,
- excl. 2, ...\}\\
- \csa{tableofcontents} |% or equivalent command|
-\end{quote}
-specifies which tags are to be required and which ones are to be
-excluded from the typeset TOC.
-
-For documents with classes where \csa{tableofcontents} is only single-use,
-the package provides:
-\begin{quote}
- \csa{tableoftaggedcontents}\{req. 1, req. 2, ...\}\{excl. 1,
- excl. 2, ...\}
-\end{quote}
-which does not have this restriction.
+ Provides |\toftagstart{}|, |\toftagstop{}|, |\toftagthis{}|,
+ |\tofuntagthis{}| to tag chapters, sections or any other sectioning units
+ destined to end up in the table(s) of contents. Then each one of
+\begin{verbatim}
+ \tableof{required tags}
+ or \tablenotof{excluded tags}
+ or \tableoftaggedcontents{required tags}{excluded tags}
+\end{verbatim}
+ typesets a table of contents (with no heading) obeying the conditions. These
+ macros can each be used multiple times in the document with varying
+ arguments.
+
+ If the document contains no usage of |\tableofcontents|, the preamble should
+ also contain an additional |\AtBeginDocument{\tofOpenTocFileForWrite}|.
+
+ The main |\tableofcontents| can also be influenced by tags like this:
+\begin{verbatim}
+ \nexttocwithtags{required tags}{excluded tags}
+ \tableofcontents
+\end{verbatim}
+
+ Depending on the document class and packages, |\tableofcontents| however may
+ be usable only once, contrarily to the |\tableof{}| et al.\@ package macros.
+
\end{abstract}
\tableofcontents
@@ -463,7 +442,7 @@ account.
\subsection{Spaces}
Spaces in tags and around commas in tag lists are transparently removed.
-(\emph{new with release} |1.3|). Tags may be macros, they are completely
+Tags may be macros, they are completely
expanded before use.
\section{Table of contents commands}
@@ -606,10 +585,17 @@ tables of contents, apart from
\hangafter1 }
\makeatother
+|2021/07/05 v1.4c: |ensure the added scope-limiting group for |\tableof{}|
+and alike macros encompasses all contents of the |.toc| file even in presence
+of packages hacking into these contents (in particular |biblatex|).
+%! https://tex.stackexchange.com/questions/603540/tableof-package-erases-citations/
+
|2018/10/02 v1.4b: |fix for situations when a |\clearpage| before
the |\end{document}| resulted in the loss of the |\tof@finish| token from |.toc|
-file, causing the package to misbehave (cf.
-\url{https://tex.stackexchange.com/q/358014/4686}). The package
+file, causing the package to misbehave.
+%! (cf.
+%! \url{https://tex.stackexchange.com/q/358014/4686}).
+The package
|atveryend| is now required.\footnote{\url{http://www.ctan.org/pkg/atveryend}}
|2015/03/10 v1.4a: i. |changes in the code to make it more easily patchable by
@@ -620,8 +606,7 @@ TOCs as tabulars of longtables, in the way \etoc |1.08| will permit).
| ii. |improved sectioning of the documentation.
-|2015/02/20 v1.4: i. |some code efficiency improvements (some
-|\edef|'s replaced by a bunch of |\expandafter|'s.)
+|2015/02/20 v1.4: i. |some code efficiency improvements (perhaps...).
| ii. |improved documentation.
@@ -649,19 +634,7 @@ document uses standard |\tableofcontents| or like commands.
\endgroup
-\bigskip % pourquoi le faut-il?
-
-\section{Generating the package file and the test file}
-
-Running |latex| on |tableof.dtx| generates:
-{1})~the package file |tableof.sty| (which should be moved to a suitable
-location within the \TeX{} installation),
-{2})~|tableof.ins| for \TeX{} distributions expecting such a file,
-{3})~|tableoftest.tex| which demonstrates the package features (one should run
-|latex| twice on it), and
-{4})~the documentation itself. After running |latex| twice, use |dvipdfmx| to
-produce the pdf documentation.
-
+\bigskip
\section{Implementation}
@@ -669,20 +642,28 @@ produce the pdf documentation.
\StopEventually{\check@checksum\end{document}}
\makeatother
-% Suite msaventure le 9 mars 2015 dans etoc.dtx:
-
-% ATTENTION QU'AVANT DE COMMENCER DES MACROCODE IL FAUT OBLIGATOIREMENT UN
-% PARAGRAPHE APRS \section (SINON ESPACEMENTS VERTICAUX POST MACROCODE
-% SUPPRIMS :((((( )
-
-% ceci faisait donc l'affaire :
-
-% Writing-up source code comments is hopefully for a future
-% release.
-
-% maintenant je fais:
-
-\indent
+% % Suite à mésaventure le 9 mars 2015 dans etoc.dtx:
+%
+% % ATTENTION QU'AVANT DE COMMENCER DES MACROCODE IL FAUT OBLIGATOIREMENT UN
+% % PARAGRAPHE APRÈS \section (SINON ESPACEMENTS VERTICAUX POST MACROCODE
+% % SUPPRIMÉS :((((( )
+%
+% % ceci faisait donc l'affaire :
+%
+% % Writing-up source code comments is hopefully for a future
+% % release.
+%
+% % maintenant je fais:
+% %
+% \indent
+%
+% Finalement, j'ai fait un bug report en 2021 et trouvé un
+% workaround
+% https://github.com/latex3/latex2e/issues/563
+\makeatletter
+\AddToHook{env/macrocode/begin}{\partopsep0pt\relax}
+\AddToHook{env/macrocode/after}{\@nobreakfalse}
+\makeatother
\makeatletter
\begingroup
@@ -724,7 +705,7 @@ produce the pdf documentation.
% |1.3| codes this |\tof@readtoc| slightly better (copied from \etoc.dtx).
% \begin{macrocode}
\def\tof@readtoc {%
- \ifeof \tof@tf
+ \ifeof\tof@tf
\else
\read\tof@tf to \tof@buffer
\tof@toctoks\expandafter\expandafter\expandafter
@@ -738,14 +719,33 @@ produce the pdf documentation.
% though that this is irrelevant if the document uses |tableof| only via its
% tagging abilities, and has standard |\tableofcontents| command to print the
% TOC.
+%
+% |1.4c| injects |\tof@begingroup| and |\tof@endgroup| to wrap the gathered
+% the contents of the toc file, rather than having them arise from expansion
+% of |\tof@begin| and respectively |\tof@finish|. This avoids a problem with
+% |biblatex| additions to the |.toc| file happening before |\tof@begin|. They
+% need to have their scope limited. The |\tableof{}| macro and variants will
+% thus achieve this automatically via the |\tof@begingroup/\tof@endgroup| pair
+% now explicitly added to |\tof@toctoks| contents.
+%
+% \etoc (a.t.t.o.w |1.09c 2020/05/15|) has some handling of
+% |\tof@begingroup/\tof@endgroup| which as far as I understand can
+% currently remain as it is. But there is something weird in \etoc with
+% a test of |\tof@finish| which probably is in need of revision (even
+% independently of changes here).
+%
+% These changes however mean for usage of |\nexttocwithtags| that whatever
+% macro is used to typeset the TOC, it is now the one bearing the
+% responsability for creating the scope-limiting group.
% \begin{macrocode}
\AtBeginDocument{\IfFileExists{\jobname.toc}
{{\endlinechar\m@ne
\makeatletter
\newread\tof@tf
\openin\tof@tf\@filef@und
+ \tof@toctoks{\tof@begingroup}%
\tof@readtoc
- \global\tof@toctoks=\expandafter{\the\tof@toctoks}%
+ \global\tof@toctoks=\expandafter{\the\tof@toctoks\tof@endgroup}%
\closein\tof@tf}}{}}
% \end{macrocode}
% The trick is that |\@ifundefined| chooses the undefined branch if the
@@ -767,6 +767,9 @@ produce the pdf documentation.
% or |\relax| are all made global, because for compatibility with the fancy
% things \etoc |1.08| will allow for TOC as table we need a global mode, and
% the simplest is here to do the things global by default.
+%
+% |1.4c| replaces |{}| (last argument of |\@ifundefined|) by |\relax|. No
+% strong reason. We and \etoc use |\endlinechar-1| anyhow.
% \begin{macrocode}
\AtBeginDocument{
\addtocontents{toc}{\string\@ifundefined{tof@begin}%
@@ -775,8 +778,15 @@ produce the pdf documentation.
\global\let\string\tof@starttags\string\@gobble
\global\let\string\tof@stoptags\string\@gobble
\global\let\string\tof@tagthis\string\@gobble
- \global\let\string\tof@untagthis\string\@gobble}{}}
+ \global\let\string\tof@untagthis\string\@gobble}\relax}
\addtocontents{toc}{\string\tof@begin}
+% \end{macrocode}
+% \LaTeX\ of 2020 or 2021 always has |\contentsline| with four arguments.
+% So an update should be done here to always gobble four, else in absence
+% of |hyperref| some |{}| are left. Does not seem to matter a lot except
+% if all is executed in math mode... thanks to \etoc for example.
+% No urgency here, only mentioning for the record.
+% \begin{macrocode}
\@ifpackageloaded{hyperref}
{\def\tof@gobblethree@orfour#1#2#3#4{}%
\ifx\hyper@last\@undefined\tof@toctoks{}\fi}
@@ -815,14 +825,19 @@ produce the pdf documentation.
\let\tof@global \@empty
\let\tof@begingroup \begingroup
\let\tof@endgroup \endgroup
+% \end{macrocode}
+% No more |\tof@endgroup| here at |1.4c|. See above explanations.
+% \begin{macrocode}
\def\tof@@finish {\tof@global\let\contentsline\tof@savedcontentsline
- \tof@endgroup\global\let\tof@begin\relax
- \global\let\tof@tags\@empty }
+ \global\let\tof@begin\relax
+ \global\let\tof@tags\@empty }
\def\tof@@tagthis #1{\def\tof@tags@tmp{#1}}
\def\tof@@untagthis #1{\def\tof@untags@tmp{#1}}
+% \end{macrocode}
+% No more |\tof@begingroup| here at |1.4c|. See above explanations.
+% \begin{macrocode}
\def\tof@init#1{%
\def\tof@begin{%
- \tof@begingroup
\tof@global\let\tof@tagthis \tof@@tagthis
\tof@global\let\tof@untagthis\tof@@untagthis
\tof@global\let\tof@starttags\tof@@starttags
@@ -1000,7 +1015,7 @@ produce the pdf documentation.
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum{557}
+\CheckSum{559}
\Finale
%%
diff --git a/macros/latex/contrib/tableof/tableof.ins b/macros/latex/contrib/tableof/tableof.ins
deleted file mode 100644
index 0b0f091b8d..0000000000
--- a/macros/latex/contrib/tableof/tableof.ins
+++ /dev/null
@@ -1,35 +0,0 @@
-%%
-%% Package: tableof
-%% Version: 1.4b (2018/10/02)
-%% License: LPPL 1.3c
-%% Copyright (C) 2012-2018 Jean-Francois Burnol <jfbu at free dot fr>
-%%
-\def\pkgname {tableof}
-\def\pkgdate {2018/10/02}
-\def\pkgversion {v1.4b}
-\def\pkgdescription {Tables of tagged contents (JFB)}
-%% This file `tableof.ins' is provided for compatibility with TeX
-%% distributions expecting to find it for installation of `tableof.sty'.
-%%
-%% As usual `tex tableof.ins' produces `tableof.sty' from the source
-%% `tableof.dtx'
-%%
-%% (an already existing `tableof.sty' in the same repertory will be
-%% overwritten)
-%%
-%% Move `tableof.sty' to a suitable location within the TeX installation:
-%% tableof.sty -> <TDS>/tex/latex/tableof/
-%%
-%% The generated auxiliary files may be discarded.
-%%
-\input docstrip.tex
-\askforoverwritefalse
-\def\pkgpreamble{\defaultpreamble^^J\MetaPrefix^^J%
-\string\ProvidesPackage{\pkgname}^^J%
-\space[\pkgdate\space\pkgversion\space\pkgdescription]}
-\generate{\usepreamble\pkgpreamble
-\file{\pkgname.sty}{\from{\pkgname.dtx}{package}}}
-\endbatchfile
-\endinput
-%%
-%% End of file `tableof.ins'.
diff --git a/macros/latex/contrib/tableof/tableof.pdf b/macros/latex/contrib/tableof/tableof.pdf
index fe26b7b124..f04fc964a0 100644
--- a/macros/latex/contrib/tableof/tableof.pdf
+++ b/macros/latex/contrib/tableof/tableof.pdf
Binary files differ
diff --git a/macros/latex/contrib/titlesec/README.md b/macros/latex/contrib/titlesec/README.md
index 7fb1fdff3d..4bdf80bc07 100644
--- a/macros/latex/contrib/titlesec/README.md
+++ b/macros/latex/contrib/titlesec/README.md
@@ -28,6 +28,9 @@ mechanims is used, without intermediate `\leftmark`s or `\rightmark`s.
### Latest changes
```
+2.14 2021-07-05
+ A couple of minor changes (for issues #17, #39).
+
2.13 2019-10-16
- \markboth (which has been redefined in the LaTeX kernel) works
again.
@@ -64,5 +67,5 @@ Further details are available on
### Contact
Please, for suggestions, bug reports, etc., go to
-More
- http://www.texnia.com/contact.html
+
+ https://github.com/jbezos/titlesec/issues
diff --git a/macros/latex/contrib/titlesec/titleps.pdf b/macros/latex/contrib/titlesec/titleps.pdf
index 0a5ea985c2..6d364232eb 100644
--- a/macros/latex/contrib/titlesec/titleps.pdf
+++ b/macros/latex/contrib/titlesec/titleps.pdf
Binary files differ
diff --git a/macros/latex/contrib/titlesec/titleps.sty b/macros/latex/contrib/titlesec/titleps.sty
index 73f7f87215..a5d995f265 100644
--- a/macros/latex/contrib/titlesec/titleps.sty
+++ b/macros/latex/contrib/titlesec/titleps.sty
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -13,7 +13,7 @@
\ifx\ttl@coreps\@empty\else % START code for package
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titleps}[2019/10/16 v2.13 Page styles]
+\ProvidesPackage{titleps}[2021/07/05 v2.14 Page styles]
% This package is mainly a wrapper for the pagestyle macros provided
% by titlesec, so that they can be used without it. Functionality is
diff --git a/macros/latex/contrib/titlesec/titleps.tex b/macros/latex/contrib/titlesec/titleps.tex
index c3af656ae9..8b1f3f5dfa 100644
--- a/macros/latex/contrib/titlesec/titleps.tex
+++ b/macros/latex/contrib/titlesec/titleps.tex
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -7,8 +7,8 @@
% Repository: https://github.com/jbezos/titlesec
%
-\def\fileversion{2.13}
-\def\docdate{2019/10/16}
+\def\fileversion{2.14}
+\def\docdate{2021/07/05}
\documentclass[a4paper]{ltxguide}
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
diff --git a/macros/latex/contrib/titlesec/titlesec.pdf b/macros/latex/contrib/titlesec/titlesec.pdf
index 1812168713..9bb6f09e9e 100644
--- a/macros/latex/contrib/titlesec/titlesec.pdf
+++ b/macros/latex/contrib/titlesec/titlesec.pdf
Binary files differ
diff --git a/macros/latex/contrib/titlesec/titlesec.sty b/macros/latex/contrib/titlesec/titlesec.sty
index e99e0b09d3..f4aa050b79 100644
--- a/macros/latex/contrib/titlesec/titlesec.sty
+++ b/macros/latex/contrib/titlesec/titlesec.sty
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -34,7 +34,7 @@
% ~~~~~~~
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titlesec}[2019/10/16 v2.13 Sectioning titles]
+\ProvidesPackage{titlesec}[2021/07/05 v2.14 Sectioning titles]
% Initialization
% ~~~~~~~~~~~~~~
@@ -289,8 +289,13 @@
\def\ttl@b{ttlf@#1}%
\def\ttl@a##1{\csname ttl@key@##1\endcsname}% Used as elt in try
\ttl@trylist
+ \ifx\ttl@c\@empty
+ \PackageError{titlesec}{No format for this command}%
+ {If you (re)set the class of a sectioning command, you may\MessageBreak
+ you may need to (re)define its format with \string\titleformat}%
+ \fi
\ifttl@explicit
- \def\ttl@passexplicit{\ttl@case{#4}}%
+ \def\ttl@passexplicit{\ttl@case{#4}}%
\ttl@c{#4}{#2}{#3}{}% ttl@c is returned by ttl@try with ttlf@...
\else
\let\ttl@passexplicit\ttl@case
diff --git a/macros/latex/contrib/titlesec/titlesec.tex b/macros/latex/contrib/titlesec/titlesec.tex
index 6c4d4a8d55..be9ae49cd9 100644
--- a/macros/latex/contrib/titlesec/titlesec.tex
+++ b/macros/latex/contrib/titlesec/titlesec.tex
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -7,8 +7,8 @@
% Repository: https://github.com/jbezos/titlesec
%
-\def\fileversion{2.13}
-\def\docdate{2019/10/16}
+\def\fileversion{2.14}
+\def\docdate{2021/07/05}
\documentclass[a4paper]{ltxguide}
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
@@ -38,7 +38,7 @@
\title{The \textsf{titlesec}, \textsf{titleps} and \textsf{titletoc}
Packages\footnote{The \textsf{titlesec} package is currently at
-version 2.13. \copyright{} 1998--2019 Javier Bezos.}}
+version 2.14. \copyright{} 1998--2021 Javier Bezos.}}
\author{Javier Bezos\footnote{For bug reports, comments and
suggestions go to \href{http://www.tex-tipografia.com/contact.html}%
@@ -863,7 +863,7 @@ and \textsf{titlesec} does not change by default the definition of
related stuff like counters, macros, format, and spacing is left to the
responsibility of the user. If there is a TOC, also the TOC format,
which might require redefining the corresponding macros to change the
- hardcoded value (either by hand or with \textsf{titletoc}).
+ hardcoded value (either by hand or with \textsf{titletoc}).
\end{warning}
\begin{desc}
@@ -901,6 +901,11 @@ depending of its name and ignoring the class:
except if you use the |newparttoc| option.
\end{itemize}
+\begin{warning}
+ If you set or reset the class, you may need to redefine the format,
+ too.
+\end{warning}
+
\begin{desc}
|loadonly| \quad (Package option)
\end{desc}
@@ -1007,13 +1012,13 @@ unwanted space in the toc.)
That works with standard classes, but if you are using
\textsf{fancyhdr} or \textsf{titlesec} to define headers you need
further refinement to kill the section number. In \textsf{titlesec}
-that's accomplished with |\ifthesection| (see below).
+that's accomplished with |\ifthesection| (see \textsf{titleps.pdf}).
-As you can see, there are no |\addcontentsline|, no
-|\markboth|, no |\section*|, just logical structure. Of
-course you may change it as you wish; for example if you decide
-these sections should be typeset in small typeface, include
-|\small|, and if you realize you do not like that, remove it.
+As you can see, there are no |\addcontentsline|, no |\markboth|, no
+|\section*|, just logical structure. Of course you may change it as you
+wish; for example if you decide these sections should be typeset in
+small typeface, include |\small|, and if you realize you do not like
+that, remove it.
While the standard \LaTeX{} commands are easier and more
direct for simple cases, I think the proposed method above is
@@ -1979,7 +1984,7 @@ with slight changes.
\end{verbatim}
\addtocontents{toc}{\protect\setcounter{tocdepth}{2}\ignorespaces}
-\setcounter{section}{9}
+\setcounter{section}{8}
\endgroup
\bigskip
diff --git a/macros/latex/contrib/titlesec/titletoc.sty b/macros/latex/contrib/titlesec/titletoc.sty
index e7a5b6e518..99164ae1d7 100644
--- a/macros/latex/contrib/titlesec/titletoc.sty
+++ b/macros/latex/contrib/titlesec/titletoc.sty
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -7,7 +7,7 @@
% Repository: https://github.com/jbezos/titlesec
%
-\ProvidesPackage{titletoc}[2019/10/16 v2.13 TOC entries]
+\ProvidesPackage{titletoc}[2021/07/05 v2.14 TOC entries]
% The following tags are used:
% ttl@ : the generic one, shared with titlesec
@@ -531,7 +531,7 @@
\AtBeginDocument{%
\ifx\ttl@gobblecontents\@undefined
- \def\ttl@gobblecontents#1#2#3{\ignorespaces}%
+ \def\ttl@gobblecontents#1#2#3#4{\ignorespaces}%
\fi}
\def\ttl@toctop{-1000}