summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-08 03:00:44 +0000
committerNorbert Preining <norbert@preining.info>2022-03-08 03:00:44 +0000
commitb1f3f2681b2bf35570ad11f65270777f38c55f7e (patch)
tree095fd002f68133f64deb00574ad4740d1df66859 /macros/latex/contrib/easybook
parent14d9a09517cc5a3a16f279ac3f64c172f8dae030 (diff)
CTAN sync 202203080300
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx27
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin582635 -> 586978 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex22
3 files changed, 28 insertions, 21 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index c767f8a591..c7a2ae3560 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}{2022/03/06}{1.64}
+\ProvidesExplClass{easybook}{2022/03/06}{1.641}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -76,22 +76,22 @@
\cs_new_eq:NN \eb_switch_family:n \ctex_ltj_switch_family:n
}
\cs_new_protected:Npn \eb_setmainfont:nn #1#2
- { \__fontspec_main_setmainfont:nn {#2} {#1} }
+ { \__fontspec_main_setmainfont:nn {#1} {#2} }
\cs_new_protected:Npn \eb_setsansfont:nn #1#2
- { \__fontspec_main_setsansfont:nn {#2} {#1} }
+ { \__fontspec_main_setsansfont:nn {#1} {#2} }
\cs_new_protected:Npn \eb_setmonofont:nn #1#2
- { \__fontspec_main_setmonofont:nn {#2} {#1} }
+ { \__fontspec_main_setmonofont:nn {#1} {#2} }
\cs_new_protected:Npn \eb_setCJKmainfont:nn #1#2
- { \eb_set_family:nnn { \CJKrmdefault } {#2} {#1} }
+ { \eb_set_family:nnn { \CJKrmdefault } {#1} {#2} }
\cs_new_protected:Npn \eb_setCJKsansfont:nn #1#2
- { \eb_set_family:nnn { \CJKsfdefault } {#2} {#1} }
+ { \eb_set_family:nnn { \CJKsfdefault } {#1} {#2} }
\cs_new_protected:Npn \eb_setCJKmonofont:nn #1#2
- { \eb_set_family:nnn { \CJKttdefault } {#2} {#1} }
+ { \eb_set_family:nnn { \CJKttdefault } {#1} {#2} }
\eb_seq_map_inline:nn
{ main,sans,mono,CJKmain,CJKsans,CJKmono }
{
\exp_args:Nc \RenewDocumentCommand { set#1font }{O{}mO{}}
- {\use:c { eb_set#1font:nn } {##2} {##1,##3}}
+ {\use:c { eb_set#1font:nn } {##1,##3} {##2}}
}
\RenewDocumentCommand{\newCJKfontfamily}{omO{}mO{}}
{
@@ -303,7 +303,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/03/06}{1.64}
+\ProvidesExplPackage{easybase}{2022/03/06}{1.641}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -1715,7 +1715,12 @@
\ctex_define:nn { spread }
{
line .code:n = \AfterPreamble{\setspread{#1}},
- line .initial:n = 1.354,
+ line .initial:n =
+ {
+ \fp_if_nan:nTF { \l__ctex_line_spread_fp }
+ { 1.354 }
+ { \fp_use:N \l__ctex_line_spread_fp }
+ },
table .fp_set:N = \l__eb_spread_table_fp,
table .initial:n = 1.354,
math .fp_set:N = \l__eb_spread_math_fp,
@@ -2302,7 +2307,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/06}{1.64}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/06}{1.641}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 2de13178dc..db967b2641 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 fc6d6ec086..26b7f8986a 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,7 +21,7 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v1.64,
+ version = v1.641,
date = 2022/03/06,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
@@ -551,8 +551,8 @@
\label{subsec:spacing}
行距因子用于设置各种行距倍数,\meta{数值} 是不带有长度单位的浮点数。各类行距既可以在导言区全局设置,也可以在正文中设置对后面生效。
\begin{options}
- \keyval{line}{数值}\Module{spread}\Default{1.354}
- 正文行距因子,注意 \CTeX 宏集原有的行距选项 \option*{linespread} 失效。
+ \keyval{line}{数值}\Module{spread}
+ 正文行距因子。行距因子初始值为 \code{1.354}(相当于 \textsf{Word} 的1.25倍行距),如果设置了文类或 \pkg*{ctex} 宏包的全局行距选项 \option*{linespread} 则初始值设为它的值。
\keyval{table}{数值}\Default{1.354}
表格内容行距因子。对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。
\keyval{math}{数值}\Default{1.354}
@@ -609,7 +609,7 @@
\keychoice{bibstyle}{numerical,authoryear,other sty}\Default{numerical}
参考文献格式使用中国参考文献推荐标准GB/T 7714-2015,对应顺序编码制和著者—出版年制两种风格。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \code{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg*{biblatex} 宏包支持的参考文献风格名称。
\keyval{citestyle}{标注风格}
- 标注参考文献的风格。选项 \keyis{backend}{bibtex} 下可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,选项 \keyis{backend}{biblatex} 下可使用 \pkg*{biblatex} 宏包支持的标注风格名称。
+ 标注参考文献的风格。后端为 \code{bibtex} 时可使用 \option{super}(数字上标标注,默认)或 \option{numbers}(数字标注)等 \pkg*{natbib} 宏包带有的标注风格,后端为 \code{biblatex} 时可使用 \pkg*{biblatex} 宏包支持的标注风格。
\keyval{datafile}{数据库列表}
参考文献数据库的文件名列表,文件列表以花括号包裹并以英文逗号分隔。使用 \hologo{biber} 处理时要带有 \code{bib} 后缀,若参考文献文件不在当前文件夹则文件名需要包含路径。不设置参考文献数据库名时 \module*{bibset} 模块中的选项会失效,即不自动载入 \pkg*{natbib} 或 \pkg*{biblatex} 宏包,此时需要手动载入相关宏包配置参考文献。
\end{options}
@@ -632,12 +632,14 @@
使用由 \cs*{defbibfilter} 定义的 \option*{filter} 来过滤条目。
\end{options}
- 可能在一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg*{biblatex} 宏包的例子:
+ 可能在一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg*{biblatex} 宏包并使一个条目\textbf{同时输出}双语文献的例子:
\begin{ctexexam}
\usepackage[style = numeric]{biblatex}
\addbibresource{myrefs.bib}
\defbibheading{bibliography}[参考文献] % 定义参考文献标题
{\chapter*{#1}\markboth{#1}{#1}}
+ \defbibentryset{Zhang2022}{张三2022,ZhangSan2022}
+ \cite{Zhang2022} % 在正文中引用
\end{ctexexam}
\end{commands}
@@ -709,7 +711,7 @@
\subsection{页面尺寸}
\label{subsec:page margins}
-模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \cls*{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
+模块 \module*{geoset} 会将除了前两个附加的选项交给页面尺寸宏包 \pkg*{geometry} 处理,并且支持它的键值列表,预置的页面尺寸与 \textsf{Word} 的默认值接近。下面列举几种代表性选项,其它选项可查阅宏包帮助文档。当在此设置纸张规格时,会覆盖文类选项 \option{paper} 的设置。
\begin{options}\noitemsep
\keyval{headruleskip}{页眉线间距}\Module{geoset}\Default*{0pt}
\keyval{footruleskip}{页脚线间距}\Default*{3.5pt}
@@ -1085,10 +1087,10 @@
}
\newtcolorbox{mytcbox}[1][]{enhanced,mytcb,title = #1}
\begin{tcolorbox}[mytcb,enhanced]
- 盒子内容1
+ 盒子内容
\end{tcolorbox}
\begin{mytcbox}[盒子标题]
- 盒子内容2
+ 盒子内容
\end{mytcbox}
\end{ctexexam}
\end{commands}
@@ -1125,7 +1127,7 @@
单位格式化命令 \cs*{unit} 包含文字元素(例如字母或数字)时,使用 \Marg{.} 和 \code{\~{}} 放置在单元乘积中间,并使用 \code{\_} 和 \code{\^{}} 正确放置指定的下标和上标。格式化方法可在数学和文本模式下使用。
\command*{qty}[\oarg{键值列表}\marg{数字}\oarg{前缀}\marg{单位}]
命令 \cs*{qty} 可用来输出带有单位的量。
- \command*{qtyrange}[\oarg{键值列表}\marg{数字1}\marg{数字2}\marg{单位}]
+ \command*{qtyrange}[\oarg{键值列表}\marg{起始数字}\marg{结束数字}\marg{单位}]
命令 \cs*{qtyrange} 可以输出带有范围和单位的量。
\begin{ctexexam}
\numproduct{-21x3e5}
@@ -1179,7 +1181,7 @@
\begin{commands}\noitemsep
\command{caption}[\sarg\oarg{目录标题}\marg{标题}]\default{}
\command{captionof}[\sarg\marg{条目名}\oarg{目录标题}\marg{标题}]\default{}
- \command{bicaption}[\sarg\oarg{目录标题1}\marg{标题1}\oarg{目录标题2}\marg{标题2}]
+ \command{bicaption}[\sarg\oarg{目录中文标题}\marg{中文标题}\oarg{目录英文标题}\marg{英文标题}]
题注命令 \cs{caption} 用于在图表上下方插入题注,需要在浮动体环境 \env*{figure} 和 \env*{table} 中使用。在浮动环境外可以使用 \cs{captionof} 命令,第一个参数指定条目名。可以搭配 \pkg*{newfloat} 宏包创建更多类型的浮动环境并设置相应题注。\cs{bicaption} 命令可以实现中英文双语题注,需要在导言区载入 \pkg*{bicaption} 宏包,具体用法见说明文档。
\end{commands}