summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-05-16 03:01:59 +0000
committerNorbert Preining <norbert@preining.info>2024-05-16 03:01:59 +0000
commit53d54125d6d3092f24b069d8fcd96125f8bb850b (patch)
treeaef7f2c7cb21c3d45cd6a113f5ffcf52d27fb22d /macros/latex/contrib
parentbad773ccaf029cbc3f447929332fbbb8a5c28faa (diff)
CTAN sync 202405160301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx6
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin632177 -> 632257 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex290
-rw-r--r--macros/latex/contrib/rpgicons/README.md2
-rw-r--r--macros/latex/contrib/rpgicons/rpgicons-doc.pdfbin490866 -> 500755 bytes
-rw-r--r--macros/latex/contrib/rpgicons/rpgicons-doc.tex53
-rw-r--r--macros/latex/contrib/rpgicons/rpgicons-l3.sty2
-rw-r--r--macros/latex/contrib/rpgicons/rpgicons-pgf.sty2
-rw-r--r--macros/latex/contrib/rpgicons/rpgicons.sty6
9 files changed, 163 insertions, 198 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index cc85f0b20a..7e00a937f3 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -14,7 +14,7 @@
% This work has the LPPL maintenance status `maintained'.
%<*class>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
-\ProvidesExplClass{easybook}{2024/05/13}{2024bp}
+\ProvidesExplClass{easybook}{2024/05/15}{2024bq}
{Easily typesetting Chinese theses or books}
\bool_new:N \l__eb_compile_draft_bool
@@ -301,7 +301,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2021/11/15]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2024/05/13}{2024bp}
+\ProvidesExplPackage{easybase}{2024/05/15}{2024bq}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2557,7 +2557,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/13}{2024bp}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2024/05/15}{2024bq}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index bea8bdcc6b..841632697c 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 929e65a67e..17f6bf6e9a 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -23,8 +23,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v2024bp,
- date = 2024/05/13,
+ version = v2024bq,
+ date = 2024/05/15,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = toquyi@163.com,
@@ -48,10 +48,23 @@
\DeclareTOCStyleEntry[entryformat = \sffamily]{default}{section}
\DeclareFieldFormat[book]{title}{\textsf{#1}}
\geometry{margin = 1in,marginparwidth = 0.6in,footskip = 0.5in}
+\renewlist{cnltxlist}{description}{2}
\SetEnumitemValue{label}{smallbullet}{\small\color{DarkBlue}\textbullet}
\setlist{nosep,topsep = \smallskipamount,labelsep = 0.5em}
\setlist[1]{labelindent = \parindent}
\setlist[itemize,1]{label = smallbullet,leftmargin = *}
+\setlist[cnltxlist]
+ {
+ leftmargin = 0pt,
+ labelwidth = 2em,
+ itemindent = -1em,
+ labelsep = 0pt,
+ listparindent = 2em,
+ topsep = \smallskipamount,
+ itemsep = \smallskipamount,
+ partopsep = 0ex,
+ parsep = 0ex
+ }
\setcounter{tocdepth}{2}
\SetTblrInner[longtblr]{columns = c,hline{1,Z} = {1pt,DarkBlue}}
\SetTblrOuter[longtblr]{presep = \bigskipamount,postsep = \bigskipamount}
@@ -131,21 +144,8 @@
}
% Use a separate module margin marker to prevent overlap
\newcommand{\smodule}[1]{\cnltx@module@text*{\normalsize #1}}
-\newcommand{\noitemsep}{\setlength{\itemsep}{0ex}}
\renewcommand{\cnltx@package@abstract@width}{0.85\linewidth}
\renewcommand{\cnltx@write@lastname}{}
-\renewcommand{\cmltx@list@setup}
- {
- \setlength{\leftmargin}{0pt}
- \setlength{\labelwidth}{2em}
- \setlength{\itemindent}{-1em}
- \setlength{\labelsep}{0pt}
- \setlength{\listparindent}{2em}
- \setlength{\topsep}{\smallskipamount}
- \setlength{\itemsep}{\smallskipamount}
- \setlength{\partopsep}{0ex}
- \setlength{\parsep}{0ex}
- }
\newcounter{ctexexam}
\define@key{FV}{labelref}{\def\ctexexamlabelref{\label{#1}}}
\let\ctexexamlabelref\empty
@@ -178,6 +178,13 @@
\refstepcounter{ctexexam}\ctexexamlabelref
}
}
+\def\command{\cnltx@command}
+\def\environment{\cnltx@environment}
+\def\opt{\@cnltx@option@item\option}
+\def\keyval{\@cnltx@option@item\key}
+\def\keylit{\@cnltx@option@item\keyis}
+\def\keychoice{\@cnltx@option@item\choicekey}
+\def\keybool{\@cnltx@option@item\boolkey}
\makeatother\ExplSyntaxOff
\labelformat{section}{节#1}
\labelformat{subsection}{小节#1}
@@ -266,7 +273,7 @@
文档类选项应当在使用 \easybook{} 文档类或 \pkg*{easybase} 宏包(部分支持)时指定,可见\ref{subsec:basic usage} 的例子。选项前带有 \ding{73} 符号表示只可用于文档类,否则文档类与宏包都适用。除了下面列举的选项以外,还支持标准和 \CTeX 文档类的选项。
\subsection{基本选项}
-\begin{options}
+\begin{cnltxlist}
\opt{draft}
开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见\ref{subsec:box}。
\opt{newline}\dtag
@@ -283,10 +290,10 @@
开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值。关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
\keychoice{theorem}{\fbox{true},false}
是否提供定理功能支持。选项开启时定理模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
-\end{options}
+\end{cnltxlist}
\subsection{配置字体}
-\begin{options}
+\begin{cnltxlist}
\keychoice{cjkfont}{adobe,fandol,founder,mac,macnew,macold,ubuntu,windows,none}\dtag
中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \option*{fontset} 选项是等效的,如果没有指定 \option{cjkfont} 的值,将会自动检测操作系统并选择相应的字体。
@@ -321,21 +328,21 @@
\keychoice{mathfont}{\fbox{times},noto,notosans,nc,ncf,stix2,charter,ebgaramond,libertine}\dtag
\leftfillchoice{mathfont}{minion,garamondx,baskervaldx,baskerville,none} \\
选择合适的数学字体,将会加载 \pkg*{newtxmath} 和 \pkg*{bm} 宏包。使用选项 \code{none} 时可以使用 \pkg*{unicode-math} 等其它数学字体宏包定义字体。
-\end{options}
+\end{cnltxlist}
\subsection{\textsf{article} 模式}
-\begin{options}
+\begin{cnltxlist}
\keychoice{class}{\fbox{book},article}
使用 \easybook{} 文档类可以有两种模式,默认为 \cls*{book} 模式。选用 \code{article} 会变为 \code{oneside} 单面排版,同时使文档编号、结构等与标准 \cls*{article} 文档类的特性相似,可用于短篇幅的文章,不需要再使用 \cs*{chapter} 命令。此时\ref{subsec:directory command} 中目录命令的 \option{chapter} 选项会失效,将以 \code{section} 标题级别输出目录。如果使用 \cls*{ctexart} 配合 \pkg*{easybase} 宏包,则选项值 \code{book} 会失效。
\opt{book}
开启 \cls*{book} 书籍模式,与 \keyis*{class}{book} 等效。
\opt{article}
开启 \cls*{article} 文章模式,与 \keyis*{class}{article} 等效。
-\end{options}
+\end{cnltxlist}
\section{接口选项}
\label{sec:interface options}
-\begin{commands}
+\begin{cnltxlist}
\command*{ctexset}[\oarg{模块名}\marg{键值列表}]
\easybook{} 扩展了 \CTeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置,原有的 \meta{键值列表} 仍然可用。本文档类目前有9个模块用于实现常规的排版功能,如\ref{table:module List} 所示。
\begin{longtblr}
@@ -367,21 +374,19 @@
\end{ctexexam}
\easybook{} 文档类有三种选项:布尔型 \choicekey*{key}{true,false},选项的值为真 \code{true} 或假 \code{false},如果不指定默认为真。键值型 \key*{key}{value} 需要为选项指定值,后面 \code{=} 号不能省略。选择型 \choicekey*{key}{one,\fbox{two},three} 根据提供的可选值进行设定。
-\end{commands}
+\end{cnltxlist}
\subsection[工具]{工具\smodule{tools}}
\label{subsec:tools}
-\begin{options}
+\begin{cnltxlist}
\keychoice{color}{\fbox{none},seaside,energy,cyberpunk}
\easybook{} 预置了四种颜色主题,默认主题 \code{none} 为黑白页面,颜色主题不包括超链接。
- \begin{commands}
\command{DeclareThemeColor}[\splitmarg{风格名称,颜色1,颜色2,颜色3}]
声明新的颜色主题命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成主题颜色列表。其中 \meta{颜色1} 为标题标签,\meta{颜色2} 为列表编号、定理标签和公式编号括号,\meta{颜色3} 为代码抄录。类似地更改超链接颜色见\ref{subsec:hyperlinks}。
\begin{ctexexam}
\DeclareThemeColor{fancy,2acb25,60aacc,ebc01c}
\ctexset{tools/color = fancy}
\end{ctexexam}
- \end{commands}
\keyval{color-every}{HTML颜色代码}
统一设置主题的各部分颜色。参数是6个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
\keyval{multoc}{整数}\Default{2}
@@ -400,10 +405,10 @@
\end{ctexexam}
\kvsplit-{figurepath}{\marg{路径名1}\marg{路径名2}$\cdots$\marg{路径名n}}
设置插入图片的文件夹路径名。可以有多个路径名,每个路径包含在花括号内分隔,只有一个路径时需要包含在两层括号内。
-\end{options}
+\end{cnltxlist}
\subsubsection{连字符}
-\begin{options}
+\begin{cnltxlist}
\keyval{hyphen-figure}{图片连字符}\Default{\Marg{.}}
设置图片题注编号的连字符。
\keyval{hyphen-table}{表格连字符}\Default{\Marg{.}}
@@ -414,11 +419,11 @@
设置公式题注编号的连字符。
\keyval{hyphen-every}{连字符}\Default{\Marg{.}}
统一设置上述所有编号的连字符。
-\end{options}
+\end{cnltxlist}
\subsubsection{上下标全局设置}
\label{subsubsec:super-sub-script}
-\begin{options}
+\begin{cnltxlist}
\keyval{spvmove}{刚性长度}\Default{0pt}
上标命令 \cs{super} 对应的上标垂直偏移量。
\keyval{sphmove}{刚性长度}\Default{0pt}
@@ -443,30 +448,28 @@
上下标命令 \cs{supersub} 对应的上下标额外垂直距离。前部分为上标的偏移量,后部分为下标的偏移量。如果只有前部分则上下标各自垂直移动当前值的一半。
\keychoice{halign}{\fbox{l},c,r}
上下标命令 \cs{supersub} 对应的上下标水平对齐方式,有左 \code{l}、居中 \code{c} 和右 \code{r} 三种对齐方式。
-\end{options}
+\end{cnltxlist}
\subsection[超链接]{超链接\smodule{ref}}
\label{subsec:hyperlinks}
模块 \module*{ref} 将超链接选项交给 \pkg*{hyperref} 宏包处理。除了一些超链接颜色的选项失效,其它由宏包全局和接口命令 \cs*{hypersetup} 支持的多数选项可用。
-\begin{options}
+\begin{cnltxlist}
\keychoice{linktype}{\fbox{edge},colors,none}
超链接类型。\code{edge} 使超链接形式为边框,\code{colors} 使超链接字体为彩色,\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。
\keychoice{linkcolor}{fresh,cutepink,\fbox{navyblue},crimson}
当超链接类型为 \code{colors} 时文本的颜色样式。预置了四种超链接颜色风格,默认为海军蓝 \code{navyblue}。
- \begin{commands}
\command{DeclareLinkColor}[\splitmarg{风格名称,颜色1,颜色2,颜色3}]
声明新的超链接颜色样式命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成超链接颜色列表。其中 \meta{颜色1} 为普通链接,\meta{颜色2} 为网址,\meta{颜色3} 为参考文献引用。
- \end{commands}
\keyval{linkcolor-every}{HTML颜色代码}
统一设置超链接的各部分颜色。参数是6个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
\keychoice{linktoc}{none,section,page,\fbox{all}}
将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
-\end{options}
+\end{cnltxlist}
\subsection[行距]{行距\smodule{spread}}
\label{subsec:spread}
行距因子用于设置各种行距倍数,\meta{数值} 是不带有长度单位的浮点数。各类行距既可以在导言区全局设置,也可以在正文中设置对后面生效。
-\begin{options}
+\begin{cnltxlist}
\keyval{line}{数值}\Default{1.354}
正文行距因子。中文主题下行距因子初始值为 \code{1.354}(相当于 \textsf{Word} 的1.25倍行距),如果设置了文类或 \pkg*{ctex} 宏包的全局行距选项 \option*{linespread} 则初始值设为它的值。
\keyval{table}{数值}\Default{1.354}
@@ -493,11 +496,11 @@
行间公式与上面正文间的额外距离。
\keyval{belowdisplayskip}{弹性长度}\Default{0.5ex plus .1ex minus .1ex}\newtag%
行间公式与下面正文间的额外距离。
-\end{options}
+\end{cnltxlist}
\subsection[部件字体]{部件字体\smodule{font}}
\label{subsec:font}
-\begin{options}
+\begin{cnltxlist}
\keyval{caption-table}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
设置表格题注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval{caption-figure}{字体命令}\Default{\cs*{sffamily}\cs*{small}}
@@ -510,20 +513,17 @@
设置脚注标记与内容的字体,包括字体族、字体系列和字体形状命令。
\keyval{marginpar}{字体命令}\Default{\cs*{footnotesize}}
设置边注的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
-\end{options}
-
-\begin{commands}
\command{ebaddtofont}[\marg{字体类型}\marg{字体命令}]
用于在上述各种字体原有的格式上附加代码。其中 \meta{字体命令} 也可以包括行距命令且相对于 \module*{spread} 模块具有优先性,不同题注的 \meta{字体类型} 则为相应选项的后缀名。
\begin{ctexexam}
\ebaddtofont{every}{\linespread{1.5}\selectfont}
\ebaddtofont{footnote}{\sffamily}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection[参考文献]{参考文献\smodule{bib}}
\label{subsec:reference}
-\begin{options}
+\begin{cnltxlist}
\keychoice{backend}{\fbox{bibtex},biblatex}
参考文献处理后端。默认用传统的 \hologo{BibTeX} 处理参考文献\footnote{使用 \hologo{BibTeX} 引擎时加载 \pkg*{natbib} 宏包,使用 \hologo{biber} 时将加载 \pkg*{biblatex} 宏包。}。
\keychoice{bibstyle}{\fbox{numerical},authoryear,\optpath*{other sty}}
@@ -532,14 +532,8 @@
标注参考文献的风格。后端为 \hologo{BibTeX} 时可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,后端为 \hologo{biber} 时可使用 \pkg*{biblatex} 宏包支持的标注风格。
\keyval{datafile}{数据库列表}
参考文献数据库的文件名列表,文件列表以花括号包裹并以英文逗号分隔。使用 \hologo{biber} 处理时文件名要带 \code{bib} 扩展名,若参考文献文件不在当前文件夹则文件名需要包含路径,即 \code{path/file.bib}。不设置参考文献数据库名时 \module*{bib} 模块中的选项会失效,即不自动载入 \pkg*{natbib} 或 \pkg*{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。
-\end{options}
-
-\begin{commands}
\command{printbibliography}[\oarg{键值列表}]
两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的 \meta{键值列表} 不同。使用 \hologo{BibTeX} 处理时选项与\ref{subsec:directory command} 目录命令的选项相同,使用 \hologo{biber} 处理时常用的选项如下:
-\end{commands}
-
-\begin{options}
\keychoice*{heading}{bibliography,subbibliography,\fbox{bibintoc},subbibintoc}
参考文献通常有一个章标题或者节标题,该选项选择由 \cs{defbibheading} 定义的标题名。
\keyval{title}{参考文献标题名}
@@ -562,15 +556,14 @@
\defbibentryset{Zhang2022}{张三2022,ZhangSan2022}
\cite{Zhang2022} % 在正文中引用
\end{ctexexam}
-\end{options}
+\end{cnltxlist}
\subsection[定理]{定理\smodule{thmt}}
\label{subsec:theorem}
定理模块 \module*{thmt} 由 \pkg*{thmtools} 宏包提供支持,主要提供了定理环境和样式声明两个命令。定理环境声明命令 \cs{declaretheorem} 使用的定理样式由样式声明命令 \cs{declaretheoremstyle} 提供。文档类未预声明任何定理环境,如果声明定理环境时不指定样式,则使用默认定理样式 \code{default},可以对它重新定义。
-\begin{commands}
+\begin{cnltxlist}
\command{declaretheorem}[\oarg{键值列表1}\marg{环境名}\oarg{键值列表2}]
定理环境声明命令。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,其中常用的选项如下:
- \begin{options}
\keyval{name}{定理名}
定理环境的标题名称,默认为英文首字母大写的环境名。
\keychoice{numbered}{no,\fbox{yes},unless unique}
@@ -590,10 +583,8 @@
\addtotcbstyle{tc-easyboxi}{colback = GreenYellow}
\tcolorboxenvironment{caixiang}{tc-easyboxi}
\end{ctexexam}
- \end{options}
\command{declaretheoremstyle}[\oarg{键值列表1}\marg{定理样式}\oarg{键值列表2}]
定理样式声明命令,键值列表支持自身以及定理声明命令 \cs{declaretheorem} 的所有选项。可选参数的 \meta{键值列表1} 与 \meta{键值列表2} 等效,其中支持的选项如下:
- \begin{options}
\keyval{headfont}{字体命令}\Default{\cs*{sffamily}}
定理标题部分(包括题注)的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval{notefont}{字体命令}\Default{\cs*{sffamily}}
@@ -614,7 +605,6 @@
设置定理题注两边的括号,两个必选参数分别代表左括号和右括号。
\keyval{headformat}{标题排列}
定理标题各组成元素的位置排列和格式。定理标题由定理名、编号和题注组成,\meta{标题排列} 中命令 \cs*{NAME}、\cs*{NUMBER} 和 \cs*{NOTE} 分别代表定理名、编号和题注。
- \end{options}
\command{theoremstyle}[\marg{定理样式}]
设置其后由 \cs{declaretheorem} 命令声明的定理环境的样式。
@@ -630,16 +620,12 @@
bodyfont = \itshape
]
\end{ctexexam}
-\end{commands}
-
-\begin{commands}\noitemsep
+ \begin{cnltxlist}[itemsep = 0ex]
\command{listoftheorems}[\sarg\oarg{键值列表}]\default{}
\item\key{listoftheorems}{定理目录标题名}
\command{settheoremtocline}[\sarg\marg{环境名}\marg{标题定义}]\newtagv{2024bb}%
对 \pkg*{thmtools} 宏包的定理环境目录命令 \cs{listoftheorems} 进行了适配调整,\ref{subsec:directory command} 和\ref{subsec:catalog} 中的选项机制均可用,但标题定义选项 \option{tocline} 较为特殊,需用 \cs{settheoremtocline} 命令单独设置。在 \meta{标题定义} 中有三个命令 \cs{thmtname}、\cs{thmtenvname} 和 \cs{thmtnote} 分别代表定理名、定理环境名和题注用于排版目录条目。
-\end{commands}
-
-\begin{commands}
+ \end{cnltxlist}
\optpath{thmt/}\key{loeskip}{弹性长度}\Default{10pt}
定理目录中每章第一个条目上方增加的垂直距离。与 \CTeX 的表格和图片目录中每章间的条目距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
\command{thmtifnote}[\marg{存在题注代码}\marg{不存在题注代码}]
@@ -656,12 +642,12 @@
\thmtname\thmtifnote{[\thmtnote]}{}
}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection[页面尺寸]{页面尺寸\smodule{geo}}
\label{subsec:page margins}
模块 \module*{geo} 会将选项(除了前两个为附加)交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \textsf{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
-\begin{options}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\keyval{headruleskip}{页眉线间距}\Default*{0pt}
\keyval{footruleskip}{页脚线间距}\Default*{3.5pt}
\kvsplit{hdivide}{左边距,版心文本宽度,右边距}\default{}
@@ -677,12 +663,12 @@
vcentering
}
\end{ctexexam}
-\end{options}
+\end{cnltxlist}
\subsection[页眉页脚]{页眉页脚\smodule{hdr}}
\label{subsec:header and footer}
模块 \module*{hdr} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。在 \cls*{book} 模式时使用标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。重新设置标题标记选项时标记大小写选项 \option{uppercase} 会失效。
-\begin{options}
+\begin{cnltxlist}
\keyval{chap-mark}{标题标记}
\code{chapter} 级别标题标记的内容,包含了标签选项 \option{chap-label} 和章标题 \code{\#1}。
\keyval{sec-mark}{标题标记}
@@ -712,9 +698,7 @@
页眉横线默认的粗细,使用 \option{headrule} 选项绘制横线后失效。
\keyval{footnoterulewd}{刚性长度}\Default{0.5pt}
脚注横线默认的粗细,使用 \option{footnoterule} 选项绘制横线后失效。
-\end{options}
-
-\begin{commands}\noitemsep
+ \begin{cnltxlist}[itemsep = 0ex]
\command{fancypagestyle}[\marg{风格名}\oarg{基础风格}\marg{风格定义}]
定义名为 \meta{风格名} 的页面风格。\meta{风格定义} 中可包含设置页眉页脚不同位置格式的命令,如果为空则等于 \code{fancy} 风格。如果存在 \meta{基础风格},则在它的基础上进行定义。
\begin{ctexexam}
@@ -728,16 +712,11 @@
\command{fancyhead}[\oarg{位置}\marg{内容}]\default{}
\command{fancyfoot}[\oarg{位置}\marg{内容}]
为了确保页面显示正确,使用 \cs{fancyhead} 和 \cs{fancyfoot} 等命令设置页眉页脚时需要在页边距的命令之后。默认设置的是一个名为 \code{fancy} 的页面风格。\pkg*{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中 \code{E} 和 \code{O} 代表偶数和奇数,\code{L}、\code{C} 和 \code{R} 代表左、中和右部分。单面打印时,含有偶数位置的命令无效。
-\end{commands}
-
-\begin{commands}\noitemsep
\command{markboth}[\marg{左页标题标记}\marg{右页标题标记}]\default{}
\command{markright}[\marg{右页标题标记}]\default{}
\command{markdouble}[\marg{双页标题标记}]
这三个命令用于手动设置当前页标题标记,特殊情况下可以使用它们定义与标题不同的页眉页脚标记。上述标记命令内容的选项便是基于这三个命令。其中 \cs{markdouble} 根据是否是双面打印设置相应标记。如果是单面打印,则 \meta{左页标题标记} 无效。
-\end{commands}
-
-\begin{commands}
+ \end{cnltxlist}
\command{markrule}[\oarg{长度}\darg{颜色名}\marg{线宽}\baroarg{上间距,下间距}]
实线命令 \cs{markrule} 既可在 \meta{横线命令} 中用于绘制页眉页脚横线,也可以在正文中使用。\meta{长度} 默认为版心的宽度,上下间距为横线与上下方部件的间距,带有长度单位,上下间距之间用符号 \code{|} 分开,若只有一部分则表示 \meta{上间距}。下面举一个设置页眉内容的例子:
\begin{ctexexam}[labelref = exam:markrule]
@@ -746,11 +725,11 @@
\fancyhead[OL]{\rightmark}
\fancyhead[EL,OR]{\textbf{\thepage}}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection[脚注]{脚注\smodule{hdr}}
模块 \module*{hdr} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号和对齐方式等,以及脚注内容的首行缩进、行距和字体等。基本思想是提供常规和自定义标记(\code{fncustom})两种脚注,常规脚注的标记分为正文(\code{fnmark})和内容(\code{fntext})标记两种,且两者编号类型分离,自定义脚注的标记与其共享格式。目前脚注模块基本兼容 \pkg*{footmisc} 宏包。
-\begin{options}
+\begin{cnltxlist}
\keychoice{footnotetype}{plain,\fbox{hang},flush,bottom}
脚注的类型。悬挂缩进 \code{hang} 是默认值,\code{plain} 是原始的类型,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。当存在浮动环境排版时,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用:
\begin{ctexexam}
@@ -771,15 +750,13 @@
脚注正文标记编号的类型。默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括1-10。
短编号的参数与列表环境类似,有 \code{1}、\code{A}、\code{a}、\code{I} 和 \code{i},除此之外还增加了中文数字 \code{c} 和符号 \code{s} 格式。原生样式 \code{plain} 等同于单独使用数字 \code{1} 参数。这个选项可以用在正文中改变其后脚注编号类型。
- \begin{commands}
\command{footref}[\marg{脚注标签名}]
在当前位置对自动编号的脚注进行引用,与被引用的正文标记共享一个编号与格式。
- \end{commands}
\begin{ctexexam}
\ebhdrset{fnmark-num = 1} % 等于编号类型plain
\ebhdrset{fnmark-num = (a)}
\end{ctexexam}
- \begin{commands}\noitemsep
+ \begin{cnltxlist}[itemsep = 0ex]
\command{SetFntSymbsList}[\marg{符号表名}\marg{符号数量}\marg{符号列表}]\default{}
\command{UseFntSymbsList}[\marg{符号表名}]\newtag[Chg]%
这两个命令用于在脚注短编号标记为 \code{s} 自定义符号型时设置符号列表。\cs{SetFntSymbsList} 命令用于定义名为 \meta{符号表名} 的符号列表,\cs{UseFntSymbsList} 命令用于启用已定义的符号列表。默认的脚注符号列表是空的,注意使用符号型标记的脚注时计数器 \code{footnote} 的值仍然递增,以及定义新列表时 \meta{符号列表} 的写法和命令顺序:
@@ -788,7 +765,7 @@
\UseFntSymbsList{fancy}
\ebhdrset{fnmark-num = s}
\end{ctexexam}
- \end{commands}
+ \end{cnltxlist}
\keychoice{fntext-num}{\fbox{plain},pifont,pifont*,pisans,pisans*,\optpath*{short num}}
脚注内容标记编号的类型。用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号类型\textbf{可以不同}。
\keychoice{fnmarktext-num}{\fbox{plain},pifont,pifont*,pisans,pisans*,\optpath*{short num}}
@@ -810,7 +787,6 @@
fnmarktext-format = \circledtext
}
\end{ctexexam}
- \begin{commands}
\command{defupfntmark}[\marg{脚注正文标记格式}]
定义脚注正文标记的格式,与正文标记编号命令 \cs{theupfootnote} 配合使用。
\command{defdownfntmark}[\marg{脚注内容标记格式}]
@@ -823,7 +799,6 @@
保存正文标记编号类型选项 \option{fnmark-num} 指定的正文标记。
\command{thedownfootnote}
保存内容标记编号类型选项 \option{fntext-num} 指定的内容标记。
- \end{commands}
\begin{ctexexam}
\defupfntmark{\super[vmove = 2pt]{\theupfootnote}}
\defdownfntmark{\notminipage{\textcolor{blue}{\thedownfootnote}}{}}
@@ -831,7 +806,7 @@
\end{ctexexam}
\keychoice{fncustom-format}{\optpath*{format code},match}
单独设定自定义脚注标记的格式,选项 \code{match} 可以匹配 \option{spcmd} 全局的值。自定义脚注内容和正文标记的命令与用法可以见下方和\ref{exam:custom footnote markers} 的介绍。
- \begin{commands}\noitemsep
+ \begin{cnltxlist}[itemsep = 0ex]
\command{Footnote}[\oarg{内容标记}\marg{正文标记}\marg{脚注文本}]\default{}
\command{Footnotetext}[\marg{内容标记}\marg{脚注文本}]\default{}
\command{Footnotemark}[\marg{正文标记}]
@@ -839,7 +814,7 @@
\begin{ctexexam}[labelref = exam:custom footnote markers]
\Footnote{*}{这是可以自定义标记的脚注。}
\end{ctexexam}
- \end{commands}
+ \end{cnltxlist}
\keychoice{fnboth-format}{\optpath*{format code},match}
同时设定默认脚注标记 \option{fnmarktext-format} 和自定义脚注标记 \option{fncustom-format} 的格式。两种脚注标记匹配上标格式 \option{spcmd} 的值是独立的,使用 \code{match} 则可以同时匹配。会覆盖 \module*{font} 模块脚注字体选项 \option{footnote} 相同类型的命令,最后一个格式命令可以带有一个参数接受脚注标记。
\keyval{fnpara-format}{格式代码}
@@ -853,12 +828,12 @@
fntext-code = {\hspace{1em}\llap,\enskip}
}
\end{ctexexam}
-\end{options}
+\end{cnltxlist}
\subsection[目录]{目录\smodule{toc}}
\label{subsec:catalog}
模块 \module*{toc} 将使用 \pkg*{titletoc} 宏包处理目录样式。默认包括 \module*{part}$\longrightarrow$\module*{subparagraph}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 条目名的键路径。选项前带有 \ding{73} 符号表示支持所有相应\textbf{条目名}的路径,其它选项则处于 \module*{toc} 键路径下。目前支持多数学术论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
-\begin{options}
+\begin{cnltxlist}
\keyval{tocformat}{条目格式}\dtag
目录中各类型条目的格式。可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。如果是段落型目录,格式代码仅在段落中当前级别条目前执行一次。
\keyval{tocformat+}{条目格式}\dtag
@@ -869,10 +844,8 @@
目录条目左边的缩进距离,通常标题级别越低缩进越大。如果是段落型目录,仅在当前条目级别为段落中最高时有效。
\keyval{tocrule}{引导线命令}\dtag
目录条目的引导线和页码。引导线可以使用基于 \cs*{xleaders} 命令的 \cs{tocrule} 绘制(同时输出页码),如果是一般不需要引导线的段落型目录,可以使用 \cs{thecontentspage} 命令输出页码。
- \begin{commands}
\command{tocrule}[\sarg\harg\oarg{引导点间距}\darg{放大因子}\marg{引导点}\oarg{页码格式}]
生成目录引导线的命令,需要在引导线选项 \option{tocrule} 中使用。带有星号的命令与 \keyis{dotalign}{false} 效果相同。命令带 \harg{} 号参数不输出目录页码,此时无格式的页码被保存在 \cs{thecontentspage} 命令中,可以配合盒子命令设置不同的页码左右间距和对齐方式。\meta{放大因子} 为 \meta{引导点} 的放大倍数。\meta{页码格式} 中最后一个命令可以带有一个参数用于接受页码。
- \end{commands}
\keyval{toclabel}{标题标签定义}\dtag\newtagv{2024as}%
目录中各类型条目标题标签的定义,可与 \option{tocline} 选项联用设置标题。其中参数 \code{\#1} 代表标签的编号 \cs{thecontentslabel},参数 \code{\#2} 代表 \meta{条目名}。定义最后的命令可带有一个参数,用于接受标题内容,一些特殊情况例如需要将标题内容放在标签后,可以通过定义命令实现:
\begin{ctexexam}
@@ -900,19 +873,14 @@
toc/pagenumwd = 0pt
}
\end{ctexexam}
-\end{options}
-
-\begin{commands}
\command{RegisterTocName}[\sarg\marg{条目名列表}]\newtagv[Changed]{2024bo}%
给 \meta{条目名列表} 中的每个 \meta{条目名} 标题注册用于设置目录样式的选项,即选项前有符号 \ding{73} 表示需要注册后使用。前面提到的条目类型均已注册,新类型的条目注册后默认格式与图表条目相同。这个命令可以重复使用,会重置目录条目为默认格式。带有星号参数的命令使注册目录的条目形成一个段落,此时多出下面三个选项可用:
- \begin{options}
\keyval{tocbegin}{开始代码}\dtag\newtagv{2024as}%
当前级别目录条目第一个标题前的代码,仅在存在更高级别的条目时有效。
\keyval{tocsep}{中间代码}\dtag\Default{\Marg{.—}}\newtagv{2024as}%
当前级别目录条目每个标题之间的代码。
\keyval{tocend}{结束代码}\dtag\Default{\Marg{.}}\newtagv{2024as}%
当前级别目录条目最后一个标题后的代码。
- \end{options}
\command{contentsuse}[\marg{条目名}\marg{扩展名}]
激活条目类型名称为 \meta{条目名} 的目录定制功能,它使用的目录文件后缀为 \meta{扩展名}。需要在激活条目后再使用命令 \cs{RegisterTocName} 注册选项。
\command{DeclareFloatList}[\marg{条目名}\marg{扩展名}]
@@ -961,9 +929,6 @@
\end{ctexexam}
\command{contentsmargin}[\oarg{修正距离}\marg{右边距}]
设置目录中引导线到版心右边的距离,用于条目页码的精细调整。当设计条目页码对齐方式或数字较大时,可以设置适当的 \meta{右边距}。\meta{修正距离} 是在过长而换行的标题右侧 \meta{右边距} 基础上附加的距离。此命令可在导言区全局使用或在 \option{tocformat} 选项给特定条目类型单独使用。
-\end{commands}
-
-\begin{options}
\keychoice{hang}{\fbox{true},false}
悬挂缩进选项 \option{hang} 使目录条目为悬挂缩进形式。缩进距离为条目标签及其与标题内容间距的长度和。通常情况下会统一设置条目标题是否悬挂缩进,因此这个选项被设计为对所有类型条目生效。
\keyval{lolskip}{弹性长度}\Default{10pt}
@@ -982,16 +947,14 @@
统一设置所有类型条目的左边缩进。
\keyval{tocrule-every}{引导线命令}
统一设置所有类型的目录引导线样式。
- \begin{commands}
\command{ExcludeEveryTocName}[\marg{条目名列表}]\newtagv{2024bn}
用于指定带有 \option*{every} 后缀选项排除的条目类型。
- \end{commands}
-\end{options}
+\end{cnltxlist}
\section{环境和命令}
\subsection{文区命令}
-\begin{commands}
+\begin{cnltxlist}
\command{frontmatter}[\sarg\oarg{编号格式}]\Default{Roman}
前言区命令。使部分和章标题不编号,带有星号的变体命令不使用 \cs{cleardoublepage} 命令。页码 \meta{编号格式} 可设置为 \code{arabic}、\code{Alph}、\code{alph}、\code{Roman}、\code{roman} 和 \code{chinese} 形式。
\command{mainmatter}[\sarg]
@@ -1002,20 +965,18 @@
清双页命令可以确保下一页文本总在奇数页开始,在奇数页使用它会产生空白偶数页。文区命令 \cs{frontmatter} 和 \cs{mainmatter} 会用到清双页命令,在启用文类选项 \option*{openright} 时标题命令 \cs*{part} 和 \cs*{chapter} 也会默认用到清双页命令。
\command{blankpagestyle}[\marg{页面风格}]
多出空白页的 \meta{页面风格} 用空白页面风格命令 \cs{blankpagestyle} 全局指定,或使用清双页命令的可选参数局部指定。空白页默认的风格为 \code{empty},即空的页眉页脚。
- \end{commands}
+\end{cnltxlist}
\subsection{目录命令}
\label{subsec:directory command}
\easybook{} 改进了标准文档类中定制性较低的章节标题和图表标题目录命令。现在目录命令带有可选参数用于设置标题格式和栏数等,并且与标准文档类不同的是目录命令可在正文中\textbf{重复}使用。更多目录命令的创建和样式设置可参考\ref{subsec:catalog}。
-\begin{commands}
+\begin{cnltxlist}
\command{tableofcontents}[\sarg\oarg{键值列表}\darg{代码钩子}]
章节标题目录命令,支持中英文双语标题目录输出。带有星号参数不输出目录条目上方的标题。\meta{代码钩子} 是当输出方案 \keyis{plan}{both} 时中文与英文目录之间执行的代码,可以插入设置目录样式和换页等命令。
- \begin{options}
\keychoice{plan}{\fbox{cn},bi,both}\newtag[Exp]%
章节标题目录的输出方案。\code{cn} 只输出中文目录,\code{bi} 只输出英文目录。\code{both} 同时连续输出中文和英文目录,需要与双语目录标题命令 \cs{bichapter} 等或双语标题选项 \option{title} 配合使用。
\keyval{bicontentsname}{英文目录标题}\Default{Contents}
英文目录的标题,为通用接口命令 \cs*{ctexset} 的选项。
- \end{options}
\command{listoffigures}[\sarg\oarg{键值列表}]
输出图片目录命令。带有星号参数的命令不输出目录标题。
\command{listoftables}[\sarg\oarg{键值列表}]
@@ -1024,11 +985,8 @@
输出代码目录命令。带有星号参数的命令不输出目录标题。
如果需要部分而不是全文的目录或其它类型的目录,可以查看 \pkg*{titletoc} 宏包的相关示例。如果需要双语图表目录,可以查看 \pkg*{bicaption} 宏包的相关示例。上面目录命令的可选参数改进了原本单一的功能,也提供了配置命令 \cs{SetTocOuter} 在目录命令外设置选项默认值。
- \begin{commands}
\command{SetTocOuter}[\marg{键值列表}]\newtag%
统一设置上述所有目录可选参数的默认值\footnote{由于目录命令通常只在文中使用一次,因此不设计为可以分别指定不同目录的参数。},其中 \meta{键值列表} 的选项如下:
- \end{commands}
- \begin{options}
\keyval{level}{标题命令}
设定输出目录标题的命令。如果使用 \option{title} 选项设置了双语标题则需要配合双语标题命令。
\begin{ctexexam}
@@ -1047,7 +1005,6 @@
用于更改目录的双语标题。标题之间用一个英文逗号分开,对主目录来说前部分为中文目录标题,后部分为英文目录标题,对图表和代码目录来说后部分则是加入英文目录的条目。也可以只有一部分,表示中文目录的标题。
\keychoice{bilist}{mix,\fbox{new}}
确定章节标题目录中双语标题条目的输出排列方式。选项 \code{mix} 使每个英文标题条目在中文目录中跟随对应的中文标题输出,\code{new} 则在新建的英文目录中输出英文标题。这是个全局选项,在所有目录的可选参数中使用均可生效,但推荐在章节标题目录中使用。
- \begin{commands}
\command{ebifbitoc}[\marg{英文目录代码}\marg{中文目录代码}]\newtag%
启用混合双语目录条目即 \keyis{bilist}{mix} 时,在设置目录样式时可以配合 \cs{ebifbitoc} 命令判断当前条目是否为英文,从而输出不同的代码。
\begin{ctexexam}
@@ -1059,7 +1016,6 @@
\UseTocStyle{section}{fancy}{toc}
\tableofcontents[bilist = mix]
\end{ctexexam}
- \end{commands}
\keyval{format}{目录标题格式}
设置目录标题的格式,在标题级别为 \code{chapter} 或者 \cls*{article} 模式且标题级别为 \code{section} 时有效。
\keyval{aftername}{标签后代码}
@@ -1070,12 +1026,11 @@
控制章节标题与之前正文的分隔关系。一般用于设置是否在标题之前分页或者设置行间罚点,生效情形同上。
\keyval{pagestyle}{页面风格}\Default{empty}
目录标题所在页的页面格式,仅当目录以 \code{chapter} 级别输出时有效。除了上述选项还支持 \CTeX 键值列表路径 \module*{chapter} 或 \module*{section} 所有的章节标题样式选项。
- \end{options}
-\end{commands}
+\end{cnltxlist}
\subsection{双语章节标题和新建标题}
双语目录标题命令目前设置了常用的三个级别,它们将中文标题正常输出,并使中英文标题加入双语目录。类似于标准文档类,这三个标题命令分别具有独立的计数器\footnote{默认情况下与普通标题命令共享使用计数器。},并对应 \cs*{the}\meta{计数器} 的值,可以用于 \option{number} 选项更改英文目录中标题的编号格式。这个功能是为国内一些高校的学位论文模板的要求设计,在一般情况和英文模式下\textbf{不需要使用}。
-\begin{commands}
+\begin{cnltxlist}
\command{bichapter}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
\code{chapter} 章级别的双语目录标题命令,具有独立的 \code{bichapter} 计数器。
\command{bisection}[\sarg\oarg{目录中文标题}\marg{中文标题}\marg{目录英文标题}]
@@ -1084,19 +1039,14 @@
\code{subsection} 小节级别的双语目录标题命令,具有独立的 \code{bisubsection} 计数器。
它们的星号变体命令使文中标题不编号,但是仍然加入双语目录,若英文标题参数空置那么仅加入中文目录而不加入英文目录,这一特点与 \cs*{chapter}\sarg{} 等命令的行为不太一样,在一些情况下会用到。可选参数是目录中的中文条目,默认与中文标题一致,正文标题过长时可用它设置在目录中显示的标题。默认情况下双语目录条目的格式是一致的,共享使用 \module*{toc} 模块的设置。提供了两个选项 \option{biname} 和 \option{binumber} 修改英文目录章标题条目的名字及编号:
- \begin{options}
\optpath{chapter/}\kvsplit+{biname}{英文目录前名字,英文目录后名字}\Default{Chapter\cs*{space}}
更改英文目录 \code{chapter} 级别的标题条目编号前后名字,类似于 \CTeX 的 \option*{name} 选项。
\optpath{chapter/}\key{binumber}{英文目录编号输出命令}\Default{\cs*{arabic}\Marg{chapter}}
更改英文目录 \code{chapter} 级别的标题条目编号输出格式,类似于 \CTeX 的 \option*{number} 选项。下面两种设置英文目录中章标题编号的方式等效:
- \end{options}
\begin{ctexexam}
\ctexset{chapter/binumber = \arabic{chapter}}
\BeforeAddtoBitoc{\ctexset{chapter/nmuber = \arabic{chapter}}}
\end{ctexexam}
-\end{commands}
-
-\begin{commands}
\command{appendix}[\splitoarg{前名字,后名字}\darg{编号输出命令}]
附录起始命令,其后的章节标题变为附录形式。\meta{前名字} 为英文目录中附录标题的前名字,同理 \meta{后名字} 为英文目录中附录标题的后名字。前后名字之间用一个半角逗号分开,也可以只有一部分,表示英文目录中附录标题前名字。\meta{编号输出命令} 为附录标题计数器在英文目录中的编号命令。注意这两个参数仅对 \code{bichapter} 级别的标题生效。
\command{BeforeAddtoBitoc}[\sarg\marg{英文标题加入目录前的代码}]
@@ -1105,9 +1055,6 @@
\BeforeAddtoBitoc{\ctexset{section/name = Section\space}}
\bisection{中文标题}{English title}
\end{ctexexam}
-\end{commands}
-
-\begin{commands}
\command{NewTitleCommand}[\oarg{基础标题}\marg{条目名}\marg{章节层次}]\newtagv{2024aw}%
创建一个命令名为 \meta{条目名} 新章节标题,并且支持 \CTeX 中的标题样式选项机制。指定可选参数后标题格式除了编号/名字会与 \meta{基础标题} 相同,否则默认为空。同时创建一个名为 \meta{条目名} 的计数器和标记命令 \code{\textbackslash}\meta{条目名}\code{\textcolor{cs}{mark}}。同时还需指定标题的 \meta{章节层次},例如标准文档类中 \code{chapter} 级别为 \code{0}。
\command{NewTitleEntryCommand}[\oarg{扩展名}\marg{条目名}]\newtagv{2024aw}%
@@ -1125,11 +1072,11 @@
\lchapter{正常标题}
\lchapterentry{加入目录的标题}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection[上标和下标]{上标和下标\smodule{tools}}
上标和下标的功能来自 \pkg*{spbmark} 宏包,下面有三个命令可以用于输出上标和下标。可以使用键值列表的形式对上下标格式进行局部或全局设置,下面命令中两个可选参数的键值列表是等效的。全局设置的详情见\ref{subsubsec:super-sub-script},更多命令和详细用法见 \pkg*{spbmark} 宏包说明文档。
-\begin{commands}
+\begin{cnltxlist}
\command{super}[\sarg\oarg{键值列表1}\marg{内容}\oarg{键值列表2}]
输出上标的命令,可用于文本和数学模式,在数学模式中可代替 \code{\^{}} 符号和 \cs*{sp} 命令。
\command{sub}[\sarg\oarg{键值列表1}\marg{内容}\oarg{键值列表2}]
@@ -1140,7 +1087,6 @@
根据上下标处于数学还是文本模式分别设置不同的值,应当在格式命令或偏移距离选项中使用。
上下标命令键值列表中共同的选项如下所示。当下面除 \option{mode} 以外的选项用于 \module*{style} 模块全局设置时,它们将根据前面最近一个命令的类型设定相应值。
- \begin{options}
\keyval{vmove}{刚性长度}\Default{0pt}
上标或下标的垂直偏移。如果是上下标命令使用则代表上标和上标间的额外垂直距离 \option{vsep}。
\keyval{hmove}{刚性长度}\Default{0pt}
@@ -1153,20 +1099,19 @@
段落中当前行上标或下标的基线与下一行的间距。
\keychoice{mode}{text,math,\fbox{match}}
上标或下标的输出格式。可以为文本 \code{text} 或数学 \code{math} 模式。当使用选项 \code{match} 时可以根据当前段落所处的模式自动匹配。
- \end{options}
-\end{commands}
+\end{cnltxlist}
\subsection{公式}
-\begin{environments}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\environment{equation}\default{}
\environment{multline}\default{}
\environment{gather}\default{}
\environment{align}
\pkg*{amsmath} 宏包提供了一系列行间数学环境,它们可以排布各种对齐或不对齐的公式组。\env{multline} 环境用于一行无法放下的长公式,\env{gather} 环境用于每行居中的公式组,\env{align} 环境用于多列对齐的公式组。还有例如 \pkg*{mathtools} 等对数学功能进行扩展的宏包,提供了更全面的数学命令与环境。
-\end{environments}
+\end{cnltxlist}
\subsection{表格}
-\begin{environments}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\environment{tabular}[\marg{列格式}]\default{}
\environment{tblr}[\marg{键值列表}]
\pkg*{tabularray} 是一个强大且全面的表格宏包,不依赖其它表格宏包所以同时使用不会产生冲突。不仅提供了各种传统表格宏包的功能,还实现了用键值列表方式简便地设置表格样式。具体用法可见宏包的说明文档,下面演示一个 \env{tblr} 表格的用法:
@@ -1188,10 +1133,10 @@
Rho & Sigma & Tau & Upsilon
\end{tblr}
\end{ctexexam}
-\end{environments}
+\end{cnltxlist}
\subsection{列表}
-\begin{commands}
+\begin{cnltxlist}
\command{setlist}[\sarg\splitoarg{列表类型,级别}\marg{键值列表}]
列表宏包 \pkg*{enumitem} 为系统预置的三个列表环境提供了灵活的标签以及间距控制,这是设置列表环境的通用接口命令。带有星号参数的命令在原有格式上补充。\meta{列表类型} 是排序列表 \code{enumerate}、常规列表 \code{itemize} 和主题列表 \code{description} 三个基本类型,也可以是 \cs{newlist} 新建的定理环境,若不指定则设置所有列表类型的格式。若不指定 \meta{级别} 则设置所有列表级别的格式。
\command{newlist}[\marg{列表名}\marg{列表类型}\marg{最大级别}]
@@ -1204,9 +1149,9 @@
\newlist{steps}{enumerate}{2}
\setlist[steps,1,2]{label = (\alph*)}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
-\begin{environments}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\environment{enumerate}[\oarg{键值列表}]\default{}
\environment{itemize}[\oarg{键值列表}]\default{}
\environment{description}[\oarg{键值列表}]
@@ -1218,10 +1163,10 @@
\begin{itemize}[label = \textbullet,labelsep = *]
\begin{description}[font = \sffamily\bfseries,style = nextline]
\end{ctexexam}
-\end{environments}
+\end{cnltxlist}
\subsection{悬挂缩进}
-\begin{commands}
+\begin{cnltxlist}
\command{hangpara}[\marg{缩进长度}\marg{缩进开始行数}]
悬挂缩进命令 \cs{hangpara} 使其后的一个段落保持悬挂缩进。参数与 \env{hangparas} 环境相同,不过只有一个段落。\meta{缩进长度} 可以是带单位的数值或由文本长度测定命令 \cs{widthof} 提供。
\command{hangfrom}[\sarg\oarg{缩进长度}\marg{悬挂内容}\oarg{缩进开始行数}]\newtag%
@@ -1230,22 +1175,16 @@
\hangfrom[\hangwd + 1em]{悬挂标签\hspace{0.5em}}[1]
\hangfrom*[3em]{}
\end{ctexexam}
-\end{commands}
-
-\begin{environments}
\environment{hangparas}[\marg{缩进长度}\marg{缩进开始行数}]
悬挂缩进环境 \env{hangparas} 有两个必选参数,使其中的段落均保持悬挂缩进。每个段落的缩进将以 \meta{缩进长度} 从 \meta{缩进开始行数} 开始。
-\end{environments}
+\end{cnltxlist}
\subsection{代码}
-\begin{commands}
+\begin{cnltxlist}
\command{lstdefinestyle}[\marg{代码风格}\marg{键值列表}]
代码抄录宏包 \pkg*{listings} 的代码风格定义命令,提供大量选项对代码样式进行高度定制。可以根据需要的代码语言和样式定义多种风格,默认使用的 \meta{代码风格} 为 \code{lst-latex}。
\command{lstinline}[\oarg{键值列表}\marg{行内代码}]
行内代码抄录命令。较原生的 \cs*{verb} 命令有较大改进,具有代码语言和样式支持。
-\end{commands}
-
-\begin{environments}
\environment{lstlisting}[\oarg{键值列表}]
行间代码抄录环境。支持多种语言库,默认使用 \code{LaTeX} 代码语言,可使用 \meta{键值列表} 局部修改代码样式。另外还提供了 \cs{lstnewenvironment} 命令包装自定义名称的代码环境。
\begin{ctexexam}
@@ -1260,18 +1199,18 @@
}
\lstnewenvironment{mypascal}[1][]{\lstset{style = lst-pascal,#1}}{}
\end{ctexexam}
-\end{environments}
+\end{cnltxlist}
-\begin{options}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\keyval{lstlistlistingname}{代码目录标题名}\default{}
\keyval{lstlistingname}{代码题注标题名}
代码目录名与代码环境题注名选项 \option{lstlistlistingname} 和 \option{lstlistingname} 用法与 \CTeX 使用手册标题汉化一节类似,可以看作对这节的扩展。
-\end{options}
+\end{cnltxlist}
\subsection{盒子}
\label{subsec:box}
文档类预置了两个行间盒子环境和两个行内盒子命令,需要在导言区\textbf{手动载入} \pkg*{tcolorbox} 宏包提供支持。它们 \meta{配置选项} 的键值列表可见宏包文档的Option Keys一节,可以进行边距、字体及背景颜色等各种个性化设置。如果 \meta{配置选项} 较长且希望在原有基础上改为全局固定的样式,可以使用 \cs{addtotcbstyle} 命令设置,第一个参数为 \code{tc-}\meta{环境或命令名}。
-\begin{commands}
+\begin{cnltxlist}
\command{deftcbstyle}[\marg{盒子风格}\marg{键值列表}]
新建或重置一个名称为 \meta{盒子风格} 的 \pkg*{tcolorbox} 宏包盒子风格,可以与 \cs{addtotcbstyle} 命令联用。
\command{addtotcbstyle}[\marg{盒子风格}\marg{键值列表}]
@@ -1292,9 +1231,6 @@
盒子内容
\end{mytcbox}
\end{ctexexam}
-\end{commands}
-
-\begin{environments}
\environment{easyboxi}[\sarg\oarg{颜色名}\darg{段落标题}\oarg{配置选项}]
行间环境 \env{easyboxi} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认标题为空。
\begin{ctexexam}
@@ -1307,20 +1243,17 @@
\end{ctexexam}
\environment{easyboxii}[\sarg\oarg{颜色名}\darg{段落标题}\oarg{配置选项}]
环境 \env{easyboxii} 用法与 \env{easyboxi} 类似,同样带有三个可选参数。盒子的左边带有一条粗竖线,背景颜色为竖线颜色的浅色。\meta{颜色名} 选项可以设置竖线的颜色。使用星号参数则盒子无背景颜色。
-\end{environments}
-
-\begin{commands}
\command{eboxi}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
行内盒子命令 \cs{eboxi} 具有模糊边缘类似高亮的效果。
\command{eboxii}[\oarg{颜色名}\marg{内容}\oarg{配置选项}]
行内盒子命令 \cs{eboxii} 则有直角边缘和四周框线,效果类似带背景色的 \cs*{fbox} 盒子。
-\end{commands}
+\end{cnltxlist}
\section{扩展功能}
\subsection{物理量}
使用 \pkg*{siunitx} 宏包提供国际单位制的物理量支持。\pkg*{siunitx} 宏包旨在为 \hologo{LaTeX} 用户提供一种统一的方法,以便正确、轻松地排版数字和单位。\pkg*{siunitx} 的设计理念是默认遵循约定的规则,但允许通过选项设置进行更改。
-\begin{commands}
+\begin{cnltxlist}
\command{num}[\oarg{键值列表}\marg{数字}]
\cs{num} 命令可以输出以科学计数法表示的数值。
\command{unit}[\oarg{键值列表}\marg{单位}]
@@ -1335,21 +1268,21 @@
\qty{5}{\mole}
\qtyrange[unit-color = green]{1.5}{4}{kg}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection{化学式}
除了以普通公式的方式,化学式的输出还可用 \pkg*{chemformula} 宏包实现。\pkg*{chemformula} 的工作原理与 \pkg*{mhchem} 非常相似,但对化合物、化学计量数和箭头的输入方式更为严格。同时 \pkg*{chemformula} 提供了多种自定义输出的可能性。
-\begin{commands}
+\begin{cnltxlist}
\command{ch}[\oarg{键值列表}\marg{化学式}]
无机化学式使用 \cs{ch} 命令书写。化合物表达式中的原子数不需要加下标符号,化学计量数与表达式间隔一个空格。
\begin{ctexexam}
\ch{[Cu(NH3)4]^2+}
\ch{Cu2S + 2 O2 - 2 e^- == 2 Cu^2+ + SO4^2-}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection{计数器}
-\begin{commands}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\command{newcounter}[\marg{计数器}\oarg{父计数器}]\default{}
\command{setcounter}[\marg{计数器}\marg{整数}]\default{}
\command{stepcounter}[\marg{计数器}]
@@ -1362,10 +1295,10 @@
\counterwithin[\Roman]{child}[-]{parent}
\counterwithout*{child}{parent}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection{标签引用}
-\begin{commands}
+\begin{cnltxlist}
\command{labelformat}[\marg{计数器}\marg{标签引用格式}]
标签格式命令 \cs{labelformat} 可以设置标签引用格式。\meta{标签引用格式} 中 \code{\#1} 代表 \cs*{the}\meta{计数器},可以设置引用序号的前缀和后缀。也可以使用 \pkg*{cleveref} 宏包提供更强大的标签功能。
\command{AtEndPreamble}[\marg{钩子代码}]
@@ -1375,24 +1308,24 @@
\labelformat{chapter}{第\thechapter 章}
\AtEndPreamble{\usepackage{cleveref}}
\end{ctexexam}
-\end{commands}
+\end{cnltxlist}
\subsection{图表题注}
\pkg*{caption} 宏包提供了多种方法来定制浮动环境(例如 \env{figure} 和 \env{table})中的标题,并可与许多其它宏包配合使用。功能包括旋转题注、侧向题注和连续题注等。
-\begin{commands}
+\begin{cnltxlist}
\command{captionsetup}[\oarg{条目名}\marg{键值列表}]
这是 \pkg*{caption} 宏包的接口命令,\meta{键值列表} 提供多个选项更改图表题注的格式。题注主要由三部分组成:标题标签即图表名与题注编号的组合,标题文本本身通常是内容的简短描述,以及将文本与标签分开的题注分隔符。可以在导言区设置整体格式,也可以在正文使用局部更改格式。
-\end{commands}
+\end{cnltxlist}
-\begin{commands}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\command{caption}[\sarg\oarg{目录标题}\marg{标题}]\default{}
\command{captionof}[\sarg\marg{条目名}\oarg{目录标题}\marg{标题}]\default{}
\command{bicaption}[\sarg\oarg{目录中文标题}\marg{中文标题}\oarg{目录英文标题}\marg{英文标题}]
题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动环境 \env*{figure} 和 \env*{table} 中使用。在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定条目名。可以搭配 \pkg*{newfloat} 宏包创建更多类型的浮动环境并设置相应题注。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
-\end{commands}
+\end{cnltxlist}
\subsection{索引}
-\begin{commands}
+\begin{cnltxlist}
\command{indexsetup}[\marg{键值列表}]
\pkg*{imakeidx} 宏包增强了索引的功能,可使用户在制作和排版文档的同时制作一个或多个索引。这是 \pkg*{imakeidx} 宏包的接口命令,用于设置索引表的整体格式。
\command{index}[\oarg{索引名}\marg{标签}]
@@ -1401,22 +1334,20 @@
用于导言区开启索引收集的命令。这个命令可以重复使用收集多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表没必要重复使用。
\command{printindex}[\sarg\oarg{键值列表}]
打印不同索引表的命令。这个命令被重新定义,\meta{键值列表} 中的选项与\ref{subsec:directory command} 其它目录命令相同,但是接口命令 \cs{indexsetup} 的部分选项失效。
- \begin{options}
\keyval{name}{索引名}
指定输出名为 \meta{索引名} 的索引表,如果只使用一个索引表则默认为项目文件名不需要指定。
- \end{options}
-\end{commands}
+\end{cnltxlist}
\subsection{边注}
-\begin{commands}
+\begin{cnltxlist}
\command{marginnote}[\oarg{左文本}\marg{右文本}\oarg{垂直偏移}]
边注命令用于在两侧页边空白添加标注。如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
\command{reversemarginpar}
边注位置设置命令,用于将边注排版到与默认边空位置相反的边空中。
-\end{commands}
+\end{cnltxlist}
\subsection{公式符号对照}
-\begin{environments}
+\begin{cnltxlist}
\environment{eqcomp}[\oarg{键值列表1}\darg{键值列表2}]
一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。对照列表的 \meta{键值列表2} 与 \pkg*{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。
\begin{ctexexam}
@@ -1426,16 +1357,12 @@
\symb{C}[---] 符号说明
\end{eqcomp}
\end{ctexexam}
-\end{environments}
-
-\begin{commands}
\command{symb}[\sarg\marg{符号}\oarg{引导符}]
符号条目命令 \cs{symb} 类似 \cs*{item},需要在环境内使用,带有星号的命令可在文本段落单独使用。
\command{seteqcomplist}[\marg{键值列表2}]
对照列表条目格式的 \meta{键值列表2} 可以使用 \cs{seteqcomplist} 全局设置。
\command{seteqcomp}[\marg{键值列表1}]
对照环境的 \meta{键值列表1} 可以使用 \cs{seteqcomp} 全局设置,它的选项如下:
- \begin{options}
\keyval{width}{符号宽度}\Default{10pt}
设置适当的符号宽度可以防止文字重叠和边界溢出等问题。
\keyval{delim}{引导符}\Default{——}
@@ -1454,22 +1381,21 @@
符号的字体。数学和文本符号模式应采用不同的字体命令,最后一个命令可以接受一个参数,这个参数为符号。
\keychoice{mode}{\fbox{math},text}
符号字体模式,可以为数学字体或者文本字体。
- \end{options}
-\end{commands}
+\end{cnltxlist}
\subsection{插入文档}
-\begin{commands}
+\begin{cnltxlist}
\command{includepdf}[\oarg{键值列表}\marg{文档名}]
该命令由文档宏包 \pkg*{pdfpages} 提供。可以将其它 \code{pdf} 文档插入当前文档,比如插入其它软件制作的封面。可选参数可以指定插入页数、逻辑页和横向页面等,详情查看宏包文档。
-\end{commands}
+\end{cnltxlist}
\subsection{下划线}
-\begin{commands}\noitemsep
+\begin{cnltxlist}[itemsep = 0ex]
\command{uline}[\marg{下划直线}]\default{}
\command{uuline}[\marg{下划双直线}]\default{}
\command{uwave}[\marg{下划波浪线}]
\pkg*{ulem} 宏包提供了多种下划线命令,可以重新定义 \cs{ULthickness} 命令控制下划线的粗细。下划线的深度由 \cs{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。
-\end{commands}
+\end{cnltxlist}
\appendix
\setlist[1]{}
diff --git a/macros/latex/contrib/rpgicons/README.md b/macros/latex/contrib/rpgicons/README.md
index febd990253..e889b70b03 100644
--- a/macros/latex/contrib/rpgicons/README.md
+++ b/macros/latex/contrib/rpgicons/README.md
@@ -1,4 +1,4 @@
-![Version 1.8.2](https://img.shields.io/badge/version-1.8.2-blue)
+![Version 1.8.3](https://img.shields.io/badge/version-1.8.3-blue)
<img width="200" alt="rpgicons-example" src="https://github.com/jasperhabicht/rpgicons/assets/6378801/81a1d0aa-7a4f-4f83-bbdc-3bc3332023b2" />
diff --git a/macros/latex/contrib/rpgicons/rpgicons-doc.pdf b/macros/latex/contrib/rpgicons/rpgicons-doc.pdf
index 7eab416244..7fa0c036d7 100644
--- a/macros/latex/contrib/rpgicons/rpgicons-doc.pdf
+++ b/macros/latex/contrib/rpgicons/rpgicons-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/rpgicons/rpgicons-doc.tex b/macros/latex/contrib/rpgicons/rpgicons-doc.tex
index 72aad456a7..7eef59a1a4 100644
--- a/macros/latex/contrib/rpgicons/rpgicons-doc.tex
+++ b/macros/latex/contrib/rpgicons/rpgicons-doc.tex
@@ -11,8 +11,8 @@
% This work has the LPPL maintenance status `maintained'.
%
\documentclass[a4paper]{article}
-\def\rpgiconsfileversion{1.8.2}
-\def\rpgiconsfiledate{28 April 2024}
+\def\rpgiconsfileversion{1.8.3}
+\def\rpgiconsfiledate{15 May 2024}
\usepackage[T1]{fontenc}
\usepackage{Alegreya}
@@ -232,7 +232,7 @@
[The rpgicons package]
{The \titlemacro{rpgicons} package}
{A set of high-quality icons for use in notes for tabletop role-playing games}
- {Jasper Habicht}[E-mail: \href{mailto:mail@jasperhabicht.de}{mail@jasperhabicht.de}]
+ {Jasper Habicht}[E-mail: \href{mailto:mail@jasperhabicht.de}{mail@jasperhabicht.de}. I am grateful to Joseph Wright who fixes bugs at an astonishing speed and to all other contributors to this package.]
{Version \rpgiconsfileversion, released on \rpgiconsfiledate}
\changes{v1.1.0}{2023/08/15}{First public release.}
@@ -261,6 +261,7 @@
\changes{v1.7.0}{2024/03/16}{Macro for easy typesetting using roll dice syntax added in L3 variant, compatibility mode updated.}
\changes{v1.8.0}{2024/03/24}{Unified wrapper to load either package variant.}
\changes{v1.8.2}{2024/04/28}{Roll dice syntax for PGF variant.}
+\changes{v1.8.3}{2024/05/15}{Minor compatibility fix. Example of how to use pics added to ducumentation.}
\begin{document}
@@ -277,11 +278,11 @@
The \macro{rpgicons} package provides a set of high-quality icons for use in notes for tabletop role-playing games. The icons are meant to be used in the body text, but they can also be used in other contexts such as graphics or diagrams.
-The package comes in two variants, a L3 variant based on the \macro{l3draw} package which is loaded per default and a PGF veriant based on PGF/Ti\emph{k}Z.
+The package comes in two variants, a L3 variant based on the \macro{l3draw} package which is loaded per default and a PGF variant based on PGF/Ti\emph{k}Z.
\section{Loading the package}
-To install the package, copy the relevant package files \macro{rpgicons.sty}, \macro{rpgicons-l3.sty} and \macro{rpgicons-pgf.sty} into the working directory or into the \macro{texmf} directory. After the package has been installted, the \macro{rpgicons} package is loaded by calling \macro{\usepackage{rpgicons}} in the preamble of the document.
+To install the package, copy the relevant package files \macro{rpgicons.sty}, \macro{rpgicons-l3.sty} and \macro{rpgicons-pgf.sty} into the working directory or into the \macro{texmf} directory. After the package has been installed, the \macro{rpgicons} package is loaded by calling \macro{\usepackage{rpgicons}} in the preamble of the document.
\begin{macrodef}l3\end{macrodef}
The L3 variant of the package is loaded by default. To load it explicitly, the package can be loaded using the option \macro{l3}. Alternatively, \macro{\usepackage{rpgicons-l3}} can be called instead.
@@ -297,7 +298,7 @@ The PGF variant of the package loads the \macro{tikz} package which in turn load
\section{Main user commands}
-Regardless of the variant of the package, a set of user commands is always available. These are described in the following. Depending on the use of the L3 or the PGF veriant, certain specific commands or options are available that are explained in the following sections in further detail.
+Regardless of the variant of the package, a set of user commands is always available. These are described in the following. Depending on the use of the L3 or the PGF variant, certain specific commands or options are available that are explained in the following sections in further detail.
Because of the way the package defines the icons, every of the below described user commands can actually be used together with every shape. However, the combinations of shapes and commands as described in the following subsections are preferable.
@@ -498,7 +499,7 @@ The command \macro{\condition} prints icons depicting a condition of a character
The L3 variant of the package that uses the \macro{l3draw} package is loaded by default or explicitly by either calling \macro{\usepackage[l3]{rpgicons}} or \macro{\usepackage{rpgicons-l3}} in the preamble of the document after having installed the files \macro{rpgicons.sty} and \macro{rpgicons-l3.sty}. The \macro{l3draw} package is an experimental package that provides only basic drawing functionality. The L3 variant thus only supports a certain set of option for styling the icons.
-The L3 variant of the package does not load the \macro{xcolor} package, but makes use of the \macro{l3color} module which uses a similar syntax like the \macro{xcolor} package, but color defintions made using the \macro{l3color} module are not directly usable via commands provided by the \macro{xcolor} package. Therefore, setting a color using the \macro{\color} macro provided by the \macro{xcolor} package won't affect the color of the icons.
+The L3 variant of the package does not load the \macro{xcolor} package, but makes use of the \macro{l3color} module which uses a similar syntax like the \macro{xcolor} package, but color definitions made using the \macro{l3color} module are not directly usable via commands provided by the \macro{xcolor} package. Therefore, setting a color using the \macro{\color} macro provided by the \macro{xcolor} package won't affect the color of the icons.
\begin{macrodef}compat\end{macrodef}
The \macro{l3draw} package is experimental and subject to ongoing updates. Loading the L3 variant of the package with the option \macro{compat} will use macro definitions that have been available since the last major TeX Live release as replacement for certain functions that only became available in the most recent versions of the \macro{l3draw} and related packages.
@@ -581,7 +582,7 @@ every attack
every condition
every <shape>
\end{macrodef}
-Styles following the pattern \macro{rpg icons/every} followed by a space and the name of the command or the shape can be used to apply styles to every instance of this command or shape. For example, \macro{\rpgiconsset{every die={color={red}}}} can be used to draw in red all icons created using the \macro{\die} command. Calling \macro{\rpgiconsset{every charisma={color={red}}}} will draw every instace of the \macro{charisma} shape in red.
+Styles following the pattern \macro{rpg icons/every} followed by a space and the name of the command or the shape can be used to apply styles to every instance of this command or shape. For example, \macro{\rpgiconsset{every die={color={red}}}} can be used to draw in red all icons created using the \macro{\die} command. Calling \macro{\rpgiconsset{every charisma={color={red}}}} will draw every instance of the \macro{charisma} shape in red.
\subsection{Setting options globally}
@@ -801,6 +802,42 @@ The icon is embedded as a node in the pic which has the name \macro{-node}. Thus
\end{macrodef}
The PGF variant of the package defines five Ti\emph{k}Z keys that are used to create pics using the relevant node shapes. Another key is defined to create keys that can be used to style all instances of a command or shape. In normal circumstances, it is not necessary to use these keys. They are mentioned here only for reference.
+The following example shows how to create the drawing on the first page of this documentation using Ti\emph{k}Z pics. We need to call \macro{rpg icons/create pic from ability shape} for the shapes \macro{twentyside}, \macro{buff} and \macro{ranged}, because per default no pics are defined for these shapes in combination with ability. Note the use of \macro{\space} to ensure correct use of spaces in the pic name as spaces are gobbled after commands in TeX.
+
+\begin{codeexample}
+\tikzset{
+ rpg icons/%
+ create pic from ability shape/%
+ .list={
+ twentyside,
+ buff,
+ ranged
+ },
+ rpg icons/every ability/.style={
+ ultra thick,
+ draw=white,
+ line join=round,
+ line cap=round
+ }
+}
+
+\begin{tikzpicture}[scale=4]
+ \foreach \x/\c [count=\i] in {
+ twentyside/264653,
+ charisma/287271,
+ armor/2a9d8f,
+ buff/e9c46a,
+ ranged/f4a261,
+ proficiency/e76f51
+ } {
+ \definecolor{color}{HTML}{\c}
+ \pic[fill=color, transform shape]
+ at ({60*\i+10}:{0.33cm})
+ {rpg icons \x\space ability};
+ }
+\end{tikzpicture}
+\end{codeexample}
+
\subsection{Roll dice syntax}
\begin{macrodef}
diff --git a/macros/latex/contrib/rpgicons/rpgicons-l3.sty b/macros/latex/contrib/rpgicons/rpgicons-l3.sty
index 491d05b17d..3103502bf3 100644
--- a/macros/latex/contrib/rpgicons/rpgicons-l3.sty
+++ b/macros/latex/contrib/rpgicons/rpgicons-l3.sty
@@ -10,7 +10,7 @@
%
% This work has the LPPL maintenance status `maintained'.
%
-\ProvidesExplPackage {rpgicons-l3} {2024-04-28} {1.8.2}
+\ProvidesExplPackage {rpgicons-l3} {2024-05-15} {1.8.3}
{rpg Icons Package (l3 Variant)}
\bool_new:N \l__rpgicons_unicode_mode_bool
diff --git a/macros/latex/contrib/rpgicons/rpgicons-pgf.sty b/macros/latex/contrib/rpgicons/rpgicons-pgf.sty
index 2b235beb48..0e0c037187 100644
--- a/macros/latex/contrib/rpgicons/rpgicons-pgf.sty
+++ b/macros/latex/contrib/rpgicons/rpgicons-pgf.sty
@@ -11,7 +11,7 @@
% This work has the LPPL maintenance status `maintained'.
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{rpgicons-pgf}[2024-04-28 rpg Icons Package (PGF Variant) (1.8.2)]
+\ProvidesPackage{rpgicons-pgf}[2024-05-15 rpg Icons Package (PGF Variant) (1.8.3)]
% provide pics option
\newif\ifrpgicons@pics\rpgicons@picsfalse
diff --git a/macros/latex/contrib/rpgicons/rpgicons.sty b/macros/latex/contrib/rpgicons/rpgicons.sty
index f80d5955c1..8079232a4f 100644
--- a/macros/latex/contrib/rpgicons/rpgicons.sty
+++ b/macros/latex/contrib/rpgicons/rpgicons.sty
@@ -10,7 +10,7 @@
%
% This work has the LPPL maintenance status `maintained'.
%
-\ProvidesExplPackage {rpgicons} {2024-04-28} {1.8.2}
+\ProvidesExplPackage {rpgicons} {2024-05-15} {1.8.3}
{rpg Icons Package}
\bool_new:N \l__rpgicons_use_legacy_variant_bool
@@ -20,7 +20,9 @@
l3 .default:n = { false } ,
pgf .bool_set:N = \l__rpgicons_use_legacy_variant_bool ,
pgf .default:n = { true } ,
- unknown .code:n = { \clist_put_right:Nn \l__rpgicons_forwarded_options_clist {#1} }
+ pics .code:n = { \clist_put_right:Nn \l__rpgicons_forwarded_options_clist { pics } } ,
+ compat .code:n = { \clist_put_right:Nn \l__rpgicons_forwarded_options_clist { compat } } ,
+ opacity .code:n = { \clist_put_right:Nn \l__rpgicons_forwarded_options_clist { opacity } }
}
\ProcessKeyOptions [ rpgicons / select ~ variant ]