From 1caaed73030c69f9f96c5138594089e2689e768b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 12 Jul 2021 03:01:21 +0000 Subject: CTAN sync 202107120301 --- macros/latex/contrib/easybook/README.md | 4 +- macros/latex/contrib/easybook/easybook.dtx | 109 ++++++++++++++++++----------- macros/latex/contrib/easybook/easybook.pdf | Bin 557312 -> 564912 bytes 3 files changed, 70 insertions(+), 43 deletions(-) (limited to 'macros/latex/contrib/easybook') diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md index d3e2188e8a..7c769767e1 100644 --- a/macros/latex/contrib/easybook/README.md +++ b/macros/latex/contrib/easybook/README.md @@ -8,7 +8,7 @@ This work may be distributed and/or modified under the conditions of the CC-BY 4 ## Website -| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [Font](https://wwe.lanzoui.com/b01ns361i) | +| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | # easybook 文档类 @@ -20,4 +20,4 @@ easybook 是基于 ctexbook 书籍文档类创建以极简为风格的模板, ## 网址 -| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [字体](https://wwe.lanzoui.com/b01ns361i) | \ No newline at end of file +| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | \ No newline at end of file diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 974c6c2049..afcbe2f704 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -28,7 +28,7 @@ % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/07/10\hskip\ccwd\relax v1.27\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/07/11\hskip\ccwd\relax v1.27b\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} @@ -208,7 +208,7 @@ % \end{syntax} % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否多栏排版,栏数默认为双栏,可使用 \opt{columns} 更改。\opt{title} 选项用于更改目录的标题,标题之间用一个英文逗号分开,也可以只有一部分,表示中文目录的标题。当设置了英文目录标题时,英文目录标题将会自动加入主文档目录,与 \tn{tableofcontents+} 配合输出。 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。} -% \changes{v1.24}{2021/04/04}{目录命令的可选参数增加标题键值。} +% \changes{v1.24}{2021/04/04}{目录命令的可选参数增加标题选项 \opt{title}。} % \changes{v1.25}{2021/06/02}{目录可设置多栏,并在 article 模式仍然生效。} % \end{function} % @@ -297,7 +297,7 @@ % \ding{229} 以上选项路径为 \opt{style/...} % \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。} % \changes{v1.23}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} -% \changes{v1.23}{2021/02/09}{增加控制页面横线粗细的选项。} +% \changes{v1.23}{2021/02/09}{增加控制页面横线粗细的选项 \opt{rulewidth}。} % \end{function} % % \begin{optdesc} @@ -719,7 +719,7 @@ % \end{syntax} % \ding{229} 以上选项路径为 \opt{tocset/(level)/...} 或 \opt{tocset/...} % \changes{v1.24}{2021/04/05}{可以设置图、表和代码目录的标签。} -% \changes{v1.24}{2021/04/06}{增加目录引导线右边对齐方式。} +% \changes{v1.24}{2021/04/06}{增加目录引导线右边对齐方式 \opt{line-align}。} % \changes{v1.24}{2021/04/19}{给目录增加 \opt{hang} 样式选项。} % \changes{v1.24}{2021/05/01}{给目录增加 \opt{format+} 和 \opt{rule-all} 选项。} % \end{function} @@ -826,13 +826,36 @@ % \end{center} % \end{function} % +% \subsection{悬挂缩进} +% \begin{function}[added = 2021-07-11]{\hangpara,hangparas} +% \begin{syntax} +% \tn{hangpara}\marg{缩进长度}\marg{缩进开始行数} +% \tn{begin}\{hangparas\}\marg{缩进长度}\marg{缩进开始行数} +% \ <段落内容> +% \tn{end}\{hangparas\} +% \end{syntax} +% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。 +% \changes{v1.27b}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。} +% \end{function} +% +% \subsection{代码} +% \begin{function}[added = 2021-01-05]{\lstinline,lstlisting,lstlistlistingname,lstlistingname} +% \begin{syntax} +% \tn{lstinline}\oarg{键值列表}\marg{行内代码} +% \tn{begin}\{lstlisting\}\oarg{键值列表} +% \ <行间代码> +% \tn{end}\{lstlisting\} +% \end{syntax} +% 加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,预置的代码样式名为 \opt{easy-listings}。\opt{lstlistlistingname} 和 \opt{lstlistingname} 分别是代码目录名与代码环境标题名,与 \CTeX 使用手册标题汉化一节类似,可使用 \tn{ctexset} 直接修改。 +% \end{function} +% % \subsection{习题} % \label{subsec:exercise} % \begin{function}[added = 2021-01-05,updated = 2021-07-03]{exercise} % \begin{syntax} -% \tn{begin}\marg{exercise}*+\oarg{键值列表}\parg{键值列表}\oarg{键值列表} +% \tn{begin}\{exercise\}*+\oarg{键值列表}\parg{键值列表}\oarg{键值列表} % \ \tn{item} <习题内容> -% \tn{end}\marg{exercise} +% \tn{end}\{exercise\} % \end{syntax} % 习题环境 \env{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号参数时不进行编号,使用 + 号参数独立编号并启用 \pkg{tcolorbox} 支持生成标题,并使 \opt{color} 生效,此时计数器使用的值为 \tn{thetcbcounter}。第三个 \meta{键值列表} 的选项与小节 \ref{subsec:sort list} 排序列表相同,\opt{number} 的编号格式也是如此。第一个 \meta{键值列表} 中包含的选项如下: % \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。} @@ -874,9 +897,9 @@ % \subsubsection{摘要盒子} % \begin{function}[added = 2021-01-05,updated = 2021-05-02]{outline} % \begin{syntax} -% \tn{begin}\marg{outline}\oarg{列表配置选项}\parg{标题名称}\oarg{盒子配置选项} +% \tn{begin}\{outline\}\oarg{列表配置选项}\parg{标题名称}\oarg{盒子配置选项} % \ \tn{item} <摘要内容> -% \tn{end}\marg{outline} +% \tn{end}\{outline\} % \end{syntax} % 摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。列表配置选项与 \pkg{enumitem} 宏包中列表的选项相同,可以设置摘要条目的各种距离。 % \end{function} @@ -891,9 +914,9 @@ % \subsubsection{段落盒子} % \begin{function}[added = 2021-01-05,updated = 2021-04-19]{easybox} % \begin{syntax} -% \tn{begin}\marg{easybox}*\oarg{颜色名|(Khaki)}\parg{段落标题}\oarg{配置选项} +% \tn{begin}\{easybox\}*\oarg{颜色名|(Khaki)}\parg{段落标题}\oarg{配置选项} % \ <盒子内容> -% \tn{end}\marg{easybox} +% \tn{end}\{easybox\} % \end{syntax} % 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用星号参数时给盒子添加边框,\meta{颜色名} 选项设置背景颜色,\meta{段落标题} 选项可以设置标题,默认无标题。 % \end{function} @@ -908,9 +931,9 @@ % % \begin{function}[added = 2021-04-19]{ebparbox} % \begin{syntax} -% \tn{begin}\marg{ebparbox}*\oarg{颜色名|(DarkSlateBlue)}\parg{段落标题}\oarg{配置选项} +% \tn{begin}\{ebparbox\}*\oarg{颜色名|(DarkSlateBlue)}\parg{段落标题}\oarg{配置选项} % \ <盒子内容> -% \tn{end}\marg{ebparbox} +% \tn{end}\{ebparbox\} % \end{syntax} % 环境 \env{ebparbox} 与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。 % \changes{v1.24}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。} @@ -925,18 +948,7 @@ % 设置了两个参数选项相同的行内盒子,盒子 \opt{eblink} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{ebemph} 也是抄录盒子,具有模糊边缘类似高亮的效果。 % \end{function} % -% \section{其它用法} -% -% \subsection{代码} -% \begin{function}[added = 2021-01-05]{\lstinline,lstlisting,lstlistlistingname,lstlistingname} -% \begin{syntax} -% \tn{lstinline}\oarg{键值列表}\marg{行内代码} -% \tn{begin}\marg{lstlisting}\oarg{键值列表} -% \ <行间代码> -% \tn{end}\marg{lstlisting} -% \end{syntax} -% 加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,预置的代码样式名为 \opt{easy-listings}。\opt{lstlistlistingname} 和 \opt{lstlistingname} 分别是代码目录名与代码环境标题名,与 \CTeX 使用手册中标题汉化一节用法相同,可使用 \tn{ctexset} 直接定义。 -% \end{function} +% \section{更多用法} % % \subsection{物理量} % \begin{function}[added = 2021-01-05,updated = 2021-05-18]{\num,\unit,\qty,\qtyrange} @@ -997,12 +1009,13 @@ % \end{function} % % \subsubsection{索引} -% \begin{function}[added = 2021-05-01,updated = 2021-06-25]{\index,\printindex} +% \begin{function}[added = 2021-05-01,updated = 2021-07-11]{\makeindex,\index,\printindex} % \begin{syntax} +% \tn{makeindex}\oarg{键值列表} % \tn{index}\oarg{索引名}\marg{标签} % \tn{printindex*+}\oarg{键值列表}\parg{索引名} % \end{syntax} -% \pkg{imakeidx} 宏包可使用索引的功能,重新定义了它的 \tn{printindex} 命令用于生成索引目录,\meta{键值列表} 及选项与节 \ref{sec:document command} 相同,但 \opt{multoc} 选项和 \pkg{imakeidx} 原本的接口命令 \tn{indexsetup} 部分选项失效。输出不同的索引目录时使用 \meta{索引名} 选项。 +% \pkg{imakeidx} 宏包提供了索引的功能,重新定义了它的 \tn{printindex} 命令用于生成索引目录,\meta{键值列表} 及选项与节 \ref{sec:document command} 相同,但是原本接口命令 \tn{indexsetup} 的部分选项失效。使用 \tn{makeindex} 命令开启索引收集,输出不同的索引目录时使用 \meta{索引名} 选项。 % \changes{v1.24}{2021/05/01}{重新定义 \tn{printindex} 命令与文档适配。} % \end{function} % @@ -1049,9 +1062,9 @@ % \subsection{指定行距的段落} % \begin{function}[added = 2021-03-14]{spacing} % \begin{syntax} -% \tn{begin}\marg{spacing}\marg{浮点数} +% \tn{begin}\{spacing\}\marg{浮点数} % \ <段落内容> -% \tn{end}\marg{spacing} +% \tn{end}\{spacing\} % \end{syntax} % 该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。 % \end{function} @@ -1151,7 +1164,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/07/10}{1.27} +\ProvidesExplClass{easybook}{2021/07/11}{1.27b} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -1398,7 +1411,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{etoolbox} -\ProvidesExplPackage{easybase}{2021/07/10}{1.27} +\ProvidesExplPackage{easybase}{2021/07/11}{1.27b} {Typeset Chinese theses or books} \cs_generate_variant:Nn \ctex_define:nn { nx } @@ -1511,7 +1524,6 @@ { protrusion = false } { microtype }, { list = off } { bicaption }, { many } { tcolorbox }, - { xindy } { imakeidx }, { upint } { newtxmath }, { svgnames } { xcolor } } @@ -1579,7 +1591,7 @@ enumitem[shortlabels,inline]+ chemformula+siunitx+pifont+ amsthm+thmtools+ - geometry+marginnote+nccfoots+ + geometry+marginnote+ pdfpages+multicol+ fancyhdr+titletoc+caption+ tabularray+ @@ -1894,14 +1906,29 @@ } } } +\tl_clear:N \@thefnmark +\cs_new:Npn \eb@makefnmark #1 + { + \tl_if_empty:oF {#1} + { + \group_begin: + \unrestored@protected@xdef\@thefnmark{#1} + \group_end: + } + } +\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext } +\cs_new:Npn \Footnotemark #1 { \eb@makefnmark{#1}\@footnotemark } +\cs_new:Npn \Footnotetext #1 { \eb@makefnmark{#1}\@footnotetext } \cs_new:Npn \eb_alph:n #1 { \int_to_alph:v { c@#1 } } \cs_set:Npn \thefootnote { \eb_footnote_counter:N \c@footnote } \cs_set:Npn \thempfootnote { \eb_alph:n { mpfootnote } } \contentsuse{lstlisting}{lol} +\seq_put_left:Nn \c__ctex_headings_seq { chapter } \seq_put_right:Nn \c__ctex_headings_seq { figure } \seq_put_right:Nn \c__ctex_headings_seq { table } \seq_put_right:Nn \c__ctex_headings_seq { lstlisting } +\seq_remove_duplicates:N \c__ctex_headings_seq \cs_new_protected:Npn \eb_toc_assign_keys:n #1 { \ctex_define:n { tocset/#1 .meta:nn = { ctex/tocset/#1 } {##1} } @@ -2362,12 +2389,6 @@ \ctex_at_end_package:nn { imakeidx } { - \makeindex[ - options = -M~texindy~-C~utf8, - program = truexindy, - columns = 2, - columnsep = 2\ccwd - ] \RenewDocumentCommand{\printindex}{st+oD(){\imki@jobname}} { \group_begin: @@ -2385,7 +2406,6 @@ \group_end: } } - \ctex_define:nn { chapter } { biname .code:n = @@ -2594,6 +2614,13 @@ \tl_gset:Nn \ULthickness { \l__eb_rule_width_dim } \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif} +\cs_new_protected:Npn \hangpara #1#2 + { \hangindent #1\hangafter #2\noindent\ignorespaces } +\NewDocumentEnvironment{hangparas}{mm+b} + { + \dim_zero:N \parindent + \everypar{\hangpara{#1}{#2}}#3\par + }{} \cs_new_protected:Npn \eb_enumitem_label_set:nn #1#2 { \SetEnumitemValue{label}{#1}{\color{ctex@emph}#2} } \clist_map_inline:nn @@ -3103,7 +3130,7 @@ abcdefghijklmnopqrstuvwxyz 0123456789 } -\ctex_at_end_preamble:n +\AtBeginDocument[hyperref] { \LoadPackage{hyperref} \urlstyle{same} @@ -3151,7 +3178,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/10}{1.27} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/11}{1.27b} {Customization of tcolorbox for easybook} \cs_new_protected:Npn \eb_tcb_theorem_set:n #1 diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index 8a95bd0721..f21fed288b 100644 Binary files a/macros/latex/contrib/easybook/easybook.pdf and b/macros/latex/contrib/easybook/easybook.pdf differ -- cgit v1.2.3