From 2a899339df4bb55e3aa0d5b7a4975b1743341e17 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 13 Mar 2021 03:01:14 +0000 Subject: CTAN sync 202103130301 --- macros/latex/contrib/easybook/doc/chapter3.tex | 6 ++-- .../latex/contrib/easybook/doc/easybook-demo.pdf | Bin 288297 -> 287458 bytes .../latex/contrib/easybook/doc/easybook-demo.tex | 2 +- macros/latex/contrib/easybook/doc/easybook.pdf | Bin 234688 -> 235059 bytes macros/latex/contrib/easybook/doc/easybook.tex | 32 ++++++++++++--------- macros/latex/contrib/easybook/easybook.cls | 31 +++++++++++--------- 6 files changed, 39 insertions(+), 32 deletions(-) (limited to 'macros/latex/contrib/easybook') diff --git a/macros/latex/contrib/easybook/doc/chapter3.tex b/macros/latex/contrib/easybook/doc/chapter3.tex index 3d0a88bb1f..3790a3c47f 100644 --- a/macros/latex/contrib/easybook/doc/chapter3.tex +++ b/macros/latex/contrib/easybook/doc/chapter3.tex @@ -5,7 +5,7 @@ \section{代码} \index{d@代码} -\zhlipsum[42][name = aspirin] +\zhlipsum[41][name = aspirin] \begin{lstlisting}[language = Python,caption = {python程序练习题}] #!/usr/bin/python # -*- coding: UTF-8 -*- @@ -26,9 +26,7 @@ if __name__ == '__main__': \index{h@化学式} 阿司匹林还有三种作用方式。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子\ch{(NH4)2S}、\ch{[Cu(NH3)4]^2+}。 \[\ch{$x$ Na(NH4)HPO4 ->[$\Delta$] (NaPO3)_{$x$} + $x$ NH3 ^ + $x$ H2O}\] -阿司匹林还有三种作用方式。 -\[\zihao{-5}\chemfig[cram width=5pt]{*6((-HO)-=-(-(<[::60]OH)-[::-60]-[::-60,,,2] -HN-[::+60]CH_3)=-(-HO)=)}\] +\zhlipsum[41][name = aspirin] \clearpage \section{引用} diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf index 0d6441a9bf..677660d9b8 100644 Binary files a/macros/latex/contrib/easybook/doc/easybook-demo.pdf and b/macros/latex/contrib/easybook/doc/easybook-demo.pdf differ diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex index 15e6900f2b..bed92304aa 100644 --- a/macros/latex/contrib/easybook/doc/easybook-demo.tex +++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex @@ -97,7 +97,7 @@ \url{https://latexstudio.net} \\ \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} } -\date{2021/03/11\hskip\ccwd\relax v1.23n} +\date{2021/03/12\hskip\ccwd\relax v1.23o} \frontmatter[roman] \maketitle diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf index ec447ae802..9dd3ad1ad2 100644 Binary files a/macros/latex/contrib/easybook/doc/easybook.pdf and b/macros/latex/contrib/easybook/doc/easybook.pdf differ diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex index ba2df4076e..00de40fdd5 100644 --- a/macros/latex/contrib/easybook/doc/easybook.tex +++ b/macros/latex/contrib/easybook/doc/easybook.tex @@ -2,7 +2,7 @@ \title{\sffamily easybook书籍文档类} \author{瞿毅} -\date{2021/03/11\hskip\ccwd\relax v1.23n\thanks{\url{https://gitee.com/texl3/easybook}}} +\date{2021/03/12\hskip\ccwd\relax v1.23o\thanks{\url{https://gitee.com/texl3/easybook}}} \begin{document} \maketitle @@ -97,7 +97,7 @@ \tn{frontmatter}\oarg{编号格式|(Roman)} \tn{printindex}\oarg{索引名} \end{syntax} -\changes{v1.23n}{2021/02/20}{重新定义文档结构划分命令。} +\changes{v1.23o}{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} @@ -131,8 +131,8 @@ uppercase = <(true)|false> \end{syntax} \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。} -\changes{v1.23n}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} -\changes{v1.23n}{2021/02/09}{增加控制页面横线粗细的选项。} +\changes{v1.23o}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} +\changes{v1.23o}{2021/02/09}{增加控制页面横线粗细的选项。} \opt{style} 选项控制文章的风格。 \end{function} @@ -189,7 +189,7 @@ footnote = <(1)> \end{syntax} \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。} -\changes{v1.23n}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} +\changes{v1.23o}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项\opt{linespread}失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 \end{function} @@ -211,7 +211,7 @@ marginpart = <\tn{rmfamily}\tn{footnotesize}> \end{syntax} \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。} -\changes{v1.23n}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} +\changes{v1.23o}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} \end{function} \begin{optdesc} @@ -232,7 +232,7 @@ \tn{printbibliography}\oarg{选项列表} \end{syntax} \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。} -\changes{v1.23n}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} +\changes{v1.23o}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} \end{function} \begin{optdesc} @@ -244,7 +244,7 @@ \end{optdesc} \subsection{定理样式} -\begin{function}[EXP,added = 2021-01-12,updated = 2021-01-18]{thmset/thmbox,thmset/numberwith,thmset/headpunct,thmset/bodyfont,thmset/notefont,thmset/headfont,thmset/headindent,thmset/spaceabove,thmset/spacebelow,thmset/spacepost} +\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-12]{thmset/thmbox,thmset/numberwith,thmset/headpunct,thmset/bodyfont,thmset/notefont,thmset/headfont,thmset/headindent,thmset/spaceabove,thmset/spacebelow,thmset/spacepost,\newtheorem} \begin{syntax} thmbox = numberwith = <(chapter)|section|其它环境|空置> @@ -256,8 +256,10 @@ spaceabove = <(0.75ex plus .1ex)> spacebelow = <(0.75ex plus .1ex)> spacepost = <(\tn{ccwd})> + \tn{newtheorem}\oarg{键值列表}\marg{定理环境名} \end{syntax} \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。} +\changes{v1.23o}{2021/03/12}{增加定义新定理环境的命令 \tn{newtheorem}。} \end{function} \begin{optdesc} @@ -271,14 +273,18 @@ \item[spaceabove] 定理环境前的间距。 \item[spacebelow] 定理环境后的间距。 \item[spacepost] 定理标题后与内容的间距。 + \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令的参数一致。 \end{optdesc} \subsubsection{新的定理样式} 定理由 \pkg{thmtools} 设置,自带定理的样式为 \opt{mythm},如果使用这个样式而只是增加新的定理名称,可以这样 \begin{ctexexam} - \AfterPreamble{\declaretheorem[style = mythm,name = 定理名]{定理环境名}} + \newtheorem[style = mythm,name = 定理名]{定理环境名} +\end{ctexexam} +若要给定理环境增加边框,可以如下进行设置 +\begin{ctexexam} + \tcolorboxenvironment{定理环境名}{thmsty} \end{ctexexam} -若要重新定义一个全新的定理样式,具体参数可以查看 \pkg{thmtools} 宏包帮助文档。 \subsection{页面边距} \begin{function}[EXP,added = 2021-01-13]{geoset/left,geoset/top,geoset/hmargin,geoset/textwidth,geoset/includehead,...} @@ -316,7 +322,7 @@ \end{syntax} \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。} \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。} -\changes{v1.23n}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。} +\changes{v1.23o}{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 @@ -437,7 +443,7 @@ \tn{item} <习题内容> \tn{end}\marg{exercise} \end{syntax} -\changes{v1.23n}{2021/02/08}{增加准确的习题盒子标题目录锚点。} +\changes{v1.23o}{2021/02/08}{增加准确的习题盒子标题目录锚点。} 习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。 \begin{ctexexam} \begin{exercise}[LightYellow][1.][习题] @@ -527,7 +533,7 @@ \tn{ch}\oarg{选项}\marg{输入} \tn{chemfig}\oarg{键值列表}\marg{分子代码} \end{syntax} -除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig} 的 \tn{chemfig} 命令完成。 +除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。 \end{function} \subsection{引用} diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls index 4405556f09..f639eeb570 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/11}{1.23n}{} +\ProvidesExplClass{easybook}{2021/03/12}{1.23o}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -81,8 +81,19 @@ {\__put_ctexbook:n {scheme = chinese}} {\__put_ctexbook:n {scheme = plain}} +\clist_map_inline:nn + { + {svgnames}{xcolor}, + {hang,stable}{footmisc}, + {normalem}{ulem}, + {protrusion = false}{microtype}, + {shortlabels,inline}{enumitem}, + {most}{tcolorbox}, + {xindy}{imakeidx}, + {CJKmath = true}{xeCJK}, + {no-math}{fontspec} + }{\PassOptionsToPackage#1} \__put_ctexbook:n {\g__options_clist} -\PassOptionsToPackage{CJKmath = true}{xeCJK} \LoadClass[UTF8]{ctexbook} \bool_new:N \l__capdash_bool @@ -136,23 +147,13 @@ uppercase .initial:n = true } -\clist_map_inline:nn - { - {svgnames}{xcolor}, - {hang,stable}{footmisc}, - {normalem}{ulem}, - {protrusion = false}{microtype}, - {shortlabels,inline}{enumitem}, - {most}{tcolorbox}, - {xindy}{imakeidx} - }{\PassOptionsToPackage#1} \RequirePackage { xcolor, pdfpages, footmisc,setspace, amsmath,amsthm,thmtools,cases, - chemformula,chemfig,siunitx,ulem, + chemformula,siunitx,ulem, geometry,marginnote,nccfoots, rotfloat,graphicx, fancyhdr,titletoc, @@ -395,7 +396,7 @@ } \cs_gset:Npn \headrule { - \color{ctex@frame}\vspace{2.5pt} + \color{ctex@frame}\vspace{1.5pt} \hrule width\textwidth height \l__rule_width_dim } \bool_if:NT \l__draft_bool @@ -792,6 +793,8 @@ \tl_new:N \l__thm_spaceabove_tl \tl_new:N \l__thm_spacebelow_tl +\RenewDocumentCommand{\newtheorem}{O{}m} + {\AfterPreamble{\declaretheorem[#1]{#2}}} \__ctex_define:nn {thmset} { thmbox .bool_set:N = \l__thmbox_bool, -- cgit v1.2.3