summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/easybook.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-28 03:00:58 +0000
committerNorbert Preining <norbert@preining.info>2021-07-28 03:00:58 +0000
commitf083b031d6785bf31f4b35408aca161e81b935f6 (patch)
tree71d21510e1f9fc17dd58aae5c45fab30c65c4ea0 /macros/latex/contrib/easybook/easybook.dtx
parentcef58753eba8ad7e2071195dbd92454febe82d32 (diff)
CTAN sync 202107280300
Diffstat (limited to 'macros/latex/contrib/easybook/easybook.dtx')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx173
1 files changed, 101 insertions, 72 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 82c1980c7b..d044cbf4b0 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -29,7 +29,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/25\hskip 1em\relax v1.27q\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/26\hskip 1em\relax v1.27R\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -149,7 +149,7 @@
% cjkfont = <adobe|fandol|founder|mac|macnew|macold|ubuntu|windows|none>
% \end{syntax}
% 中文字体采用 \CTeX 宏集包含的字库并与其一致,具体配置方案可以查看 \CTeX 使用手册。它与 \opt{fontset} 选项是等效的,如果没有指定 \opt{cjkfont} 的值,将会自动检测用户的操作系统并选择相应的字体。
-% \changes{v1.27q}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
+% \changes{v1.27R}{2021/07/12}{新增 \opt{cjkfont} 选项设置中文字体,原 \opt{font} 选项设置英文字体,中文字体使用 \CTeX 的字库。}
% \end{function}
%
% 如果需要使用其它中文字体,可以在启用选项 \opt{cjkfont = none} 后,再使用 \pkg{xeCJK} 宏包的相关命令设置字体以及声明字体族:
@@ -614,7 +614,7 @@
% \tcolorboxenvironment{定理环境名}{tc-theorem}
% \end{ctexexam}
%
-% 使用 \tn{tcbappstyle} 命令调整开启定理盒子时默认的样式,第一个参数为 \opt{theorem},关于命令的介绍在小节 \ref{subsec:exercise}。
+% 使用 \tn{tcbappstyle} 命令调整开启定理盒子时默认的样式,第一个参数为 \opt{theorem},关于命令的介绍在小节 \ref{subsec:box}。
% \begin{ctexexam}
% \tcbappstyle{theorem}{colback = GreenYellow}
% \end{ctexexam}
@@ -731,7 +731,7 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{hdrset/...} \\
% \changes{v1.25}{2021/05/12}{增加脚注样式设置选项。}
-% \changes{v1.27q}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
+% \changes{v1.27R}{2021/07/14}{增加脚注内容格式选项 \opt{fntext-form} 和脚注类型选项 \opt{footnotetype}。}
% \end{function}
%
% \begin{optdesc}
@@ -919,7 +919,7 @@
% \tn{end}\{hangparas\}
% \end{syntax}
% \tn{hangpara} 命令使其后的一个段落保持悬挂缩进,\env{hangparas} 环境使其中的段落均保持悬挂缩进。缩进将以 \meta{缩进长度} 从每个段落的 \meta{缩进开始行数} 开始。
-% \changes{v1.27q}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
+% \changes{v1.27R}{2021/07/11}{增加悬挂缩进段落命令 \tn{hangpara} 和环境 \env{hangparas}。}
% \end{function}
%
% \subsection{代码}
@@ -941,7 +941,7 @@
% \ \tn{item} <习题内容>
% \tn{end}\{exercise\}
% \end{syntax}
-% 习题环境的标题使用 \env{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 + 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \opt{label} 选项失效。
+% 习题环境的标题使用 \tn{tcbox} 行内盒子包装样式,内容则使用 \env{enumerate} 列表环境。它有 5 个可选参数,应当注意用法。当使用星号参数时标题不进行编号,使用 + 号参数时不使用预置标题,此时 \meta{键值列表1} 除了 \opt{label} 选项失效。
% \changes{v1.23}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
% \end{function}
%
@@ -959,24 +959,17 @@
% \opt{number} 为短编号形式,应当包含 A、a、I、i、或 1 其中一个符号。\opt{label} 选项用于设置习题环境的引用标签,它与标签格式命令 \tn{labelformat} 对应的计数器是 eb@exercise。
% \end{function}
%
-% \begin{function}{\setexercise,\tcbappstyle,\setexerlist,\exerprologue,\tcphantomifname}
+% \begin{function}{\setexercise,\setexerlist,\exerprologue,\tcphantomifname}
% \begin{syntax}
% \tn{setexercise}\marg{键值列表1}
-% \tn{tcbappstyle*}\marg{风格名称}\marg{键值列表2}
% \tn{setexerlist}\marg{键值列表3}
% \tn{exerprologue}\marg{序言内容}
% \tn{tcphantomifname}\marg{编号代码}\marg{不编号代码}
% \end{syntax}
+% \tn{setexercise} 命令可以全局设置上述习题综合选项 \meta{键值列表1} 的默认值。\tn{setexerlist} 命令用于设置习题条目选项 \meta{键值列表3} 的值。\tn{exerprologue} 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。
% \end{function}
%
-% \begin{optdesc}
-% \item[\tn{setexercise}] 这个命令可以全局设置上述习题综合选项 \meta{键值列表1} 的默认值。
-% \item[\tn{tcbappstyle*}] 这是 \pkg{tcolorbox} 宏包盒子风格定义命令,带有星号的命令可以\textbf{新建或重置}一个名为 \opt{tc-}\meta{风格名称} 的盒子风格,否则是修改\textbf{已存在}的风格。在这里可以设置标题选项 \meta{键值列表2} 的值,第一个参数为 \opt{exercise},也可以修改小节 \ref{subsec:box} 本文档类支持的其它盒子环境风格。
-% \item[\tn{setexerlist}] 这个命令用于设置习题条目选项 \meta{键值列表3} 的值。
-% \item[\tn{exerprologue}] 在习题环境开始前插入一段内容,可以是文本或者代码,需要在每一个习题环境前使用。
-% \item[\tn{tcphantomifname}] 根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \tn{addcontentsline} 命令将习题标题加入目录。
-% \end{optdesc}
-%
+% 在这里可以使用 \tn{tcbappstyle} 命令设置标题选项 \meta{键值列表2} 的值,第一个参数为 \opt{exercise}。\tn{tcphantomifname} 根据使用 \pkg{tcolorbox} 生成的习题标题是否编号,在超链接锚点的位置加入代码,比如使用 \tn{addcontentsline} 命令将习题标题加入目录。
% \begin{ctexexam}
% \tcphantomifname{\markright{\UseCounter{tcbcounter}{\quad 习题}}}{}
% \tcbappstyle{exercise}{boxsep = 5pt}
@@ -991,6 +984,30 @@
% \label{subsec:box}
% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包,它们 \meta{配置选项} 的键值列表同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖预设。
%
+% \begin{function}[added = 2021-07-25]{\tcbappstyle}
+% \begin{syntax}
+% \tn{tcbappstyle*}\marg{风格名称}\marg{键值列表}
+% \end{syntax}
+% 这是一个 \pkg{tcolorbox} 宏包盒子风格定义命令,带有星号的命令可以\textbf{新建或重置}一个名为 \opt{tc-}\meta{风格名称} 的盒子风格,否则是修改\textbf{已存在}的风格。这个命令可以调整以下即将介绍的预置盒子风格,对于预置盒子来说参数 \meta{风格名称} 即为它们对应的环境或命令名。
+% \end{function}
+%
+% \begin{ctexexam}
+% \tcbappstyle*{mytcb} % 新建一个盒子风格tc-mytcb
+% {
+% colback = Snow,colframe = LimeGreen,coltext = Coral,
+% fontupper = \bfseries,arc = 6pt,
+% boxrule = 5pt,boxsep = 5pt,
+% borderline = {2pt}{2pt}{white}
+% }
+% \newtcolorbox{mytcbox}[1][]{enhanced,tc-mytcb,title = #1}
+% \begin{tcolorbox}[tc-mytcb,enhanced]
+% 盒子内容1
+% \end{tcolorbox}
+% \begin{mytcbox}[盒子标题]
+% 盒子内容2
+% \end{mytcbox}
+% \end{ctexexam}
+%
% \subsubsection{摘要盒子}
% \begin{function}[added = 2021-01-05,updated = 2021-05-02]{\setoutlinelist,outline}
% \begin{syntax}
@@ -1004,9 +1021,9 @@
%
% \begin{ctexexam}
% \tcbappstyle{outline}{arc = 6pt}
-% \begin{outline}[leftmargin = *](标题名称)
-% \item 摘要内容
-% \item 摘要内容
+% \begin{outline}[leftmargin = *](摘要标题)
+% \item 摘要内容1
+% \item 摘要内容2
% \end{outline}
% \end{ctexexam}
%
@@ -1111,7 +1128,7 @@
% \subsection{公式符号对照}
% \begin{function}[added = 2021-07-22]{\seteqcomp,\seteqcomplist,\symb,eqcomp}
% \begin{syntax}
-% \tn{seteqcomp}\marg{键值列表}
+% \tn{seteqcomp}\marg{键值列表1}
% \tn{seteqcomplist}\marg{键值列表2}
% \tn{symb*}\marg{符号}\oarg{引导符}
% \tn{begin}\{eqcomp\}\oarg{键值列表1}\parg{键值列表2}
@@ -1119,7 +1136,7 @@
% \tn{end}\{eqcomp\}
% \end{syntax}
% 一些公式之后可以使用基于列表环境的 \env{eqcomp} 进行符号对照。\tn{symb} 需要在环境内使用,带有星号的命令可单独在文本段落使用。对照列表的 \meta{键值列表2} 与 \pkg{enumitem} 的选项相同,一般较少用到,可以用于设置垂直间距等。\meta{键值列表1} 也可以使用 \tn{seteqcomp} 全局设置,它的选项如下:
-% \changes{v1.27q}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。}
+% \changes{v1.27R}{2021/07/22}{增加公式符号对照环境 \env{eqcomp} 和命令 \tn{symb}。}
% \end{function}
%
% \begin{function}{width,delim,space,item-align,delim-align,enumitem,intro,font,mode}
@@ -1253,7 +1270,7 @@
% \textsc{The \LaTeX~Project Team}.
% \newblock \textit{The \hologo{LaTeX2e} Sources} [CP/OL].
% \newblock (2020-10-01)
-% \urlprefix\url{https://www.ctan.org/pkg/source2e}
+% \urlprefix\url{https://ctan.org/pkg/source2e}
%
% \bibitem{胡伟2017latex2e}
% 胡伟.
@@ -1270,56 +1287,63 @@
% \newblock \textit{The \pkg{footmisc} package} [EB/OL].
% \newblock version 5.5b,
% \newblock (2011-06-06)
-% \urlprefix\url{https://www.ctan.org/pkg/footmisc}
+% \urlprefix\url{https://ctan.org/pkg/footmisc}
%
% \bibitem{thmtools}
% Dr. Ulrich M. Schwarz, Yukai Chou.
% \newblock \textit{The \pkg{thmtools} package} [EB/OL].
% \newblock version 0.72,
% \newblock (2020-08-01)
-% \urlprefix\url{https://www.ctan.org/pkg/thmtools}
+% \urlprefix\url{https://ctan.org/pkg/thmtools}
%
% \bibitem{fancyhdr}
% Pieter van Oostrum.
% \newblock \textit{The \pkg{fancyhdr} package} [EB/OL].
% \newblock version 4.0.1,
% \newblock (2020-01-28)
-% \urlprefix\url{https://www.ctan.org/pkg/fancyhdr}
+% \urlprefix\url{https://ctan.org/pkg/fancyhdr}
%
% \bibitem{caption}
% Axel Sommerfeldt.
% \newblock \textit{The \pkg{caption} package} [EB/OL].
% \newblock version 3.5,
% \newblock (2020-08-30)
-% \urlprefix\url{https://www.ctan.org/pkg/caption}
+% \urlprefix\url{https://ctan.org/pkg/caption}
%
% \bibitem{titletoc}
% Javier Bezos.
% \newblock \textit{The \pkg{titletoc} package} [EB/OL].
% \newblock version 2.13,
% \newblock (2019-10-16)
-% \urlprefix\url{https://www.ctan.org/pkg/titletoc}
+% \urlprefix\url{https://ctan.org/pkg/titletoc}
%
% \bibitem{tcolorbox}
% Thomas F. Sturm.
% \newblock \textit{The \pkg{tcolorbox} package} [EB/OL].
% \newblock version 4.51,
% \newblock (2021-06-14)
-% \urlprefix\url{https://www.ctan.org/pkg/tcolorbox}
+% \urlprefix\url{https://ctan.org/pkg/tcolorbox}
+%
+% \bibitem{enumitem}
+% Javier Bezos.
+% \newblock \textit{The \pkg{enumitem} package} [EB/OL].
+% \newblock version 3.9,
+% \newblock (2019-06-20)
+% \urlprefix\url{https://ctan.org/pkg/enumitem}
%
% \bibitem{biblatex}
% Philipp Lehman, Philip Kime.
% \newblock \textit{The \pkg{biblatex} package} [EB/OL].
% \newblock version 3.16,
% \newblock (2020-12-31)
-% \urlprefix\url{https://www.ctan.org/pkg/biblatex}
+% \urlprefix\url{https://ctan.org/pkg/biblatex}
%
% \bibitem{eqexpl}
% Konstantin Morenko.
% \newblock \textit{The \pkg{eqexpl} package} [EB/OL].
% \newblock version 1.1,
% \newblock (2019-07-01)
-% \urlprefix\url{https://www.ctan.org/pkg/eqexpl}
+% \urlprefix\url{https://ctan.org/pkg/eqexpl}
%
% \bibitem{xmuthesis}
% Camuse Cao.
@@ -1340,7 +1364,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/25}{1.27q}
+\ProvidesExplClass{easybook}{2021/07/26}{1.27R}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1624,7 +1648,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/25}{1.27q}
+\ProvidesExplPackage{easybase}{2021/07/26}{1.27R}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -3588,7 +3612,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/25}{1.27q}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/26}{1.27R}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
@@ -3623,8 +3647,44 @@
fontupper = \Large\sffamily,
beforeafter~skip = 3.75ex plus .2ex minus .1ex
}
-\tcbappstyle*{easybox}{}
-\tcbappstyle*{ebparbox}{}
+\tcbappstyle*{easybox}
+ {
+ enhanced~jigsaw,pad~at~break* = 3pt,
+ center~title,
+ sharpish~corners,
+ left = 8pt,right = 8pt,
+ opacityback = 0.2,opacitybacktitle = 0.2,
+ coltitle = black,colframe = black,
+ top = \eb@tc@line@skip,bottom = \eb@tc@line@skip,
+ middle = \eb@tc@line@skip,
+ toptitle = \eb@tc@line@skip,
+ titlerule = 0pt,
+ beforeafter~skip = 1.75ex plus .2ex minus .1ex
+ }
+\tcbappstyle*{ebparbox}
+ {
+ frame~hidden,
+ enhanced~jigsaw,pad~at~break* = 3pt,
+ boxrule = 0pt,
+ sharpish~corners,
+ left = 8pt,
+ middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip,
+ beforeafter~skip = 1.75ex plus .2ex minus .1ex
+ }
+\tcbappstyle*{ebemph}{on~line,blank}
+\tcbappstyle*{eblink}
+ {
+ standard~jigsaw,on~line,
+ top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt,
+ boxrule = 0.75pt,arc = 1pt,
+ opacityback = 0.2
+ }
+\tcbappstyle*{ebfbox}
+ {
+ on~line,sharpish~corners,
+ top = 2pt,bottom = 2pt,left = 1pt,right = 1pt,
+ leftrule = 0pt,rightrule = 0pt
+ }
\tcbset
{
breakable,
@@ -3707,30 +3767,13 @@
}{}
\DeclareTColorBox{easybox}{sO{Khaki}d()O{}}
{
- enhanced~jigsaw,pad~at~break* = 3pt,
- IfBooleanTF = {#1}
- {toptitle = \eb@tc@line@skip,top = \eb@tc@line@skip}
- {
- frame~hidden,boxrule = 0pt,
- toptitle = \eb@tc@line@skip,top = 0pt
- },
+ IfBooleanF = {#1}{frame~hidden,boxrule = 0pt},
IfValueT = {#3}{title = #3},
colback = #2,colbacktitle = #2,
- opacityback = 0.2,opacitybacktitle = 0.2,
- coltitle = black,colframe = black,
- sharpish~corners,
- left = 8pt,right = 8pt,
- bottom = \eb@tc@line@skip,middle = \eb@tc@line@skip,
- bottomtitle = \eb@tc@line@skip,
- beforeafter~skip = 1.75ex plus .2ex minus .1ex,
- halign~upper = left,halign~lower = left,
- center~title,tc-easybox,#4
+ tc-easybox,#4
}
\DeclareTColorBox{ebparbox}{sO{DarkSlateBlue}d()O{}}
{
- frame~hidden,
- enhanced~jigsaw,pad~at~break* = 3pt,
- boxrule = 0pt,
borderline~west = {3pt}{0pt}{#2},
IfBooleanTF = {#1}
{
@@ -3744,27 +3787,13 @@
IfValueT = {#3}{title = #3},
top = 0pt,bottom = 0pt,right = 0pt,toptitle = 0pt
},
- sharpish~corners,
- left = 8pt,
- middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip,
- beforeafter~skip = 1.75ex plus .2ex minus .1ex,
colframe = #2,coltitle = #2,tc-ebparbox,#4
}
+\DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}}
+ {colback = #1!10!white,colframe = #1!50!black,tc-ebfbox,#3}{#2}
\DeclareTotalTCBox{\ebemph}{O{DarkSeaGreen}vO{}}
- {on~line,blank,fuzzy~halo = 2pt~with~#1,#3}{#2}
+ {fuzzy~halo = 2pt~with~#1,tc-ebemph,#3}{#2}
\DeclareTotalTCBox{\eblink}{O{Aqua}vO{}}
- {
- standard~jigsaw,on~line,
- top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt,
- boxrule = 0.75pt,arc = 1pt,
- colback = #1,opacityback = 0.2,colframe = #1,#3
- }{#2}
-\DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}}
- {
- on~line,sharpish~corners,
- top = 2pt,bottom = 2pt,left = 1pt,right = 1pt,
- leftrule = 0pt,rightrule = 0pt,
- colback = #1!10!white,colframe = #1!50!black,#3
- }{#2}
+ {colback = #1,colframe = #1,tc-eblink,#3}{#2}
%</tcolorbox>
\endinput \ No newline at end of file