summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-13 03:00:47 +0000
committerNorbert Preining <norbert@preining.info>2022-03-13 03:00:47 +0000
commit830142c7beb66ea5baa91b009ecea1529eaa70b0 (patch)
tree6a591b445e6d4ed21b2aa759e18a97911c6a88c0 /macros/latex/contrib/easybook
parent0c73359c915c22297090c6c23c5ac23a8ec9603e (diff)
CTAN sync 202203130300
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r--macros/latex/contrib/easybook/README.md2
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx18
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin591676 -> 591526 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex34
4 files changed, 26 insertions, 28 deletions
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index 0a22e71b49..6534037fd7 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,4 +1,4 @@
-# Easybook document class
+# easybook document class
`easybook` is a pure academic template created based on the `ctexbook` book document class. It also has the functions of `book` and `article` document class. Combined with the general framework design of the dissertation of many universities in China, providing multiple commands and interfaces allows users to easily customize the thesis template. Its basic macro package `easybase` can also be used with `ctex` and standard document classes.
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 15185e97b7..698244b85f 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/11}{1.645}
+\ProvidesExplClass{easybook}{2022/03/12}{1.646}
{Easily typesetting Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -303,7 +303,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/03/11}{1.645}
+\ProvidesExplPackage{easybase}{2022/03/12}{1.646}
{Easily typesetting Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -430,7 +430,6 @@
}
\PassOptionsToPackage{list = off}{bicaption}
-\PassOptionsToPackage{nonewpage}{imakeidx}
\PassOptionsToPackage{upint}{newtxmath}
\PassOptionsToPackage{svgnames}{xcolor}
\PassOptionsToPackage{many}{tcolorbox}
@@ -474,6 +473,7 @@
\newcounter{chapter}
\providebool{@mainmatter}
\bool_set_false:N \l__eb_class_mode_book_bool
+ \ctex_define:n { chapter .meta:nn = { ctex/chapter } {#1} }
\ctex_define:n { chapter/tocline .code:n = { } }
}
\bool_if:NF \l__eb_class_mode_book_bool
@@ -633,8 +633,6 @@
{ \use:c { eb@mark@#1@label@layout }{##1} }
}
}
-\cs_gset_eq:NN \easyhead \fancyhead
-\cs_gset_eq:NN \easyfoot \fancyfoot
\NewDocumentCommand{\markrule}
{O{\textwidth}D(){ctex@frame}m>{\SplitArgument{1}{|}}O{}}
{\eb_draw_markrule:nnnnn {#1} {#2} {#3} #4}
@@ -888,6 +886,7 @@
{ plain,hang,bottom,para,flush }
{ \eb_footnote_value_handle:n {#1} },
footnotetype .value_required:n = true,
+ footnotetype/default .meta:n = footnotetype/plain,
footnotetype .initial:n = hang,
fnmark-vmove .code:n = \eb_fnmate_move_set:nnn {#1} { mark } { v },
fnmark-hmove .code:n = \eb_fnmate_move_set:nnn {#1} { mark } { h },
@@ -1222,13 +1221,13 @@
\NewDocumentCommand{\counteruse}{sO{arabic}D(){.}mod()}
{
\IfBooleanF{#1}{\stepcounter{#4}}
- \tl_set:cn { theeb@#4 }
+ \tl_set:cn { theeb-#4 }
{
\IfValueT{#5}{\use:c { the#5 }#3}
\use:c {#2}{#4}
}
- \tl_use:c { theeb@#4 }
- \eb_current_label:n { eb@#4 }
+ \tl_use:c { theeb-#4 }
+ \eb_current_label:n { eb-#4 }
}
\cs_new:Npn \eb_section_counter_prefix:n #1
{
@@ -2323,7 +2322,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/11}{1.645}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/03/12}{1.646}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
@@ -2332,7 +2331,6 @@
{ \tcbset{#1/.style = {#2}} }
\cs_new_protected:Npn \tcbappstyle
{ \@ifstar{\deftcbstyle}{\addtotcbstyle} }
-\cs_set_eq:NN \newtcbstyle \deftcbstyle
\deftcbstyle{tc-easybox}
{
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 0ef1b36ef4..b8185638a7 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 b1eb6b71b7..6935a62b41 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,8 +21,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK使用手册,
- version = v1.645,
- date = 2022/03/11,
+ version = v1.646,
+ date = 2022/03/12,
authors = 瞿毅,
info = 简便地排版中文学位论文或书籍,
email = q1jx@foxmail.com,
@@ -168,7 +168,7 @@
您在使用 \cls*{easybook} 文档类编写文档前可能需要具备以下的条件:
\begin{itemize}
\item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
- \item 由于文档类用到了一些 \LaTeX 和依赖宏包较新的功能,需要版本至少在2020/10/01以后的 \LaTeX 内核支持,建议您安装最新的 \TeX 发行版。
+ \item 由于文档类用到了一些 \LaTeX 和依赖宏包较新的功能,需要版本至少在\textbf{2020/10/01}以后的 \LaTeX 内核支持。建议您安装最新的 \TeX 发行版。
\item 虽然手册对基本用法做了介绍,但这并不是入门教程,所涉及到宏包的用法与命令也需要有了解。您应当具有一定的 \LaTeX 使用基础,可以在 \TeX 综合网站 \href{https://www.ctan.org/}{CTAN} 查看相关资源。
\end{itemize}
@@ -566,7 +566,7 @@
\keyval{caption-every}{数值}\Default{1.2}
同时设置图片、表格和代码题注的行距因子。
\keyval{footnote}{数值}\Default{1.2}
- 脚注内容整体的行距因子,可以使用 \option{fnpara-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同\footnote{若在正文区中更改脚注行距,脚注横线下方的间距不会随当前行距改变。}。
+ 脚注内容整体的行距因子。可以使用 \option{fnpara-form} 的代码覆盖每个脚注单独的行距,从而与不同脚注的段落间距不同\footnote{若在正文区中更改脚注行距,脚注横线下方的间距不会随当前行距改变。}。
\begin{ctexexam}
\ebspread{footnote = 1.3}
\ebhdrset{fnpara-form = \linespread{1.2}\selectfont}
@@ -632,10 +632,10 @@
使用由 \cs*{defbibfilter} 定义的 \option*{filter} 来过滤条目。
\end{options}
- 可能在一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg*{biblatex} 宏包并使一个条目\textbf{同时输出}双语文献的例子:
+ 可能在一些情况下您希望更加灵活地设置参考文献或有更多需求,下面举一个在导言区手动配置 \pkg*{biblatex} 宏包并使一个条目输出双语对照文献的例子:
\begin{ctexexam}
- \usepackage[style = numeric]{biblatex}
- \addbibresource{myrefs.bib}
+ \usepackage[style = gb7714-2015]{biblatex}
+ \addbibresource{reference.bib}
\defbibheading{bibliography}[参考文献] % 定义参考文献标题
{\chapter*{#1}\markboth{#1}{#1}}
\defbibentryset{Zhang2022}{张三2022,ZhangSan2022}
@@ -1098,8 +1098,8 @@
boxrule = 5pt,boxsep = 5pt,
borderline = {2pt}{2pt}{white}
}
- \newtcolorbox{mytcbox}[1][]{enhanced,mytcb,title = #1}
- \begin{tcolorbox}[mytcb,enhanced]
+ \newtcolorbox{mytcbox}[1][]{enhanced,fancy,title = #1}
+ \begin{tcolorbox}[fancy,enhanced]
盒子内容
\end{tcolorbox}
\begin{mytcbox}[盒子标题]
@@ -1156,7 +1156,7 @@
除了以普通公式的方式,化学式还可用 \pkg*{chemformula} 实现。无机化学式使用 \cs{ch} 命令书写。化合物表达式中的原子数不需要加下标符号,化学计量数与表达式间隔一个空格。
\begin{ctexexam}
\ch{[Cu(NH3)4]^2+}
- \ch{Cu2S + 2 O2 - 2 e^- == 2 Cu^2+ + SO^{2-}_4}
+ \ch{Cu2S + 2 O2 - 2 e^- == 2 Cu^2+ + SO4^2-}
\end{ctexexam}
\end{commands}
@@ -1166,9 +1166,9 @@
\command{counteruse}[\sarg\oarg{编号}\darg{分隔符}\marg{计数器}\oarg{父计数器}]
命令 \cs{newcounter} 是 \LaTeX 自带的创建计数器命令,计数器值输出命令 \cs{counteruse} 将会以 \cs*{the}\meta{父计数器}\meta{分隔符}\cs*{the}\meta{计数器} 形式输出这种计数器的值。命令 \cs{counteruse} 仅具有\textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加1,带有星号参数的命令使 \meta{计数器} 的值保持不变。计数器的 \meta{编号} 为 \code{arabic} 或 \code{alph} 等计数形式。
- 在一定的场合下可能用到 \cs{counteruse} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器,使用 \cs{labelformat} 设置计数器的标签引用需添加 \code{eb@}:
+ 在一定的场合下可能用到 \cs{counteruse} 命令,比如通过新建快捷命令在一些位置使用定理环境的计数器。使用 \cs{labelformat} 设置计数器的标签引用时需添加 \code{eb-} 前缀:
\begin{ctexexam}
- \labelformat{eb@theorem}{定理#1}
+ \labelformat{eb-theorem}{定理#1}
\newcommand{\theoremhead}[1]{定理\counteruse{theorem}[chapter]\hspace{1em}#1}
\theoremhead{定理内容}\label{thm:theorem}
\end{ctexexam}
@@ -1212,12 +1212,12 @@
\begin{commands}
\command{indexsetup}[\marg{键值列表}]
\pkg*{imakeidx} 宏包增强了索引的功能。这是它的的接口命令,用于设置索引表的整体格式。
- \command*{index}[\oarg{索引名}\marg{标签}]
- 索引标签命令 \cs*{index} 的 \meta{索引名} 与索引输出命令 \cs{printindex} 一致,可以存在多个索引表。
- \command*{makeindex}[\oarg{键值列表}]
- 使用 \cs*{makeindex} 命令开启索引收集。这个命令可以重复使用打印多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表就没必要再使用。
+ \command{index}[\oarg{索引名}\marg{标签}]
+ 索引标签命令的可选参数可以用不同的 \meta{索引名} 给多个索引表设置标签。
+ \command{makeindex}[\oarg{键值列表}]
+ 用于导言区开启索引收集的命令。这个命令可以重复使用收集多个索引表,以不同的 \meta{索引名} 作为区分,如果仅打印一个索引表没必要重复使用。
\command{printindex}[\sarg\oarg{键值列表}]
- 现在索引表生成命令 \cs{printindex} 被重新定义。\meta{键值列表} 中的选项与\ref{sec:document command} 其它目录命令相同,但是原本接口命令 \cs{indexsetup} 的部分选项失效。
+ 打印不同索引表的命令。这个命令被重新定义,\meta{键值列表} 中的选项与\ref{sec:document command} 其它目录命令相同,但是接口命令 \cs{indexsetup} 的部分选项失效。
\begin{options}
\keyval{name}{索引名}
指定输出名为 \meta{索引名} 的索引表,如果只使用一个索引表则默认为项目文件名不需要指定。