summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-12 03:00:41 +0000
committerNorbert Preining <norbert@preining.info>2021-03-12 03:00:41 +0000
commitcf09e33d4f54e872c7090def0ad41b06fb559cdb (patch)
tree45e43abe52fa306171e09b1c8375ce2cd808017a /macros/latex/contrib/easybook
parent8379a45cf223651b1c06ebf5c680db900d83c6a5 (diff)
CTAN sync 202103120300
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r--macros/latex/contrib/easybook/doc/chapter1.tex1
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin290263 -> 288297 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex7
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin234637 -> 234688 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex19
-rw-r--r--macros/latex/contrib/easybook/easybook.cls164
6 files changed, 96 insertions, 95 deletions
diff --git a/macros/latex/contrib/easybook/doc/chapter1.tex b/macros/latex/contrib/easybook/doc/chapter1.tex
index fa4dfb8869..d11d88a969 100644
--- a/macros/latex/contrib/easybook/doc/chapter1.tex
+++ b/macros/latex/contrib/easybook/doc/chapter1.tex
@@ -84,6 +84,7 @@
\item \zhlipsum[41-42][name = aspirin]
\begin{enumerate}
\item \zhlipsum*[42][name = aspirin]
+ \item \zhlipsum*[42][name = aspirin]
\end{enumerate}
\item \zhlipsum*[42][name = aspirin]
\end{enumerate}
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index 22cc5d8266..0d6441a9bf 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index 697baf76b9..15e6900f2b 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -94,11 +94,10 @@
\author
{
瞿毅\thanks{texeasybook@foxmail.com.} \\
- \git~\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} \\
- \github~\url{https://github.com/texl3/easybook} \\
- \edge~\url{https://latexstudio.net}
+ \url{https://latexstudio.net} \\
+ \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/03/10\hskip\ccwd\relax v1.23m}
+\date{2021/03/11\hskip\ccwd\relax v1.23n}
\frontmatter[roman]
\maketitle
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 9809242c07..ec447ae802 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
index 2db86a5b56..ba2df4076e 100644
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ b/macros/latex/contrib/easybook/doc/easybook.tex
@@ -1,9 +1,8 @@
\documentclass{ctxdoc}
-\hypersetup{linkcolor = blue,urlcolor = blue}
\title{\sffamily easybook书籍文档类}
\author{瞿毅}
-\date{2021/03/10\hskip\ccwd\relax v1.23m\thanks{\url{https://gitee.com/texl3/easybook}}}
+\date{2021/03/11\hskip\ccwd\relax v1.23n\thanks{\url{https://gitee.com/texl3/easybook}}}
\begin{document}
\maketitle
@@ -98,7 +97,7 @@
\tn{frontmatter}\oarg{编号格式|(Roman)}
\tn{printindex}\oarg{索引名}
\end{syntax}
-\changes{v1.23m}{2021/02/20}{重新定义文档结构划分命令。}
+\changes{v1.23n}{2021/02/20}{重新定义文档结构划分命令。}
\tn{frontmatter} 为前言区命令,章标题不编号,页码可设置为例如 \opt{roman}、\opt{Alph} 等格式,带有星号的命令 \tn{frontmatter*} 不使用 \tn{cleardoublepage}。\tn{mainmatter} 为主文区命令,章标题正常编号且页码为从1开始计数的阿拉伯数字,\tn{mainmatter*} 命令不使用 \tn{cleardoublepage}。\tn{backmatter} 为后记区命令,页码格式与编号保持不变,章标题不编号。\tn{listoffigures} 命令输出图片目录,\tn{listoftables} 命令输出表格目录,\tn{listoflistings} 命令输出代码目录。
\end{function}
@@ -132,8 +131,8 @@
uppercase = <(true)|false>
\end{syntax}
\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-\changes{v1.23m}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-\changes{v1.23m}{2021/02/09}{增加控制页面横线粗细的选项。}
+\changes{v1.23n}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+\changes{v1.23n}{2021/02/09}{增加控制页面横线粗细的选项。}
\opt{style} 选项控制文章的风格。
\end{function}
@@ -190,7 +189,7 @@
footnote = <(1)>
\end{syntax}
\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-\changes{v1.23m}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+\changes{v1.23n}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项\opt{linespread}失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
\end{function}
@@ -212,7 +211,7 @@
marginpart = <\tn{rmfamily}\tn{footnotesize}>
\end{syntax}
\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-\changes{v1.23m}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+\changes{v1.23n}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
\end{function}
\begin{optdesc}
@@ -233,7 +232,7 @@
\tn{printbibliography}\oarg{选项列表}
\end{syntax}
\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-\changes{v1.23m}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+\changes{v1.23n}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
\end{function}
\begin{optdesc}
@@ -317,7 +316,7 @@
\end{syntax}
\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-\changes{v1.23m}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+\changes{v1.23n}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,它们用于 \opt{head-foot} 选项中,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
\begin{ctexexam}
\ctexset
@@ -438,7 +437,7 @@
\tn{item} <习题内容>
\tn{end}\marg{exercise}
\end{syntax}
-\changes{v1.23m}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+\changes{v1.23n}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
\begin{ctexexam}
\begin{exercise}[LightYellow][1.][习题]
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls
index 055b403aed..4405556f09 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.cls
@@ -9,7 +9,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/10}{1.23m}{}
+\ProvidesExplClass{easybook}{2021/03/11}{1.23n}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -153,13 +153,11 @@
footmisc,setspace,
amsmath,amsthm,thmtools,cases,
chemformula,chemfig,siunitx,ulem,
- microtype,
- geometry,marginnote,
+ geometry,marginnote,nccfoots,
rotfloat,graphicx,
- nccfoots,tablefootnote,
fancyhdr,titletoc,
caption,bicaption,subcaption,
- zhlipsum,fontawesome,pifont,
+ microtype,zhlipsum,pifont,
tabularx,multirow,makecell,booktabs,
paralist,tasks,enumitem,
tcolorbox,
@@ -171,9 +169,6 @@
modifier = {by},
version = {4.0}
]{doclicense}
-\cs_new_eq:NN \github\faGithub
-\cs_new:Npn \git{\textcolor[HTML]{c71d23}{\faGit}}
-\cs_new:Npn \edge{\textcolor[HTML]{00c2ff}{\faEdge}}
\ctex_at_end_preamble:n
{
\bool_if:NT \l__notomath_bool
@@ -365,11 +360,13 @@
{
\markboth
{
- \bool_if:NT \l__uppercase_bool{\MakeUppercase}
- {\l__fancyhf_chap_mark_tl#1}
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {\l__fancyhf_chap_mark_tl#1}}
+ {\text_titlecase_first:n {\l__fancyhf_chap_mark_tl#1}}
}{
- \bool_if:NT \l__uppercase_bool{\MakeUppercase}
- {\l__fancyhf_chap_mark_tl#1}
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {\l__fancyhf_chap_mark_tl#1}}
+ {\text_titlecase_first:n {\l__fancyhf_chap_mark_tl#1}}
}
}
\l__fancyhf_content_tl
@@ -379,8 +376,9 @@
{
\markboth
{
- \bool_if:NT \l__uppercase_bool{\MakeUppercase}
- {\l__fancyhf_chap_mark_tl#1}
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {\l__fancyhf_chap_mark_tl#1}}
+ {\text_titlecase_first:n {\l__fancyhf_chap_mark_tl#1}}
}{}
}
\l__fancyhf_content_tl
@@ -390,8 +388,9 @@
{
\markright
{
- \bool_if:NT \l__uppercase_bool{\MakeUppercase}
- {\l__fancyhf_sec_mark_tl#1}
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {\l__fancyhf_sec_mark_tl#1}}
+ {\text_titlecase_first:n {\l__fancyhf_sec_mark_tl#1}}
}
}
\cs_gset:Npn \headrule
@@ -506,12 +505,22 @@
\bool_if:NTF \l__page_twoside_bool
{
\markboth
- {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1}
- {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1}
+ {
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {#1}}
+ {\text_titlecase_first:n {#1}}
+ }{
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {#1}}
+ {\text_titlecase_first:n {#1}}
+ }
}{
\markboth
- {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1}
- {}
+ {
+ \bool_if:NTF \l__uppercase_bool
+ {\text_uppercase:n {#1}}
+ {\text_titlecase_first:n {#1}}
+ }{}
}
}
\cs_new_protected:Npn \__title_mark_intoc:n #1
@@ -583,30 +592,22 @@
}
\cs_new:Npn \listoflistings
{
- \group_begin:
- \@ifundefined{@restonecoltrue}{}
- {
- \if@twocolumn
- \@restonecoltrue\onecolumn
- \bool_if:NT \l__multoc_bool{\twocolumn}
- \else
- \@restonecolfalse
- \bool_if:NT \l__multoc_bool{\twocolumn}
- \fi
- }
+ \if@twocolumn
+ \@restonecoltrue\onecolumn
+ \bool_if:NT \l__multoc_bool{\twocolumn}
+ \else
+ \@restonecolfalse
+ \bool_if:NT \l__multoc_bool{\twocolumn}
+ \fi
\__title_mark_intoc:n {\lstlistlistingname}
\dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
\vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lol}
- \@ifundefined{@restonecoltrue}{}
- {
- \if@restonecol
- \twocolumn
- \else
- \onecolumn
- \fi
- }
- \group_end:
+ \if@restonecol
+ \twocolumn
+ \else
+ \onecolumn
+ \fi
}
\makeindex[
@@ -626,44 +627,45 @@
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
{\__markboth:n {\indexname}}
-\tl_new:N \l__table_font_tl
-\tl_new:N \l__figure_font_tl
-\tl_new:N \l__listing_font_tl
-\tl_new:N \l__footnote_font_tl
-\tl_new:N \l__marginpar_font_tl
+\tl_new:N \l__font_table_tl
+\tl_new:N \l__font_figure_tl
+\tl_new:N \l__font_listing_tl
+\tl_new:N \l__font_footnote_tl
+\tl_new:N \l__font_marginpar_tl
\__ctex_define:nn {elfont}
{
- table-cap .tl_set:N = \l__table_font_tl,
+ table-cap .tl_set:N = \l__font_table_tl,
table-cap .initial:n = \sffamily\small,
- figure-cap .tl_set:N = \l__figure_font_tl,
+ figure-cap .tl_set:N = \l__font_figure_tl,
figure-cap .initial:n = \sffamily\small,
- listing-cap .tl_set:N = \l__listing_font_tl,
+ listing-cap .tl_set:N = \l__font_listing_tl,
listing-cap .initial:n = \sffamily\small,
- footnote .tl_set:N = \l__footnote_font_tl,
+ footnote .tl_set:N = \l__font_footnote_tl,
footnote .initial:n = \rmfamily,
- marginpar .tl_set:N = \l__marginpar_font_tl,
+ marginpar .tl_set:N = \l__font_marginpar_tl,
marginpar .initial:n = \rmfamily\footnotesize
}
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
-\DeclareCaptionFont{table@font}{\l__table_font_tl}
-\DeclareCaptionFont{figure@font}{\l__figure_font_tl}
-\DeclareCaptionFont{listing@font}{\l__listing_font_tl}
+\DeclareCaptionFont{table@font}{\l__font_table_tl}
+\DeclareCaptionFont{figure@font}{\l__font_figure_tl}
+\DeclareCaptionFont{listing@font}{\l__font_listing_tl}
\captionsetup
{
format = hang,
% figurewithin = section,
% tablewithin = section,
- font = {stretch = {\fp_use:N \l__caption_spread_fp}},
+ font = {stretch = {\fp_use:N \l__spread_caption_fp}},
labelfont = {color = ctex@frame},
labelsep = ccwd,
+ singlelinecheck = true,
belowskip = 0pt,aboveskip = 10pt
}
\captionsetup[table]{font += table@font}
\captionsetup[figure]{font += figure@font}
-\captionsetup[lstlisting]{singlelinecheck = false,font += listing@font}
+\captionsetup[lstlisting]{font += listing@font}
\captionsetup[subfigure]
{
labelformat = parens,
@@ -683,27 +685,27 @@
}
}
\AtBeginEnvironment{tabularx}
- {\exp_args:Nx \linespread{\fp_use:N \l__table_spread_fp}\selectfont\ignorespaces}
+ {\exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}\selectfont\ignorespaces}
\AtBeginEnvironment{tabular}
- {\exp_args:Nx \linespread{\fp_use:N \l__table_spread_fp}\selectfont\ignorespaces}
+ {\exp_args:Nx \linespread{\fp_use:N \l__spread_table_fp}\selectfont\ignorespaces}
-\fp_new:N \l__line_spread_fp
-\fp_new:N \l__table_spread_fp
-\fp_new:N \l__math_spread_fp
-\fp_new:N \l__caption_spread_fp
-\fp_new:N \l__footnote_spread_fp
+\fp_new:N \l__spread_line_fp
+\fp_new:N \l__spread_table_fp
+\fp_new:N \l__spread_math_fp
+\fp_new:N \l__spread_caption_fp
+\fp_new:N \l__spread_footnote_fp
\__ctex_define:nn {spread}
{
- line .fp_set:N = \l__line_spread_fp,
+ line .fp_set:N = \l__spread_line_fp,
line .initial:n = 1.3,
- table .fp_set:N = \l__table_spread_fp,
+ table .fp_set:N = \l__spread_table_fp,
table .initial:n = 1.05,
- math .fp_set:N = \l__math_spread_fp,
+ math .fp_set:N = \l__spread_math_fp,
math .initial:n = 1.05,
- caption .fp_set:N = \l__caption_spread_fp,
+ caption .fp_set:N = \l__spread_caption_fp,
caption .initial:n = 1,
- footnote .fp_set:N = \l__footnote_spread_fp,
+ footnote .fp_set:N = \l__spread_footnote_fp,
footnote .initial:n = 1
}
@@ -721,7 +723,7 @@
\cs_gset:Npn \bottomfraction{0.65}
\cs_gset:Npn \floatpagefraction{0.60}
\ctex_after_end_preamble:n
- {\exp_args:Nx \linespread{\fp_use:N \l__line_spread_fp}\selectfont}
+ {\exp_args:Nx \linespread{\fp_use:N \l__spread_line_fp}\selectfont}
\newcolumntype{L}{X}
\newcolumntype{C}{>{\centering\arraybackslash}X}
@@ -882,7 +884,7 @@
\cs_new_protected:Npn \l__math_restore:n #1
{
\AtBeginEnvironment{#1}
- {\linespread{\fp_use:N \l__math_spread_fp}\selectfont\ignorespaces}
+ {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\ignorespaces}
}
\clist_map_inline:nn
{
@@ -893,16 +895,16 @@
}{\l__math_restore:n {#1}}
\__patch_cmd:Nnn \start@gather
{\collect@body}
- {\linespread{\fp_use:N \l__math_spread_fp}\selectfont\collect@body}
+ {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
\__patch_cmd:Nnn \start@align
{\collect@body}
- {\linespread{\fp_use:N \l__math_spread_fp}\selectfont\collect@body}
+ {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
\__patch_cmd:Nnn \start@multline
{\collect@body}
- {\linespread{\fp_use:N \l__math_spread_fp}\selectfont\collect@body}
+ {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\collect@body}
\__patch_cmd:Nnn \gather@split
{\spread@equation}
- {\linespread{\fp_use:N \l__math_spread_fp}\selectfont\spread@equation}
+ {\linespread{\fp_use:N \l__spread_math_fp}\selectfont\spread@equation}
\ctex_after_end_preamble:n
{
\skip_set:Nn \abovedisplayskip{5pt plus 1pt minus 1pt}
@@ -1125,7 +1127,7 @@
\skip_set:Nn \footnotemargin{0.5\ccwd}
\group_begin:
\footnotesize
- \exp_args:Nx \linespread{\fp_use:N \l__footnote_spread_fp}\selectfont
+ \exp_args:Nx \linespread{\fp_use:N \l__spread_footnote_fp}\selectfont
\skip_gset:Nn \footnotesep{\ht\strutbox}
\group_end:
\cs_gset:Npn \hangfootparskip{0ex}
@@ -1151,13 +1153,13 @@
}
\__patch_cmd:Nnn \@footnotetext
{\reset@font}
- {\def\baselinestretch{\fp_use:N \l__footnote_spread_fp}\l__footnote_font_tl}
+ {\def\baselinestretch{\fp_use:N \l__spread_footnote_fp}\l__font_footnote_tl}
\__patch_cmd:Nnn \@mpfootnotetext
{\reset@font}
- {\def\baselinestretch{\fp_use:N \l__footnote_spread_fp}\l__footnote_font_tl}
+ {\def\baselinestretch{\fp_use:N \l__spread_footnote_fp}\l__font_footnote_tl}
\__patch_cmd:Nnn \@makefnmark
- {\normalfont}{\l__footnote_font_tl}
-\cs_gset:Npn \marginfont{\l__marginpar_font_tl}
+ {\normalfont}{\l__font_footnote_tl}
+\cs_gset:Npn \marginfont{\l__font_marginpar_tl}
\lstdefinestyle{mystyle}
{
@@ -1192,7 +1194,7 @@
% numbers = left,
numberstyle = \footnotesize,
abovecaptionskip = -1ex,
- belowcaptionskip = 1ex,
+ belowcaptionskip = 1.5ex,
aboveskip = 1.5ex plus .2ex minus .1ex,
belowskip = 0.55ex plus .2ex minus .1ex,
keepspaces = true,
@@ -1306,7 +1308,7 @@
listtablename = {表格索引},
abstractname = {摘\hspace{\ccwd}要},
lstlistlistingname = {代码索引},
- lstlistingname = {\faCode 代码}
+ lstlistingname = {代码}
}
\crefformat{equation}{#2式(#1)#3}
\crefformat{align}{#2式(#1)#3}
@@ -1328,7 +1330,7 @@
{
abstractname = {Abstract},
lstlistlistingname = {List~of~Listings},
- lstlistingname = {\faCode\space Code}
+ lstlistingname = {Code}
}
\crefformat{equation}{#2Equation~(#1)#3}
\crefformat{align}{#2Equation~(#1)#3}