From 363ea487975bcc527ccdb2c9b5dda1b27cf839b2 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Tue, 3 Aug 2021 03:03:59 +0000 Subject: CTAN sync 202108030303 --- macros/latex/contrib/easybook/easybook.dtx | 52 ++++++++++++++++++----------- macros/latex/contrib/easybook/easybook.pdf | Bin 571527 -> 580944 bytes macros/latex/contrib/easybook/easybook.tex | 51 ++++++++++++++++++++-------- 3 files changed, 69 insertions(+), 34 deletions(-) (limited to 'macros/latex/contrib/easybook') diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index 7f671cf194..ab3c09ae3c 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -8,7 +8,7 @@ %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/08/01}{1.28b} +\ProvidesExplClass{easybook}{2021/08/02}{1.28c} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -292,12 +292,12 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/08/01}{1.28b} +\ProvidesExplPackage{easybase}{2021/08/02}{1.28c} {Typeset Chinese theses or books} -\cs_generate_variant:Nn \int_to_arabic:n { v } \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } \cs_generate_variant:Nn \dim_set:Nn { NV } +\cs_generate_variant:Nn \int_to_arabic:n { v } \cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV } \cs_generate_variant:Nn \skip_set:Nn { NV } \cs_generate_variant:Nn \seq_set_from_clist:Nn { No } @@ -786,20 +786,20 @@ { \exp_not:N \c@footnote } } } -\cs_new_protected:Npn \eb_fnmark_shorter_label_set:nn #1#2 +\cs_new_protected:Npn \eb_fnmark_short_label_set:nn #1#2 { - \tl_set:Nn \l__eb_fnmark_shorter_label_tl {#1} + \tl_set:Nn \l__eb_fnmark_short_tokens_tl {#1} \eb_clist_map_inline:nn { A,a,1,I,i,c } { \tl_if_in:nnT {#1} {##1} { - \tl_replace_once:Nnn \l__eb_fnmark_shorter_label_tl {##1} + \tl_replace_once:Nnn \l__eb_fnmark_short_tokens_tl {##1} { \eb_int_format_trans:NN ##1 \c@footnote } \seq_map_break: } } - \cs_set_eq:cN {#2} \l__eb_fnmark_shorter_label_tl + \cs_set_eq:cN {#2} \l__eb_fnmark_short_tokens_tl } \bool_new:N \l__eb_fntext_bottom_bool \ctex_define:nn { hdrset } @@ -834,13 +834,13 @@ { \eb_fnmark_normal_label_set:nn {#1} { the@footnote } }, fnmark-num .value_required:n = true, fnmark-num/unknown .code:n = - { \eb_fnmark_shorter_label_set:nn {#1} { the@footnote } }, + { \eb_fnmark_short_label_set:nn {#1} { the@footnote } }, fntext-num .choices:nn = { plain,pifont,pifont*,pifont-sans,pifont-sans* } { \eb_fnmark_normal_label_set:nn {#1} { thefootnote } }, fntext-num .value_required:n = true, fntext-num/unknown .code:n = - { \eb_fnmark_shorter_label_set:nn {#1} { thefootnote } }, + { \eb_fnmark_short_label_set:nn {#1} { thefootnote } }, fnboth-num .meta:n = { fntext-num = #1,fnmark-num = #1 }, fnboth-num .initial:n = plain, @@ -956,12 +956,13 @@ } \ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}} \providecommand{\spb@textsuperscript@save}{\textsuperscript} +\providecommand{\spbset}{\use_none:n} \cs_set_protected:Npn \footref #1 { \group_begin: \unrestored@protected@xdef\eb@thefnmark{\ref{#1}} \group_end: - \@footnotemark + \H@@footnotemark } \cs_set_protected:Npn \footnote { @@ -994,13 +995,14 @@ \setcounter{footnote}{#1} \unrestored@protected@xdef\eb@thefnmark{\the@footnote} \group_end: - \@footnotemark + \H@@footnotemark } } \cs_set:Npn \@makefnmark { \hbox:n { + \spbset{super-format = { }} \tl_use:N \l__eb_subfont_footnote_tl \tl_use:N \l__eb_fnmark_format_tl { @@ -1028,18 +1030,27 @@ } } \tl_clear:N \@thefnmark -\cs_new:Npn \eb@@makefnmark #1 +\tl_new:N \eb@thefnmark +\cs_new:Npn \eb@@makefnmark #1#2 { - \tl_if_empty:oF {#1} + \tl_if_empty:oF {#2} { \group_begin: - \unrestored@protected@xdef\@thefnmark{#1} + \unrestored@protected@xdef\eb@thefnmark{#1} + \unrestored@protected@xdef\@thefnmark{#2} \group_end: } } -\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext } -\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark } -\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext } +\NewDocumentCommand{\Footnote}{O{#2}m} + { + \eb@@makefnmark{#2}{#1} + \@footnotemark + \@footnotetext + } +\cs_new_protected:Npn \Footnotemark #1 + { \eb@@makefnmark{#1}{#1}\@footnotemark } +\cs_new_protected:Npn \Footnotetext #1 + { \eb@@makefnmark{#1}{#1}\@footnotetext } \cs_new:Npn \eb@footmisc@ifvoid #1#2#3 { \ifvoid #1#2\else #3\fi } \cs_set:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } } @@ -1375,7 +1386,7 @@ \thechapter \tl_use:c { l__eb_#1_connector_tl } } - \eb_arabic:n {#1} + \int_to_arabic:v { c@#1 } } } @@ -2352,7 +2363,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/01}{1.28b} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/02}{1.28c} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } @@ -2500,6 +2511,7 @@ } } \tl_if_empty:NF \eb@tc@list@prologue { \eb@tc@list@prologue } + \exp_last_unbraced:NnNo \begin{eb@exercise@list}[\eb@tc@list@number,#5] #6 \end{eb@exercise@list} @@ -2527,7 +2539,7 @@ IfValueT = {#3}{title = #3}, top = 0pt,bottom = 0pt,right = 0pt,toptitle = 0pt }, - colframe = #2,coltitle = #2,tc-ebparbox,#4 + coltitle = #2,tc-ebparbox,#4 } \DeclareTotalTCBox{\ebfbox}{O{Lime}vO{}} {colback = #1!10!white,colframe = #1!50!black,tc-ebfbox,#3}{#2} diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index e8f8782172..932e678f7b 100644 Binary files a/macros/latex/contrib/easybook/easybook.pdf and b/macros/latex/contrib/easybook/easybook.pdf differ diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex index da6802b68f..cf55a6de1d 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -11,8 +11,8 @@ { name = easybook, title = EASYBOOK 使用手册, - version = v1.28b, - date = 2021/08/01, + version = v1.28c, + date = 2021/08/02, authors = 瞿毅, info = 排版简体中文学位论文和书籍, email = quee123@foxmail.com, @@ -115,7 +115,6 @@ \begin{document} -\clearpage \section{使用说明} 您在使用 \cls*{easybook} 文档类编写文档前可能需要满足以下的条件: \begin{itemize} @@ -125,9 +124,10 @@ \end{itemize} \subsection{基本用法} +\label{subsec:basic usage} 以下一份简单的 \TeX 文档演示了 \cls*{easybook} 的最基本用法,在导言区进行宏包载入与文档设置,一些详细的使用样例会不定期上传在 \href{https://www.latexstudio.net/}{\LaTeX 工作室} 的网站。 \begin{frameverb} - \documentclass{easybook} + \documentclass[文档类选项]{easybook} \ctexset{键值列表} \usepackage{宏包列表} @@ -139,11 +139,11 @@ \end{document} \end{frameverb} -或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类。它的宏包选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage},包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。 +或者直接使用 \pkg*{easybase} 宏包,目前适用于 \cls*{ctexbook}、\cls*{ctexrep}、\cls*{ctexart} 以及标准文档类,包含了节 \ref{sec:interface options} 所示各个模块接口命令的功能。它的宏包选项共享文档类选项的一部分,支持的选项见节 \ref{sec:document class options}。当在\textbf{标准文档类}后载入时还可以使用 \pkg*{ctex} 宏包的选项,将会传递给 \pkg*{ctex} 宏包。 \begin{frameverb} - \documentclass{ctexbook} + \documentclass[文档类选项]{ctexbook} - \usepackage{easybase} + \usepackage[宏包选项]{easybase} \ctexset{键值列表} \usepackage{宏包列表} @@ -169,6 +169,7 @@ \section{文档类选项} \label{sec:document class options} +文档类选项应当在使用 \cls*{easybook} 文档类或 \pkg*{easybase} 宏包(部分支持)时载入,可见小节 \ref{subsec:basic usage} 的例子。目前 \pkg*{easybase} 宏包可用的选项有 \option{class}、\option{draft}、\option{paper} 和 \option{floatpage}。除了下面列举的选项,还可使用标准文档类和 C\TeX 文档类的选项。 \begin{options} \opt{draft}\Default! 开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。不使用绘图宏包及依赖于 \pkg*{tcolorbox} 宏包的盒子环境也会增快编译速度,详情见小节 \ref{subsec:box}。 @@ -364,10 +365,10 @@ 使章标题跟随每一部分编号,开启新的一部分时章编号从 1 开始,默认不跟随。 \keychoice{footwith}{part,chapter,page}\Default{chapter} 使脚注跟随编号的计数器,默认跟随章,当开启新的一章时脚注编号从 1 开始。 - \keyval-{rulewidth}{线宽}\Default{0.75pt} - 调整页眉、定理盒子以及代码框线条的粗细。 + \keyval-{rulewidth}{刚性长度}\Default{0.75pt} + 统一调整页眉、定理盒子以及代码框等线条的粗细。 \keybool{uppercase}\Default{true} - 使用 \cs*{rightmark} 及 \cs*{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。 + 使用 \cs*{rightmark} 及 \cs*{leftmark} 页眉标记命令获取标题内容时英文是否大写。 \kvsplit*{figurepath}{\meta{路径名1}\code{\}}\code{\{}\meta{路径名2}}\Default 设置插入图片的文件夹路径名,可以有多个路径名,每个路径包含在括号分隔,只有一个路径时需要包含在两层括号内。 \end{options} @@ -413,7 +414,7 @@ \subsection{超链接} \label{subsec:hyperlinks} -\module*{refset} 将超链接选项(包括以上选项)交给 \pkg*{hyperref} 处理,除了一些关于 \code{pdf} 书签的选项可能会失效,其它由键值选项命令 \cs*{hypersetup} 支持的多数选项可用。 +模块 \module*{refset} 将超链接选项交给 \pkg*{hyperref} 宏包处理,除了一些关于 \code{pdf} 书签或已预设的选项可能失效,其它由接口命令 \cs*{hypersetup} 支持的多数选项可用。 \begin{options} \keychoice{linktype}{edge,colors,none}\Module{refset}\Default{edge} 使超链接为边框形式,\option{various} 使超链接变为彩色,预置了四种颜色样式。\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。 @@ -522,7 +523,7 @@ 定理内容部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{notefont}{字体命令}\Default 定理题注部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 - \keychoice{headfont}{字体命令}\Default + \keyval-{headfont}{字体命令}\Default 定理标题部分的字体,包括字体族、字体系列、字体尺寸和字体形状命令。 \keyval-{headindent}{刚性长度}\Default{0em} 定理标题的缩进,默认无缩进,可用 \cs*{parindent} 命令设置为段落缩进。 @@ -1099,10 +1100,10 @@ \subsubsection{自定义脚注} \begin{commands}\noitemsep - \command{Footnote}[\marg{标记}\marg{脚注文本}]\default{} + \command{Footnote}[\oarg{内容标记}\marg{正文标记}\marg{脚注文本}]\default{} \command{Footnotetext}[\marg{标记}\marg{脚注文本}]\default{} \command{Footnotemark}[\marg{标记}] - 这些是自定义 \meta{标记} 且不影响正常编号的脚注命令,用法与它们对应首字母小写的命令类似。如果 \meta{标记} 为空,那么将会使用上一个脚注标记。 + 这些是自定义 \meta{标记} 且不影响正常编号的脚注命令,用法与它们对应首字母小写的命令类似。\meta{内容标记} 默认与 \meta{正文标记} 一致,可以进行微调。如果 \meta{标记} 为空,那么将会使用上一个脚注标记。 \begin{ctexexam} \Footnote{*}{这是可以自定义标记的脚注。} \end{ctexexam} @@ -1114,6 +1115,28 @@ 命令 \cs{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。 \end{commands} +\subsection{插入文档} +\begin{commands} + \command*{includepdf}[\oarg{键值列表}\marg{文档名}] + 该命令由 \pkg*{pdfpages} 提供,将其他 \code{pdf} 文档插入当前文档,比如插入封面。可以指定插入页数、 + 逻辑页和横向等,详情查看宏包文档。 +\end{commands} + +\subsection{指定行距的段落} +\begin{environments} + \environment*{spacing}[\marg{浮点数}] + 该环境由 \pkg*{setspace} 提供,可以指定环境内段落的行距,使用 \meta{浮点数} 控制行距倍数。 +\end{environments} + +\subsection{下划线} +\begin{commands}\noitemsep + \command*{uline}[\marg{下划直线}]\default{} + \command*{uuline}[\marg{下划双直线}]\default{} + \command*{uwave}[\marg{下划波浪线}] + \pkg*{ulem} 宏包提供了多种下划线命令,可以通过命令重新定义 \cs*{ULthickness} 命令控制下划线的粗细由。下划线的深度由 \cs*{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允 + 许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。 +\end{commands} + \appendix \section{依赖的宏包} -- cgit v1.2.3