summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx97
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin578327 -> 578164 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex16
3 files changed, 56 insertions, 57 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7a2475dd58..87098257ca 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/09/28}{1.3F}
+\ProvidesExplClass{easybook}{2021/10/06}{1.3G}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -33,32 +33,40 @@
scheme .code:n = \eb_put_ctexbook:n { scheme = #1 },
enmode .meta:n = { newline,scheme = plain },
- font .choices:nn =
+ font .choices:nn =
{ 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 },
+ font .value_required:n = true,
+ font .initial:n = auto,
+ cjkfont .code:n = \eb_put_ctexbook:n { fontset = #1 },
+ mathfont .choices:nn =
+ {
+ noto,notosans,times,libertine,
+ charter,garamond,none,nc,stix
+ }
+ { \tl_set:Nn \l__eb_mathfont_choice_tl {#1} },
+ mathfont .value_required:n = true,
+ mathfont .initial:n = times,
paper .choice:,
- paper .value_required:n = true,
- paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
+ paper .value_required:n = true,
+ paper/unknown .code:n = \PassOptionsToPackage{#1}{geometry},
class .choice:,
- class .value_required:n = true,
- class/book .code:n = { },
- class/article .code:n =
+ class .value_required:n = true,
+ class/book .code:n = { },
+ class/article .code:n =
{
\bool_set_false:N \l__eb_class_book_bool
\eb_put_ctexbook:n { oneside }
},
- book .meta:n = { class = book },
- article .meta:n = { class = article },
+ book .meta:n = { class = book },
+ article .meta:n = { class = article },
- config .tl_set:N = \g__eb_config_tl,
- floatpage .bool_set:N = \l__eb_float_page_bool,
- floatpage .default:n = true,
- unknown .code:n =
+ config .tl_set:N = \g__eb_config_tl,
+ floatpage .bool_set:N = \l__eb_float_page_bool,
+ floatpage .default:n = true,
+ unknown .code:n =
{ \clist_gput_right:NV \g__eb_options_clist \CurrentOption }
}
@@ -221,6 +229,20 @@
\eb_font_load_libertinus_sans:
\eb_font_load_lmmonolt_mono:
}
+\cs_new_protected:Npn \eb_put_newtxmath:n #1
+ { \PassOptionsToPackage{#1}{newtxmath} }
+\str_case:VnT \l__eb_mathfont_choice_tl
+ {
+ { times } { }
+ { nc } { \eb_put_newtxmath:n { nc } }
+ { noto } { \eb_put_newtxmath:n { noto } }
+ { stix } { \eb_put_newtxmath:n { stix2 } }
+ { charter } { \eb_put_newtxmath:n { charter } }
+ { notosans } { \eb_put_newtxmath:n { notosans } }
+ { garamond } { \eb_put_newtxmath:n { ebgaramond } }
+ { libertine } { \eb_put_newtxmath:n { libertine } }
+ }
+ { \LoadPackage{newtxmath+bm} }
\ctex_set:n
{
@@ -297,7 +319,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/09/28}{1.3F}
+\ProvidesExplPackage{easybase}{2021/10/06}{1.3G}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1153,7 +1175,7 @@
\ctex_define:nn { tocset }
{
#1/voffset .skip_set:c = l__eb_toc_#1_voffset_skip,
- #1/tocline .cs_set:cp = { eb@labelname@#1 } ##1,
+ #1/tocline .cs_set:cp = { eb@toc@label@#1 } ##1,
}
}
\eb_clist_map_inline:nn
@@ -1301,8 +1323,8 @@
\prop_new:N \l__eb_list_label_name_prop
\prop_set_from_keyval:Nn \l__eb_list_label_name_prop
{
- figure = \eb@labelname@figure,
- table = \eb@labelname@table
+ figure = \eb@toc@label@figure,
+ table = \eb@toc@label@table
}
\cs_gset:Npn \caption@@@addcontentsline #1#2#3#4
{
@@ -1321,7 +1343,7 @@
\addcontentsline{lol}{lstlisting}
{
\ifbool{eb@titletoc@hang@fix}{\eb@numberline}{}
- {\eb@labelname@lstlisting}\lst@@caption
+ {\eb@toc@label@lstlisting{}}\lst@@caption
}
}
@@ -1652,36 +1674,9 @@
footnote .initial:n = \rmfamily,
marginpar .tl_set:N = \marginfont,
marginpar .initial:n = \rmfamily\footnotesize,
-
- math .choices:nn =
- {
- noto,notosans,times,libertine,
- charter,garamond,none,nc,stix
- }
- { \tl_set:Nn \l__eb_subfont_math_choice_tl {#1} },
- math .value_required:n = true,
- math .initial:n = times,
unknown .code:n = \eb_msg_unknown_option:n { subfont }
}
-\cs_new_protected:Npn \eb_put_newtxmath:n #1
- { \PassOptionsToPackage{#1}{newtxmath} }
-\eb_at_end_preamble:n
- {
- \str_case:VnT \l__eb_subfont_math_choice_tl
- {
- { times } { }
- { nc } { \eb_put_newtxmath:n { nc } }
- { noto } { \eb_put_newtxmath:n { noto } }
- { stix } { \eb_put_newtxmath:n { stix2 } }
- { charter } { \eb_put_newtxmath:n { charter } }
- { notosans } { \eb_put_newtxmath:n { notosans } }
- { garamond } { \eb_put_newtxmath:n { ebgaramond } }
- { libertine } { \eb_put_newtxmath:n { libertine } }
- }
- { \LoadPackage{newtxmath+bm} }
- }
-
\fp_new:N \l__eb_spread_line_fp
\fp_new:N \l__eb_spread_table_fp
\fp_new:N \l__eb_spread_math_fp
@@ -1693,9 +1688,9 @@
line .fp_set:N = \l__eb_spread_line_fp,
line .initial:n = 1.3,
table .fp_set:N = \l__eb_spread_table_fp,
- table .initial:n = 1.05,
+ table .initial:n = 1.1,
math .fp_set:N = \l__eb_spread_math_fp,
- math .initial:n = 1.05,
+ math .initial:n = 1.1,
caption .fp_set:N = \l__eb_spread_caption_fp,
caption .initial:n = 1.1,
footnote .fp_set:N = \l__eb_spread_footnote_fp,
@@ -2390,7 +2385,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/28}{1.3F}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/06}{1.3G}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 67e4adfe07..643ed6dca6 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 61c180ba7a..925276e8c1 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -12,8 +12,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.3F,
- date = 2021/09/28,
+ version = v1.3G,
+ date = 2021/10/06,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = quee123@foxmail.com,
@@ -219,6 +219,12 @@
\end{center}
\end{options}
+\subsection{数学字体}
+\begin{options}
+ \keychoice{mathfont}{times,noto,notosans,nc,stix,charter,garamond,libertine,none}\Default{times}
+ 选择合适的数学字体,将会加载 \pkg*{newtxmath} 和 \pkg*{bm} 宏包。使用选项 \code{none} 时可以使用 \pkg*{unicode-math} 等其它数学字体宏包定义字体。
+\end{options}
+
\subsection{article 模式}
\begin{options}
\keychoice{class}{book,article}\Default{book}
@@ -443,9 +449,9 @@
\begin{options}
\keyval-{line}{数值}\Module{spread}\Default{1.3}
正文行距因子,C\TeX 原有的行距选项 \option*{linespread} 失效。
- \keyval-{table}{数值}\Default{1.05}
+ \keyval-{table}{数值}\Default{1.1}
表格行距因子,对传统表格环境 \env*{tabular}、\env*{tabularx} 以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距。
- \keyval-{math}{数值}\Default{1.05}
+ \keyval-{math}{数值}\Default{1.1}
数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。
\keyval-{caption}{数值}\Default{1.1}
图片、表格和代码题注的行距因子。
@@ -472,8 +478,6 @@
设置脚注标记与内容的字体,包括字体族、字体系列、字体尺寸和字体形状命令。
\keyval-{marginpar}{字体命令}\Default{\cs*{rmfamily}\cs*{footnotesize}}
边注的字体设置,包括字体族、字体系列、字体尺寸和字体形状命令。
- \keychoice{math}{times,noto,notosans,nc,stix,charter,garamond,libertine,none}\Default{times}
- 选择合适的数学字体,将会加载 \pkg*{newtxmath} 和 \pkg*{bm} 宏包。使用选项 \code{none} 时可以使用 \pkg*{unicode-math} 等其它数学字体宏包定义字体。
\end{options}
\subsection{参考文献}