summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-10-24 03:01:50 +0000
committerNorbert Preining <norbert@preining.info>2021-10-24 03:01:50 +0000
commit40f406b1e0017bdecc0890738274fc8e88c08486 (patch)
treebb403e88febe52774df35db999419a76c4bd3de5 /macros/latex
parentd7054d4900d83d1ca32cddacbd6f3d07dfc2f4cc (diff)
CTAN sync 202110240301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx79
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin577576 -> 579819 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex44
3 files changed, 60 insertions, 63 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 053bb668e8..2872218cb2 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/10/21}{1.40}
+\ProvidesExplClass{easybook}{2021/10/21}{1.40A}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -319,7 +319,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/10/21}{1.40}
+\ProvidesExplPackage{easybase}{2021/10/21}{1.40A}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -332,7 +332,7 @@
\cs_generate_variant:Nn \eb_put_hyperref:n { x }
\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
-\cs_new_protected:Npn \ctex_define:nn #1
+\cs_set_protected:Npn \ctex_define:nn #1
{ \keys_define:nn { ctex/#1 } }
\cs_new_protected:Npn \eb_clist_map_inline:nn #1#2
{
@@ -386,10 +386,10 @@
\cs_new_protected:Npn \eb_if_package_loaded:nF #1#2
{
\@ifpackageloaded{#1}
- {\msg_warning:nnn { easybase } { package-loaded } {#1}}
+ {\msg_warning:nnn { easybase } { package-reloaded } {#1}}
{#2\disable@package@load{#1}{}}
}
-\msg_new:nnn { easybase } { package-loaded }
+\msg_new:nnn { easybase } { package-reloaded }
{
The~macro~package~#1~has~been~reloaded. \\
Please~pass~the~arguments~by \\
@@ -939,7 +939,7 @@
\group_begin:
\footnotesize
\exp_args:Nx
- \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
+ \setspread{ \fp_use:N \l__eb_spread_footnote_fp }
\exp_args:NNNo \group_end:
\dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
\bool_if:NT \l__eb_chap_counter_withpart_bool
@@ -951,6 +951,7 @@
}
\eb_fnpara_if_pos_bottom:
}
+\cs_new_protected:Npn \setspread #1 { \linespread{#1}\selectfont }
\cs_new_protected:Npn \eb_fnpara_if_pos_bottom:
{
\bool_if:NT \l__eb_fnpara_bottom_bool
@@ -1084,8 +1085,7 @@
\eb_patch_cmd:wnn { \@footnotetext,\@mpfootnotetext }
{ \reset@font }
{
- \linespread{\fp_use:N \l__eb_spread_footnote_fp}
- \selectfont\ignorespaces
+ \setspread{\fp_use:N \l__eb_spread_footnote_fp}
\l__eb_subfont_footnote_tl
}
\ctex_at_end_package:nn { hyperref }
@@ -1809,24 +1809,20 @@
}
\IfPackageAtLeastTF{tabularray}{2021/07/01}
{
- \SetTblrInner
- {
- rows = {abovesep = 4pt,belowsep = 2pt},
- stretch = \fp_use:N \l__eb_spread_table_fp
- }
\NewTableCommand{\toprule}[1][1pt]{\hline[#1]}
\NewTableCommand{\midrule}[1][0.5pt]{\hline[#1]}
\NewTableCommand{\bottomrule}[1][1pt]{\hline[#1]}
+ \SetTblrInner{stretch = \fp_use:N \l__eb_spread_table_fp}
}{}
\eb_at_begin_environment:nn { tabular,tabularx }
{
- \exp_args:Nx \linespread { \fp_use:N \l__eb_spread_table_fp }
- \selectfont\ignorespaces
+ \exp_args:Nx
+ \setspread { \fp_use:N \l__eb_spread_table_fp }
}
\ctex_after_end_preamble:n
{
- \exp_args:Nx \linespread { \fp_use:N \l__eb_spread_line_fp }
- \selectfont\ignorespaces
+ \exp_args:Nx
+ \setspread { \fp_use:N \l__eb_spread_line_fp }
}
\bool_if:NF \l__eb_float_page_bool
@@ -1982,7 +1978,7 @@
\RenewDocumentCommand{\declaretheoremstyle}{O{}mO{}}
{\eb@declaretheoremsyle@save[#1,#3]{#2}}
\cs_set_eq:NN \newtheorem \declaretheorem
-\NewDocumentCommand{\DeclareTheorem}
+\NewDocumentCommand{\deftheorem}
{mO{\text_titlecase_first:n {#1}}mD(){tc-theorem}O{}}
{
\eb_thm_name_set:nnn {#1} {#2} {#3}
@@ -2003,21 +1999,21 @@
Now~that~the~thmframe~option~is~true. \\
Please~load~the~tcolorbox~macro~package.
}
-\cs_set_eq:NN \EBNewTheorem \DeclareTheorem
+\cs_set_eq:NN \DeclareTheorem \deftheorem
\prop_new:N \l__eb_thmtools_entry_prop
\clist_const:Nn \c__eb_thmtools_entry_clist
{
- spaceabove = \l__eb_thm_spaceabove_tl,
- spacebelow = \l__eb_thm_spacebelow_tl,
- headindent = \l__eb_thm_headindent_tl,
+ within = \l__eb_thm_within_tl,
headfont = \l__eb_thm_headfont_tl,
notefont = \l__eb_thm_notefont_tl,
bodyfont = \l__eb_thm_bodyfont_tl,
headpunct = \l__eb_thm_headpunct_tl,
- postheadspace = \l__eb_thm_postheadspace_tl,
- within = \l__eb_thm_within_tl,
- headformat = \l__eb_thm_headformat_tl
+ spaceabove = \l__eb_thm_spaceabove_tl,
+ spacebelow = \l__eb_thm_spacebelow_tl,
+ headindent = \l__eb_thm_headindent_tl,
+ headformat = \l__eb_thm_headformat_tl,
+ postheadspace = \l__eb_thm_postheadspace_tl
}
\prop_set_from_keyval:NV
\l__eb_thmtools_entry_prop \c__eb_thmtools_entry_clist
@@ -2061,14 +2057,14 @@
\declaretheoremstyle[\c__eb_thmtools_entry_clist]{easy-theorem}
\eb_thm_name_set:nnn { exercise } { Exercise } { 练习 }
\cs_undefine:N \proof
- \DeclareTheorem{lemma}{引理}
- \DeclareTheorem{example}{例}
- \DeclareTheorem{theorem}{定理}
- \DeclareTheorem{corollary}{推论}
- \DeclareTheorem{definition}{定义}
- \DeclareTheorem{proposition}{性质}
- \DeclareTheorem{remark}{注}[numbered = no]
- \DeclareTheorem{proof}{证明}[numbered = no,qed = \qedsymbol]
+ \deftheorem{lemma}{引理}
+ \deftheorem{example}{例}
+ \deftheorem{theorem}{定理}
+ \deftheorem{corollary}{推论}
+ \deftheorem{definition}{定义}
+ \deftheorem{proposition}{性质}
+ \deftheorem{remark}{注}[numbered = no]
+ \deftheorem{proof}{证明}[numbered = no,qed = \qedsymbol]
}
\setchemformula
@@ -2100,22 +2096,19 @@
cases,cases*,dcases,dcases*,rcases,rcases*,drcases,drcases*,
aligned,alignedat,gathered,multlined,lgathered,rgathered
}
- {
- \linespread{\fp_use:N \l__eb_spread_math_fp}
- \selectfont\ignorespaces
- }
+ { \setspread{\fp_use:N \l__eb_spread_math_fp} }
\eb_patch_cmd:wnn
{ \start@gather,\start@align,\start@multline }
{ \collect@body }
{
- \linespread{\fp_use:N \l__eb_spread_math_fp}
- \selectfont\collect@body
+ \setspread{\fp_use:N \l__eb_spread_math_fp}
+ \collect@body
}
\eb_patch_cmd:wnn \gather@split
{ \spread@equation }
{
- \linespread{\fp_use:N \l__eb_spread_math_fp}
- \selectfont\spread@equation
+ \setspread{\fp_use:N \l__eb_spread_math_fp}
+ \spread@equation
}
\ctex_after_end_preamble:n
{
@@ -2167,12 +2160,10 @@
backend/bibtex .code:n = { },
backend/biblatex .code:n =
{ \bool_set_false:N \l__eb_backend_bibtex_bool },
-
bibstyle .code:n =
{ \tl_set:Nn \l__eb_bib_all_style_tl {#1} },
bibstyle .value_required:n = true,
bibstyle .initial:n = numerical,
-
citestyle .code:n =
{ \tl_set:Nn \l__eb_bib_cite_style_tl {#1} },
datafile .clist_set:N = \l__eb_bib_datafile_clist,
@@ -2468,7 +2459,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/21}{1.40}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/10/21}{1.40A}
{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 8ca5f64aae..6e88bcf6af 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 60736dc607..4bb1025dcb 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -20,7 +20,7 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.40,
+ version = v1.40A,
date = 2021/10/21,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
@@ -218,14 +218,16 @@
{
colspec = @{}*{4}{c}@{},
hline{1,7} = {1pt,cnltxblue},
- hline{2} = {0.6pt,cnltxblue}
+ hline{2} = {0.6pt,cnltxblue},
+ row{1} = {font = \sffamily},
+ column{1} = {cmd = \code}
}
- & \textsf{正文字体} & \textsf{无衬线字体} & \textsf{等宽字体} \\
- \code{noto} & Noto Serif & Noto Sans & Noto Sans Mono \\
- \code{garamond} & EB Garamond & Libertinus Sans & LM Mono \\
- \code{palatino} & TG Pagella & Libertinus Sans & LM Mono \\
- \code{libertine} & TG Pagella & Libertinus Sans & LM Mono \\
- \code{times} & XITS & TG Heros & TG Cursor
+ & 正文字体 & 无衬线字体 & 等宽字体 \\
+ noto & Noto Serif & Noto Sans & Noto Sans Mono \\
+ garamond & EB Garamond & Libertinus Sans & LM Mono \\
+ palatino & TG Pagella & Libertinus Sans & LM Mono \\
+ libertine & TG Pagella & Libertinus Sans & LM Mono \\
+ times & XITS & TG Heros & TG Cursor
\end{tblr}
\end{center}
\end{options}
@@ -340,12 +342,14 @@
{
colspec = @{}*{5}{c}@{},
hline{1,5} = {1pt,cnltxblue},
- hline{3} = {0.6pt,cnltxblue}
+ hline{3} = {0.6pt,cnltxblue},
+ row{1,3} = {font = \sffamily},
+ row{2,4} = {cmd = \module*}
}
\hyperref[subsec:style]{风格} & \hyperref[subsec:other font]{其它字体} & \hyperref[subsec:spacing]{行距} & \hyperref[subsec:hyperlinks]{超链接} & \hyperref[subsec:reference]{参考文献} \\
- \module*{style} & \module*{subfont} & \module*{spread} & \module*{refset} & \module*{bibset} \\
+ style & subfont & spread & refset & bibset \\
\hyperref[subsec:theorem of style]{定理样式} & \hyperref[subsec:page margins]{页面尺寸} & \hyperref[subsec:header and footer]{页眉页脚} & \hyperref[subsec:catalog style]{目录样式} & \\
- \module*{thmset} & \module*{geoset} & \module*{hdrset} & \module*{tocset} &
+ thmset & geoset & hdrset & tocset &
\end{tblr}
\end{center}
@@ -576,8 +580,8 @@
\keyval*-{style}{定理样式}\Default
选项的值为使用 \cs{declaretheoremstyle} 命令新定义的定理样式。
\end{options}
- \command{DeclareTheorem}[\marg{环境名}\oarg{英文标题}\marg{中文标题}\darg{盒子风格}\oarg{键值列表}]
- 定理声明命令 \cs{DeclareTheorem} 更加便捷,同样定义一个新的定理环境,\meta{键值列表} 中支持的选项与 \cs{declaretheorem} 命令相同,但它们的区别有:
+ \command{deftheorem}[\marg{环境名}\oarg{英文标题}\marg{中文标题}\darg{盒子风格}\oarg{键值列表}]
+ 定理声明命令 \cs{deftheorem} 更加便捷,同样定义一个新的定理环境,\meta{键值列表} 中支持的选项与命令 \cs{declaretheorem} 相同,但与这个命令有以下区别:
\begin{itemize}
\item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的 \meta{环境名}。
\item 自动定义交叉引用的格式,引用标签前缀为定理名。
@@ -589,7 +593,7 @@
下面简单列举几个定理命令的用法,例如使用预置样式新建一个定理环境猜想:
\begin{ctexexam}
- \DeclareTheorem{caixiang}{猜想}[style = easy-theorem] % 不需要指定预置样式
+ \deftheorem{caixiang}{猜想}[style = easy-theorem] % 不需要指定预置样式
\declaretheorem[style = easy-theorem,name = 猜想]{caixiang}
\end{ctexexam}
@@ -684,7 +688,7 @@
\begin{ctexexam}
\hdrset
{
- headfoot =
+ headfoot =
{
\easyhead[ER]{\leftmark}
\easyhead[OL]{\rightmark}
@@ -731,7 +735,7 @@
\keychoice{fntext-vshift}{fixed length,match}\Default{0pt}
脚注内容标记的垂直偏移,可以设为刚性长度,或用 \code{match} 匹配 \option*{super-vshift} 全局的值。
\keychoice{fnmate-form}{format code,match}\Default
- 默认脚注标记的格式,\code{match} 可以匹配 \option*{super-format} 全局的值。一般配合选项 \keyis-{fnmark-num}{plain} 使用,例如配合 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈:
+ 默认脚注标记的格式,\code{match} 可以匹配 \option*{super-format} 全局的值。一般配合选项 \keyis-{fnmate-num}{plain} 使用,例如配合 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈:
\begin{ctexexam}
\usepackage{circledsteps}
\hdrset
@@ -902,10 +906,12 @@
{
colspec = @{}*{8}{c}@{},
hline{1,3} = {1pt,cnltxblue},
- hline{2} = {0.6pt,cnltxblue}
+ hline{2} = {0.6pt,cnltxblue},
+ row{1} = {font = \sffamily},
+ row{2} = {cmd = \env}
}
- \env{theorem} & \env{definition} & \env{lemma} & \env{corollary} & \env{proposition} & \env{example} & \env{remark} & \env{proof} \\
- 定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明
+ 定理 & 定义 & 引理 & 推论& 性质 & 例 & 注 & 证明 \\
+ theorem & definition & lemma & corollary & proposition & example & remark & proof
\end{tblr}
\end{center}
\end{environments}