diff options
author | Karl Berry <karl@freefriends.org> | 2021-04-30 21:07:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-04-30 21:07:42 +0000 |
commit | f36fee618493ae988de9fd5b9bb8ae876a340ca0 (patch) | |
tree | 23dbc9ec5d41d30b083ef00d97b48f3090e6fbf7 /Master/texmf-dist | |
parent | 510c61fbfa6454db89adf44b23014b13adadc46f (diff) |
easybook (30apr21)
git-svn-id: svn://tug.org/texlive/trunk@59032 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/README.md | 42 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf | bin | 266732 -> 266711 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.pdf | bin | 466920 -> 466617 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 180 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 123 |
6 files changed, 168 insertions, 181 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/README.md b/Master/texmf-dist/doc/latex/easybook/README.md index a75444600b0..b18f85b2d0f 100644 --- a/Master/texmf-dist/doc/latex/easybook/README.md +++ b/Master/texmf-dist/doc/latex/easybook/README.md @@ -1,10 +1,13 @@ -# Easybook book document class +# Easybook document class -Easybook is a minimalist style template based on the ctexbook book document class. It is mainly suitable for typesetting Chinese books or notes, and can even be slightly modified to become a dissertation template. Some commonly used macro packages have been loaded to achieve general typesetting requirements. Although some details have been considered as much as possible, there are still deficiencies. This project is currently under active development. If you have good suggestions, please feel free to give feedback. +Easybook is based on the ctexbook book document class to create a minimalist style template, which can be seen as a further packaging of ctexbook. Although the ctex document class provides better Chinese support, it is generally necessary to load more macro packages for customization if you want to achieve personalized functions. Easybook has considered some details and has loaded some commonly used macro packages to achieve general typesetting requirements. It also has the function of article file type, so that users can easily set it up. It is suitable for typesetting Chinese and English academic books, notes or dissertations. This project is currently under active development. If you have any good suggestions, please feel free to give feedback. -## Reference documents +## Reference - [CTeX macro collection manual](https://ctan.org/pkg/ctex) +- [The LaTeX3 Interfaces](https://www.ctan.org/pkg/l3kernel) +- Latex2e Text Classes and Macro Packages Learning Manual — Hu Wei +- Introduction to LaTeX — Liu Haiyang - [Fudan University graduation thesis template](https://github.com/stone-zeng/fduthesis) - [Xiamen University graduation thesis template](https://github.com/CamuseCao/XMU-thesis) - [Wuhan University graduation thesis template](https://github.com/mtobeiyf/whu-thesis) @@ -18,13 +21,16 @@ This work may be distributed and/or modified under the conditions of the CC-BY 4 | [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [Font](https://wws.lanzous.com/b01ns361i) | -# easybook 书籍文档类 +# easybook 文档类 -easybook 是基于 ctexbook 书籍文档类的极简风格模板。它主要适用于中文书籍或笔记的排版,甚至可以稍作调整成为学位论文模板。已加载一些常用的宏包以实现一般的排版要求。尽管已尽可能多地考虑了一些细节,但仍然存在不足。目前本项目处于活跃的开发状态,如果您有好的建议欢迎进行反馈。 +easybook 是基于 ctexbook 书籍文档类创建以极简为风格的模板,可以看作对 ctexbook 的进一步包装。虽然 ctex 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。easybook 虑了一些细节并已载入一些常用宏包用于实现一般的排版需求,同时也具有 article 档类的功能,使用户可以简便地进行设置。它适用于排版中英文学术书籍、笔记或者是学位论文。目前本项目处于活跃的开发状态,如果您有好的建议欢迎进行反馈。 -## 参考文档 +## 参考文献 - [CTeX 宏集手册](https://ctan.org/pkg/ctex) +- [The LaTeX3 Interfaces](https://www.ctan.org/pkg/l3kernel) +- LaTeX2e 文类与宏包学习手册 — 胡伟 +- LaTeX 入门 — 刘海洋 - [复旦大学毕业论文模板](https://github.com/stone-zeng/fduthesis) - [厦门大学毕业论文模板](https://github.com/CamuseCao/XMU-thesis) - [武汉大学毕业论文模板](https://github.com/mtobeiyf/whu-thesis) @@ -36,26 +42,4 @@ easybook 是基于 ctexbook 书籍文档类的极简风格模板。它主要适 ## 网址 -| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [字体](https://wws.lanzous.com/b01ns361i) | - -## v1.24 更新内容 - -- 各模块名变为相应接口命令名 -- 主题颜色调整 -- 改为导言区载入 | tasks | imakeidex | 宏包,取消载入 cleverref 宏包 -- 文档类选项变动 english $\rightarrow$ scheme -- 文档类选项变动 enstyle $\rightarrow$ enmode -- 文档类选项 entitle 删除 -- 定理模块变动 numberwith $\rightarrow$ within -- 定理模块新增选项 | tocline-fig | tocline-tab |tocline-lst | line-align | hang | -- 超链接模块变动 linktopage $\rightarrow$ linktoc -- 超链接模块新增选项 linkcol-all -- 风格模块新增选项 color-all -- 行距模块新增选项 spread-all -- 目录命令新增选项 title -- 页眉页脚模块新增选项 | subsec-mark | numsep | numsep-all | indent-all | -- 参考文献模块新增选项 bib-loadpkg -- 参考文献模块新增命令 | \EbBibtexSet | \EbBiblatexPreset | \EbBiblatexPostset | -- 目录样式模块新增命令 \EbNumberline -- 定理样式模块新增命令 \EbNewtheorem -- 盒子 easybox 和环境 exercise 升级,新增盒子 ebparbox,盒子命令变动 | \concise $\rightarrow$ \eblink | \fuzzy $\rightarrow$ \ebemph |
\ No newline at end of file +| [Gitee](https://gitee.com/texl3/easybook) | [Github](https://github.com/texl3/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [字体](https://wws.lanzous.com/b01ns361i) |
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf Binary files differindex bd1d906f9d4..af3e39f83d3 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf +++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex index 2b6c2915f57..3660fb5e5ae 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex @@ -106,7 +106,7 @@ \url{https://latexstudio.net} \\ \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} } -\date{2021/04/29\hskip\ccwd\relax v1.24w} +\date{2021/04.30\hskip\ccwd\relax v1.24x} \frontmatter[roman] \maketitle @@ -124,5 +124,5 @@ \backmatter \printbibliography+[book,multoc = false,title = 参考文献] -\printindex[索引] +\printindex+[book,title = 索引] \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf Binary files differindex 6a6d93d8b72..032b2ce5463 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.pdf +++ b/Master/texmf-dist/doc/latex/easybook/easybook.pdf diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index bd50a651710..f7b99b2f5b1 100644 --- a/Master/texmf-dist/source/latex/easybook/easybook.dtx +++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx @@ -56,11 +56,11 @@ The latest version of this license is in % % \title{\sffamily easybook 文档类手册} % \author{瞿毅} -% \date{2021/04/29\hskip\ccwd\relax v1.24w\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/04/30\hskip\ccwd\relax v1.24x\thanks{\url{https://gitee.com/texl3/easybook}}} % % \maketitle % \begin{abstract} -% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。 +% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并已载入一些常用宏包用于实现一般的排版需求,同时也具有 \cls{article} 文档类的功能,使用户可以简便地进行设置。它适用于排版中英文学术书籍、笔记或者是学位论文。 % \end{abstract} % \tableofcontents % @@ -180,7 +180,7 @@ The latest version of this license is in % \end{syntax} % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。已经预置了中英文的目录标题,可以使用 \opt{title} 选项更改目录标题的名称。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。} -% \changes{v1.24w}{2021/04/04}{目录命令的可选参数增加标题键值。} +% \changes{v1.24x}{2021/04/04}{目录命令的可选参数增加标题键值。} % \end{function} % % \section{接口选项} @@ -263,7 +263,7 @@ The latest version of this license is in % \ding{229} 以上选项路径为 \opt{link/...} \\ % \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。} -% \changes{v1.24w}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} +% \changes{v1.24x}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} % \end{function} % % \begin{optdesc} @@ -342,7 +342,7 @@ The latest version of this license is in % \ding{229} 以上选项路径为 \opt{bibset/...} % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。} % \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} -% \changes{v1.24w}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。} +% \changes{v1.24x}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。} % \end{function} % % \begin{optdesc} @@ -414,7 +414,7 @@ The latest version of this license is in % \end{syntax} % 文档类已预置8个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令。 % \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。} -% \changes{v1.24w}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。} +% \changes{v1.24x}{2021/04/25}{增加定义定理环境命令 \tn{EbNewtheorem}。} % \end{function} % % \begin{optdesc} @@ -498,7 +498,7 @@ The latest version of this license is in % \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。} % \changes{v1.23}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 标志选项。} % \changes{v1.23}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。} -% \changes{v1.24w}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。} +% \changes{v1.24x}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。} % \end{function} % % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{\easyhead,\easyfoot} @@ -533,11 +533,11 @@ The latest version of this license is in % numsep = <编号后间距|(\tn{ccwd})> % \end{syntax} % \ding{229} 以上选项路径为 \opt{tocset/(level)/...} \\ -% \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{level} 代表 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录样式设置,其中 \opt{lists} 为图片、表格和代码目录样式的级别。 +% \opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,\opt{level} 代表 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{list} 五种级别的目录样式设置,其中 \opt{list} 为图片、表格和代码目录样式的级别。 % % \opt{format} 是目录中标题的格式,可以设置字体和加入垂直间距等,垂直间距最好使用无间距重合的 \tn{addvspace} 命令。\opt{indent} 是目录中标题在页面左侧的缩进距离,应该有长度单位。\opt{rule} 选项中一般应当使用 \tn{tocrule} 命令,将会在接下来介绍。\opt{numsep} 是有编号的标题在目录中编号与标题的间距。 % \changes{v1.21}{2021/01/13}{增加配置目录样式的选项。} -% \changes{v1.24w}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。} +% \changes{v1.24x}{2021/04/20}{增加目录中编号与标题的间距选项 \opt{numsep}。} % \end{function} % % \begin{function}[added = 2021-01-13,updated = 2021-04-20]{\tocrule,\EbNumberline} @@ -562,7 +562,7 @@ The latest version of this license is in % } % \end{ctexexam} % -% \begin{function}[EXP,added = 2021-01-13,updated = 2021-04-19]{lists/lolskip,lists/belowoffset,tocset/tocline-fig,tocset/tocline-tab,tocset/tocline-lst,tocset/belowoffset,tocset/line-align,tocset/hang,tocset/numsep-all,tocset/indent-all} +% \begin{function}[EXP,added = 2021-01-13,updated = 2021-04-19]{list/lolskip,list/belowoffset,tocset/tocline-fig,tocset/tocline-tab,tocset/tocline-lst,tocset/belowoffset,tocset/line-align,tocset/hang,tocset/numsep-all,tocset/indent-all} % \begin{syntax} % lolskip = <(0.8pc)> % belowoffset = <(0pc)> @@ -575,23 +575,24 @@ The latest version of this license is in % numsep-all = <编号后间距|(\tn{ccwd})> % indent-all = <目录标题左边缩进> % \end{syntax} -% \ding{229} 以上选项路径为 \opt{tocset/lists/...} 或 \opt{tocset/...} -% \changes{v1.24w}{2021/04/05}{可以设置图、表和代码目录的标签。} -% \changes{v1.24w}{2021/04/06}{增加目录引导线右边对齐方式。} -% \changes{v1.24w}{2021/04/19}{给目录增加 \opt{hang} 样式选项。} +% \ding{229} 以上选项路径为 \opt{tocset/list/...} 或 \opt{tocset/...} +% \changes{v1.24x}{2021/04/05}{可以设置图、表和代码目录的标签。} +% \changes{v1.24x}{2021/04/06}{增加目录引导线右边对齐方式。} +% \changes{v1.24x}{2021/04/19}{给目录增加 \opt{hang} 样式选项。} % \end{function} % % \begin{optdesc} % \item[lolskip] \opt{lolskip} 是代码目录中章之间的代码标题的距离,与\CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 \opt{article} 模式中此选项失效。 -% \item[belowoffset] \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{lists} 中的 \opt{belowoffset} 与之意义类似,但是一般为正值,可以在 \opt{article} 模式中使用。建议 \opt{lists/lolskip(0.8pc) + lists/format/addvspace(0.2pc) + lists/belowoffset(0pc) = belowoffset(-1pc)}。 +% \item[belowoffset] \opt{belowoffset} 选项为主目录标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的垂直间距。\opt{list} 中的 \opt{belowoffset} 与之意义类似,但是一般为正值,可以在 \opt{article} 模式中使用。建议 \opt{list/lolskip(0.8pc) + list/format/addvspace(0.2pc) + list/belowoffset(0pc) = belowoffset(-1pc)}。 % \item[tocline] 目录标签整体使用 \opt{tocline} 设置,在图表标签的参数中\#1代表编号,代码标签中则是 \tn{thelstlisting} 代表编号,标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子 -% \begin{ctexexam} -% \tocset -% { -% tocline-fig = 图#1\hspace{\ccwd} -% tocline-lst = 代码\thelstlisting\hspace{\ccwd} -% } -% \end{ctexexam} +% \begin{ctexexam} +% \tocset +% { +% hang = false, +% tocline-fig = 图#1\hspace{\ccwd}, +% tocline-lst = 代码\thelstlisting\hspace{\ccwd} +% } +% \end{ctexexam} % \item[line-align] \opt{line-align} 选项可以使目录引导线右边对齐并与页码保持一定间隙,否则会与页码连接。 % \item[hang] \opt{hang} 选项使目录标题为悬挂缩进形式,缩进距离为编号及其与标题间距的长度,但此时目录编号会失去超链接。 % \item[numsep-all] 统一设置所有有编号的标题在目录中编号与标题的间距。 @@ -618,7 +619,7 @@ The latest version of this license is in % \tn{end}\marg{环境名} % \end{syntax} % \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式,也可以直接使用可选参数的键值列表,具体选项见 \pkg{enumitem} 宏包文档。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如 -% \changes{v1.24w}{2021/04/08}{重新优化列表环境的配置。} +% \changes{v1.24x}{2021/04/08}{重新优化列表环境的配置。} % \end{function} % % \begin{ctexexam} @@ -737,7 +738,7 @@ The latest version of this license is in % \tn{end}\marg{ebparbox} % \end{syntax} % 环境 \env{ebparbox} 与 \env{easybox} 类似,同样带有三个可选参数。当使用星号参数时盒子左边带有一条竖线,\meta{颜色名} 选项可以自定义竖线颜色,使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\meta{段落标题} 选项可以设置标题,默认无标题。 -% \changes{v1.24w}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。} +% \changes{v1.24x}{2021/04/19}{优化盒子环境的选项,增加可带有标题的扁平盒子 \env{ebparbox}。} % \end{function} % % \subsubsection{行内盒子} @@ -796,16 +797,16 @@ The latest version of this license is in % \tn{labelformat}\marg{计数器}\marg{标签引用格式} % \end{syntax} % 使用 \tn{ref} 命令进行引用将会自动检测环境并添加相应的前缀,\tn{labelformat} 可以设置标签引用格式,第二个参数中\#1代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。 -% \changes{v1.24w}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。} +% \changes{v1.24x}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。} % \end{function} % % \subsubsection{索引} -% \begin{function}[added = 2021-04-29]{\index,\printindex} +% \begin{function}[added = 2021-04-30]{\index,\printindex} % \begin{syntax} % \tn{index}\marg{标签} -% \tn{printindex}\parg{索引名}\oarg{标题名} +% \tn{printindex*+}\parg{索引名}\oarg{键值列表} % \end{syntax} -% \pkg{imakeidx} 宏包可使用索引的功能,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。 +% \pkg{imakeidx} 宏包可使用索引的功能,重新定义了它的 \tn{printindex} 命令用于生成索引目录,键值列表及用法与小节 \ref{subsec:document command} 相同,但 \opt{multoc} 选项和 \pkg{imakeidx} 原本的接口命令 \tn{indexsetup} 部分选项失效。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。 % \end{function} % % \subsubsection{自定义脚注} @@ -909,7 +910,7 @@ The latest version of this license is in %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplClass{easybook}{2021/04/29}{1.24w}{beta} +\ProvidesExplClass{easybook}{2021/04/30}{1.24x}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -1366,7 +1367,7 @@ The latest version of this license is in } \seq_const_from_clist:Nn \c__eb_toc_headings_level_seq - {part,chapter,section,subsection,lists} + {part,chapter,section,subsection,list} \seq_map_inline:Nn \c__eb_toc_headings_level_seq { \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}} @@ -1390,10 +1391,10 @@ The latest version of this license is in \newbool{eb@titletoc@hang@fix} \eb_ctex_define:nn {tocset} { - lists/lolskip .skip_set:N = \l__eb_toc_lolskip_skip, - lists/lolskip .initial:n = 0.8pc, - lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim, - lists/belowoffset .initial:n = + list/lolskip .skip_set:N = \l__eb_toc_lolskip_skip, + list/lolskip .initial:n = 0.8pc, + list/belowoffset .dim_set:N = \l__eb_toc_listoffset_dim, + list/belowoffset .initial:n = {\bool_if:NTF \l__eb_class_book_bool{0pc}{0.15pc}}, belowoffset .dim_set:N = \l__eb_toc_offset_dim, belowoffset .initial:n = @@ -1403,21 +1404,21 @@ The latest version of this license is in { \figurename\space#1 \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lists@numsep}}{} + {\hspace{\eb@toc@list@numsep}}{} }, tocline-tab .cs_set:Np = \eb@labelname@lot#1, tocline-tab .initial:n = { \tablename\space#1 \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lists@numsep}}{} + {\hspace{\eb@toc@list@numsep}}{} }, tocline-lst .tl_set:N = \eb@labelname@lol, tocline-lst .initial:n = { \lstlistingname\space\thelstlisting \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lists@numsep}}{} + {\hspace{\eb@toc@list@numsep}}{} }, line-align .bool_set:N = \l__eb_toc_line_align_bool, line-align .default:n = true, @@ -1452,7 +1453,7 @@ The latest version of this license is in chapter/numsep = {#1}, section/numsep = {#1}, subsection/numsep = {#1}, - lists/numsep = {#1} + list/numsep = {#1} }, indent-all .meta:n = { @@ -1460,7 +1461,7 @@ The latest version of this license is in chapter/indent = {#1}, section/indent = {#1}, subsection/indent = {#1}, - lists/indent = {#1} + list/indent = {#1} } } \ctex_set:nn {tocset} @@ -1487,10 +1488,10 @@ The latest version of this license is in subsection/rule = \tocrule{$\cdot$}, subsection/numsep = \ccwd, - lists/format = \addvspace{0.2pc}, - lists/indent = 0\ccwd, - lists/rule = \tocrule{$\cdot$}, - lists/numsep = \ccwd + list/format = \addvspace{0.2pc}, + list/indent = 0\ccwd, + list/rule = \tocrule{$\cdot$}, + list/numsep = \ccwd } \NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}} @@ -1530,9 +1531,9 @@ The latest version of this license is in {chapter}{chapter}, {section}{section}, {subsection}{subsection}, - {figure}{lists}, - {table}{lists}, - {lstlisting}{lists} + {figure}{list}, + {table}{list}, + {lstlisting}{list} }{\eb_titlecontents_set:nn #1} \prop_new:N \l__eb_label_name_prop @@ -1582,6 +1583,17 @@ The latest version of this license is in The~\string\chapter\space~command~will~not~be~used. } +\tl_set:Nn \l__eb_toc_type_tl{book} +\keys_define:nn {eb/listoc} + { + article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article}, + book .code:n = {}, + multoc .bool_set:N = \l__eb_multoc_bool, + multoc .default:n = true, + multoc .initial:n = false, + title .tl_set:N = \eb@toc@title + } + \cs_new:Npn \eb_upper_nonumber_mark_bool:n #1 { \bool_if:NTF \l__eb_uppercase_bool @@ -1600,17 +1612,6 @@ The latest version of this license is in \cs_new:Npn \eb@nonumber@markright#1 {\markright{\eb_upper_nonumber_mark_bool:n {#1}}} -\tl_set:Nn \l__eb_toc_type_tl{book} -\keys_define:nn {listoc} - { - article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article}, - book .code:n = {}, - multoc .bool_set:N = \l__eb_multoc_bool, - multoc .default:n = true, - multoc .initial:n = false, - title .tl_set:N = \eb@toc@title - } - \cs_new_protected:Npn \eb_title_mark_intoc:n #1 { \tl_if_eq:NnTF \l__eb_toc_type_tl{book} @@ -1639,7 +1640,7 @@ The latest version of this license is in {\eb@nonumber@markdouble{#1}} } } -\cs_new_protected:Npn \eb_title_intoc_bool:nn #1#2 +\cs_new_protected:Npn \eb_title_number_intoc_bool:nn #1#2 { \IfBooleanTF{#1} { @@ -1652,7 +1653,7 @@ The latest version of this license is in {\eb_title_mark_intoc:n {\eb@toc@title}} } } -\cs_new_protected:Npn \eb_class_title_bool:n #1 +\cs_new_protected:Npn \eb_class_title_level_bool:n #1 { \bool_if:NTF \l__eb_class_book_bool { @@ -1687,7 +1688,7 @@ The latest version of this license is in { \group_begin: \tl_set_eq:NN \eb@toc@title\contentsname - \IfValueT{#1}{\keys_set:nn {listoc}{#1}} + \IfValueT{#1}{\keys_set:nn {eb/listoc}{#1}} \eb_multoc_pre_bool: \eb_title_mark_notoc:n {\eb@toc@title} \vspace*{\dim_use:N \l__eb_toc_offset_dim} @@ -1699,10 +1700,10 @@ The latest version of this license is in { \group_begin: \tl_set_eq:NN \eb@toc@title\listfigurename - \IfValueT{#3}{\keys_set:nn {listoc}{#3}} + \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}} \eb_multoc_pre_bool: - \eb_title_intoc_bool:nn {#2}{#1} - \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim + \eb_title_number_intoc_bool:nn {#2}{#1} + \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{lof} \eb_multoc_post_bool: @@ -1712,10 +1713,10 @@ The latest version of this license is in { \group_begin: \tl_set_eq:NN \eb@toc@title\listtablename - \IfValueT{#3}{\keys_set:nn {listoc}{#3}} + \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}} \eb_multoc_pre_bool: - \eb_title_intoc_bool:nn {#2}{#1} - \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim + \eb_title_number_intoc_bool:nn {#2}{#1} + \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{lot} \eb_multoc_post_bool: @@ -1725,10 +1726,10 @@ The latest version of this license is in { \group_begin: \tl_set_eq:NN \eb@toc@title\lstlistlistingname - \IfValueT{#3}{\keys_set:nn {listoc}{#3}} + \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}} \eb_multoc_pre_bool: - \eb_title_intoc_bool:nn {#2}{#1} - \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim + \eb_title_number_intoc_bool:nn {#2}{#1} + \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{lol} \eb_multoc_post_bool: @@ -1738,28 +1739,27 @@ The latest version of this license is in \ctex_at_end_package:nn {imakeidx} { \makeindex[ - intoc, - title = \eb@toc@title, options = -M~texindy~-C~utf8, program = truexindy, columns = 2, columnsep = 2\ccwd ] - \indexsetup - { - level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*}, - toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section}, - firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy} - } - \ctex_patch_cmd:Nnn \imki@indexheaders - {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}} - {\eb@nonumber@markdouble{\indexname}} - \RenewDocumentCommand{\printindex} - {D(){\imki@jobname}O{\imki@indexname}} + \RenewDocumentCommand{\printindex}{st+D(){\imki@jobname}o} { \group_begin: - \tl_set:Nn \eb@toc@title{#2} - \imki@putindex{#1} + \tl_set_eq:NN \eb@toc@title\indexname + \tl_set_eq:NN \imki@indexlevel\use_none:n + \setkeys{imki}{intoc = false} + \IfValueT{#4}{\keys_set:nn {eb/listoc}{#4}} + \bool_if:NTF \l__eb_class_book_bool + {\tl_gset:Nn \imki@firstpagestyle{plain}} + { + \tl_gset:Nn \imki@firstpagestyle{fancy} + \tl_set:Nn \l__eb_toc_type_tl{article} + } + \tl_set:Nn \imki@indexheaders + {\eb_title_number_intoc_bool:nn {#2}{#1}} + \imki@putindex{#3} \group_end: } } @@ -2301,9 +2301,10 @@ The latest version of this license is in { \group_begin: \tl_set_eq:NN \eb@toc@title\bibname - \IfValueT{##3}{\keys_set:nn {listoc}{##3}} + \IfValueT{##3}{\keys_set:nn {eb/listoc}{##3}} \eb_multoc_pre_bool: - \cs_set:Npn \bibsection{\eb_title_intoc_bool:nn {##2}{##1}} + \cs_set:Npn \bibsection + {\eb_title_number_intoc_bool:nn {##2}{##1}} \exp_args:NV \bibliography\l__eb_bib_file_tl \eb_multoc_post_bool: \group_end: @@ -2328,7 +2329,8 @@ The latest version of this license is in { \exp_args:NV \addbibresource\l__eb_bib_file_tl \cs_gset:Npn \blx@default@theheading{bibintoc} - \defbibheading{bibintoc}[\bibname]{\eb_class_title_bool:n {##1}} + \defbibheading{bibintoc}[\bibname] + {\eb_class_title_level_bool:n {##1}} \skip_set:Nn \bibitemsep{0ex} } \eb_at_end_preamble:n @@ -2618,13 +2620,13 @@ The latest version of this license is in part = { pagestyle = empty, + tocline = \EbNumberline{#1}#2, format = \color{ctex@frame}\sffamily\Huge, aftername = { \bool_if:NTF \l__eb_title_newline_bool {\par\nobreak}{\hspace{\ccwd}} - }, - tocline = \CTEXifname{\CTEXthepart\hspace{\eb@toc@part@numsep}}{}#2 + } }, chapter = { diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 427ba8dbace..3427b9a7aff 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplClass{easybook}{2021/04/29}{1.24w}{beta} +\ProvidesExplClass{easybook}{2021/04/30}{1.24x}{beta} \cs_generate_variant:Nn \eb_ctex_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -470,7 +470,7 @@ } \seq_const_from_clist:Nn \c__eb_toc_headings_level_seq - {part,chapter,section,subsection,lists} + {part,chapter,section,subsection,list} \seq_map_inline:Nn \c__eb_toc_headings_level_seq { \ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}} @@ -494,10 +494,10 @@ \newbool{eb@titletoc@hang@fix} \eb_ctex_define:nn {tocset} { - lists/lolskip .skip_set:N = \l__eb_toc_lolskip_skip, - lists/lolskip .initial:n = 0.8pc, - lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim, - lists/belowoffset .initial:n = + list/lolskip .skip_set:N = \l__eb_toc_lolskip_skip, + list/lolskip .initial:n = 0.8pc, + list/belowoffset .dim_set:N = \l__eb_toc_listoffset_dim, + list/belowoffset .initial:n = {\bool_if:NTF \l__eb_class_book_bool{0pc}{0.15pc}}, belowoffset .dim_set:N = \l__eb_toc_offset_dim, belowoffset .initial:n = @@ -507,21 +507,21 @@ { \figurename\space#1 \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lists@numsep}}{} + {\hspace{\eb@toc@list@numsep}}{} }, tocline-tab .cs_set:Np = \eb@labelname@lot#1, tocline-tab .initial:n = { \tablename\space#1 \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lists@numsep}}{} + {\hspace{\eb@toc@list@numsep}}{} }, tocline-lst .tl_set:N = \eb@labelname@lol, tocline-lst .initial:n = { \lstlistingname\space\thelstlisting \notbool{eb@titletoc@hang@fix} - {\hspace{\eb@toc@lists@numsep}}{} + {\hspace{\eb@toc@list@numsep}}{} }, line-align .bool_set:N = \l__eb_toc_line_align_bool, line-align .default:n = true, @@ -556,7 +556,7 @@ chapter/numsep = {#1}, section/numsep = {#1}, subsection/numsep = {#1}, - lists/numsep = {#1} + list/numsep = {#1} }, indent-all .meta:n = { @@ -564,7 +564,7 @@ chapter/indent = {#1}, section/indent = {#1}, subsection/indent = {#1}, - lists/indent = {#1} + list/indent = {#1} } } \ctex_set:nn {tocset} @@ -591,10 +591,10 @@ subsection/rule = \tocrule{$\cdot$}, subsection/numsep = \ccwd, - lists/format = \addvspace{0.2pc}, - lists/indent = 0\ccwd, - lists/rule = \tocrule{$\cdot$}, - lists/numsep = \ccwd + list/format = \addvspace{0.2pc}, + list/indent = 0\ccwd, + list/rule = \tocrule{$\cdot$}, + list/numsep = \ccwd } \NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}} @@ -634,9 +634,9 @@ {chapter}{chapter}, {section}{section}, {subsection}{subsection}, - {figure}{lists}, - {table}{lists}, - {lstlisting}{lists} + {figure}{list}, + {table}{list}, + {lstlisting}{list} }{\eb_titlecontents_set:nn #1} \prop_new:N \l__eb_label_name_prop @@ -686,6 +686,17 @@ The~\string\chapter\space~command~will~not~be~used. } +\tl_set:Nn \l__eb_toc_type_tl{book} +\keys_define:nn {eb/listoc} + { + article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article}, + book .code:n = {}, + multoc .bool_set:N = \l__eb_multoc_bool, + multoc .default:n = true, + multoc .initial:n = false, + title .tl_set:N = \eb@toc@title + } + \cs_new:Npn \eb_upper_nonumber_mark_bool:n #1 { \bool_if:NTF \l__eb_uppercase_bool @@ -704,17 +715,6 @@ \cs_new:Npn \eb@nonumber@markright#1 {\markright{\eb_upper_nonumber_mark_bool:n {#1}}} -\tl_set:Nn \l__eb_toc_type_tl{book} -\keys_define:nn {listoc} - { - article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article}, - book .code:n = {}, - multoc .bool_set:N = \l__eb_multoc_bool, - multoc .default:n = true, - multoc .initial:n = false, - title .tl_set:N = \eb@toc@title - } - \cs_new_protected:Npn \eb_title_mark_intoc:n #1 { \tl_if_eq:NnTF \l__eb_toc_type_tl{book} @@ -743,7 +743,7 @@ {\eb@nonumber@markdouble{#1}} } } -\cs_new_protected:Npn \eb_title_intoc_bool:nn #1#2 +\cs_new_protected:Npn \eb_title_number_intoc_bool:nn #1#2 { \IfBooleanTF{#1} { @@ -756,7 +756,7 @@ {\eb_title_mark_intoc:n {\eb@toc@title}} } } -\cs_new_protected:Npn \eb_class_title_bool:n #1 +\cs_new_protected:Npn \eb_class_title_level_bool:n #1 { \bool_if:NTF \l__eb_class_book_bool { @@ -791,7 +791,7 @@ { \group_begin: \tl_set_eq:NN \eb@toc@title\contentsname - \IfValueT{#1}{\keys_set:nn {listoc}{#1}} + \IfValueT{#1}{\keys_set:nn {eb/listoc}{#1}} \eb_multoc_pre_bool: \eb_title_mark_notoc:n {\eb@toc@title} \vspace*{\dim_use:N \l__eb_toc_offset_dim} @@ -803,10 +803,10 @@ { \group_begin: \tl_set_eq:NN \eb@toc@title\listfigurename - \IfValueT{#3}{\keys_set:nn {listoc}{#3}} + \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}} \eb_multoc_pre_bool: - \eb_title_intoc_bool:nn {#2}{#1} - \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim + \eb_title_number_intoc_bool:nn {#2}{#1} + \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{lof} \eb_multoc_post_bool: @@ -816,10 +816,10 @@ { \group_begin: \tl_set_eq:NN \eb@toc@title\listtablename - \IfValueT{#3}{\keys_set:nn {listoc}{#3}} + \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}} \eb_multoc_pre_bool: - \eb_title_intoc_bool:nn {#2}{#1} - \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim + \eb_title_number_intoc_bool:nn {#2}{#1} + \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{lot} \eb_multoc_post_bool: @@ -829,10 +829,10 @@ { \group_begin: \tl_set_eq:NN \eb@toc@title\lstlistlistingname - \IfValueT{#3}{\keys_set:nn {listoc}{#3}} + \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}} \eb_multoc_pre_bool: - \eb_title_intoc_bool:nn {#2}{#1} - \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim + \eb_title_number_intoc_bool:nn {#2}{#1} + \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim \vspace*{\dim_use:N \l__eb_toc_offset_dim} \@starttoc{lol} \eb_multoc_post_bool: @@ -842,28 +842,27 @@ \ctex_at_end_package:nn {imakeidx} { \makeindex[ - intoc, - title = \eb@toc@title, options = -M~texindy~-C~utf8, program = truexindy, columns = 2, columnsep = 2\ccwd ] - \indexsetup - { - level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*}, - toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section}, - firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy} - } - \ctex_patch_cmd:Nnn \imki@indexheaders - {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}} - {\eb@nonumber@markdouble{\indexname}} - \RenewDocumentCommand{\printindex} - {D(){\imki@jobname}O{\imki@indexname}} + \RenewDocumentCommand{\printindex}{st+D(){\imki@jobname}o} { \group_begin: - \tl_set:Nn \eb@toc@title{#2} - \imki@putindex{#1} + \tl_set_eq:NN \eb@toc@title\indexname + \tl_set_eq:NN \imki@indexlevel\use_none:n + \setkeys{imki}{intoc = false} + \IfValueT{#4}{\keys_set:nn {eb/listoc}{#4}} + \bool_if:NTF \l__eb_class_book_bool + {\tl_gset:Nn \imki@firstpagestyle{plain}} + { + \tl_gset:Nn \imki@firstpagestyle{fancy} + \tl_set:Nn \l__eb_toc_type_tl{article} + } + \tl_set:Nn \imki@indexheaders + {\eb_title_number_intoc_bool:nn {#2}{#1}} + \imki@putindex{#3} \group_end: } } @@ -1405,9 +1404,10 @@ { \group_begin: \tl_set_eq:NN \eb@toc@title\bibname - \IfValueT{##3}{\keys_set:nn {listoc}{##3}} + \IfValueT{##3}{\keys_set:nn {eb/listoc}{##3}} \eb_multoc_pre_bool: - \cs_set:Npn \bibsection{\eb_title_intoc_bool:nn {##2}{##1}} + \cs_set:Npn \bibsection + {\eb_title_number_intoc_bool:nn {##2}{##1}} \exp_args:NV \bibliography\l__eb_bib_file_tl \eb_multoc_post_bool: \group_end: @@ -1432,7 +1432,8 @@ { \exp_args:NV \addbibresource\l__eb_bib_file_tl \cs_gset:Npn \blx@default@theheading{bibintoc} - \defbibheading{bibintoc}[\bibname]{\eb_class_title_bool:n {##1}} + \defbibheading{bibintoc}[\bibname] + {\eb_class_title_level_bool:n {##1}} \skip_set:Nn \bibitemsep{0ex} } \eb_at_end_preamble:n @@ -1722,13 +1723,13 @@ part = { pagestyle = empty, + tocline = \EbNumberline{#1}#2, format = \color{ctex@frame}\sffamily\Huge, aftername = { \bool_if:NTF \l__eb_title_newline_bool {\par\nobreak}{\hspace{\ccwd}} - }, - tocline = \CTEXifname{\CTEXthepart\hspace{\eb@toc@part@numsep}}{}#2 + } }, chapter = { |