From 8e38006fd2e220c3a27208477dab7abbf7256370 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 15 Aug 2021 03:00:39 +0000 Subject: CTAN sync 202108150300 --- macros/latex/contrib/easybook/README.md | 4 +- macros/latex/contrib/easybook/easybook.dtx | 119 +++++++++++++++-------------- macros/latex/contrib/easybook/easybook.ins | 26 +++++-- macros/latex/contrib/easybook/easybook.pdf | Bin 582159 -> 583341 bytes macros/latex/contrib/easybook/easybook.tex | 39 ++++++---- 5 files changed, 111 insertions(+), 77 deletions(-) (limited to 'macros') diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md index 33c2e966c2..ac57d4e389 100644 --- a/macros/latex/contrib/easybook/README.md +++ b/macros/latex/contrib/easybook/README.md @@ -4,7 +4,7 @@ Easybook is a minimalist style template based on the ctexbook book document clas ## License -This work may be distributed and/or modified under the conditions of the CC-BY 4.0 License. The latest version of this license is in https://creativecommons.org/licenses/by/4.0/legalcode +This work may be distributed and/or modified under the conditions of the LPPL-1.3c License. The latest version of this license is in http://www.latex-project.org/lppl.txt ## Website @@ -16,7 +16,7 @@ easybook 是基于 ctexbook 书籍文档类创建以极简为风格的模板, ## 协议 -可以使用 CC-BY 4.0 许可协议传播和修改此作品。此许可协议的最新版本位于 https://creativecommons.org/licenses/by/4.0/legalcode +可以使用 LPPL-1.3c 许可协议传播和修改此作品。此许可协议的最新版本位于 http://www.latex-project.org/lppl.txt ## 网址 diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx index d114859b14..970c1d7f52 100644 --- a/macros/latex/contrib/easybook/easybook.dtx +++ b/macros/latex/contrib/easybook/easybook.dtx @@ -2,13 +2,20 @@ % Copyright (C) 2021 by Qu Yi % % This work may be distributed and/or modified under the -% conditions of the CC-BY 4.0 License. -% The latest version of this license is in -% https://creativecommons.org/licenses/by/4.0/legalcode +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any later +% version. The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3 or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/08/13}{1.28N} +\ProvidesExplClass{easybook}{2021/08/13}{1.28o} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool @@ -292,7 +299,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2021/08/13}{1.28N} +\ProvidesExplPackage{easybase}{2021/08/13}{1.28o} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_add:Nn { NV,Nv } @@ -405,10 +412,10 @@ \keys_define:nn { easybase } { - draft .code:n = \bool_set_true:N \l__eb_compile_draft_bool, - floatpage .bool_set:N = \l__eb_float_page_bool, - floatpage .default:n = true, - floatpage .initial:n = false, + draft .code:n = \bool_set_true:N \l__eb_compile_draft_bool, + floatpage .bool_set:N = \l__eb_float_page_bool, + floatpage .default:n = true, + floatpage .initial:n = false, paper .choice:, paper .value_required:n = true, @@ -641,8 +648,8 @@ } \ctex_define:nn { hdrset } { - head-foot .tl_set:N = \l__eb_fancyhf_content_tl, - head-foot .initial:n = + head-foot .tl_set:N = \l__eb_fancyhf_content_tl, + head-foot .initial:n = { \ifbool{@twoside} { @@ -2010,16 +2017,16 @@ { \sisetup { - mode = match, + mode = match, table-parse-only, text-family-to-math, text-series-to-math, - reset-text-family = false, - reset-text-series = false, - reset-text-shape = false, - range-phrase = \ensuremath{\sim}, - range-units = single, - group-digits = none + reset-text-family = false, + reset-text-series = false, + reset-text-shape = false, + range-phrase = \ensuremath{\sim}, + range-units = single, + group-digits = none } }{} \eb_at_begin_environment:nn @@ -2102,11 +2109,11 @@ bib-style .value_required:n = true, bib-style .initial:n = numerical, - cite-style .code:n = + cite-style .code:n = { \tl_set:Nn \l__eb_bib_cite_style_tl {#1} }, - datafile .clist_set:N = \l__eb_bib_datafile_clist, - bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl, - bitoc-title .initial:n = Reference, + datafile .clist_set:N = \l__eb_bib_datafile_clist, + bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl, + bitoc-title .initial:n = Reference, unknown .code:n = \eb_msg_unknown_option:n { bibset } } @@ -2179,8 +2186,32 @@ \cs_new:Npn \eb@lst@if@display #1#2 { \lst@ifdisplaystyle #1\else #2\fi } -\lstdefinestyle{easy-listings} +\lstdefinestyle{lst-base} + { + breaklines = true, + resetmargins = true, + % numbers = left, + numberstyle = \footnotesize, + basewidth = 0.5em, + columns = flexible, + aboveskip = 1.5ex plus .2ex minus .1ex, + belowskip = 1.5ex plus .2ex minus .1ex, + abovecaptionskip = -1ex, + belowcaptionskip = 1.5ex, + keepspaces = true, + escapeinside = {(*}{*)}, + framerule = \l__eb_rule_width_dim, + xleftmargin = 5pt, + xrightmargin = 5pt, + framesep = \dimexpr(5pt - \l__eb_rule_width_dim), + frame = single, + rulecolor = \color{ctex@frame}, + commentstyle = \color{SlateGray}, + emphstyle = \color{ctex@emph} + } +\lstdefinestyle{lst-latex} { + style = lst-base, language = [LaTeX]TeX, texcsstyle = *\color{ctex@verb}\bfseries, basicstyle = @@ -2192,33 +2223,9 @@ { \color{ctex@verb} \eb@lst@if@display{\bfseries}{} - }, - framexleftmargin = 0pt, - framexrightmargin = 0pt, - xleftmargin = 3pt, - xrightmargin = 3pt, - numbersep = 10pt, - framesep = 3pt, - frame = single, - rulecolor = \color{ctex@frame}, - commentstyle = \color{SlateGray}, - emphstyle = \color{ctex@emph} - } -\lstset - { - style = easy-listings, - breaklines = true, - resetmargins = true, - % numbers = left, - numberstyle = \footnotesize, - aboveskip = 1.5ex plus .2ex minus .1ex, - belowskip = 1.5ex plus .2ex minus .1ex, - keepspaces = true, - framerule = \l__eb_rule_width_dim, - columns = flexible, - abovecaptionskip = -1ex, - belowcaptionskip = 1.5ex + } } +\lstset{style = lst-latex} \lstloadlanguages{C,C++,Java,Python,Matlab} \clist_new:N \l__eb_hyperref_clist @@ -2272,7 +2279,7 @@ linktype .initial:n = edge, linktoc .choice:, - linktoc/unknown .code:n = + linktoc/unknown .code:n = { \eb_put_hyperref:n { linktoc = #1 } \clist_map_inline:nn { page,none } @@ -2284,9 +2291,9 @@ } } }, - linktoc .default:n = all, - linktoc .initial:n = all, - unknown .code:n = + linktoc .default:n = all, + linktoc .initial:n = all, + unknown .code:n = { \eb_put_hyperref:x { @@ -2324,8 +2331,8 @@ { cyberpunk, 601986,eb6877,a4005b } } \eb_theme_color_set:n - color .initial:n = none, - color-all .code:n = + color .initial:n = none, + color-all .code:n = { \eb_define_theme_color:n { \exp_not:n {#1} } } } @@ -2396,7 +2403,7 @@ } % %<*tcolorbox> -\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/13}{1.28N} +\ProvidesExplFile{eb-tcolorbox.cfg}{2021/08/13}{1.28o} {Customization of tcolorbox for easybook} \tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip } diff --git a/macros/latex/contrib/easybook/easybook.ins b/macros/latex/contrib/easybook/easybook.ins index 6b343c15fe..9ffc418c6e 100644 --- a/macros/latex/contrib/easybook/easybook.ins +++ b/macros/latex/contrib/easybook/easybook.ins @@ -2,9 +2,16 @@ % Copyright (C) 2021 by Qu Yi % % This work may be distributed and/or modified under the -% conditions of the CC-BY 4.0 License. -% The latest version of this license is in -% https://creativecommons.org/licenses/by/4.0/legalcode +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any later +% version. The latest version of this license is in: +% +% http://www.latex-project.org/lppl.txt +% +% and version 1.3 or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. \input l3docstrip \keepsilent \askforoverwritefalse @@ -15,9 +22,16 @@ Copyright (C) 2021 by Qu Yi This work may be distributed and/or modified under the -conditions of the CC-BY 4.0 License. -The latest version of this license is in - https://creativecommons.org/licenses/by/4.0/legalcode +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any later +version. The latest version of this license is in: + + http://www.latex-project.org/lppl.txt + +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status `maintained'. \endpreamble \generate diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf index 3bdcdbb92e..aa74f48edc 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 341d3127cb..7ac6054a8a 100644 --- a/macros/latex/contrib/easybook/easybook.tex +++ b/macros/latex/contrib/easybook/easybook.tex @@ -11,7 +11,7 @@ { name = easybook, title = EASYBOOK 使用手册, - version = v1.28N, + version = v1.28o, date = 2021/08/13, authors = 瞿毅, info = 排版简体中文学位论文和书籍, @@ -369,7 +369,7 @@ \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} @@ -560,7 +560,7 @@ 选项的值为 \cs{declaretheoremstyle} 新定义的 \meta{定理样式名} 或预置的 \code{easy-theorem} 定理样式,定理将使用这种样式的设置。 \end{options} \command{DeclareTheorem}[\marg{环境名}\oarg{英文标题}\marg{中文标题}\darg{盒子风格}\oarg{键值列表}] - 定理声明命令 \cs{DeclareTheorem} 更加便捷,它定义一个新的定理环境,与 \cs{declaretheorem} 命令 \meta{键值列表} 支持的选项相同,但它们的区别有: + 定理声明命令 \cs{DeclareTheorem} 更加便捷,它定义一个新的定理环境,与 \cs{declaretheorem} 命令 \meta{键值列表} 支持相同的选项,但它们的区别有: \begin{itemize} \item 中英文模式下标题不同,英文标题为可选项,默认为首字母大写的 \meta{环境名}。 \item 自动定义交叉引用的格式,引用标签前缀为定理标题名称。 @@ -618,7 +618,7 @@ \subsection{页眉页脚} \label{subsec:header and footer} -模块 \module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。在 \cls*{book} 模式时使用章节页眉标志内容选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致,标志内容中参数 \code{\#1} 代表当前章、节或小节的标题。也可以直接重新定义这些选项对应的标题标记命令,但此时 \module*{style/}\option{uppercase} 选项失效,这时可以用例如 \cs*{MakeUppercase} 命令来设置标志内容的大小写。 +模块 \module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。在 \cls*{book} 模式时使用章节标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。也可以直接重新定义这些选项对应的标题标记命令,但此时标记大写选项 \module*{style/}\option{uppercase} 失效。 \begin{options} \keyval-{head-foot}{页眉页脚代码}\Module{hdrset} 设置页眉页脚的格式,使用 \pkg*{fancyhdr} 支持的 \cs*{fancyhead} 和 \cs*{fancyhead} 等命令,或在正文中使用这些命令改变其后的页面风格。 @@ -629,7 +629,7 @@ \keyval-{subsec-mark}{标题标记} 标题标记命令 \cs*{subsectionmark} 的内容,包括了标签选项 \option{subsec-label} 的内容。 \kvsplit-{chap-label}{\oarg{数字输出命令}\marg{距离命令}}\Default{\cs*{hspace}\Marg{1em}} - 标题标记命令 \cs*{chaptermark} 内容的标签(标题有编号时),比标记命令内容选项更常用,可选参数是对应于章节编号计数器的输出命令,必选参数是编号与标题之间的距离命令: + 标题标记命令 \cs*{chaptermark} 内容的标签(标题有编号时),比标题标记选项更常用,可选参数是对应于章节编号计数器的输出命令,必选参数是编号与标题之间的距离命令: \begin{ctexexam} \hdrset { @@ -658,7 +658,7 @@ \begin{commands}\noitemsep \command*{markboth}[\marg{左页页眉内容}\marg{右页页眉内容}]\default{} \command*{markright}[\marg{右页页眉内容}] - 命令 \cs*{markboth} 和 \cs*{markright} 用于手动设置当前页页眉标记,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉标志。上述标记命令内容的选项便是基于这两个命令。如果是单面打印,则 \meta{左页页眉内容} 无效。 + 命令 \cs*{markboth} 和 \cs*{markright} 用于手动设置当前页标题标记,一般紧随标题命令,特殊情况下可以使用它们得到需要的页眉标志。上述标记命令内容的选项便是基于这两个命令。如果是单面打印,则 \meta{左页页眉内容} 无效。 \end{commands} \begin{commands} @@ -673,7 +673,7 @@ \easyhead[OL]{\rightmark} \easyhead[EL,OR]{\textbf{\thepage}} }, - headrule = \markrule(Darkcnltxblue){0.5pt}[2pt!2pt] + headrule = \markrule(DarkOrchid){0.5pt}[2pt!2pt] } \end{ctexexam} \end{commands} @@ -801,7 +801,7 @@ \environment*{multline}\default{} \environment*{gather}\default{} \environment*{align} - \pkg*{amsmath} 宏包提供了一系列行间数学环境,它们可以排布各种对齐或不对齐的公式组。\env*{multline} 环境用于一行无法放下的长公式,\env*{gather} 环境用于每行居中的公式组,\env*{align} 环境用于多列对齐的公式组。 + \pkg*{amsmath} 宏包提供了一系列行间数学环境,它们可以排布各种对齐或不对齐的公式组。\env*{multline} 环境用于一行无法放下的长公式,\env*{gather} 环境用于每行居中的公式组,\env*{align} 环境用于多列对齐的公式组。还有例如 \pkg*{mathtools} 等对数学功能进行扩展的宏包,提供了更全面的数学命令与环境。 \end{environments} \subsection{表格} @@ -879,15 +879,28 @@ \end{environments} \subsection{代码} -\pkg*{listings} 宏包提供了大量选项对代码格式进行高度定制,代码格式可使用 \cs*{lstset} 命令全局设置,预置的代码风格 \option*{style} 为 \code{easy-listings}。 \begin{commands} + \command*{lstdefinestyle}[\marg{代码风格}\marg{键值列表}] + 代码抄录宏包 \pkg*{listings} 的代码风格定义命令,提供大量选项对代码样式进行高度定制。可以根据需要的代码语言和样式定义多种风格,默认使用的 \meta{代码风格} 为 \code{lst-latex}。 \command{lstinline}[\oarg{键值列表}\marg{行内代码}] - 行内代码抄录命令,较 \cs*{verb} 命令有较大改进,具有代码语言和样式支持。 + 行内代码抄录命令,较原生的 \cs*{verb} 命令有较大改进,具有代码语言和样式支持。 \end{commands} \begin{environments} \environment{lstlisting}[\oarg{键值列表}] - 行间代码抄录环境,支持多种语言库,默认使用 \code{LaTeX} 代码语言,使用可选参数局部设置代码格式。 + 行间代码抄录环境,支持多种语言库,默认使用 \code{LaTeX} 代码语言,可使用 \meta{键值列表} 局部修改代码样式。另外还提供了 \cs*{lstnewenvironment} 命令包装自定义名称的代码环境。 + \begin{ctexexam} + \lstdefinestyle{lst-pascal} + { + language = Pascal, + numbers = left, + firstnumber = last, + frame = shadowbox, + backgroundcolor = \color{MistyRose}, + rulesepcolor = \color{DarkGray} + } + \lstnewenvironment{mypascal}[1][]{\lstset{style = lst-pascal,#1}}{} + \end{ctexexam} \end{environments} \begin{options}\noitemsep @@ -1083,7 +1096,7 @@ \keyval-{width}{符号宽度}\Default{2em} 设置适当的符号宽度可以防止文字重叠和边界溢出等问题。 \keyval-{delim}{引导符}\Default{——} - 符号对照的引导符,\cs{symb} 的 \meta{引导符} 和对齐方式是基于这个符号的宽度。 + 全局的符号对照引导符,\cs{symb} 局部的 \meta{引导符} 和对齐方式是基于这个符号的宽度。 \keyval-{space}{符号间隙}\Default{0.25em} 符号间隙为引导符两侧与符号和说明文字间的距离。 \keychoice{item-align}{l,c,r}\Default{r} @@ -1158,7 +1171,7 @@ \command*{uline}[\marg{下划直线}]\default{} \command*{uuline}[\marg{下划双直线}]\default{} \command*{uwave}[\marg{下划波浪线}] - \pkg*{ulem} 宏包提供了多种下划线命令,可以通过命令重新定义 \cs*{ULthickness} 命令控制下划线的粗细。下划线的深度由 \cs*{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。 + \pkg*{ulem} 宏包提供了多种下划线命令,可以重新定义 \cs*{ULthickness} 命令控制下划线的粗细。下划线的深度由 \cs*{ULdepth} 控制,默认值 \cs*{maxdimen} 是一个允许深度根据当前字体变化的特殊标志,当然也可以使用 \cs*{setlength} 设定为指定深度。 \end{commands} \appendix -- cgit v1.2.3