summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx69
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin587175 -> 590797 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex28
-rw-r--r--macros/latex/contrib/ejpecp/README.md11
-rw-r--r--macros/latex/contrib/ejpecp/ejpecp.dtx130
-rw-r--r--macros/latex/contrib/ejpecp/ejpecp.ins4
-rw-r--r--macros/latex/contrib/ejpecp/ejpecp.pdfbin180735 -> 183645 bytes
-rw-r--r--macros/latex/contrib/ejpecp/sample.pdfbin155933 -> 155435 bytes
-rw-r--r--macros/latex/contrib/ejpecp/sample.tex10
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-cn.pdfbin311756 -> 319814 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-en.pdfbin191210 -> 199160 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc-fr.pdfbin192902 -> 200071 bytes
-rw-r--r--macros/latex/contrib/projlib/ProjLib-doc.dtx345
-rw-r--r--macros/latex/contrib/projlib/ProjLib.dtx148
-rw-r--r--macros/latex/contrib/zref-check/CHANGELOG.md18
-rw-r--r--macros/latex/contrib/zref-check/README.md11
-rw-r--r--macros/latex/contrib/zref-check/zref-check-code.pdfbin702150 -> 710511 bytes
-rw-r--r--macros/latex/contrib/zref-check/zref-check.dtx301
-rw-r--r--macros/latex/contrib/zref-check/zref-check.pdfbin454988 -> 455030 bytes
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-ar.pdfbin146943 -> 161779 bytes
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-ar.tex29
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-en.pdfbin105529 -> 119572 bytes
-rw-r--r--macros/luatex/latex/beamer-rl/Example-of-use-en.tex24
-rw-r--r--macros/luatex/latex/beamer-rl/README.txt4
-rw-r--r--macros/luatex/latex/beamer-rl/beamer-rl.cls2
-rw-r--r--macros/luatex/latex/beamer-rl/pgfpages-rl.sty666
26 files changed, 1514 insertions, 286 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 29456c1287..778d47e92a 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/08/16}{1.28q}
+\ProvidesExplClass{easybook}{2021/08/16}{1.29}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -63,7 +63,7 @@
}
\ProcessKeysOptions{easybook}
-\PassOptionsToPackage{no-math,quiet,CJKmath}{xeCJK}
+\PassOptionsToPackage{CJKmath,quiet}{xeCJK}
\eb_put_ctexbook:n { \g__eb_options_clist }
\LoadClass[UTF8]{ctexbook}
@@ -297,7 +297,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/08/16}{1.28q}
+\ProvidesExplPackage{easybase}{2021/08/16}{1.29}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
@@ -437,7 +437,7 @@
{ \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption }
}
-\clist_map_inline:nn
+\eb_clist_map_inline:nn
{
{ protrusion = false } { microtype },
{ list = off } { bicaption },
@@ -536,7 +536,7 @@
if~you~continue~compiling. \\\\
Please~update~your~macro~package~from~CTAN.
}
-\clist_map_inline:nn
+\eb_clist_map_inline:nn
{
{ expl3 } { 2020/10/27 },
{ xparse } { 2020/10/27 },
@@ -1548,21 +1548,18 @@
\eb_toc_start_multi_column_ext:n {#5}
\group_end:
}
-\clist_map_inline:nn
+\cs_new_protected:Npn \eb_list_content_cmd_set:nn #1#2
{
- { figure,lof },
- { table,lot },
- { lstlisting,lol }
+ \exp_args:Nc \DeclareDocumentCommand { listof#1s }{st+o}
+ {\eb_toc_list_parse:nnnnn {##1} {##2} {##3} {#1} {#2}}
}
+\eb_clist_map_inline:nn
{
- \exp_args:Nc \DeclareDocumentCommand
- { listof\clist_item:nn {#1} { 1 }s }{st+o}
- {
- \eb_toc_list_parse:nnnnn {##1} {##2} {##3}
- { \clist_item:nn {#1} { 1 } }
- { \clist_item:nn {#1} { 2 } }
- }
+ { figure } { lof },
+ { table } { lot },
+ { lstlisting } { lol }
}
+ { \eb_list_content_cmd_set:nn #1 }
\cs_set_eq:NN \listoflistings \listoflstlistings
\RenewDocumentCommand{\tableofcontents}{t+oD(){}}
{
@@ -1680,18 +1677,18 @@
\cs_new_protected:Npn \eb_put_newtxmath:n #1
{ \PassOptionsToPackage{#1}{newtxmath} }
-\eb_at_end_preamble:n
+\AfterPreamble
{
\str_case:VnT \l__eb_subfont_math_choice_tl
{
+ { times } { }
+ { nc } { \eb_put_newtxmath:n { nc } }
{ noto } { \eb_put_newtxmath:n { noto } }
+ { stix } { \eb_put_newtxmath:n { stix2 } }
+ { charter } { \eb_put_newtxmath:n { charter } }
{ notosans } { \eb_put_newtxmath:n { notosans } }
{ garamond } { \eb_put_newtxmath:n { ebgaramond } }
- { times } { \eb_put_newtxmath:n { noOT1 } }
- { libertine } { \eb_put_newtxmath:n { libertine,noOT1 } }
- { stix } { \eb_put_newtxmath:n { stix2,noOT1 } }
- { nc } { \eb_put_newtxmath:n { nc,noOT1 } }
- { charter } { \eb_put_newtxmath:n { charter,noOT1 } }
+ { libertine } { \eb_put_newtxmath:n { libertine } }
}
{ \LoadPackage{newtxmath+bm} }
}
@@ -1809,7 +1806,7 @@
}{}
\cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2
{ \SetEnumitemValue{label}{#1}{\color{ctex@emph}#2} }
-\clist_map_inline:nn
+\eb_clist_map_inline:nn
{
{ bullet } { \textbullet },
{ endash } { \normalfont\bfseries\textendash },
@@ -2134,7 +2131,7 @@
\group_begin:
\tl_set_eq:NN \eb@toc@title \bibname
\IfValueT{##3}{ \keys_set:nn { eb/listoc } {##3} }
- \tl_set:Nn \bibsection
+ \cs_set:Npn \bibsection
{
\eb_title_number_intoc_spec:nn {##2} {##1}
\bool_if:NT \l__eb_toc_multi_column_bool
@@ -2235,23 +2232,25 @@
{ \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } }
\cs_new_protected:Npn \DeclareThemeColor #1
{ \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } }
-\clist_map_inline:nn
- {
- { linkcolor,link },
- { color,theme }
- }
+\cs_new_protected:Npn \eb_color_assign_cmd_set:nn #1#2
{
- \cs_new:cpn { eb_\clist_item:nn {#1} { 2 }_color_set:n } ##1
+ \cs_new:cpn { eb_#2_color_set:n } ##1
{
- \clist_item:nn {#1} { 1 }/\clist_item:nn {##1} { 1 } .code:n =
+ #1/\clist_item:nn {##1} { 1 } .code:n =
{
- \use:c { eb_define_\clist_item:nn {#1} { 2 }_color:nnn }
+ \use:c { eb_define_#2_color:nnn }
{ \clist_item:nn {##1} { 2 } }
{ \clist_item:nn {##1} { 3 } }
{ \clist_item:nn {##1} { 4 } }
},
}
}
+\eb_clist_map_inline:nn
+ {
+ { linkcolor } { link },
+ { color } { theme }
+ }
+ { \eb_color_assign_cmd_set:nn #1 }
\bool_set_false:N \l__eb_toc_number_color_bool
\ctex_define:nn { refset }
@@ -2274,12 +2273,12 @@
linktoc/unknown .code:n =
{
\eb_put_hyperref:n { linktoc = #1 }
- \clist_map_inline:nn { page,none }
+ \eb_clist_map_inline:nn { page,none }
{
\tl_if_eq:NnT \l_keys_value_tl {##1}
{
\colorlet{ctex@toc@number}{black}
- \clist_map_break:
+ \seq_map_break:
}
}
},
@@ -2395,7 +2394,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/16}{1.28q}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/16}{1.29}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index e8462e7c52..59fc52c31d 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 59ad7179cd..8485acc478 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -12,7 +12,7 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.28q,
+ version = v1.29,
date = 2021/08/16,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
@@ -593,7 +593,7 @@
\subsection{页面尺寸}
\label{subsec:page margins}
-预置的页面尺寸与 \cls*{Word} 的默认值接近,模块 \module*{geoset} 会将前两个之外的选项交给 \pkg*{geometry} 宏包接口命令 \cs*{geometry} 处理,并且 \meta{键值列表} 的选项与之相同,下面的选项仅是一小部分,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。
+模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面是列举的一小部分选项,其它选项可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \option{paper} 选项的设置。
\begin{options}\noitemsep
\keyval-{headruleskip}{页眉线间距}\Module{geoset}\Default*
\keyval-{footruleskip}{页脚线间距}\Default*
@@ -808,7 +808,7 @@
\environment*{tabularx}[\marg{长度}\marg{列格式}]\default{}
\environment*{tabular}[\marg{列格式}]\default{}
\environment{tblr}[\marg{键值列表}]
- \pkg*{tabularray} 是一个较新的宏包,不仅提供了 \pkg*{tabularx}、\pkg*{multirow}、和 \pkg*{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法:
+ \pkg*{tabularray} 是一个较新的表格宏包,不仅提供了 \pkg*{tabularx}、\pkg*{multirow}、和 \pkg*{booktabs} 宏包的功能,并且不依赖其它宏包与它们同时使用不会产生冲突,还实现了用简便的键值列表方式设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法:
\begin{ctexexam}
\begin{tblr}
{
@@ -829,7 +829,20 @@
\end{environments}
\subsection{列表}
-\pkg*{enumitem} 宏包为系统预置的三种列表环境即排序列表 \env{enumerate}、常规列表 \env{itemize} 和 主题列表 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \cs*{setlist} 命令设置三种列表格式,或者直接使用可选参数的 \meta{键值列表},具体选项见 \pkg*{enumitem} 宏包文档。
+\begin{commands}
+ \command*{setlist}[\sarg\splitoarg{列表类型,级别}\marg{键值列表}]
+ 列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制,这是设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs*{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。
+ \command*{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}]
+ 克隆基本的 \meta{列表类型} 在其基础上新建一个名为 \meta{列表名} 的列表环境。不要将 \meta{最大级别} 设置过大以避免创建过多的计数器和相关宏。
+ \begin{ctexexam}
+ \setlist[1]{labelindent = \parindent}
+ \setlist[itemize,1]{label = $\triangleleft$}
+ \setlist[enumerate]{labelsep = *,leftmargin = 1.5pc}
+ \newlist{steps}{enumerate}{2}
+ \setlist[steps,1,2]{label = (\arabic*)}
+ \end{ctexexam}
+\end{commands}
+
\begin{environments}\noitemsep
\environment*{enumerate}[\oarg{键值列表}]\default{}
\environment*{itemize}[\oarg{键值列表}]\default{}
@@ -855,7 +868,7 @@
\environment{example}\default{}
\environment{remark}\default{}
\environment{proof}
- 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改边框样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名名如下:
+ 这些是预置的定理环境,可使用选项 \module*{thmset/}\option{thmbox} 为它们添加盒子边框,其中注与证明环境不编号,证明末尾会自动添加证明结束符,声明新的定理环境或更改定理盒子样式见小节 \ref{subsec:theorem of style}。环境名与之对应的定理名如下:
\begin{center}
\begin{tabular}{*{8}{c}}
\toprule
@@ -912,7 +925,7 @@
\label{subsec:exercise}
\begin{environments}
\environment{exercise}[\sarg\parg\oarg{键值列表1}\darg{键值列表2}\oarg{键值列表3}]
- 习题环境的标题使用 \cs*{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 \parg{} 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \option{label} 选项失效。\par
+ 习题环境的标题使用 \cs*{tcbox} 行内盒子包装样式,内容则使用 \env*{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 \parg{} 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \option{label} 选项失效。
\meta{键值列表2} 包括 \pkg*{tcolorbox} 的盒子样式选项,例如 \option*{boxsep} 和 \option*{fontupper} 等,也可以使用下述 \option{tcolorbox} 选项。在这里可以使用 \cs{addtcbstyle} 命令设置标题选项 \meta{键值列表2} 的值,第一个参数为 \code{exercise}。
\begin{ctexexam}
@@ -946,8 +959,7 @@
设置习题环境的引用标签,它与标签格式命令 \cs{labelformat} 对应的计数器是 \code{eb@exercise}。
\end{options}
\command{setexerlist}[\marg{键值列表3}]
- \meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。
- \cs{setexerlist} 命令用于设置习题条目选项 \meta{键值列表3} 的值。
+ 命令 \cs{setexerlist} 用于全局设置习题条目选项 \meta{键值列表3} 的值。\meta{键值列表3} 的选项与 \pkg*{enumitem} 的排序列表相同,也可以使用下述 \option{enumitem} 选项,不过第一个选项无法是短编号形式,这被 \option{number} 选项代替。
\command{exerprologue}[\marg{序言内容}]
序言命令 \cs{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。
\command{tcphantomifname}[\marg{编号代码}\marg{不编号代码}]
diff --git a/macros/latex/contrib/ejpecp/README.md b/macros/latex/contrib/ejpecp/README.md
index d30626bca4..f893ab593c 100644
--- a/macros/latex/contrib/ejpecp/README.md
+++ b/macros/latex/contrib/ejpecp/README.md
@@ -6,11 +6,10 @@
mathematical research periodicals "Electronic Journal of Probability" (EJP)
and "Electronic Communications in Probability" (ECP). The websites of these
electronic journals are https://imstat.org/journals-and-publications/electronic-journal-of-probability/
-and https://www.imstat.org/journals-and-publications/electronic-communications-in-probability/
## COPYRIGHT
-- Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+- Copyright (c) 2019-2021 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
- Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania for EJP-ECP
- Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
- Copyright (c) 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
@@ -54,7 +53,7 @@ and https://www.imstat.org/journals-and-publications/electronic-communications-i
`ejpecp` is a LaTeX2e document class designed to be used with a `pdflatex` engine.
`ejpecp` relies on the following packages: `amsmath`, `amsfonts`, `amssymb`, `amsthm`,
-`bera`, `dsfont`, `hyperref`, `geometry`, `graphicx`, `lastpage`, `latexsym`, `mathtools`,
+`bera`, `dsfont`, `hyperref`, `geometry`, `graphicx`, `latexsym`, `mathtools`,
`microtype`, `afterpackage`. It was also successfully tested with the next
generation engine `lualatex`.
@@ -68,6 +67,12 @@ https://github.com/vtex-soft/texsupport.ims-ejpecp
## CHANGELOG
+- 2021/08/17 v1.11.1
+ - Removed dependency on `lastpage` package
+- 2021/04/20 v1.11.0
+ - preprint option added
+- 2021/02/11 v1.10.0
+ - acks environment added and support macro
- 2020/10/21 v1.9.0
- Supplement environment added
- 2020/08/26 v1.8.3
diff --git a/macros/latex/contrib/ejpecp/ejpecp.dtx b/macros/latex/contrib/ejpecp/ejpecp.dtx
index 8e9d67c4e1..663786f537 100644
--- a/macros/latex/contrib/ejpecp/ejpecp.dtx
+++ b/macros/latex/contrib/ejpecp/ejpecp.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+% Copyright (c) 2019-2021 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
% Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania
% Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
% Copyright (c), 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
@@ -26,9 +26,9 @@
%<class>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<class>\ProvidesClass{ejpecp}
%<*class>
- [2020/10/21 v1.9.0 class for EJP and ECP journals]
+ [2021/08/17 v1.11.1 class for EJP and ECP journals]
%</class>
-%<class>\ClassInfo{ejpecp}{Copyright (c) 2019-2020 Edgaras SAKURAS, VTeX, Lithuania.}
+%<class>\ClassInfo{ejpecp}{Copyright (c) 2019-2021 Edgaras SAKURAS, VTeX, Lithuania.}
%<class>\ClassInfo{ejpecp}{Copyright (c) 2018 Deimantas GALCIUS, VTeX, Lithuania.}
%<class>\ClassInfo{ejpecp}{Copyright (c) 2016-2017 Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP.}
%<class>\ClassInfo{ejpecp}{Copyright (c), 2011-2015 BURDZY and CHAFAI for EJP-ECP.}
@@ -47,7 +47,7 @@
%</driver>
% \fi
%
-% \CheckSum{845}
+% \CheckSum{968}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -81,7 +81,10 @@
% \changes{v1.7}{2019/04/04}{merged with production version: fixltx2e removed, natbib setup with afterpackage, etc}
% \changes{v1.8.2}{2020/07/30}{no. prefix updated and msc2020}
% \changes{v1.8.3}{2020/08/26}{Update URLs}
-% \changes{v1.9.0}{2020/10/21}{Supplement envirnment}
+% \changes{v1.9.0}{2020/10/21}{Supplement environment}
+% \changes{v1.10.0}{2021/02/11}{acks and support}
+% \changes{v1.11.0}{2021/04/20}{preprint option}
+% \changes{v1.11.1}{2021/08/17}{removed dependency on lastpage package}
% \GetFileInfo{ejpecp.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -162,6 +165,8 @@
\DeclareOption{final}{%
\PassOptionsToClass{final}{article}
}
+\newif\if@ejpecp@preprint \@ejpecp@preprintfalse
+\DeclareOption{preprint}{\@ejpecp@preprinttrue}
\DeclareOption*{%
\PackageWarning{ejpecp}{Unknown option ‘\CurrentOption’}%
}
@@ -179,7 +184,6 @@
\fi
\RequirePackage{mathtools}
\RequirePackage{microtype}
-\RequirePackage{lastpage}
\RequirePackage{latexsym}
\ifx\@NODS\undefined
\RequirePackage{dsfont}
@@ -211,7 +215,7 @@
\newcommand{\@PAPERNUM}{0}
\newcommand{\@YEAR}{2012}
\newcommand{\@PAGESTART}{1}
-\newcommand{\@PAGEEND}{\pageref{LastPage}} % using lastpage package
+\newcommand{\@PAGEEND}{\@ifundefined{ejpecp@lastpage}{\@PAGESTART}{\ejpecp@lastpage}}
\newcommand{\@SUBMITTED}{FIXME!}
\newcommand{\@ACCEPTED}{FIXME!}
\newcommand{\TITLE}[1]{\renewcommand{\@TITLE}{#1}}
@@ -228,13 +232,18 @@
\newcommand{\PAPERNUM}[1]{\renewcommand{\@PAPERNUM}{#1}}
\newcommand{\YEAR}[1]{\renewcommand{\@YEAR}{#1}}
\newcommand{\PAGESTART}[1]{\renewcommand{\@PAGESTART}{#1}}
-\newcommand{\PAGEEND}[1]{\renewcommand{\@PAGEEND}{#1}}
+\newcommand{\PAGEEND}[1]{%
+ \let\write@ejpecp@lastpage\relax
+ \renewcommand{\@PAGEEND}{#1}%
+ }
\newcommand{\SUBMITTED}[1]{\renewcommand{\@SUBMITTED}{#1}}
\newcommand{\ACCEPTED}[1]{\renewcommand{\@ACCEPTED}{#1}}
\newcommand{\DOI}[1]{\gdef\@DOI{#1}}
\newcommand{\ARXIVID}[1]{\gdef\@ARXIVID{#1}}
\newcommand{\HALID}[1]{\gdef\@HALID{#1}}
\newcommand{\ACKNO}[1]{\noindent\textbf{Acknowledgments.} #1}
+\def\acknowledgementsname{Acknowledgments}
+\newenvironment{acks}[1][\acknowledgementsname]{\noindent\textbf{#1.}\space\ignorespaces}{\par}
\def\EMAIL#1{E-mail:~\texttt{\href{mailto:#1}{\nolinkurl{#1}}}}
\newcommand{\BEMAIL}[1]{\newline\hspace*{1.8em}\EMAIL{#1}} % useful in ftnotes
%% Logos
@@ -293,6 +302,15 @@
\def\@doiprefix{https://doi.org/}
\def\printdoi{\texttt{\href{\@doiprefix\@DOI}{\@doiprefix\@DOI}}}
\def\msc@url{https://ams.org/mathscinet/msc/msc2020.html}
+%% for multiple thanks/support in title
+\def\title@makefnmark{%
+ \setbox\@tempboxa\hbox{\@textsuperscript{\normalfont\@thefnmark}}%
+ \@ifundefined{prev@makefnmark@wd}%
+ {\edef\prev@makefnmark@wd{0pt}}%
+ {\edef\prev@makefnmark@wd{\the\dimexpr\prev@makefnmark@wd+\wd\@tempboxa\relax}}%
+ \rlap{\hskip\prev@makefnmark@wd\unhbox\@tempboxa}%
+ }
+\def\title@thanks#1{\unskip\unkern\orig@thanks{#1}\ignorespaces}%
%% make title long
\renewcommand\title[1]{\gdef\@title{#1}}
%% Macro handling the first page
@@ -300,35 +318,65 @@
\newcommand{\FIRSTPAGE}{%
\setcounter{page}{\@PAGESTART}%
\title{\small
+ \let\orig@thanks\thanks
\ifx\@EJP\undefined\else
- \@EJPLOGO
+ \if@ejpecp@preprint
+ \phantom{\@EJPLOGO}\par
+ \else
+ \@EJPLOGO
+ \fi
\bigskip
- \centerline{\@JOURNALA\ \textbf{\@VOLUME} (\@YEAR),\
- \papernum@name\ \@PAPERNUM, \,\@PAGESTART--\@PAGEEND.}%
- \centerline{ISSN:\ \texttt{\href{\@FULLURL}{\@ISSN}} %
- \ifx\@DOI\undefined\else
- \ \printdoi
- \fi}%
+ \if@ejpecp@preprint
+ \null\null
+ \else
+ \centerline{\@JOURNALA\ \textbf{\@VOLUME} (\@YEAR),\
+ \papernum@name\ \@PAPERNUM, \,\@PAGESTART--\@PAGEEND.}%
+ \centerline{ISSN:\ \texttt{\href{\@FULLURL}{\@ISSN}} %
+ \ifx\@DOI\undefined\else
+ \ \printdoi
+ \fi}%
+ \fi
\bigskip
\bigskip
- {\Large\bfseries\@TITLE\par}%
+ \bgroup
+ \@ifundefined{no@title@thanks@support}{%
+ \let\thanks\title@thanks
+ \let\@makefnmark\title@makefnmark
+ \let\support\thanks
+ }{}%
+ \Large\bfseries\@TITLE\par
+ \egroup
\fi
\ifx\@ECP\undefined
\else
\parbox[t]{9cm}{%
- \@JOURNALA\ \textbf{\@VOLUME} (\@YEAR),
- \papernum@name\ \@PAPERNUM, \@PAGESTART--\@PAGEEND.\\
- \ifx\@DOI\undefined
- \else
- \ \printdoi
- \fi \\
- ISSN:\ \texttt{\href{\@FULLURL}{\@ISSN}}%
+ \if@ejpecp@preprint
+ \else
+ \@JOURNALA\ \textbf{\@VOLUME} (\@YEAR),
+ \papernum@name\ \@PAPERNUM, \@PAGESTART--\@PAGEEND.\\
+ \ifx\@DOI\undefined
+ \else
+ \ \printdoi
+ \fi \\
+ ISSN:\ \texttt{\href{\@FULLURL}{\@ISSN}}%
+ \fi
}%
\hfill
- \@ECPLOGO\\
+ \if@ejpecp@preprint
+ \phantom{\@ECPLOGO}%
+ \else
+ \@ECPLOGO
+ \fi\\
\bigskip
\bigskip
- {\Large\@TITLE\par}%
+ \bgroup
+ \@ifundefined{no@title@thanks@support}{%
+ \let\thanks\title@thanks
+ \let\@makefnmark\title@makefnmark
+ \let\support\thanks
+ }{}%
+ \Large\@TITLE\par
+ \egroup
\fi
}% end title
\date{%
@@ -351,9 +399,13 @@
\noindent
Primary \@AMSSUBJ, Secondary \@AMSSUBJSECONDARY.\par
\fi
- \noindent
- Submitted to \@JOURNAL\ on \@SUBMITTED,
- final version accepted on \@ACCEPTED.\par
+ \if@ejpecp@preprint
+ \mbox{}\par
+ \else
+ \noindent
+ Submitted to \@JOURNAL\ on \@SUBMITTED,
+ final version accepted on \@ACCEPTED.\par
+ \fi
\ifx\@ARXIVID\undefined
\else
\noindent
@@ -374,13 +426,16 @@
}%END-FIRSTPAGE
%% Macro setting the PDF title
\newcommand{\PDFFIELDS}{%
- \hypersetup{%
- pdftitle={\@JOURNALA\ \@VOLUME\ (\@YEAR), \papernum@name\ \@PAPERNUM, \@doiprefix\@DOI}}%
+ \if@ejpecp@preprint
+ \else
+ \hypersetup{%
+ pdftitle={\@JOURNALA\ \@VOLUME\ (\@YEAR), \papernum@name\ \@PAPERNUM, \@doiprefix\@DOI}}%
+ \hypersetup{pdfproducer={\@JOURNAL\ Managing Editor https://\@URL}}%
+ \hypersetup{pdfauthor={Please see \@doiprefix\@DOI}}%
+ \fi
\hypersetup{pdfkeywords={\@KEYWORDS}}%
- \hypersetup{pdfproducer={\@JOURNAL\ Managing Editor https://\@URL}}%
- \hypersetup{pdfcreator={LaTeX with ejpecp.cls v1.8.2}}%
+ \hypersetup{pdfcreator={LaTeX with ejpecp.cls \@nameuse{ver@ejpecp.cls}}}%
\hypersetup{pdfsubject={Probability Theory}}%
- \hypersetup{pdfauthor={Please see \@doiprefix\@DOI}}%
}%END-PDFFIELDS
%% Supplement
@@ -505,13 +560,16 @@
\let\mathbb=\mathds
\fi
%% Headings
+\def\write@ejpecp@lastpage{\immediate\write\@auxout{\string\xdef\string\ejpecp@lastpage{\the\c@page}}}
\newcommand{\@HBLOB}{%
\href{\@doiprefix\@DOI}%
{\@JOURNAL\ \textbf{\@VOLUME}\, (\@YEAR),\ paper \@PAPERNUM.}}
\renewcommand{\@evenfoot}{%
- \normalfont\footnotesize\@HBLOB\hfil
- \small\raisebox{-1em}{Page \thepage/\@PAGEEND}\hfil
- \footnotesize\href{\@FULLURL}{https://\@URL}}
+ \normalfont\footnotesize\if@ejpecp@preprint\mbox{}\else\@HBLOB\fi\hfil
+ \small
+ \write@ejpecp@lastpage
+ \raisebox{-1em}{Page \thepage/\@PAGEEND}\hfil
+ \footnotesize\if@ejpecp@preprint\mbox{}\else\href{\@FULLURL}{https://\@URL}\fi}
\renewcommand{\@oddfoot}{\@evenfoot}
\renewcommand{\@evenhead}{\hfil\@SHORTTITLE\hfil}
\renewcommand{\@oddhead}{\@evenhead}
diff --git a/macros/latex/contrib/ejpecp/ejpecp.ins b/macros/latex/contrib/ejpecp/ejpecp.ins
index 43a1cf1c3b..9ceb307343 100644
--- a/macros/latex/contrib/ejpecp/ejpecp.ins
+++ b/macros/latex/contrib/ejpecp/ejpecp.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+%% Copyright (c) 2019-2021 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
%% Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania for EJP-ECP
%% Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
%% Copyright (c), 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
@@ -24,7 +24,7 @@
This is a generated file.
-Copyright (c) 2019-2020 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
+Copyright (c) 2019-2021 by Edgaras SAKURAS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2018 by Deimantas GALCIUS, VTeX, Lithuania for EJP-ECP
Copyright (c) 2016-2017 by Eimantas GUMBAKIS, VTeX, Lithuania for EJP-ECP
Copyright (c), 2011-2015 by Krzysztof BURDZY and Djalil CHAFAI for EJP-ECP
diff --git a/macros/latex/contrib/ejpecp/ejpecp.pdf b/macros/latex/contrib/ejpecp/ejpecp.pdf
index 290f565d11..f55a7f9df9 100644
--- a/macros/latex/contrib/ejpecp/ejpecp.pdf
+++ b/macros/latex/contrib/ejpecp/ejpecp.pdf
Binary files differ
diff --git a/macros/latex/contrib/ejpecp/sample.pdf b/macros/latex/contrib/ejpecp/sample.pdf
index aa47175278..f6e975a52f 100644
--- a/macros/latex/contrib/ejpecp/sample.pdf
+++ b/macros/latex/contrib/ejpecp/sample.pdf
Binary files differ
diff --git a/macros/latex/contrib/ejpecp/sample.tex b/macros/latex/contrib/ejpecp/sample.tex
index fed48e097e..8061c4f8fe 100644
--- a/macros/latex/contrib/ejpecp/sample.tex
+++ b/macros/latex/contrib/ejpecp/sample.tex
@@ -22,6 +22,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[ECP]{ejpecp} % replace ECP by EJP if needed.
+% add preprint option to remove journal information and logos
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
@@ -52,7 +53,7 @@
\SHORTTITLE{Introduction to the \emph{ejpecp} Class}
-\TITLE{Introduction to the \emph{ejpecp} Class Version 1.7\thanks{Supported
+\TITLE{Introduction to the \emph{ejpecp} Class Version 1.11.1\support{Supported
by the Institute of Mathematical Statistics (IMS) and the Bernoulli
Society.}\
\thanks{Current maintainer of class file is
@@ -198,7 +199,7 @@ The \emph{ejpecp} document class loads automatically the following packages:
\begin{center}
\ttfamily
amsmath, amsthm, amsfonts, amssymb, bera, dsfont, \\
- hyperref, geometry, graphicx, lastpage, latexsym, \\
+ hyperref, geometry, graphicx, latexsym, \\
mathtools, microtype, afterpackage.
\end{center}
It is thus not necessary to add \verb+\usepackage+ load commands for
@@ -518,8 +519,9 @@ identifier. It is acceptable to leave arXiv links in the bibliography
%% You may add acknowledgments (optional). %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-\ACKNO{We are grateful to Martin Hairer who provided a nice \texttt{MR} macro and to S\'ebastien Gou\"ezel for his useful comments on the internals of the class file.}
+\begin{acks}
+We are grateful to Martin Hairer who provided a nice \texttt{MR} macro and to S\'ebastien Gou\"ezel for his useful comments on the internals of the class file.
+\end{acks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
index ac7811c2cf..db10c276d5 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
index 2e0e84a54c..67f16164a8 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
index 83efca0ee5..18ae26be58 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
+++ b/macros/latex/contrib/projlib/ProjLib-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/projlib/ProjLib-doc.dtx b/macros/latex/contrib/projlib/ProjLib-doc.dtx
index 8c54844a7f..ac30792c0f 100644
--- a/macros/latex/contrib/projlib/ProjLib-doc.dtx
+++ b/macros/latex/contrib/projlib/ProjLib-doc.dtx
@@ -15,7 +15,7 @@
\ProvidesFile{ProjLib-doc.dtx}
%</driver>
%
-\documentclass[English,Chinese,French,allowbf,puretext]{lebhart}
+\documentclass[allowbf,puretext]{lebhart}
%%================================
%% Import toolkit
@@ -107,7 +107,7 @@
%<*ProjLib-doc-cn>
\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
-\thanks{对应版本.~~\texttt{\ProjLib{}~2021/08/11}}
+\thanks{对应版本.~~\texttt{\ProjLib{}~2021/08/17}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{2021年8月,北京}
%</ProjLib-doc-cn>
@@ -115,7 +115,7 @@
%<*ProjLib-doc-en>
\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen XU}
-\thanks{Corresponding to: \texttt{\ProjLib{}~2021/08/11}}
+\thanks{Corresponding to: \texttt{\ProjLib{}~2021/08/17}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{August 2021, Beijing}
%</ProjLib-doc-en>
@@ -123,7 +123,7 @@
%<*ProjLib-doc-fr>
\title{La boîte à outils~\,\ProjLib{}\\[.3\baselineskip]\normalsize Manuel d'utilisation}
\author{Jinwen XU}
-\thanks{Correspondant à : \texttt{\ProjLib{}~2021/08/11}}
+\thanks{Correspondant à : \texttt{\ProjLib{}~2021/08/17}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{Août 2021, à Pékin}
%</ProjLib-doc-fr>
@@ -221,7 +221,7 @@ La boîte à outils \ProjLib{} est composée du package principal \ProjLibPackag
加载 \ProjLib{} 工具箱十分容易,只需要在导言部分加入这一行即可:
\begin{code}
- \usepackage{ProjLib}
+\usepackage{ProjLib}
\end{code}
\begin{tip}[注意事项]
@@ -237,7 +237,7 @@ La boîte à outils \ProjLib{} est composée du package principal \ProjLibPackag
Just add the following line to your preamble:
\begin{code}
- \usepackage{ProjLib}
+\usepackage{ProjLib}
\end{code}
\begin{tip}[Attention]
@@ -253,7 +253,7 @@ Just add the following line to your preamble:
Ajoutez simplement la ligne suivante à votre préambule :
\begin{code}
- \usepackage{ProjLib}
+\usepackage{ProjLib}
\end{code}
\begin{tip}[Attention]
@@ -708,13 +708,13 @@ De plus, il existe également certaines options des composants qui doivent être
\PJLauthor{} 提供了 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 命令,并且允许输入多组用户信息。标准的输入方式是这样的:
\begin{code}
- \author{(*\meta{author 1}*)}
- \address{(*\meta{address 1}*)}
- \email{(*\meta{email 1}*)}
- \author{(*\meta{author 2}*)}
- \address{(*\meta{address 2}*)}
- \email{(*\meta{email 2}*)}
- ...
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
\end{code}
其中 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 的相互顺序是不重要的。
@@ -736,13 +736,13 @@ De plus, il existe également certaines options des composants qui doivent être
\PJLauthor{} offers \lstinline|\address|, \lstinline|\curraddr| and \lstinline|\email|, and allows you to enter multiple groups of author information. The standard usage is like this:
\begin{code}
- \author{(*\meta{author 1}*)}
- \address{(*\meta{address 1}*)}
- \email{(*\meta{email 1}*)}
- \author{(*\meta{author 2}*)}
- \address{(*\meta{address 2}*)}
- \email{(*\meta{email 2}*)}
- ...
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
\end{code}
The mutual order of \lstinline|\address|, \lstinline|\curraddr| and \lstinline|\email| is not important.
@@ -764,13 +764,13 @@ In addition, you can use the option \texttt{amsfashion} to enable the \AmS{} fas
\PJLauthor{} propose les macros \lstinline|\address|, \lstinline|\curraddr| et \lstinline|\email|, et vous permet de saisir plusieurs groupes d'informations sur l'auteur. L'utilisation standard est comme ceci :
\begin{code}
- \author{(*\meta{author 1}*)}
- \address{(*\meta{address 1}*)}
- \email{(*\meta{email 1}*)}
- \author{(*\meta{author 2}*)}
- \address{(*\meta{address 2}*)}
- \email{(*\meta{email 2}*)}
- ...
+\author{(*\meta{author 1}*)}
+\address{(*\meta{address 1}*)}
+\email{(*\meta{email 1}*)}
+\author{(*\meta{author 2}*)}
+\address{(*\meta{address 2}*)}
+\email{(*\meta{email 2}*)}
+...
\end{code}
L'ordre mutuel de \lstinline|\address|, \lstinline|\curraddr| et \lstinline|\email| n'est pas important.
@@ -861,7 +861,7 @@ De plus, vous pouvez utiliser l'option \texttt{amsfashion} pour écrire à la ma
The language can be selected by the following macros:
\begin{itemize}
- \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding setting of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English" is selected by default.
+ \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding settings of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English" is selected by default.
\item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, which uses the specified language settings to typeset \meta{content}. Compared with \lstinline|\UseLanguage|, it will not modify the line spacing, so line spacing would remain stable when CJK and Western texts are mixed.
\end{itemize}
@@ -979,27 +979,47 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\end{tip}
\medskip
-% 若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称 \lstinline|\|\meta{name of environment}\meta{language abbr},其中 \meta{language abbr} 是语言的简写,分别为:
-% \begin{longtable}{ll|ll}
-% \texttt{CN} & 简体中文 & \texttt{DE} & 德文\\
-% \texttt{TC} & 繁体中文 & \texttt{JP} & 日文\\
-% \texttt{EN} & 英文 & \texttt{RU} & 俄文\\
-% \texttt{FR} & 法文 & &\\
-% \end{longtable}
-
-% \begin{tip}
-% 如果要定义名称后带有星号 \lstinline|*| 的环境,那么在上面的 \meta{name of environment} 中不用写星号。
-% \end{tip}
-若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
-\vspace{-.15\baselineskip}%
+若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称。有两种方式:
\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+ \item 简易设置:\lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+ \begin{itemize}
+ \item 这种方式只设置单独的显示名称,智能引用等名称与之取为相同(特别地,以这种方式设置时智能引用名称将不区分单复数)。当不指定 \meta{language name}时,会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}| 与 \lstinline|\NameTheorem{envname}| 效果相同。
+ \end{itemize}
+ \item 详细设置(推荐):
+\begin{code}
+\NameTheorem{(*\meta{name of environment}*)}{
+ (*\meta{language name 1}*)={
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+ },
+ (*\meta{language name 2}*)={...},
+}
+\end{code}
+或
+\begin{code}
+\NameTheorem[(*\meta{language name}*)]{(*\meta{name of environment}*)}{
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+}
+\end{code}
+ \begin{itemize}
+ \item 这种方式可以具体设置各个名称。当不指定 \meta{language name}时,将允许使用完整界面;在指定语言时则只设定相应语言。同样,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}| 与 \lstinline|\NameTheorem{envname}| 效果相同。
+ \end{itemize}
\end{itemize}
-\vspace{-.15\baselineskip}%
-其中,\meta{language name} 可参阅关于 \PJLlang{} 的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
-\bigskip
-然后用下面五种方式之一定义这一环境:
+\begin{tip}
+ 除此以外,你也可以在定义相应的定理类环境时为之命名,可以参见后文对 \lstinline|\CreateTheorem| 的说明。
+\end{tip}
+
+\clearpage
+% \bigskip
+然后,用下面五种方式之一定义这一环境:
\begin{itemize}
\item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
\begin{itemize}
@@ -1033,6 +1053,21 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
\end{tip}
+\bigskip
+你也可以在定义定理类环境的同时为之命名,只需要在之后再加入一组括号进行设置:
+\begin{code}
+\CreateTheorem{(*\meta{name of environment}*)}{
+ (*\meta{language name 1}*)={
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+ },
+ (*\meta{language name 2}*)={...},
+}
+\end{code}
+
% \def\proofideanameCN{思路}
\NameTheorem[CN]{proofidea}{思路}
\CreateTheorem*{proofidea*}
@@ -1041,11 +1076,10 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\bigskip
下面提供一个例子。这三行代码:
\begin{code}
- \NameTheorem[CN]{proofidea}{思路}
- \CreateTheorem*{proofidea*}
- \CreateTheorem{proofidea}<subsection>
+\NameTheorem[CN]{proofidea}{思路}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
\end{code}
-\clearpage\noindent
可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示 (具体样式与所在的文档类有关) :
\begin{proofidea*}
@@ -1055,6 +1089,31 @@ Par exemple, \lstinline|\AddLanguageSetting(German){\color{orange}}| peut rendre
\begin{proofidea}
\lstinline|proofidea| 环境。
\end{proofidea}
+
+\medskip
+当然,你也可以使用更加精细的名称:
+\begin{code}
+\NameTheorem{proofidea}{
+ CN = {
+ name = 思路,
+ crefname = {思路}{思路},
+ Crefname = {思路}{思路},
+ }
+}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
+\end{code}
+或者在定义时设置名称(对于 \lstinline|proofidea*| 与 \lstinline|proofidea| 只需要设置一次即可):
+\begin{code}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>{
+ CN = {
+ name = 思路,
+ crefname = {思路}{思路},
+ Crefname = {思路}{思路},
+ }
+}
+\end{code}
%</ProjLib-doc-cn>
%
%<*ProjLib-doc-en>
@@ -1089,26 +1148,45 @@ Preset environments include: \texttt{assumption}, \texttt{axiom}, \texttt{conjec
\begin{tip}
When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
\end{tip}
-%
-% If you need to define a new theorem-like environment, you must first define the name of the environment in the language used: \lstinline|\|\meta{name of environment}\meta{language abbr}, where \meta{language abbr} is the abbreviation of language, which can be:
-% % \vspace{-.5\baselineskip}
-% \begin{longtable}{ll|ll}
-% \texttt{CN} & Simplified Chinese & \texttt{DE} & German\\
-% \texttt{TC} & Traditional Chinese & \texttt{JP} & Japanese\\
-% \texttt{EN} & English & \texttt{RU} & Russian\\
-% \texttt{FR} & French & &\\
-% \end{longtable}
-
-% \begin{tip}
-% If you want to define an environment with an asterisk \lstinline|*| after the name, you don't need to write an asterisk in the \meta{name of environment} above. See the example below.
-% \end{tip}
\bigskip
-If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use:
+If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use. There are two ways for this:
\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+ \item Simple settings: \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+ \begin{itemize}
+ \item This approach only sets one main name, the other names, such as those used for clever reference, are set to be the same (in particular, for clever reference, the singular and plural form will not be distinguished). When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}| has the same effect as \lstinline|\NameTheorem{envname}| .
+ \end{itemize}
+ \item Detailed settings (recommended):
+\begin{code}
+\NameTheorem{(*\meta{name of environment}*)}{
+ (*\meta{language name 1}*)={
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+ },
+ (*\meta{language name 2}*)={...},
+}
+\end{code}
+or
+\begin{code}
+\NameTheorem[(*\meta{language name}*)]{(*\meta{name of environment}*)}{
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+}
+\end{code}
+ \begin{itemize}
+ \item This approach sets all the names. When \meta{language name} is not specified, the full interface will be enabled; when it is specified, only the names of the corresponding language are set. Similarly, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}| has the same effect as \lstinline|\NameTheorem{envname}| .
+ \end{itemize}
\end{itemize}
-For \meta{language name}, please refer to the section on \PJLlang{}. When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}{...}| has the same effect as \lstinline|\NameTheorem{envname}{...}| .
+
+\begin{tip}
+ In addition, you can also name a theorem-like environment while defining it, see the description of \lstinline|\CreateTheorem| later.
+\end{tip}
And then define this environment in one of following five ways:
\vspace{-.3\baselineskip}
@@ -1145,7 +1223,21 @@ And then define this environment in one of following five ways:
This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
\end{tip}
-% \def\proofideanameEN{Idea}
+\bigskip
+You can also name a theorem-like environment while defining it, by adding afterwards a group of parentheses containing the settings:
+\begin{code}
+\CreateTheorem{(*\meta{name of environment}*)}{
+ (*\meta{language name 1}*)={
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+ },
+ (*\meta{language name 2}*)={...},
+}
+\end{code}
+
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
@@ -1153,9 +1245,9 @@ And then define this environment in one of following five ways:
\bigskip
Here is an example. The following code:
\begin{code}
- \NameTheorem[EN]{proofidea}{Idea}
- \CreateTheorem*{proofidea*}
- \CreateTheorem{proofidea}<subsection>
+\NameTheorem[EN]{proofidea}{Idea}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
\end{code}
defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context. The effect is as follows (the actual style is related to the document class):
@@ -1166,6 +1258,31 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm
\begin{proofidea}
The \lstinline|proofidea| environment.
\end{proofidea}
+
+\medskip
+Of course, you can also use a set of more detailed name:
+\begin{code}
+\NameTheorem{proofidea}{
+ EN = {
+ name = Idea,
+ crefname = {idea}{ideas},
+ Crefname = {Idea}{Ideas},
+ }
+}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
+\end{code}
+or set the names while defining them (for \lstinline|proofidea*| and \lstinline|proofidea|, set once suffices):
+\begin{code}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>{
+ EN = {
+ name = Idea,
+ crefname = {idea}{ideas},
+ Crefname = {Idea}{Ideas},
+ }
+}
+\end{code}
%</ProjLib-doc-en>
%
%<*ProjLib-doc-fr>
@@ -1202,11 +1319,43 @@ Les environnements prédéfinis incluent : \texttt{assumption}, \texttt{axiom},
\end{tip}
\medskip
-Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser :
+Si vous avez besoin de définir un nouvel environnement de type théorème, vous devez d'abord définir le nom de l'environnement dans le langage à utiliser. Il y a deux façons pour cela:
\begin{itemize}
- \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+ \item Paramètres simples : \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+ \begin{itemize}
+ \item Cette approche ne définit qu'un seul nom principal. Les autres noms, tels que ceux utilisés pour référence intelligente, sont définis pour être identiques (en particulier, pour référence intelligente, les noms singulier et pluriel ne seront pas distingués). Lorsque \meta{language name} n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc, \lstinline|\NameTheorem{envname*}| a le même effet que \lstinline|\NameTheorem{envname}| .
+ \end{itemize}
+ \item Paramètres détaillés (recommandés) :
+\begin{code}
+\NameTheorem{(*\meta{name of environment}*)}{
+ (*\meta{language name 1}*)={
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+ },
+ (*\meta{language name 2}*)={...},
+}
+\end{code}
+ou
+\begin{code}
+\NameTheorem[(*\meta{language name}*)]{(*\meta{name of environment}*)}{
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+}
+\end{code}
+ \begin{itemize}
+ \item Cette approche définit tous les noms. Lorsque \meta{language name} n'est pas spécifié, l'interface complète sera activée ; lorsqu'il est spécifié, seuls les noms de la langue correspondante sont définis. De même, les environnements avec ou sans astérisque partagent le même nom, donc \lstinline|\NameTheorem{envname*}| a le même effet que \lstinline|\NameTheorem{envname}| .
+ \end{itemize}
\end{itemize}
-Pour \meta{language name}, veuillez vous référer à la section sur \PJLlang{}. Lorsque \meta{language name} n'est pas spécifié, le nom sera défini pour toutes les langues prises en charge. De plus, les environnements avec ou sans astérisque partagent le même nom, donc, \lstinline|\NameTheorem{envname*}{...}| a le même effet que \lstinline|\NameTheorem{envname}{...}| .
+
+\begin{tip}
+ De plus, vous pouvez également nommer un environnement de type théorème tout en le définissant, voir la description de \lstinline|\CreateTheorem| plus tard.
+\end{tip}
Ensuite, créez cet environnement de l'une des cinq manières suivantes :
\vspace{-.3\baselineskip}
@@ -1243,6 +1392,21 @@ Ensuite, créez cet environnement de l'une des cinq manières suivantes :
Cette macro utilise la fonctionnalité de \textsf{amsthm} en interne, donc le traditionnel \texttt{theoremstyle} lui est également applicable. Il suffit de déclarer le style avant les définitions pertinentes.
\end{tip}
+\bigskip
+Vous pouvez également nommer un environnement de type théorème lors de sa définition, en ajoutant ensuite un groupe de parenthèses contenant les paramètres :
+\begin{code}
+\CreateTheorem{(*\meta{name of environment}*)}{
+ (*\meta{language name 1}*)={
+ name=(*\meta{Name}*),
+ crefname={(*\meta{name}*)}{(*\meta{names}*)},
+ Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
+ autorefname=(*\meta{name}*),
+ theoremheading=(*\meta{Name}*),
+ },
+ (*\meta{language name 2}*)={...},
+}
+\end{code}
+
\NameTheorem[FR]{proofidea}{Idée}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
@@ -1250,9 +1414,9 @@ Ensuite, créez cet environnement de l'une des cinq manières suivantes :
\bigskip
Voici un exemple. Le code suivant :
\begin{code}
- \NameTheorem[FR]{proofidea}{Idée}
- \CreateTheorem*{proofidea*}
- \CreateTheorem{proofidea}<subsection>
+\NameTheorem[FR]{proofidea}{Idée}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
\end{code}
définit un environnement non numéroté \lstinline|proofidea*| et un environnement numéroté \lstinline|proofidea| (numérotés dans la sous-section) respectivement. Ils peuvent être utilisés dans le contexte français. L'effet est le suivant (le style réel est lié à votre classe de document) :
@@ -1263,11 +1427,36 @@ définit un environnement non numéroté \lstinline|proofidea*| et un environnem
\begin{proofidea}
La environnement \lstinline|proofidea| .
\end{proofidea}
+
+\medskip
+Bien sûr, vous pouvez également utiliser un ensemble de nom plus détaillé :
+\begin{code}
+\NameTheorem{proofidea}{
+ FR = {
+ name = Idée,
+ crefname = {idée}{idées},
+ Crefname = {Idée}{Idées},
+ }
+}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>
+\end{code}
+ou définissez les noms en les définissant (pour \lstinline|proofidea*| et \lstinline|proofidea|, définir une fois suffit) :
+\begin{code}
+\CreateTheorem*{proofidea*}
+\CreateTheorem{proofidea}<subsection>{
+ FR = {
+ name = Idée,
+ crefname = {idée}{idées},
+ Crefname = {Idée}{Idées},
+ }
+}
+\end{code}
%</ProjLib-doc-fr>
-\bigskip
+\clearpage
%<*ProjLib-doc-cn>
\subsection{次要功能}
diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx
index 930ff18847..7199d00910 100644
--- a/macros/latex/contrib/projlib/ProjLib.dtx
+++ b/macros/latex/contrib/projlib/ProjLib.dtx
@@ -18,47 +18,47 @@
%
%<*ProjLib>
\ProvidesPackage{ProjLib}
- [2021/08/11 The collective interface of ProjLib toolkit]
+ [2021/08/17 The collective interface of ProjLib toolkit]
%</ProjLib>
%
%<*PJLauthor>
\ProvidesPackage{PJLauthor}
- [2021/08/11 Enhanced author information block]
+ [2021/08/17 Enhanced author information block]
%</PJLauthor>
%
%<*PJLdate>
\ProvidesPackage{PJLdate}
- [2021/08/11 Convert yyyy-mm-dd to normal datetime format]
+ [2021/08/17 Convert yyyy-mm-dd to normal datetime format]
%</PJLdate>
%
%<*PJLdraft>
\ProvidesPackage{PJLdraft}
- [2021/08/11 Some useful macros for the draft stage]
+ [2021/08/17 Some useful macros for the draft stage]
%</PJLdraft>
%
%<*PJLlang>
\ProvidesPackage{PJLlang}
- [2021/08/11 Multi-language configuration]
+ [2021/08/17 Multi-language configuration]
%</PJLlang>
%
%<*PJLlogo>
\ProvidesPackage{PJLlogo}
- [2021/08/11 The ProjLib logo]
+ [2021/08/17 The ProjLib logo]
%</PJLlogo>
%
%<*PJLmath>
\ProvidesPackage{PJLmath}
- [2021/08/11 Useful math macros and shortcuts]
+ [2021/08/17 Useful math macros and shortcuts]
%</PJLmath>
%
%<*PJLpaper>
\ProvidesPackage{PJLpaper}
- [2021/08/11 Paper style configuration]
+ [2021/08/17 Paper style configuration]
%</PJLpaper>
%
%<*PJLthm>
\ProvidesPackage{PJLthm}
- [2021/08/11 Theorem setup and configuration]
+ [2021/08/17 Theorem setup and configuration]
%</PJLthm>
%
%# 下面两行引入宏包的代码是所有文件共用的。
@@ -1409,33 +1409,39 @@
%# 用于命名定理类环境的用户命令
%# Macro for naming theorems
+\RequirePackage{xstring}
\NewDocumentCommand{\NameTheorem}{omm}{%
\protected@edef\PJLthm@temp{#2}%
\expandafter\IfEndWith\expandafter{\PJLthm@temp}{*}{%
\expandafter\StrGobbleRight\expandafter{\PJLthm@temp}{1}[\PJLthm@temp]%
}{}%
- \IfValueTF{#1}{%
- \expandafter\def\expandafter\PJL@temp@abbr\expandafter%
- {\expandafter\StrToABBR\expandafter{#1}}%
- \expandafter\def\csname\PJLthm@temp name\PJL@temp@abbr\endcsname{#3}%
- }{%
- \expandafter\def\csname\PJLthm@temp nameEN\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameFR\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameDE\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameIT\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp namePT\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameBR\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameES\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameCN\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameTC\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameJP\endcsname{#3}%
- \expandafter\def\csname\PJLthm@temp nameRU\endcsname{#3}%
+ \IfSubStr{#3}{=}{% key-value mode
+ \IfValueTF{#1}{%
+ \CreateTheoremSetKeys{\PJLthm@temp}{#1={#3}}%
+ }{%
+ \CreateTheoremSetKeys{\PJLthm@temp}{#3}%
+ }%
+ }{% simple mode
+ \IfValueTF{#1}{%
+ \expandafter\def\csname\PJLthm@temp name\StrToABBR{#1}\endcsname{#3}%
+ }{%
+ \expandafter\def\csname\PJLthm@temp nameEN\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameFR\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameDE\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameIT\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp namePT\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameBR\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameES\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameCN\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameTC\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameJP\endcsname{#3}%
+ \expandafter\def\csname\PJLthm@temp nameRU\endcsname{#3}%
+ }%
}%
}
%# 用于创建定理类环境的用户命令
%# Macro for creating theorems
-\RequirePackage{xstring}
\newcommand\PassFirstToSecond[2]{#2{#1}}%
\NewDocumentCommand{\CreateTheorem}{sm}{%
\begingroup
@@ -1450,13 +1456,14 @@
\expandafter{\PJLthm@temp}{\endgroup\InnerCreateTheorem{#1}}}%
}%
\if@PJLthm@regionalref
-\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{%
+\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()g}{%
% #1 = star or no star
% #2 = name of environment
% #3 = emptiness or star to append to name of environment
% #4 = numbered like
% #5 = numbered within
% #6 = existed environment
+% #7 = key-value configuration of names
\IfBooleanTF{#1}{%
\IfValueTF{#4}
{\@firstoftwo}
@@ -1510,9 +1517,12 @@
}%
}%
}%
+ \IfValueTF{#7}{%
+ \CreateTheoremSetKeys{#2}{#7}%
+ }{}%
}%
\else
-\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{%
+\NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()g}{%
% #1 = Tokens denoting an xparse-boolean value;
% value "true" -> the call was \CreateTheorem*{...}...
% value "false" -> the call was \CreateTheorem{...}...
@@ -1532,6 +1542,7 @@
% to the environment's counter and whose stepping resets
% the environment's counter.
% #6 = existed environment name (the environment to copy)
+% #7 = key-value configuration of names
\IfBooleanTF{#1}{%
\IfValueTF{#4}
{\@firstoftwo}
@@ -1619,6 +1630,9 @@
{\csname end#2\csname\languagename ABBR\endcsname#3\endcsname}%
}%
}%
+ \IfValueTF{#7}{%
+ \CreateTheoremSetKeys{#2}{#7}%
+ }{}%
}%
\NewDocumentCommand{\CreateTheoremNumberedLikeAliasCounter}{mmm}{%
\newaliascnt{#1#2#3}{#1#3}%
@@ -1644,6 +1658,84 @@
}%
\fi
+% See https://tex.stackexchange.com/a/610604
+\ExplSyntaxOn
+
+% Helper-macros/scratch-macros
+%-----------------------------
+\cs_new:Nn \PJLthm_exchange_i_iii_ii:nnn { #1 {#3} {#2} }
+\cs_new:Nn \__PJLthm_languageprefix: {}
+\cs_new:Nn \__PJLthm_countername: {}
+
+% Message-management:
+%--------------------
+\msg_new:nnnn {PJLthm}
+ {Undefined Language Dependent Specification Class}
+ {\token_to_str:N \CreateTheorem :\ Value\ `\tl_to_str:n{#2}'\ for\ invalid\ key\ `#1'.}
+ {Providing\ Language-dependent\ specifications\ for\ element\ `#1'\ is\ currently\ not\ implemented.}
+
+% Nested key=value-interface by means of package l3keys:
+%-------------------------------------------------------
+% (l3keys is similar to pgfkeys.)
+% The outer level of key=value-specifications, i.e., <language-ID>={...},
+% is processed via \keyval_parse:nnn which was added tpo expl3 in 2020/12/19.
+% The inner level of key=value-specifications,
+% i.e., the single keys whose values are to be specified dependant on the language,
+% i.e., the "..."-content of the outer lever's {...},
+% is processed via \keys_set:nn .
+% The keys for the inner level are defined via \keys_define:nn .
+
+\NewDocumentCommand \CreateTheoremSetKeys { mm } {
+ % #1 = name of counter
+ % #2 = keyval-list of language-specifications
+ \cs_set:Nn \__PJLthm_countername: {#1}
+ \keyval_parse:nnn { \PJLthm_exchange_i_iii_ii:nnn { \PJLthm_setlanguagespecificparameters:nn } {} }
+ { \PJLthm_setlanguagespecificparameters:nn }
+ { #2 }
+}
+
+\cs_new_protected:Nn \PJLthm_setlanguagespecificparameters:nn {
+ % #1 = language-prefix
+ % #2 = key-val-list for language whose prefix is language-prefix
+ \cs_set:Nx \__PJLthm_languageprefix: {\StrToABBR{#1}}
+ \exp_args:No \tl_if_empty:nTF {\__PJLthm_languageprefix:}
+ { \msg_error:nn { PJLthm }
+ { No language \exp_not:n{#1} defined }
+ }%
+ {%
+ \newaliascnt {\__PJLthm_countername: \__PJLthm_languageprefix:} {\__PJLthm_countername:}%
+ \aliascntresetthe {\__PJLthm_countername: \__PJLthm_languageprefix:}%
+ \keys_set:nn { PJLthm } { #2 }
+ }%
+}%
+\keys_define:nn { PJLthm } {
+ crefname.code:n = \cs_if_exist:NTF \crefname {
+ \exp_args:Nx \crefname {\__PJLthm_countername: \__PJLthm_languageprefix: }#1
+ }{},
+ crefname.value_required:n = true,
+ Crefname.code:n = \cs_if_exist:NTF \Crefname {
+ \exp_args:Nx \Crefname {\__PJLthm_countername: \__PJLthm_languageprefix: }#1
+ }{},
+ Crefname.value_required:n = true,
+ name.code:n = \exp_args:Nx \cs_set:cpn {\__PJLthm_countername: name \__PJLthm_languageprefix:} {#1},
+ name.value_required:n = true,
+ autorefname.code:n = \exp_args:Nx \cs_set:cpn {\__PJLthm_countername: \__PJLthm_languageprefix: autorefname} {#1},
+ autorefname.value_required:n = true,
+ theoremheading.code:n= \exp_args:Nx \cs_set:cpn {\__PJLthm_countername: \__PJLthm_languageprefix: heading} {#1},
+ theoremheading.value_required:n = true,
+ the.code:n= \exp_args:Nx \cs_set:cpn {the \__PJLthm_countername: \__PJLthm_languageprefix: } {#1},
+ the.value_required:n = true,
+ %
+ % Define keys for more Language Dependent Specification Classes.
+ %
+ unknown.code:n = \msg_error:nnxx {PJLthm}
+ {Undefined Language Dependent Specification Class}
+ {\exp_args:No \exp_not:n \l_keys_key_str}
+ {\exp_not:n{#1}},
+}
+
+\ExplSyntaxOff
+
%# 英文定理名称
%# English theorems names
\def\theoremnameEN{{Theorem}}
diff --git a/macros/latex/contrib/zref-check/CHANGELOG.md b/macros/latex/contrib/zref-check/CHANGELOG.md
index debf07cafc..130aaf8ad7 100644
--- a/macros/latex/contrib/zref-check/CHANGELOG.md
+++ b/macros/latex/contrib/zref-check/CHANGELOG.md
@@ -1,6 +1,22 @@
# Changelog
-## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.1.0...HEAD)
+## [Unreleased](https://github.com/gusbrs/zref-check/compare/v0.2.0...HEAD)
+
+## [v0.2.0](https://github.com/gusbrs/zref-check/compare/v0.1.0...v0.2.0) (2021-08-17)
+
+### Changed
+- The syntax of user command `\zcheck` has changed. Previously, it received
+ the `<checks>` as a second optional argument, now both `<checks>` and
+ `<options>` can be passed together in the single optional argument to
+ `\zcheck`.
+- (Internal) Use new hook management system syntax for begindocument hooks.
+- (Internal) Use prefix for internal zref properties.
+- Small adjustments in User manual.
+
+### Added
+- CTAN upload automation with l3build.
+- Regression tests for labels with `babel` active characters.
+- Dedicated Readme for CTAN.
## [v0.1.0](https://github.com/gusbrs/zref-check/releases/tag/v0.1.0) (2021-08-04)
diff --git a/macros/latex/contrib/zref-check/README.md b/macros/latex/contrib/zref-check/README.md
index c5726af278..2b5febb76c 100644
--- a/macros/latex/contrib/zref-check/README.md
+++ b/macros/latex/contrib/zref-check/README.md
@@ -2,6 +2,9 @@
**Flexible LaTeX cross-references with contextual checks based on zref**
+Author: Gustavo Barros
+Maintainer: Gustavo Barros
+
`zref-check` provides an user interface for making LaTeX cross-references
flexibly, while allowing to have them checked for consistency with the
document structure as typeset. Statements such as “above”, “on the next
@@ -12,6 +15,10 @@ compilation time if any of these checks fail. `\zctarget` and the `zcregion`
environment are also defined as a means to easily set label targets to
arbitrary places in the text which can be referred to by `\zcheck`.
-The released version of this package is available from CTAN.
+License: LPPL Version 1.3c
+
+Repository: https://github.com/gusbrs/zref-check
+
+Bug tracker: https://github.com/gusbrs/zref-check/issues
-For more details, check the Documentation.
+CTAN: https://ctan.org/pkg/zref-check
diff --git a/macros/latex/contrib/zref-check/zref-check-code.pdf b/macros/latex/contrib/zref-check/zref-check-code.pdf
index 52682fbc5e..b412a1c5be 100644
--- a/macros/latex/contrib/zref-check/zref-check-code.pdf
+++ b/macros/latex/contrib/zref-check/zref-check-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-check/zref-check.dtx b/macros/latex/contrib/zref-check/zref-check.dtx
index 3ef8af66d8..29c48befbd 100644
--- a/macros/latex/contrib/zref-check/zref-check.dtx
+++ b/macros/latex/contrib/zref-check/zref-check.dtx
@@ -74,7 +74,7 @@
% provide the text to be typeset based on the contextual information,
% \cs{zcheck} lets the user supply an arbitrary text and specify one or more
% checks to be done on the label(s) being referred to. If any of the checks
-% fail, a warning is issued upon compilation, so that the user can go back to
+% fails, a warning is issued upon compilation, so that the user can go back to
% that cross-reference and correct it as needed, without having to rely on
% burdensome and error prone manual proof-reading.
%
@@ -151,24 +151,26 @@
%
% \begin{function}{\zcheck}
% \begin{syntax}
-% \cs{zcheck}\oarg{options}\marg{labels}\oarg{checks}\marg{text}
+% \cs{zcheck}\oarg{checks/options}\marg{labels}\marg{text}
% \end{syntax}
-% Typesets \marg{text}, as given, while performing the comma separated list
-% of \oarg{checks} on each of the comma separated list of \marg{labels}.
-% When \pkg{hyperref} support is enabled, \marg{text} will be made a
-% hyperlink to \emph{the first} label in \marg{labels}. The starred version
-% of the command does the same as the plain one, just does not form a link.
-% The \oarg{options} are (mostly) the same as those of the package, and can
-% be given to local effect.
+% Typesets \meta{text}, as given, while performing a list of \meta{checks}
+% on each of the \meta{labels}. When \pkg{hyperref} support is enabled,
+% \meta{text} will be made a hyperlink to \emph{the first} \meta{label} in
+% \meta{labels}. The starred version of the command does the same as the
+% plain one, just does not form a link. The \meta{options} are (mostly) the
+% same as those of the package, and can be given to local effect.
+% \meta{checks} and \meta{options} can be given side by side as a comma
+% separated list in the optional argument. \meta{labels} is also a comma
+% separated list.
% \end{function}
%
% \begin{function}{\zctarget}
% \begin{syntax}
% \cs{zctarget}\marg{label}\marg{text}
% \end{syntax}
-% Typesets \marg{text}, as given, and places a pair of \texttt{zlabel}s, one
-% at the start of \marg{text}, using \marg{label} as label name, another one
-% (internal) at the end of \marg{text}.
+% Typesets \meta{text}, as given, and places a pair of \texttt{zlabel}s, one
+% at the start of \meta{text}, using \meta{label} as label name, another one
+% (internal) at the end of \meta{text}.
% \end{function}
%
%
@@ -197,11 +199,11 @@
% \pkg{zref-check} provides several ``checks'' to be used with \cs{zcheck}.
% The checks may be combined in a \cs{zcheck} call, e.g.\ \opt{[close,
% after]}, or \opt{[thischap, before]}. In this case, each check in
-% \oarg{checks} is performed against each of the \marg{labels}. This is done
+% \meta{checks} is performed against each of the \meta{labels}. This is done
% independently for each check, which means, in practice, that the checks bear
% a logical \texttt{AND} relation to the others. Whether the combination is
% meaningful, is up to the user. As is the correspondence between the
-% \oarg{checks} and the \marg{text>} in \cs{zcheck}.
+% \meta{checks} and the \meta{text} in \cs{zcheck}.
%
% The use of checks which perform ``within the page'' comparisons -- namely
% \opt{above} and \opt{below} and, through them, \opt{before} and \opt{after}
@@ -214,7 +216,7 @@
% label being referred to, relative to the \cs{zcheck} call being made. For
% example, the \opt{before} check should issue no message if
% \cs{ztarget}|{mylabel}{...}| occurs before
-% \cs{zcheck}|{mylabel}[before]{...}|.
+% \cs{zcheck}|[before]{mylabel}{...}|.
%
% The available checks are the following:
%
@@ -298,14 +300,13 @@
% set globally either as \cs{usepackage}\oarg{options} at load-time (see
% Section~\ref{sec:loading-package}), or by means of \cs{zrefchecksetup} (see
% Section~\ref{sec:user-interface}) in the preamble. Most options can also be
-% used with local effects, through the optional argument \oarg{options} of
-% \cs{zcheck}.
+% used with local effects, through the optional argument of \cs{zcheck}.
%
% \DescribeOption{hyperref}
% Controls the use of \pkg{hyperref} by \pkg{zref-check} and takes values
% \opt{auto}, \opt{true}, \opt{false}. The default value, \opt{auto}, makes
% \pkg{zref-check} use \pkg{hyperref} if it is loaded, meaning \cs{zcheck} can
-% be hyperlinked to the \emph{first label} in \marg{labels}. \opt{true} does
+% be hyperlinked to the \emph{first label} in \meta{labels}. \opt{true} does
% the same thing, but warns if \pkg{hyperref} is not loaded (\pkg{hyperref} is
% never loaded for you). In either of these cases, if \pkg{hyperref} is
% loaded, module \pkg{zref-hyperref} is also loaded by \pkg{zref-check}.
@@ -399,7 +400,7 @@
% in tandem with standard references, for example:
%
% \begin{verbatim}
-% ... Figure~\ref{fig:figure-1}, \zcheck*{fig:figure-1}[nextpage]{on
+% ... Figure~\ref{fig:figure-1}, \zcheck*[nextpage]{fig:figure-1}{on
% the next page}.
% \end{verbatim}
%
@@ -431,12 +432,12 @@
% \texttt{abspage} property provided by the \pkg{zref-abspage} module. This
% is a solid piece of information, on which we can rely upon. However,
% despite that, page number checks may still become ill-defined, if the
-% \marg{text} argument in \cs{zcheck}, when typeset, crosses page boundaries,
+% \meta{text} argument in \cs{zcheck}, when typeset, crosses page boundaries,
% starting in one page, and finishing in another. The same can happen with
% the text in \cs{zctarget} and the \texttt{zcregion} environment.
%
-% This is why the user commands of this package set always a pair or labels
-% around \meta{text}. So, when checking \cs{zcheck} against a regular
+% This is why the user commands of this package set a pair or labels around
+% \meta{text}. So, when checking \cs{zcheck} against a regular
% \texttt{zlabel} both the start and the end of the \meta{text} are checked
% against the label, and the check fails if either of them fails. When
% checking \cs{zcheck} against a \cs{zctarget} or a \texttt{zcregion}, both
@@ -548,7 +549,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-check} {2021-08-04} {0.1.0}
+\ProvidesExplPackage {zref-check} {2021-08-17} {0.2.0}
{Flexible cross-references with contextual checks based on zref}
% \end{macrocode}
%
@@ -587,15 +588,15 @@
\int_gincr:N \g_@@_abschap_int
\int_zero:N \g_@@_abssec_int
}
-\zref@newprop { abschap } [0] { \int_use:N \g_@@_abschap_int }
-\zref@addprop \ZREF@mainlist { abschap }
+\zref@newprop { zc@abschap } [0] { \int_use:N \g_@@_abschap_int }
+\zref@addprop \ZREF@mainlist { zc@abschap }
% \end{macrocode}
%
% \begin{macrocode}
\AddToHook { cmd / section / before }
{ \int_gincr:N \g_@@_abssec_int }
-\zref@newprop { abssec } [0] { \int_use:N \g_@@_abssec_int }
-\zref@addprop \ZREF@mainlist { abssec }
+\zref@newprop { zc@abssec } [0] { \int_use:N \g_@@_abssec_int }
+\zref@addprop \ZREF@mainlist { zc@abssec }
% \end{macrocode}
%
%
@@ -606,10 +607,10 @@
\zref@newlist { zrefcheck }
\zref@addprops { zrefcheck }
{
+ page ,
abspage ,
- abschap ,
- abssec ,
- page
+ zc@abschap ,
+ zc@abssec
}
% \end{macrocode}
%
@@ -773,7 +774,7 @@
% \end{variable}
%
% \begin{macrocode}
-\AtBeginDocument
+\AddToHook { begindocument }
{
\@ifpackageloaded { hyperref }
{
@@ -837,7 +838,7 @@
% \end{variable}
%
% \begin{macrocode}
-\AtBeginDocument
+\AddToHook { begindocument }
{
\keys_define:nn { zref-check }
{ ignore .meta:n = { msglevel = none } }
@@ -935,7 +936,7 @@
% \end{macro}
%
% \begin{macrocode}
-\AtBeginDocument
+\AddToHook { begindocument }
{
\bool_if:NT \l_@@_target_label_bool
{
@@ -1147,9 +1148,11 @@
% circumstances, and except for outrageous label placement by the user, it
% would return the expected results. We don't really need exact coordinates
% to decide ``above/below''. Besides, it would do an exact job for the
-% dedicated target macros of this package. However, I could not conceive a
-% situation where the \texttt{yx} criterion would perform clearly better than
-% the \texttt{labelseq} one. And, if that's the case, and considering the
+% dedicated target macros of this package. It is also true that the ``page''
+% for \cs{pageref} is stored with the value of where the \cs{label} is placed,
+% wherever that may be. However, I could not conceive a situation where the
+% \texttt{yx} criterion would perform clearly better than the
+% \texttt{labelseq} one. And, if that's the case, and considering the
% complications it brings, this check was a slippery slope. All in all, I've
% decided to drop it.
%
@@ -1350,13 +1353,13 @@
% \url{https://tex.stackexchange.com/a/179907}.
%
% \begin{syntax}
-% \cs{zcheck}\meta{*}\oarg{options}\marg{labels}\oarg{checks}\marg{text}
+% \cs{zcheck}\meta{*}\oarg{checks/options}\marg{labels}\marg{text}
% \end{syntax}
%
% \begin{macrocode}
\NewDocumentCommand \zcheck
- { s O { } > { \SplitList { , } } m > { \SplitList { , } } O { } m }
- { \zref@wrapper@babel \@@_zcheck:nnnnn {#3} {#1} {#2} {#4} {#5} }
+ { s O { } > { \SplitList { , } } m m }
+ { \zref@wrapper@babel \@@_zcheck:nnnn {#3} {#1} {#2} {#4} }
% \end{macrocode}
% \end{macro}
%
@@ -1368,7 +1371,7 @@
% \l_@@_checkend_tl ,
% \l_@@_link_label_tl ,
% \l_@@_link_anchor_tl ,
-% \l_@@_link_star_tl
+% \l_@@_link_star_bool
% }
% \begin{macrocode}
\int_new:N \g_@@_id_int
@@ -1376,11 +1379,11 @@
\tl_new:N \l_@@_checkend_tl
\tl_new:N \l_@@_link_label_tl
\tl_new:N \l_@@_link_anchor_tl
-\bool_new:N \l_@@_link_star_tl
+\bool_new:N \l_@@_link_star_bool
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_zcheck:nnnnn}
+% \begin{macro}{\@@_zcheck:nnnn}
% An intermediate internal function, which does the actual heavy lifting,
% and places \Arg{labels} as first argument, so that it can be protected by
% \cs{zref@wrapper@babel} in \cs{zcheck}. This is the same procedure as the
@@ -1388,15 +1391,19 @@
% protection of \pkg{babel} active characters.
%
% \begin{syntax}
-% \cs{@@_zcheck:nnnnn} \Arg{labels} \Arg{*} \Arg{options} \Arg{checks} \Arg{text}
+% \cs{@@_zcheck:nnnn} \Arg{labels} \Arg{*} \Arg{checks/options} \Arg{text}
% \end{syntax}
%
% \begin{macrocode}
-\cs_new:Npn \@@_zcheck:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_zcheck:nnnn #1#2#3#4
{
\group_begin:
% \end{macrocode}
-% Process local options.
+% Set checks keys.
+% \begin{macrocode}
+ \@@_set_checks_keys:
+% \end{macrocode}
+% Process local options and checks.
% \begin{macrocode}
\keys_set:nn { zref-check } {#3}
% \end{macrocode}
@@ -1418,25 +1425,25 @@
% hyperlinking.
% \begin{macrocode}
\tl_set:Nn \l_@@_link_label_tl { \tl_head:n {#1} }
- \bool_set:Nn \l_@@_link_star_tl {#2}
+ \bool_set:Nn \l_@@_link_star_bool {#2}
\zref@ifrefundefined { \l_@@_link_label_tl }
% \end{macrocode}
% If the reference is undefined, just typeset.
% \begin{macrocode}
- {#5}
+ {#4}
{
\bool_if:nTF
{
\l_@@_use_hyperref_bool &&
- ! \l_@@_link_star_tl
+ ! \l_@@_link_star_bool
}
{
\exp_args:Nx \zrefcheck_get_astl:nnn
{ \l_@@_link_label_tl }
{ anchor } { \l_@@_link_anchor_tl }
- \hyperlink { \l_@@_link_anchor_tl } {#5}
+ \hyperlink { \l_@@_link_anchor_tl } {#4}
}
- {#5}
+ {#4}
}
% \end{macrocode}
% Set checkend label.
@@ -1449,7 +1456,8 @@
% \end{macrocode}
% Run the checks.
% \begin{macrocode}
- \@@_run_checks:nnV {#4} {#1} { \l_@@_checkbeg_tl }
+ \@@_run_checks:nnv
+ { \l_@@_zcheck_checks_seq } {#1} { l_@@_checkbeg_tl }
\group_end:
}
% \end{macrocode}
@@ -1536,25 +1544,146 @@
% registered for \pkg{zref}. This can be done with \cs{zref@newprop},
% \cs{zref@addprop} and friends, as usual.
%
+% Third, the check must be registered as a key which gets setup in
+% \cs{zcheck} by \cs{@@_set_checks_keys:}.
+%
+%
+% \subsection{Setup}
+%
+% \begin{variable}{\l_@@_zcheck_checks_seq}
+% \begin{macrocode}
+\seq_new:N \l_@@_zcheck_checks_seq
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_set_checks_keys:}
+% \begin{macrocode}
+\cs_new:Npn \@@_set_checks_keys:
+ {
+ \keys_define:nn { zref-check }
+ {
+ thispage .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { thispage } } ,
+ thispage .value_forbidden:n = true ,
+
+ prevpage .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { prevpage } } ,
+ prevpage .value_forbidden:n = true ,
+
+ nextpage .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { nextpage } } ,
+ nextpage .value_forbidden:n = true ,
+
+ facing .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { facing } } ,
+ facing .value_forbidden:n = true ,
+
+ above .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { above } } ,
+ above .value_forbidden:n = true ,
+
+ below .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { below } } ,
+ below .value_forbidden:n = true ,
+
+ pagesbefore .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { pagesbefore } } ,
+ pagesbefore .value_forbidden:n = true ,
+
+ ppbefore .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { ppbefore } } ,
+ ppbefore .value_forbidden:n = true ,
+
+ pagesafter .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { pagesafter } } ,
+ pagesafter .value_forbidden:n = true ,
+
+ ppafter .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { ppafter } } ,
+ ppafter .value_forbidden:n = true ,
+
+ before .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { before } } ,
+ before .value_forbidden:n = true ,
+
+ after .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { after } } ,
+ after .value_forbidden:n = true ,
+
+ thischap .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { thischap } } ,
+ thischap .value_forbidden:n = true ,
+
+ prevchap .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { prevchap } } ,
+ prevchap .value_forbidden:n = true ,
+
+ nextchap .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { nextchap } } ,
+ nextchap .value_forbidden:n = true ,
+
+ chapsbefore .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { chapsbefore } } ,
+ chapsbefore .value_forbidden:n = true ,
+
+ chapsafter .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { chapsafter } } ,
+ chapsafter .value_forbidden:n = true ,
+
+ thissec .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { thissec } } ,
+ thissec .value_forbidden:n = true ,
+
+ prevsec .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { prevsec } } ,
+ prevsec .value_forbidden:n = true ,
+
+ nextsec .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { nextsec } } ,
+ nextsec .value_forbidden:n = true ,
+
+ secsbefore .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { secsbefore } } ,
+ secsbefore .value_forbidden:n = true ,
+
+ secsafter .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { secsafter } } ,
+ secsafter .value_forbidden:n = true ,
+
+ close .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { close } } ,
+ close .value_forbidden:n = true ,
+
+ far .code:n =
+ { \seq_put_right:Nn \l_@@_zcheck_checks_seq { far } } ,
+ far .value_forbidden:n = true ,
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
%
% \subsection{Running}
%
-% \begin{macro}{\@@_run_checks:nnn, \@@_run_checks:nnV}
+% \begin{macro}{\@@_run_checks:nnn, \@@_run_checks:nnv}
% \begin{syntax}
% \cs{@@_run_checks:nnn} \Arg{checks} \Arg{labels} \Arg{reference}
% \end{syntax}
+% \meta{checks} are expected to be received as a sequence variable.
% \begin{macrocode}
\cs_new:Npn \@@_run_checks:nnn #1#2#3
{
\group_begin:
\tl_map_inline:nn {#2}
{
- \tl_map_inline:nn {#1}
+ \seq_map_inline:Nn #1
{ \@@_do_check:nnn {####1} {##1} {#3} }
}
\group_end:
}
-\cs_generate_variant:Nn \@@_run_checks:nnn { nnV }
+\cs_generate_variant:Nn \@@_run_checks:nnn { nnv }
% \end{macrocode}
% \end{macro}
%
@@ -1981,15 +2110,15 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
\int_compare_p:nNn
{ \l_@@_lbl_int } = { \l_@@_ref_int } &&
% \end{macrocode}
-% `0' is the default value of \texttt{abschap} property, and means here no
+% `0' is the default value of \texttt{zc@abschap} property, and means here no
% \cs{chapter} has yet been issued, therefore it cannot be ``this chapter'',
% nor ``the next chapter'', nor ``the previous chapter'', it is just ``no
% chapter''. Note, however, that a statement about a ``future'' chapter does
@@ -2007,8 +2136,8 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2024,8 +2153,8 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2042,8 +2171,8 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2059,8 +2188,8 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2092,10 +2221,10 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int }
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2104,7 +2233,7 @@
\int_compare_p:nNn
{ \l_@@_lbl_int } = { \l_@@_ref_int } &&
% \end{macrocode}
-% `0' is the default value of \texttt{abssec} property, and means here no
+% `0' is the default value of \texttt{zc@abssec} property, and means here no
% \cs{section} has yet been issued since its counter has been reset, which
% occurs at the beginning of the document and at every chapter. Hence, as is
% the case for chapters, `0' is just ``not a section''. The same observation
@@ -2122,10 +2251,10 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int }
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2143,10 +2272,10 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int }
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2165,10 +2294,10 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int }
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
@@ -2186,10 +2315,10 @@
{
\group_begin:
\bool_set_true:N \l_@@_integer_bool
- \zrefcheck_get_asint:nnn {#1} { abssec } { \l_@@_lbl_int }
- \zrefcheck_get_asint:nnn {#2} { abssec } { \l_@@_ref_int }
- \zrefcheck_get_asint:nnn {#1} { abschap } { \l_@@_lbl_b_int }
- \zrefcheck_get_asint:nnn {#2} { abschap } { \l_@@_ref_b_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abssec } { \l_@@_lbl_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abssec } { \l_@@_ref_int }
+ \zrefcheck_get_asint:nnn {#1} { zc@abschap } { \l_@@_lbl_b_int }
+ \zrefcheck_get_asint:nnn {#2} { zc@abschap } { \l_@@_ref_b_int }
\bool_lazy_and:nnTF
{ \l_@@_integer_bool }
{
diff --git a/macros/latex/contrib/zref-check/zref-check.pdf b/macros/latex/contrib/zref-check/zref-check.pdf
index ffdf333037..f7b1110802 100644
--- a/macros/latex/contrib/zref-check/zref-check.pdf
+++ b/macros/latex/contrib/zref-check/zref-check.pdf
Binary files differ
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf b/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf
index ecec4cb867..7190863231 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-ar.pdf
Binary files differ
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex b/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex
index 7354c5805e..0aaf2768c5 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-ar.tex
@@ -206,6 +206,35 @@ RTL context & \selectlanguage{nil}\blacktriangleright & \selectlanguage{nil}\bla
\end{frame}
+\section{الحزمة pgfpages-rl}
+
+\begin{frame}[fragile]
+\frametitle{الحزمة pgfpages-rl}
+الحزمة pgfpages-rl تضيف الى الحزمة pgfpages القدرة على دعم الصفحات من اليمين الى اليسار
+ (\verb:pagedir TRT:)
+ تتطلب المعالجة باستعمال
+\hologo{LuaLaTeX}
+
+يمكن استعمالها أيضا مع الفئات الأخرى عدا عن الفئة
+\verb:beamer-rl:
+
+\begin{codeblock}
+\documentclass{beamer-rl}
+\babelprovide[import=ar-DZ, main]{arabic}
+\usetheme{Warsaw}
+\usepackage{pgfpages-rl} % adapt pgfpages to TRT pagedir
+\setbeamertemplate{note page}[]
+\setbeameroption{show notes on second screen=right}
+\begin{document}
+...
+\end{document}
+
+\end{codeblock}
+
+
+\end{frame}
+
+
\section{أمثلة}
\begin{frame}[plain]{}
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf b/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf
index 2fa964af5a..facfcb1bf0 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-en.pdf
Binary files differ
diff --git a/macros/luatex/latex/beamer-rl/Example-of-use-en.tex b/macros/luatex/latex/beamer-rl/Example-of-use-en.tex
index 200ffe04f9..82d333dd77 100644
--- a/macros/luatex/latex/beamer-rl/Example-of-use-en.tex
+++ b/macros/luatex/latex/beamer-rl/Example-of-use-en.tex
@@ -193,6 +193,30 @@ package to insert a left to right text within your right to left text, e.g if yo
\end{frame}
+\section{pgfpages-rl package}
+
+\begin{frame}[fragile]
+\frametitle{pgfpages-rl package}
+
+\verb:pgfpages-rl: adds to \verb:pgfpages: the ability to support TRT pagedir, the package requires \hologo{LuaLaTeX} engine.
+It can also be used with other document classes besides \verb:beamer-rl:
+
+\begin{codeblock}
+\documentclass{beamer-rl}
+\babelprovide[import=ar-DZ, main]{arabic}
+\usetheme{Warsaw}
+\usepackage{pgfpages-rl} % adapt pgfpages to TRT pagedir
+\setbeamertemplate{note page}[]
+\setbeameroption{show notes on second screen=right}
+\begin{document}
+...
+\end{document}
+
+\end{codeblock}
+
+
+\end{frame}
+
\section{Examples}
\begin{frame}[plain]{}
diff --git a/macros/luatex/latex/beamer-rl/README.txt b/macros/luatex/latex/beamer-rl/README.txt
index 919c52117d..8e3d9c7dd5 100644
--- a/macros/luatex/latex/beamer-rl/README.txt
+++ b/macros/luatex/latex/beamer-rl/README.txt
@@ -1,5 +1,5 @@
The beamer-rl class
-v1.4c
+v1.5
This class provides patchs of some beamer templates and commands
for right to left presentation, the class require babel with lualatex engine
@@ -9,7 +9,7 @@ please use the issue tracker:
<https://github.com/seloumi/beamer-rl/issues>
-Current version release date: 2021/08/03
+Current version release date: 2021/08/17
___________________
Salim Bou
diff --git a/macros/luatex/latex/beamer-rl/beamer-rl.cls b/macros/luatex/latex/beamer-rl/beamer-rl.cls
index df628d67ad..c9d650377d 100644
--- a/macros/luatex/latex/beamer-rl/beamer-rl.cls
+++ b/macros/luatex/latex/beamer-rl/beamer-rl.cls
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{beamer-rl}
-[2021/08/03 v1.4c LaTeX class to patch beamer for right to left presentation with babel]
+[2021/08/17 v1.5 LaTeX class to patch beamer for right to left presentation with babel]
\RequirePackage{kvoptions}
\RequirePackage{kvsetkeys}
diff --git a/macros/luatex/latex/beamer-rl/pgfpages-rl.sty b/macros/luatex/latex/beamer-rl/pgfpages-rl.sty
new file mode 100644
index 0000000000..28c8e5926b
--- /dev/null
+++ b/macros/luatex/latex/beamer-rl/pgfpages-rl.sty
@@ -0,0 +1,666 @@
+% The package will be deleted if TRT pagedir is supported by package pgfpages
+% https://github.com/pgf-tikz/pgf/issues/911
+
+\ProvidesPackage{pgfpages-rl}[2021/08/15 ver 1 adapt pgfpages for TRT pagedir (lualatex)]
+
+\RequirePackage{pgfpages,ifluatex}
+
+\ifluatex
+\else
+\PackageError{pgfpages-rl}{pgfpages-rl require lualatex}
+\fi
+
+
+\def\pgfpagespoint{\pgfpages@test@pagedir\pgfpagespoint}
+
+\def\pgfpages@test@pagedir{%
+ \let\pgfpagespoint\pgfpoint
+ \ifcase\pagedirection
+ % 0, TLT (latin)
+ \or % 1, TRT (arabic)
+ \def\pgfpagespoint##1##2{\pgfpoint{##1}{##2}\pgf@x=-\pgf@x}%
+ \fi
+ }
+
+
+\renewcommand\pgfpagesdeclarelayout[3]{%
+ \expandafter\let\csname pgfpages@layoutbefore@#1\endcsname\relax
+ \expandafter\let\csname pgfpages@layout@#1\endcsname\relax
+ \expandafter\newcommand\csname pgfpages@layoutbefore@#1\endcsname{#2}
+ \expandafter\newcommand\csname pgfpages@layout@#1\endcsname{#3}
+ }
+
+\define@key{pgfpagesuselayoutoption}{second right}[]%
+{%
+ \def\pgfpageoptionfirstcenter{%
+ \ifcase\pagedirection
+ \pgfpoint{.5\paperwidth}{.5\paperheight}%
+ \or
+ \pgfpoint{-1.5\paperwidth}{.5\paperheight}%
+ \fi}
+ \def\pgfpageoptionsecondcenter{%
+ \ifcase\pagedirection
+ \pgfpoint{1.5\paperwidth}{.5\paperheight}%
+ \or
+ \pgfpoint{-.5\paperwidth}{.5\paperheight}%
+ \fi}
+ \def\pgfpageoptiontwoheight{\paperheight}%
+ \def\pgfpageoptiontwowidth{2\paperwidth}%
+}
+
+\define@key{pgfpagesuselayoutoption}{second left}[]%
+{%
+ \def\pgfpageoptionfirstcenter{%
+ \ifcase\pagedirection
+ \pgfpoint{1.5\paperwidth}{.5\paperheight}%
+ \or
+ \pgfpoint{-.5\paperwidth}{.5\paperheight}%
+ \fi}
+ \def\pgfpageoptionsecondcenter{%
+ \ifcase\pagedirection
+ \pgfpoint{.5\paperwidth}{.5\paperheight}%
+ \or
+ \pgfpoint{-1.5\paperwidth}{.5\paperheight}%
+ \fi}
+ \def\pgfpageoptiontwoheight{\paperheight}%
+ \def\pgfpageoptiontwowidth{2\paperwidth}%
+}
+
+\define@key{pgfpagesuselayoutoption}{second top}[]%
+{%
+ \def\pgfpageoptionfirstcenter{\pgfpagespoint{.5\paperwidth}{.5\paperheight}}%
+ \def\pgfpageoptionsecondcenter{\pgfpagespoint{.5\paperwidth}{1.5\paperheight}}%
+ \def\pgfpageoptiontwoheight{2\paperheight}%
+ \def\pgfpageoptiontwowidth{\paperwidth}%
+}
+
+\define@key{pgfpagesuselayoutoption}{second bottom}[]%
+{%
+ \def\pgfpageoptionfirstcenter{\pgfpagespoint{.5\paperwidth}{1.5\paperheight}}%
+ \def\pgfpageoptionsecondcenter{\pgfpagespoint{.5\paperwidth}{.5\paperheight}}%
+ \def\pgfpageoptiontwoheight{2\paperheight}%
+ \def\pgfpageoptiontwowidth{\paperwidth}%
+}
+
+\pgfpagesdeclarelayout{rounded corners}
+{
+ \def\pgfpageoptioncornerwidth{10pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=1
+ }
+ \pgfpageslogicalpageoptions{1}
+ {%
+ center=\pgfpagespoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight},%
+ corner width=\pgfpageoptioncornerwidth%
+ }%
+}
+
+\pgfpagesdeclarelayout{resize to}
+{
+ \def\pgfpageoptionborder{0pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=1,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth%
+ }
+ \pgfpageslogicalpageoptions{1}
+ {%
+ resized width=\pgfphysicalwidth,%
+ resized height=\pgfphysicalheight,%
+ border shrink=\pgfpageoptionborder,%
+ center=\pgfpagespoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+}
+
+\pgfpagesdeclarelayout{2 on 1}
+{
+ \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
+ \edef\pgfpageoptionwidth{\the\paperheight}
+ \def\pgfpageoptionborder{0pt}
+ \def\pgfpageoptionfirstshipout{1}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=2,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth,%
+ current logical shipout=\pgfpageoptionfirstshipout%
+ }
+ \ifdim\paperheight>\paperwidth\relax
+ % put side-by-side
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ \else
+ % stack on top of one another
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \fi
+}
+
+\pgfpagesdeclarelayout{4 on 1}
+{
+ \edef\pgfpageoptionheight{\the\paperheight}
+ \edef\pgfpageoptionwidth{\the\paperwidth}
+ \edef\pgfpageoptionborder{0pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=4,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth%
+ }
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+}
+
+\pgfpagesdeclarelayout{6 on 1}
+{
+ \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
+ \edef\pgfpageoptionwidth{\the\paperheight}
+ \def\pgfpageoptionborder{0pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=6,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth%
+ }
+ \ifdim\paperheight>\paperwidth\relax
+ % put side-by-side
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.167\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.833\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.167\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.833\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \else
+ % stack on top of one another
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.833\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.833\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.167\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.167\pgfphysicalheight}%
+ }%
+ \fi
+}
+
+\pgfpagesdeclarelayout{8 on 1}
+{
+ \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
+ \edef\pgfpageoptionwidth{\the\paperheight}
+ \def\pgfpageoptionborder{0pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=8,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth%
+ }
+ \ifdim\paperheight>\paperwidth\relax
+ % put side-by-side
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.125\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.375\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.625\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.875\pgfphysicalwidth}{.75\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.125\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.375\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{7}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.625\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{8}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.5\pgfphysicalheight,%
+ center=\pgfpagespoint{.875\pgfphysicalwidth}{.25\pgfphysicalheight}%
+ }%
+ \else
+ % stack on top of one another
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.875\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.875\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.625\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.625\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.375\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.375\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{7}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.25\pgfphysicalwidth}{.125\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{8}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.5\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.75\pgfphysicalwidth}{.125\pgfphysicalheight}%
+ }%
+ \fi
+}
+
+\pgfpagesdeclarelayout{16 on 1}
+{
+ \edef\pgfpageoptionheight{\the\paperheight}
+ \edef\pgfpageoptionwidth{\the\paperwidth}
+ \edef\pgfpageoptionborder{0pt}
+}
+{
+ \pgfpagesphysicalpageoptions
+ {%
+ logical pages=16,%
+ physical height=\pgfpageoptionheight,%
+ physical width=\pgfpageoptionwidth%
+ }
+ \pgfpageslogicalpageoptions{1}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.125\pgfphysicalwidth}{.875\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{2}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.375\pgfphysicalwidth}{.875\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{3}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.625\pgfphysicalwidth}{.875\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{4}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.875\pgfphysicalwidth}{.875\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{5}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.125\pgfphysicalwidth}{.625\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{6}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.375\pgfphysicalwidth}{.625\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{7}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.625\pgfphysicalwidth}{.625\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{8}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.875\pgfphysicalwidth}{.625\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{9}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.125\pgfphysicalwidth}{.375\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{10}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.375\pgfphysicalwidth}{.375\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{11}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.625\pgfphysicalwidth}{.375\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{12}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.875\pgfphysicalwidth}{.375\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{13}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.125\pgfphysicalwidth}{.125\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{14}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.375\pgfphysicalwidth}{.125\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{15}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.625\pgfphysicalwidth}{.125\pgfphysicalheight}%
+ }%
+ \pgfpageslogicalpageoptions{16}
+ {%
+ border shrink=\pgfpageoptionborder,%
+ resized width=.25\pgfphysicalwidth,%
+ resized height=.25\pgfphysicalheight,%
+ center=\pgfpagespoint{.875\pgfphysicalwidth}{.125\pgfphysicalheight}%
+ }%
+}
+
+
+
+\def\pgfpages@buildshipoutbox{%
+ \setbox\pgfpages@shipoutbox=\vbox{{%
+ \set@typeset@protect%
+ \offinterlineskip%
+ \pgfsys@beginpicture%
+ \pgf@cpn=1\relax%
+ \loop%
+ \setbox0=\hbox to \csname pgfpages@p@\the\pgf@cpn @width\endcsname{%
+ \hskip1in%
+ \vbox to \csname pgfpages@p@\the\pgf@cpn @height\endcsname%
+ {\vskip1in\offinterlineskip\expandafter\copy\csname
+ pgfpages@box@\the\pgf@cpn\endcsname\vss}\hss}%
+ \pgfsys@beginscope%
+ % Translate lower left corner
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @center\endcsname\relax%
+ \else%
+ \pgflowlevel{\pgftransformshift{\csname pgfpages@p@\the\pgf@cpn @center\endcsname}}%
+ \fi%
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @scale\endcsname\relax%
+ \else%
+ \pgflowlevel{\pgftransformscale{\csname pgfpages@p@\the\pgf@cpn @scale\endcsname}}%
+ \fi%
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @xscale\endcsname\relax%
+ \else%
+ \pgflowlevel{\pgftransformxscale{\csname pgfpages@p@\the\pgf@cpn @xscale\endcsname}{1}}%
+ \fi%
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @yscale\endcsname\relax%
+ \else%
+ \pgflowlevel{\pgftransformyscale{\csname pgfpages@p@\the\pgf@cpn @yscale\endcsname}}%
+ \fi%
+ \pgfscope%
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @rotation\endcsname\relax%
+ \else%
+ \pgflowlevel{\pgftransformrotate{\csname
+ pgfpages@p@\the\pgf@cpn @rotation\endcsname}}%
+ \fi%
+ \pgfutil@tempdima=\csname pgfpages@p@\the\pgf@cpn @width\endcsname\relax%
+ \pgfutil@tempdimb=\csname pgfpages@p@\the\pgf@cpn @height\endcsname\relax%
+ \pgflowlevel{\pgftransformshift{\pgfpagespoint{-.5\pgfutil@tempdima}{-.5\pgfutil@tempdimb}}}%
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @bordercode\endcsname\relax%
+ \else%
+ \pgfpathmoveto{\pgfpointorigin}%
+ \pgfpathlineto{\pgfpagespoint{\wd0}{0pt}}%
+ \pgfpathlineto{\pgfpagespoint{\wd0}{\ht0}}%
+ \pgfpathlineto{\pgfpoint{0pt}{\ht0}}%
+ \pgfpathclose%
+ {\csname pgfpages@p@\the\pgf@cpn @bordercode\endcsname}%
+ \fi%
+ \expandafter\ifx\csname pgfpages@p@\the\pgf@cpn @cornerwidth\endcsname\relax%
+ \else%
+ {\ifcase\pagedirection
+ \or%
+ \pgftransformcm{-1}{0}{0}{1}{\pgfpointorigin}%
+ \fi%
+ \expandafter\pgfutil@tempdima\csname pgfpages@p@\the\pgf@cpn @cornerwidth\endcsname\relax%
+ \color{black}
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\pgfutil@tempdima}{\pgfutil@tempdima}}%
+ \pgfpathrectangle{\pgfpoint{0pt}{\ht0-\pgfutil@tempdima}}{\pgfpoint{\pgfutil@tempdima}{\pgfutil@tempdima}}%
+ \pgfpathrectangle{\pgfpoint{\wd0-\pgfutil@tempdima}{0pt}}{\pgfpoint{\pgfutil@tempdima}{\pgfutil@tempdima}}%
+ \pgfpathrectangle{\pgfpoint{\wd0-\pgfutil@tempdima}{\ht0-\pgfutil@tempdima}}{\pgfpoint{\pgfutil@tempdima}{\pgfutil@tempdima}}%
+ \pgfusepath{fill}%
+ \pgfpathmoveto{\pgfpoint{0pt}{\pgfutil@tempdima}}
+ \pgfpathcurveto{\pgfpoint{0pt}{0.555\pgfutil@tempdima}}{\pgfpoint{.555\pgfutil@tempdima}{0pt}}{\pgfpoint{\pgfutil@tempdima}{0pt}}
+ \pgfpathlineto{\pgfpoint{\wd0-\pgfutil@tempdima}{0pt}}
+ \pgfpathcurveto{\pgfpoint{\wd0-.555\pgfutil@tempdima}{0pt}}{\pgfpoint{\wd0}{.555\pgfutil@tempdima}}{\pgfpoint{\wd0}{\pgfutil@tempdima}}
+ \pgfpathlineto{\pgfpoint{\wd0}{\ht0-\pgfutil@tempdima}}
+ \pgfpathcurveto{\pgfpoint{\wd0}{\ht0-.555\pgfutil@tempdima}}{\pgfpoint{\wd0-.555\pgfutil@tempdima}{\ht0}}{\pgfpoint{\wd0-\pgfutil@tempdima}{\ht0}}
+ \pgfpathlineto{\pgfpoint{\pgfutil@tempdima}{\ht0}}
+ \pgfpathcurveto{\pgfpoint{.555\pgfutil@tempdima}{\ht0}}{\pgfpoint{0pt}{\ht0-.555\pgfutil@tempdima}}{\pgfpoint{0pt}{\ht0-\pgfutil@tempdima}}
+ \pgfpathclose
+ \pgfusepath{clip}
+ \color{white}
+ \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\wd0}{\ht0}}
+ \pgfusepath{fill}
+ }
+ \fi%
+ \ht0=0pt%
+ \wd0=0pt%
+ \dp0=0pt%
+ \pgfsys@hbox0%
+ \endpgfscope%
+ \pgfsys@endscope%
+ \ifnum\pgf@cpn<\pgf@logicalpages%
+ \advance \pgf@cpn by 1\relax%
+ \repeat%
+ \pgfsys@endpicture%
+ }}%
+}