summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-13 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2021-07-13 03:00:55 +0000
commit4ac920a9909dd7d233ed3662bb576e1ae4ade873 (patch)
tree946aeeae5a3e59d9ec5aec51ee0520dbc712af55 /macros/latex/contrib/easybook
parent1caaed73030c69f9f96c5138594089e2689e768b (diff)
CTAN sync 202107130300
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx320
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin564912 -> 569332 bytes
2 files changed, 208 insertions, 112 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index afcbe2f704..28934e5a5f 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/11\hskip\ccwd\relax v1.27b\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/12\hskip\ccwd\relax v1.27c\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -41,7 +41,7 @@
% 您在使用 \cls{easybook} 文档类编写文档前可能需要满足以下的条件:
% \begin{itemize}
% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
-% \item 由于用到了一些 \LaTeX 和宏包较新的功能,建议安装最新的 \TeX 发行版,例如 \TeX Live 2021 或 \hologo{MiKTeX} 21.2 之后的版本。
+% \item 由于用到了一些 \LaTeX 和宏包较新的功能,建议安装最新的 \TeX 发行版,例如 \TeX~Live 2021 或 \hologo{MiKTeX} 21.2 之后的版本。
% \item 虽然手册对基本用法做了介绍,但这并不是入门教程,您应当具有一定的 \LaTeX 使用基础。
% \end{itemize}
%
@@ -60,7 +60,7 @@
% \end{document}
% \end{frameverb}
%
-% 或者直接使用 \pkg{easybase} 宏包,它的宏包选项有 \opt{class}、\opt{draft}、\opt{paper} 和 \opt{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能,目前只适用于 \cls{ctexbook} 和 \cls{ctexart} 文档类。
+% 或者直接使用 \pkg{easybase} 宏包,目前适用于 \cls{ctexbook}、\cls{ctexrep}、\cls{ctexart} 以及标准文档类。它的宏包选项有 \opt{class}、\opt{draft}、\opt{paper} 和 \opt{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在 \textbf{标准文档类} 后载入时还可以使用 \pkg{ctex} 宏包的选项,将会传递给 \pkg{ctex} 宏包。
% \begin{frameverb}
% \documentclass{ctexbook}
%
@@ -88,17 +88,6 @@
% 当然也可以使用 \opt{latexmk} 及一些软件自带的编译工具,这里就不做介绍。 \\
% \ding{72} 需要注意正确 \textbf{编译索引} 要增加 \opt{-shell-escape} 命令行选项。
%
-% \subsection{字体设置}
-% \label{subsec:font settings}
-% 默认使用 \CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体默认使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wwe.lanzoui.com/b01ns361i}{下载地址}。
-%
-% 如果您不想使用 \CTeX 默认字体和方正、思源字体,\textbf{自定义字体} 需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
-% \begin{ctexexam}
-% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
-% \setCJKsansfont{SimHei}
-% \setCJKmonofont{FangSong}
-% \end{ctexexam}
-%
% \section{文档类选项}
% \label{sec:document class options}
% 标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
@@ -108,7 +97,7 @@
% \end{itemize}
%
% \begin{function}[rEXP,added = 2021-01-05]{draft}
-% 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不载入 \pkg{tcolorbox} 宏包支持盒子环境也会提高编译速度,详情见小节 \ref{subsec:box}。
+% 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不载入 \pkg{tcolorbox} 宏包使用盒子环境也会提高编译速度,详情见小节 \ref{subsec:box}。
% \end{function}
%
% \begin{function}[rEXP,added = 2021-01-05]{newline}
@@ -130,15 +119,6 @@
% 同时开启 \opt{newline} 和 \opt{scheme = plain} 选项以符合英文原生风格。
% \end{function}
%
-% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-06-18]{font}
-% \begin{syntax}
-% font = <adobe|fandol|mac|windows|linux|noto|(auto)|none>
-% \end{syntax}
-% 传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{auto} 是一个各系统通用选项,会检测系统环境选取对应字体。
-% \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
-% \changes{v1.25}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
-% \end{function}
-%
% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
% \begin{syntax}
% paper = <(a4paper)|b5paper|c5paper|letterpaper|...>
@@ -162,6 +142,47 @@
% \changes{v1.26}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
% \end{function}
%
+% \subsection{中文字体}
+% \begin{function}[rEXP,added = 2021-07-12]{cjkfont}
+% \begin{syntax}
+% cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
+% \end{syntax}
+% 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
+% \changes{v1.27c}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
+% \end{function}
+%
+% 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
+% \begin{ctexexam}
+% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
+% \setCJKsansfont{SimHei}
+% \setCJKmonofont{FangSong}
+% \newCJKfontfamily[song]\songti{SimSun}
+% \end{ctexexam}
+%
+% \subsection{英文字体}
+% \begin{function}[rEXP,added = 2021-01-05,updated = 2021-07-12]{font}
+% \begin{syntax}
+% font = <noto|garamond|times|libertine|palatino||(auto)|>
+% \end{syntax}
+% 预置的英文字体相关配置方案如下表所示,这些字体已经包含在了 \TeX~Live 发行版中,所以通常不需要再专门安装。如果您想使用其他英文字体,可以使用 \pkg{fontspec} 宏包的相关命令进行设置。
+% \changes{v1.21}{2021/01/12}{默认字体与 \CTeX 一致,不再是自定义字体。}
+% \changes{v1.25}{2021/05/04}{修复使用 \pkg{xeCJK} 与 \pkg{fontspec} 宏包的字体设置命令在 \hologo{LuaLaTeX} 下失效的问题。}
+% \end{function}
+%
+% \begin{center}
+% \begin{tabular}{cccc}
+% \toprule
+% & \sffamily{正文字体} & \sffamily{无衬线字体} & \sffamily{等宽字体} \\
+% \midrule
+% \opt{noto} & Noto Serif & Noto Sans & Noto Sans Mono \\
+% \opt{garamond} & EB Garamond & Libertinus Sans & LM Mono \\
+% \opt{palatino} & TG Pagella & Libertinus Sans & LM Mono \\
+% \opt{libertine} & TG Pagella & Libertinus Sans & LM Mono \\
+% \opt{times} & XITS & TG Heros & TG Cursor \\
+% \bottomrule
+% \end{tabular}
+% \end{center}
+%
% \subsection{article 模式}
% \begin{function}[rEXP,added = 2021-03-16]{class}
% \begin{syntax}
@@ -351,7 +372,7 @@
% \label{subsec:hyperlinks}
% \begin{function}[EXP,added = 2021-01-05,updated = 2021-07-03]{linktype,linkcolor,linkcol-all,linktoc}
% \begin{syntax}
-% linktype = <(edge)|various|none>
+% linktype = <(edge)|colors|none>
% linkcolor = <fresh|cutepink|(navyblue)|crimson>
% linkcol-all = <HTML颜色代码>
% linktoc = <none|section|page|(all)>
@@ -413,7 +434,7 @@
% listing-cap = <(\tn{sffamily}\tn{small})>
% footnote = <(\tn{rmfamily})>
% marginpar = <(\tn{rmfamily}\tn{footnotesize})>
-% math = <times|(noto)|notosans|scholax|stix|charter|ebgaramond|libertine|none>
+% math = <times|(noto)|notosans|nc|stix|charter|garamond|libertine|none>
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{subfont/...}
% \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
@@ -835,7 +856,7 @@
% \tn{end}\{hangparas\}
% \end{syntax}
% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27b}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
+% \changes{v1.27c}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
% \end{function}
%
% \subsection{代码}
@@ -1082,7 +1103,7 @@
% \section{载入的宏包}
% 以下为 \cls{easybook} 直接调用的关键宏包,带有 \ding{75} 符号的宏包并未载入它们,仅做了预配置和兼容性处理,可根据需要在导言区手动载入以实现相关的功能。
% \begin{description}
-% \item[ctexbook] 提供中文排版的通用框架。
+% \item[ctex] 提供中文排版的通用框架。
% \item[xcolor] 提供任意颜色的设定与混合,已载入了 \opt{svgnames} 颜色库。
% \item[footmisc] 更改脚注排版的方法的集合。
% \item[amsmath] 提供 \LaTeX 中的数学功能。
@@ -1164,7 +1185,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/11}{1.27b}
+\ProvidesExplClass{easybook}{2021/07/12}{1.27c}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1173,6 +1194,7 @@
\bool_set_true:N \l__eb_page_twoside_bool
\bool_set_true:N \l__eb_class_book_bool
\tl_new:N \g__eb_config_tl
+\tl_new:N \l__eb_font_choice_tl
\clist_new:N \g__eb_options_clist
\cs_new_protected:Npn \eb_put_ctexbook:n #1
{ \PassOptionsToClass{#1}{ctexbook} }
@@ -1184,17 +1206,11 @@
enmode .meta:n = { newline,scheme = plain },
font .choices:nn =
- { adobe,fandol,mac,windows,none }
- { \eb_put_ctexbook:n { fontset = \l_keys_choice_tl } },
- font/noto .code:n =
- {
- \bool_set_true:N \l__eb_font_noto_bool
- \eb_put_ctexbook:n { fontset = none }
- },
- font/auto .code:n = { },
- font/linux .code:n = \eb_put_ctexbook:n { fontset = ubuntu },
+ { noto,garamond,times,libertine,palatino,auto }
+ { \tl_set:Nn \l__eb_font_choice_tl {#1} },
font .value_required:n = true,
font .initial:n = auto,
+ cjkfont .code:n = \eb_put_ctexbook:n { fontset = #1 },
paper .choice:,
paper .value_required:n = true,
@@ -1239,28 +1255,19 @@
\RequirePackage{easybase}
\ctex_at_end:n
{
+ \use:c { eb@font@load@\l__eb_font_choice_tl }
\tl_if_empty:NF \g__eb_config_tl
{ \file_input:n { \g__eb_config_tl } }
}
\sys_if_engine_xetex:TF
{
- \cs_new_eq:NN \eb_set_family:nnn \xeCJK_set_family:nnn
+ \cs_new_eq:NN \eb_set_family:nnn \xeCJK_set_family:nnn
\cs_new_eq:NN \eb_switch_family:n \xeCJK_switch_family:n
- }
- {
- \cs_new_eq:NN \eb_set_family:nnn \ctex_ltj_set_family:nnn
+ }{
+ \cs_new_eq:NN \eb_set_family:nnn \ctex_ltj_set_family:nnn
\cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n
}
-\cs_new_protected:Npn \eb_font_double_engine_set:n #1
- {
- \exp_args:Nc \RenewDocumentCommand {set#1font}{O{}mO{}}
- {\use:c { eb_set#1font:nn } {##2} {##1,##3}}
- }
-\eb_clist_map_function:nN
- { main,sans,mono,CJKmain,CJKsans,CJKmono }
- \eb_font_double_engine_set:n
-
\cs_new_protected:Npn \eb_setmainfont:nn #1#2
{ \__fontspec_main_setmainfont:nn {#2} {#1} }
\cs_new_protected:Npn \eb_setsansfont:nn #1#2
@@ -1273,33 +1280,24 @@
{ \eb_set_family:nnn { \CJKsfdefault } {#2} {#1} }
\cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2
{ \eb_set_family:nnn { \CJKttdefault } {#2} {#1} }
-\cs_new_protected:Npn \eb_set_zhfont_songti:nn #1#2
- { \eb_set_family:nnn { songti } {#2} {#1} }
-\cs_new_protected:Npn \eb_set_zhfont_heiti:nn #1#2
- { \eb_set_family:nnn { heiti } {#2} {#1} }
-\cs_new_protected:Npn \eb_set_zhfont_kaishu:nn #1#2
- { \eb_set_family:nnn { kaishu } {#2} {#1} }
-\cs_new_protected:Npn \eb_set_zhfont_fangsong:nn #1#2
- { \eb_set_family:nnn { fangsong } {#2} {#1} }
-
-\tl_const:Nn \eb_option_zhfont_tl
- { UprightFont = *,AutoFakeBold = 1.5,ItalicFont = * }
-\cs_new_protected:Npx \eb_setCJKmainfont:n #1
- { \eb_setCJKmainfont:nn {#1} { \eb_option_zhfont_tl } }
-\cs_new_protected:Npx \eb_setCJKsansfont:n #1
- { \eb_setCJKsansfont:nn {#1} { \eb_option_zhfont_tl } }
-\cs_new_protected:Npx \eb_setCJKmonofont:n #1
- { \eb_setCJKmonofont:nn {#1} { \eb_option_zhfont_tl } }
-\cs_new_protected:Npx \eb_set_zhfont_songti:n #1
- { \eb_set_zhfont_songti:nn {#1} { \eb_option_zhfont_tl } }
-\cs_new_protected:Npx \eb_set_zhfont_heiti:n #1
- { \eb_set_zhfont_heiti:nn {#1} { \eb_option_zhfont_tl } }
-\cs_new_protected:Npx \eb_set_zhfont_kaishu:n #1
- { \eb_set_zhfont_kaishu:nn {#1} { \eb_option_zhfont_tl } }
-\cs_new_protected:Npx \eb_set_zhfont_fangsong:n #1
- { \eb_set_zhfont_fangsong:nn {#1} { \eb_option_zhfont_tl } }
-
-\bool_if:NT \l__eb_font_noto_bool
+\cs_new_protected:Npn \eb_font_double_engine_set:n #1
+ {
+ \exp_args:Nc \RenewDocumentCommand { set#1font }{O{}mO{}}
+ {\use:c { eb_set#1font:nn } {##2} {##1,##3}}
+ }
+\eb_clist_map_function:nN
+ { main,sans,mono,CJKmain,CJKsans,CJKmono }
+ \eb_font_double_engine_set:n
+\RenewDocumentCommand{\newCJKfontfamily}{omO{}mO{}}
+ {
+ \tl_set:Nx \l_tmpa_tl
+ { \tl_if_novalue:nTF {#1} { \cs_to_str:N #2 } {#1} }
+ \cs_new_protected:Npx #2
+ { \eb_switch_family:n { \l_tmpa_tl } }
+ \eb_set_family:nnn { \l_tmpa_tl } {#3,#5} {#4}
+ }
+
+\cs_new_protected:Npn \eb@font@load@noto
{
\eb_setmainfont:nn { NotoSerif }
{
@@ -1321,22 +1319,94 @@
UprightFont = *-Regular,
BoldFont = *-Bold
}
- \eb_setCJKmainfont:nn { FZShuSong-Z01S }
+ }
+\cs_new_protected:Npn \eb@font@load@times
+ {
+ \eb_setmainfont:nn { XITS }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic
+ }
+ \eb_setsansfont:nn { texgyreheros }
{
- UprightFont = *,
- BoldFont = FZHei-B01S,
- ItalicFont = FZKai-Z03S
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic
+ }
+ \eb_setmonofont:nn { texgyrecursor }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic,
+ Ligatures = CommonOff
}
- \eb_setCJKsansfont:n { FZHei-B01S }
- \eb_setCJKmonofont:n { FZFangSong-Z02S }
- \eb_set_zhfont_songti:n { FZShuSong-Z01S }
- \eb_set_zhfont_heiti:n { FZHei-B01S }
- \eb_set_zhfont_kaishu:n { FZKai-Z03S }
- \eb_set_zhfont_fangsong:n { FZFangSong-Z02S }
- \cs_new_protected:Npn \songti { \eb_switch_family:n { songti } }
- \cs_new_protected:Npn \heiti { \eb_switch_family:n { heiti } }
- \cs_new_protected:Npn \kaishu { \eb_switch_family:n { kaishu } }
- \cs_new_protected:Npn \fangsong { \eb_switch_family:n { fangsong } }
+ }
+\cs_new_protected:Npn \eb_font_load_libertinus_sans:
+ {
+ \eb_setsansfont:nn { LibertinusSans }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic
+ }
+ }
+\cs_new_protected:Npn \eb_font_load_lmmonolt_mono:
+ {
+ \eb_setmonofont:nn { lmmonolt10 }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-oblique,
+ BoldItalicFont = *-boldoblique
+ }
+ }
+\cs_new_protected:Npn \eb@font@load@garamond
+ {
+ \eb_setmainfont:nn { EBGaramond }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic
+ }
+ \eb_font_load_libertinus_sans:
+ \eb_font_load_lmmonolt_mono:
+ }
+\cs_new_protected:Npn \eb@font@load@libertine
+ {
+ \eb_setmainfont:nn { LibertinusSerif }
+ {
+ Extension = .otf,
+ UprightFont = *-Regular,
+ BoldFont = *-Bold,
+ ItalicFont = *-Italic,
+ BoldItalicFont = *-BoldItalic
+ }
+ \eb_font_load_libertinus_sans:
+ \eb_font_load_lmmonolt_mono:
+ }
+\cs_new_protected:Npn \eb@font@load@palatino
+ {
+ \eb_setmainfont:nn { texgyrepagella }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic
+ }
+ \eb_font_load_libertinus_sans:
+ \eb_font_load_lmmonolt_mono:
}
\ctex_set:n
@@ -1398,7 +1468,6 @@
afterskip = \parskip
}
}
-
\bool_if:NF \l__eb_title_newline_bool
{
\ctex_set:n
@@ -1410,8 +1479,8 @@
%</class>
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/11}{1.27b}
+\RequirePackage{l3keys2e,etoolbox}
+\ProvidesExplPackage{easybase}{2021/07/12}{1.27c}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \ctex_define:nn { nx }
@@ -1476,12 +1545,12 @@
}
\NewDocumentCommand{\LoadPackage}{O{}m}
{
- \seq_set_split:Nnn \l__eb_package_names_seq { + } {#2}
+ \seq_set_split:Nnn \l_tmpb_seq { + } {#2}
\int_compare:oNnT
- { \seq_count:N \l__eb_package_names_seq } = { 1 }
+ { \seq_count:N \l_tmpb_seq } = { 1 }
{ \PassOptionsToPackage{#1}{#2} }
\seq_map_function:NN
- \l__eb_package_names_seq \eb_match_load_package:n
+ \l_tmpb_seq \eb_match_load_package:n
}
\cs_new_protected:Npn \eb_at_end_preamble:n
{ \BeforeBeginEnvironment{document} }
@@ -1493,6 +1562,7 @@
{ \bool_set_true:N \l__eb_page_twoside_bool }
\bool_if_exist:NF \l__eb_compile_draft_bool
{ \bool_set_false:N \l__eb_compile_draft_bool }
+\clist_new:N \g__eb_ctex_options_clist
\keys_define:nn { easybase }
{
@@ -1516,7 +1586,10 @@
},
class .initial:n = book,
book .meta:n = { class = #1 },
- article .meta:n = { class = #1 }
+ article .meta:n = { class = #1 },
+
+ unknown .code:n =
+ { \clist_gput_right:NV \g__eb_ctex_options_clist \CurrentOption }
}
\clist_map_inline:nn
@@ -1529,6 +1602,15 @@
}
{ \PassOptionsToPackage #1 }
\ProcessKeysOptions{easybase}
+\PassOptionsToPackage{\g__eb_ctex_options_clist}{ctex}
+\@ifclassloaded{ctexbook}{}
+ {
+ \@ifclassloaded{ctexart}{}
+ {
+ \@ifclassloaded{ctexrep}{}
+ {\RequirePackage[heading]{ctex}}
+ }
+ }
\bool_new:N \l__eb_toc_multi_column_bool
\bool_new:N \l__eb_mark_uppercase_bool
@@ -2241,7 +2323,17 @@
listing-con = #1,
equation-con = #1
},
- number-con .initial:n = { . }
+ number-con .initial:n = { . },
+ unknown .code:n =
+ {
+ \msg_warning:nnx
+ { easybase } { ignore-style } { \l_keys_key_str }
+ }
+ }
+\msg_new:nnn { easybase } { ignore-style }
+ {
+ #1~is~an~unknown~style~option. \\
+ Please~check~the~user~manual~for~the~supported~options.
}
\eb_clist_map_inline:nn
{ figure,table,lstlisting,equation }
@@ -2475,8 +2567,8 @@
math .choices:nn =
{
- noto,notosans,times,scholax,stix,
- charter,ebgaramond,libertine,none
+ noto,notosans,times,libertine,
+ charter,garamond,none,nc,stix
}
{
\tl_gset_eq:NN
@@ -2494,11 +2586,11 @@
{
{ noto } { \eb_put_newtxmath:n { noto } }
{ notosans } { \eb_put_newtxmath:n { notosans } }
- { ebgaramond } { \eb_put_newtxmath:n { ebgaramond } }
+ { garamond } { \eb_put_newtxmath:n { ebgaramond } }
{ times } { \eb_put_newtxmath:n { noOT1 } }
{ libertine } { \eb_put_newtxmath:n { libertine,noOT1 } }
{ stix } { \eb_put_newtxmath:n { stix2,noOT1 } }
- { scholax } { \eb_put_newtxmath:n { nc,noOT1 } }
+ { nc } { \eb_put_newtxmath:n { nc,noOT1 } }
{ charter } { \eb_put_newtxmath:n { charter,noOT1 } }
}
{ \LoadPackage{newtxmath+bm} }
@@ -2998,7 +3090,7 @@
% numbers = left,
numberstyle = \footnotesize,
aboveskip = 1.5ex plus .2ex minus .1ex,
- belowskip = 1ex plus .2ex minus .1ex,
+ belowskip = 1.5ex plus .2ex minus .1ex,
keepspaces = true,
framerule = \l__eb_rule_width_dim,
columns = flexible,
@@ -3054,13 +3146,17 @@
{
linktype .choice:,
linktype .value_required:n = true,
- linktype/edge .code:n = { },
- linktype/none .code:n = \eb_put_hyperref:n { hidelinks },
- linktype/various .code:n =
+ linktype/edge .code:n =
+ { \AtBeginDocument[hyperref]{\tl_set:Nn \@pdfborder { 0~0~1 }} },
+ linktype/none .code:n =
+ { \AtBeginDocument[hyperref]{\tl_set:Nn \@pdfborder { 0~0~0 }} },
+ linktype/colors .code:n =
{
\bool_set_true:N \l__eb_toc_number_color_bool
\eb_put_hyperref:n { colorlinks }
},
+ linktype/various .meta:n = linktype/colors,
+ linktype .initial:n = edge,
linktoc .choice:,
linktoc/unknown .code:n =
@@ -3107,7 +3203,7 @@
\clist_map_function:nN
{
{ none, 000000,000000,000000 },
- { seaside, 4169e1,708090,9932cc },
+ { seaside, 4169e1,007130,9932cc },
{ energy, f39800,00a0e9,893895 },
{ cyberpunk, 601986,eb6877,a4005b }
}
@@ -3130,13 +3226,13 @@
abcdefghijklmnopqrstuvwxyz
0123456789
}
-\AtBeginDocument[hyperref]
+\ctex_at_end_preamble:n
{
\LoadPackage{hyperref}
\urlstyle{same}
\eb_allow_urlbreak:
- \ctex_hypersetup:n { pdfstartview = FitH }
\exp_args:NV \hypersetup \l__eb_hyperref_clist
+ \use:c { makeindex }
}
\labelformat{part}{\CTEXthepart}
@@ -3178,7 +3274,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/11}{1.27b}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/12}{1.27c}
{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 f21fed288b..9126c42467 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ