diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-07 21:55:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-07 21:55:17 +0000 |
commit | c29268370234787df332b36d33e6339e21c505f6 (patch) | |
tree | 9533407ce9ca75b169aefb8811bab11524b444e2 /Master | |
parent | 5b0e260dfe8dc259a3447e100508eead27c837f6 (diff) |
easybook (7feb21)
git-svn-id: svn://tug.org/texlive/trunk@57667 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/appendix.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter1.tex | 35 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter2.tex | 25 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter3.tex | 40 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf | bin | 300438 -> 297365 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.tex | 29 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.pdf | bin | 224735 -> 225630 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.tex | 50 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 123 |
9 files changed, 151 insertions, 157 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/appendix.tex b/Master/texmf-dist/doc/latex/easybook/appendix.tex index f5981487b1b..e05362d02d0 100644 --- a/Master/texmf-dist/doc/latex/easybook/appendix.tex +++ b/Master/texmf-dist/doc/latex/easybook/appendix.tex @@ -1,11 +1,7 @@ % 附录 -\documentclass[../easybook-demo]{subfiles} -\begin{document} \appendix \chapter{维基百科} \section{阿司匹林} -\zhlipsum[50-52][name = aspirin] - -\end{document}
\ No newline at end of file +\zhlipsum[50-52][name = aspirin]
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/easybook/chapter1.tex b/Master/texmf-dist/doc/latex/easybook/chapter1.tex index 80157ecaacd..28df5582009 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter1.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter1.tex @@ -1,10 +1,9 @@ % Chapter 1 -\documentclass[../easybook-demo]{subfiles} -\begin{document} \chapter{常用环境} -\section{公式}\index{g@公式} +\section{公式} +\index{g@公式} \zhlipsum*[42][name = aspirin] \begin{equation}\label{eq:matrix} \bm{A} = \left[ @@ -44,7 +43,8 @@ \vfill{\small\doclicenseThis} \clearpage -\section{插图}\index{c@插图} +\section{插图} +\index{c@插图} 当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\cref{fig:example}。 \begin{figure}[htbp] \centering @@ -56,7 +56,8 @@ \bicaption[使用subcaption排版子图]{使用subcaption宏包的subcaptionbox命令排版子图}[Use subcaption to typeset subgraphs]{Use the subcaptionbox command of the subcaption package to typeset sub-pictures}\label{fig:example} \end{figure} -\section{表格}\index{b@表格} +\section{表格} +\index{b@表格} 合并表格列使用 \lstinline{\multicolumn} 命令,合并行使用 \lstinline{\multirowcell} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,设置了\textsf{L、C和R}三个列对齐选项,一个例子如\cref{tab:example} 所示。 \begin{table}[htbp] \centering @@ -74,31 +75,33 @@ \end{table} \clearpage -\section{列表}\index{l@列表} -\zhlipsum*[10][name = aspirin] +\section{列表} +\index{l@列表} +\zhlipsum*[42][name = aspirin] -\subsection{排序列表}\label{subsec1}\index{l@列表!p@排序列表} +\subsection{排序列表} +\index{l@列表!p@排序列表} \begin{enumerate} - \item \zhlipsum*[41][name = aspirin] + \item \zhlipsum*[42][name = aspirin] \begin{enumerate} \item \zhlipsum*[42][name = aspirin] \end{enumerate} - \item \zhlipsum*[41][name = aspirin] + \item \zhlipsum*[42][name = aspirin] \end{enumerate} -\subsection{常规列表}\index{l@列表!c@常规列表} +\subsection{常规列表} +\index{l@列表!c@常规列表} \begin{itemize} \item \zhlipsum[41-42][name = aspirin] \begin{itemize} \item \zhlipsum*[42][name = aspirin] \end{itemize} - \item \zhlipsum*[41][name = aspirin] + \item \zhlipsum*[42][name = aspirin] \end{itemize} -\subsection{主题列表}\index{l@列表!z@主题列表} +\subsection{主题列表} +\index{l@列表!z@主题列表} \begin{description} \item[主题一] \zhlipsum*[42][name = aspirin] \item[主题二] \zhlipsum*[42][name = aspirin] -\end{description} - -\end{document}
\ No newline at end of file +\end{description}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/easybook/chapter2.tex b/Master/texmf-dist/doc/latex/easybook/chapter2.tex index 49e9d1e8246..bf2bbf77980 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter2.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter2.tex @@ -1,16 +1,18 @@ % Chapter 2 -\documentclass[../easybook-demo]{subfiles} -\begin{document} \chapter{定理盒子} -\begin{outline}\index{zhaiyao@摘要盒子} +\begin{outline} +\index{zhaiyao@摘要盒子} \item 这是一个摘要盒子。 \item 它的标题是可选参数,默认标题是摘要。 \end{outline} -\section{定理}\index{d@定理} -\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{theorem:gauss formula}\index{d@定理!g@高斯公式} +\section{定理} +\index{d@定理} +\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})] +\label{theorem:gauss formula} +\index{d@定理!g@高斯公式} 设空间闭区域$\Omega$是由分片光滑的闭曲面$\Sigma$围成,若函数$P(x,y,z)$,$Q(x,y,z)$,$R(x,y,z)$在$\Omega$上具有一节连续偏导数,则有 \begin{align} \iiint_\Omega\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial x}\right)\mathrm{d}V & =\oiint_\Sigma P\mathrm{d}y\mathrm{d}z+Q\mathrm{d}z\mathrm{d}x+R\mathrm{d}x\mathrm{d}y @@ -20,7 +22,8 @@ 这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{theorem:gauss formula}。 \end{theorem} -\begin{definition}[(Stokes formula)]\index{d@定理!s@Stokes formula} +\begin{definition}[(Stokes formula)] +\index{d@定理!s@Stokes formula} Let $\Gamma$ be a piecewise smooth directed closed curve, $\Sigma$ is a piecewise smooth directed surface bounded by $\Gamma$, the side of $\Gamma$ and the positive direction of $\Sigma$ According to the right-hand rule, if the function $P(x,y,z)$, $Q(x,y,z)$, $R(x,y,z)$ has a first-order continuous deviation on the curve $\Sigma$ Derivative, then \begin{multline} \iint_\Sigma\left(\frac{\partial R}{\partial y}-\frac{\partial Q}{\partial z}\right)\mathrm{d}y\mathrm{d}z+\left(\frac{\partial P}{\partial z}-\frac{\partial R}{\partial x}\right)\mathrm{d}z\mathrm{d}x+\left(\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}\right)\mathrm{d}x\mathrm{d}y @@ -55,14 +58,16 @@ The Stokes formula is an extension of the basic calculus formula in the case of 这是一个证明,末尾自动添加证明结束符。 \end{proof} -\begin{mybox}*[My title]\index{z@自定义盒子} +\begin{mybox}*[My title] +\index{z@自定义盒子} \zhlipsum*[3][name = aspirin] \tcblower \zhlipsum*[8][name = aspirin] \end{mybox} \zhlipsum*[3][name = aspirin] -\begin{exercise}[black][1.][习题]\index{x@习题环境} +\begin{exercise}[black][1.][习题] +\index{x@习题环境} \item 设$w = f(x+y+z,xyz)$,$f$具有二阶连续偏导数,求$\dfrac{{\partial w}}{{\partial x}}$和$\dfrac{{{\partial ^2}w}}{{\partial x\partial z}}$。 \item 已知$y = y(x)$在任意点$x$处的增量$\Delta y = \dfrac{y\Delta x}{1+x^2}+\alpha$,其中$\alpha$是$\Delta x$的高阶无穷小($\Delta x\to 0$时),$y(0) = \pi$,则$y(1) = \uline{\mbox{\hspace{2em}}}$。 \item 设函数$f(x)$在$(-\infty,+\infty)$上有定义,则下述命题中正确的是 \mbox{(\hspace{1.5em})} @@ -72,6 +77,4 @@ The Stokes formula is an extension of the basic calculus formula in the case of \task 若$f''(x_0) = 0$,则$(x_0,f(x_0))$是曲线$y = f(x)$的拐点坐标。 \task 若$f'(x_0) = 0$, $f''(x_0) = 0$,$f'''(x_0)\ne 0$,则$x_0$一定不是$f(x)$的极值点。 \end{tasks} -\end{exercise} - -\end{document}
\ No newline at end of file +\end{exercise}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/easybook/chapter3.tex b/Master/texmf-dist/doc/latex/easybook/chapter3.tex index 04fa95dc341..8670c109751 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter3.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter3.tex @@ -1,10 +1,10 @@ % Chapter 3 -\documentclass[../easybook-demo]{subfiles} -\begin{document} -\chapter{其它格式}\label{chap:other formats} +\chapter{其它格式} +\label{chap:other formats} -\section{代码}\index{d@代码} +\section{代码} +\index{d@代码} \zhlipsum[42][name = aspirin] \begin{lstlisting}[language = Python,caption = {python程序练习题}] #!/usr/bin/python @@ -18,10 +18,12 @@ if __name__ == '__main__': print ptr \end{lstlisting} -\section{物理量}\index{w@物理量} +\section{物理量} +\index{w@物理量} 阿司匹林还有三种作用方式 \num{-21x.3e5}。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子 \SI{.5}{mol}。 -\section{化学式}\index{h@化学式} +\section{化学式} +\index{h@化学式} 阿司匹林还有三种作用方式。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子\ch{(NH4)2S}、\ch{[Cu(NH3)4]^2+}。 \[\ch{$x$ Na(NH4)HPO4 ->[$\Delta$] (NaPO3)_{$x$} + $x$ NH3 ^ + $x$ H2O}\] 阿司匹林还有三种作用方式。 @@ -29,26 +31,28 @@ if __name__ == '__main__': HN-[::+60]CH_3)=-(-HO)=)}\] \clearpage -\section{引用}\index{y@引用} +\section{引用} +\index{y@引用} \zhlipsum[8][name = aspirin] -\subsection{索引}\index{y@引用!s@索引} +\subsection{索引} +\index{y@引用!s@索引} \zhlipsum[8][name = aspirin] -\subsection{脚注}\index{y@引用!j@脚注} +\subsection{脚注} +\index{y@引用!j@脚注} 六年之后的1859年,冯·基尔姆让水杨酸和乙酰氯反应,制得了分析纯的乙酰水杨酸,他称之为“乙酰化水杨酸”(acetylierte*Salicyls+"aure)\footnote{这是一个悬挂缩进的脚注。\par 这是分段将会缩进两字符。}。 60和70年代,约翰·范恩等人发现了阿司匹林的作用机理,60至80年代的其他研究和临床试验证明该药有抗凝血的药效,可降低血栓疾病的发病率\Footnote{*}{这是可以自定义标记的脚注。}。 -\subsection{边注}\index{y@引用!b@边注} -对乙酰氨基酚和布洛芬\marginnote{这是一个边注。}于1956年和1959年相继问世以后,阿司匹林的使用率开始下降。 - -\subsection{引用章节}\label{subsec:reference section}\index{y@引用!s@索引} +\subsection{引用章节} +\label{subsec:reference section} +\index{y@引用!s@索引} 兽医有时用阿司匹林来镇痛或抗血栓,主要给狗用\cref{chap:other formats},有时给马用\cref{subsec:reference section},不过现在一般会用副作用较少的新疗法。 -\subsection{参考文献}\index{y@引用!c@参考文献} +\subsection{参考文献} +\index{y@引用!c@参考文献} 这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。 -\section{行内盒子}\index{h@行内盒子} -对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[DarkSeaGreen][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。 - -\end{document}
\ No newline at end of file +\section{行内盒子} +\index{h@行内盒子} +对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[DarkSeaGreen][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf Binary files differindex a30d93392eb..5fb27f8d904 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf +++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf diff --git a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex index 3d9712293f5..57801d4fafe 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex @@ -9,7 +9,7 @@ { style = { - color = forest, + color = seaside, % capdash = true, % multoc = true, % withpart = true, @@ -34,11 +34,11 @@ }, elfont = { - tabfont = \sffamily\small, - figfont = \sffamily\small, - lstfont = \sffamily\small, + tabfont = \sffamily\zihao{5}, + figfont = \sffamily\zihao{5}, + lstfont = \sffamily\zihao{5}, fnfont = \rmfamily, - marfont = \sffamily\footnotesize + marfont = \sffamily\zihao{-5} }, thmset = { @@ -57,9 +57,9 @@ }, hdrset = { - \fancyhead[EC]{\color{DarkViolet}\kaishu\leftmark} - \fancyhead[OC]{\color{DarkViolet}\kaishu\rightmark} - \fancyhead[EL,OR]{\color{DarkViolet}\thepage} + \easyhead[EC]{\color{DarkViolet}\kaishu\leftmark} + \easyhead[OC]{\color{DarkViolet}\kaishu\rightmark} + \easyhead[EL,OR]{\color{DarkViolet}\thepage} }, tocset = { @@ -93,10 +93,9 @@ 瞿毅\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://ctan.org/pkg/easybook} + \edge~\url{https://latexstudio.net} } - \date{2021/02/02\hskip\ccwd\relax v1.23} + \date{2021/02/08\hskip\ccwd\relax v1.23a} } \begin{document} @@ -106,10 +105,10 @@ \mainmatter \part{使用示例} -\subfile{pages/chapter1} -\subfile{pages/chapter2} -\subfile{pages/chapter3} -\subfile{pages/appendix} +\include{pages/chapter1} +\include{pages/chapter2} +\include{pages/chapter3} +\include{pages/appendix} \backmatter \printbibliography diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf Binary files differindex 6dac946312b..cea72f04f6b 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.pdf +++ b/Master/texmf-dist/doc/latex/easybook/easybook.pdf diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.tex b/Master/texmf-dist/doc/latex/easybook/easybook.tex index d2a9be0bdfb..4cd23121b73 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex @@ -1,13 +1,9 @@ \documentclass{ctxdoc} -\hypersetup - { - linkcolor = blue, - urlcolor = blue - } +\hypersetup{linkcolor = blue,urlcolor = blue} \title{\sffamily easybook书籍文档类} \author{瞿毅} -\date{2021/02/02\hskip\ccwd\relax v1.23\thanks{\url{https://gitee.com/texl3/easybook}}} +\date{2021/02/08\hskip\ccwd\relax v1.23a\thanks{\url{https://gitee.com/texl3/easybook}}} \begin{document} \maketitle @@ -19,7 +15,7 @@ \tableofcontents \section{编译方式} -模板含有一个使用示例文件,编译前建议满足以下的条件 +模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件 \begin{itemize} \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。 \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。 @@ -40,7 +36,8 @@ LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. \end{frameverb} -\subsection{字体设置}\label{font settings} +\subsection{字体设置} +\label{font settings} 默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见小节 \ref{document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。 如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。 @@ -50,7 +47,8 @@ \setCJKmonofont{FangSong} \end{ctexexam} -\section{文档类选项}\label{document class options} +\section{文档类选项} +\label{document class options} 标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类 \begin{itemize} \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。 @@ -111,9 +109,9 @@ \end{function} \subsection{风格} -\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-02]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath} +\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-08]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath} \begin{syntax} - color = <(none)|forest|energy|cyberpunk> + color = <(none)|seaside|energy|cyberpunk> capdash = <true|(false)> multoc = <true|(false)> withpart = <true|(false)> @@ -143,7 +141,8 @@ \item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。 \end{optdesc} -\subsection{超链接}\label{hyperlinks} +\subsection{超链接} +\label{hyperlinks} \begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/hyperlink,link/linkcolor,link/linktopage} \begin{syntax} hyperlink = <(edge)|various|none> @@ -189,7 +188,7 @@ \end{optdesc} \subsection{其它字体} -\begin{function}[EXP,added = 2021-01-08]{elfont/tabfont,elfont/figfont,elfont/lstfont,elfont/fnfont,elfont/marfont} +\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-08]{elfont/tabfont,elfont/figfont,elfont/lstfont,elfont/fnfont,elfont/marfont} \begin{syntax} tabfont = <\tn{sffamily}\tn{small}> figfont = <\tn{sffamily}\tn{small}> @@ -198,6 +197,7 @@ marfont = <\tn{rmfamily}\tn{footnotesize}> \end{syntax} \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。} +\changes{v1.23a}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} \end{function} \begin{optdesc} @@ -291,23 +291,23 @@ \end{function} \subsection{页眉页脚} -\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{hdrset,\fancyhead,\fancyfoot,...} +\begin{function}[EXP,added = 2021-01-13,updated = 2021-02-08]{hdrset,\easyhead,\easyfoot,...} \begin{syntax} hdrset = <载入 \opt{fancyhdr} 的设置> - \tn{fancyhead}\oarg{位置}\marg{内容} - \tn{fancyfoot}\oarg{位置}\marg{内容} + \tn{easyhead}\oarg{位置}\marg{内容} + \tn{easyfoot}\oarg{位置}\marg{内容} \end{syntax} \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。} \changes{v1.21c}{2021/01/13}{增加配置页眉页脚的选项。} -\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 +\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 \begin{ctexexam} \ctexset { hdrset = { - \fancyhead[ER]{\leftmark} - \fancyhead[OL]{\rightmark} - \fancyhead[EL,OR]{\textbf{\thepage}} + \easyhead[ER]{\leftmark} + \easyhead[OL]{\rightmark} + \easyhead[EL,OR]{\textbf{\thepage}} } } \end{ctexexam} @@ -365,7 +365,7 @@ \tn{item} <列表内容> \tn{end}\marg{环境名} \end{syntax} -\pkg{enumitem} 宏包为系统自带的列表环境提供了更灵活的标签以及间距的控制。已设置默认格式,若自定义标签可例如 +\pkg{enumitem} 宏包为系统自带的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如 \begin{ctexexam} \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume] \begin{itemize}[label = \textbullet] @@ -373,7 +373,8 @@ \end{ctexexam} \end{function} -\subsubsection{排序列表}\label{sort list} +\subsubsection{排序列表} +\label{sort list} 使用 \opt{enumerate} 环境可创建排序列表,使用 \opt{enumerate*} 环境产生行内部列表,可以使用\textbf{A、a、I、i和1}作为可选项为 \opt{enumerate} 与 \opt{enumerate*} 格式化标签。若生成\textbf{Item I、Item II、Item III}格式可以这样 \begin{ctexexam} \begin{enumerate*}[(a)] @@ -409,12 +410,13 @@ \end{function} \subsection{习题} -\begin{function}[added = 2021-01-05]{exercise} +\begin{function}[added = 2021-01-05,updated = 2021-02-08]{exercise} \begin{syntax} \tn{begin}\marg{exercise}\oarg{颜色名}\oarg{编号}\oarg{标题} \tn{item} <习题内容> \tn{end}\marg{exercise} \end{syntax} +\changes{v1.23a}{2021/02/08}{增加准确的习题盒子标题目录锚点。} 习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称(深色),正文编号格式与小节 \ref{sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。 \begin{ctexexam} \begin{exercise}[black][1.][习题] @@ -478,7 +480,7 @@ <行间代码> \tn{end}\marg{lstlisting} \end{syntax} -使用 \pkg{listings} 宏包可以对代码格式进行高度定制,\tn{listoflistings} 命令用于输出代码目录。 +加载了 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。 \end{function} \subsection{物理量} diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 34602785126..d0d8ae2c1e7 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -9,7 +9,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e} \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/02/02}{1.23}{} +\ProvidesExplClass{easybook}{2021/02/08}{1.23a}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -43,18 +43,12 @@ font .choice:, font .value_required:n = true, font/overleaf .code:n = {}, - font/adobe .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/founder .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/mac .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/windows .code:n = - {\__put_ctexbook:n {fontset = #1}}, - font/linux .code:n = - {\__put_ctexbook:n {fontset = ubuntu}}, - font/none .code:n = - {\__put_ctexbook:n {fontset = #1}}, + font/adobe .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/founder .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/mac .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/windows .code:n = {\__put_ctexbook:n {fontset = #1}}, + font/linux .code:n = {\__put_ctexbook:n {fontset = ubuntu}}, + font/none .code:n = {\__put_ctexbook:n {fontset = #1}}, font/noto .code:n = { \bool_set_true:N \l__font_noto_bool @@ -64,16 +58,14 @@ paper .choice:, paper .value_required:n = true, - paper/unknown .code:n = - {\PassOptionsToPackage{#1}{geometry}}, + paper/unknown .code:n = {\PassOptionsToPackage{#1}{geometry}}, paper .initial:n = a4paper, - oneside .value_forbidden:n = true, - twoside .value_forbidden:n = true, - oneside .code:n = - {\bool_set_false:N \l__page_twoside_bool}, + oneside .value_forbidden:n = true, + twoside .value_forbidden:n = true, + oneside .code:n = {\bool_set_false:N \l__page_twoside_bool}, - unknown .code:n = + unknown .code:n = {\clist_gput_right:No \g__options_clist{\CurrentOption}} } @@ -150,8 +142,7 @@ \RequirePackage { xcolor, - pdfpages,subfiles, - footmisc, + pdfpages,footmisc, setspace,zhlineskip, amsthm,thmtools,cases, chemformula,chemfig,siunitx,ulem, @@ -183,8 +174,7 @@ \RequirePackage[noto,upint]{newtxmath} \RequirePackage{bm} } - \tl_if_empty:NF \g__config_tl - {\file_input:n {\g__config_tl}} + \tl_if_empty:NF \g__config_tl{\file_input:n {\g__config_tl}} } \sys_if_engine_xetex:TF @@ -316,15 +306,17 @@ \@mainmatterfalse \pagenumbering{Roman} } - +\cs_gset_eq:NN \easyhead\fancyhead +\cs_gset_eq:NN \easyfoot\fancyfoot +\cs_gset_eq:NN \easypagestyle\fancypagestyle \ctex_define:n { hdrset .tl_set:N = \l__fancyhf_content_tl, hdrset .initial:n = { - \fancyhead[EC]{\color{ctex@frame}\kaishu\leftmark} - \fancyhead[OC]{\color{ctex@frame}\kaishu\rightmark} - \fancyhead[EL,OR]{\color{ctex@frame}\thepage} + \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark} + \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark} + \easyhead[EL,OR]{\color{ctex@frame}\thepage} } } \ctex_at_end_preamble:n @@ -402,8 +394,8 @@ \bool_if:NT \l__draft_bool { \bool_if:NTF \l__page_twoside_bool - {\fancyfoot[C]{\color{gray!60}\sffamily\today}} - {\fancyhead[L]{\color{gray!60}\sffamily\today}} + {\easyfoot[C]{\color{gray!60}\sffamily\today}} + {\easyhead[L]{\color{gray!60}\sffamily\today}} \geometry{showframe} } } @@ -419,16 +411,14 @@ \__ctex_define:nn {tocset} { part/format .tl_set:N = \l__toc_part_format_tl, - part/format .initial:n = - {\addvspace{1pc}\sffamily\large}, + part/format .initial:n = \addvspace{1pc}\sffamily\large, part/indent .tl_set:N = \l__toc_part_indent_tl, part/indent .initial:n = 0\ccwd, part/rule .tl_set:N = \l__toc_part_rule_tl, part/rule .initial:n = \tocrule{}[\bfseries], chapter/format .tl_set:N = \l__toc_chap_format_tl, - chapter/format .initial:n = - {\addvspace{1pc}\sffamily\large}, + chapter/format .initial:n = \addvspace{1pc}\sffamily\large, chapter/indent .tl_set:N = \l__toc_chap_indent_tl, chapter/indent .initial:n = 0\ccwd, chapter/rule .tl_set:N = \l__toc_chap_rule_tl, @@ -662,30 +652,20 @@ format = hang, % figurewithin = section, % tablewithin = section, + font = {stretch = \l__cap_spread_tl}, + labelfont = {color = ctex@frame}, labelsep = ccwd, belowskip = 0pt,aboveskip = 10pt } -\captionsetup[table] - { - labelfont = {tabfont,color = ctex@frame}, - textfont = {tabfont,stretch = \l__cap_spread_tl} - } -\captionsetup[figure] - { - labelfont = {figfont,color = ctex@frame}, - textfont = {figfont,stretch = \l__cap_spread_tl} - } +\captionsetup[table]{font += tabfont} +\captionsetup[figure]{font += figfont} +\captionsetup[lstlisting]{singlelinecheck = false,font += lstfont} \captionsetup[subfigure] { labelformat = parens, + font += figfont, belowskip = 2pt,aboveskip = 6pt } -\captionsetup[lstlisting] - { - singlelinecheck = false, - labelfont = {lstfont,color = ctex@frame}, - textfont = {lstfont,stretch = \l__cap_spread_tl} - } \captionsetup[figure][bi-second]{name = Figure} \captionsetup[table][bi-second]{name = Table} \cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}} @@ -770,11 +750,6 @@ \skip_set:Nn \plpartopsep{0ex} \skip_set:Nn \plitemsep{.75ex plus .1ex} \skip_set:Nn \plparsep{0ex} -\cs_new:Npn \circled#1 - { - \lower .7ex - \hbox{\tikz\draw(0pt,0pt)circle(.5\ccwd)node{\makebox[\ccwd][c]{\small#1}};} - } \cs_new_protected:Npn \__thmname_set:nn #1#2 {\tl_const:cn {c__name_#1_tl}{#2}} @@ -972,13 +947,6 @@ } \NewDocumentEnvironment{exercise}{sO{black}O{1.}O{\c__name_exercise_tl}} { - \IfBooleanF{#1} - { - \CTEX@ifnametrue - \refstepcounter{section} - \CTEX@addtocline{section}{#4} - \markright{\CTEXthesection\hspace{0.5\ccwd}#4} - } \begin{center} \bool_if:NTF \l__thmbox_bool { @@ -986,9 +954,25 @@ exsty, colback = #2!8!white,colframe = #2!50!black, drop~fuzzy~shadow = #2!50!white, + phantom = + \IfBooleanF{#1} + { + \CTEX@ifnametrue + \refstepcounter{section} + \markright{\CTEXthesection\hspace{0.5\ccwd}#4} + \CTEX@addtocline{section}{#4} + }, ]{\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4} }{ - \sffamily\Large\IfBooleanF{#1}{\CTEXthesection\hspace{0.5\ccwd}}#4 + \sffamily\Large + \IfBooleanF{#1} + { + \CTEX@ifnametrue + \refstepcounter{section} + \markright{\CTEXthesection\hspace{0.5\ccwd}#4} + \CTEX@addtocline{section}{#4} + \CTEXthesection\hspace{0.5\ccwd} + }#4 } \end{center} \begin{compactenum}[#3] @@ -1148,8 +1132,10 @@ \lstdefinestyle{mystyle} { language = [LaTeX]TeX, - texcsstyle = *\lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, - basicstyle = \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi, + texcsstyle = + *\lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, + basicstyle = + \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi, framexleftmargin = 0pt, framexrightmargin = 0pt, xleftmargin = 0pt, @@ -1160,7 +1146,8 @@ commentstyle = \color{gray}, emphstyle = \color{ctex@emph}, emph = {caption,subcaption,tabularx}, - keywordstyle = \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, + keywordstyle = + \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi, morekeywords = { includegraphics,setmainfont,setsansfont,setmonofont,setCJKmainfont,setCJKsansfont,setCJKmonofont,setCJKfamilyfont,RequirePackage @@ -1172,7 +1159,7 @@ breaklines = true, resetmargins = true, numbers = left, - numberstyle = \small, + numberstyle = \footnotesize, abovecaptionskip = -1ex, belowcaptionskip = 1ex, aboveskip = 1.5ex plus .2ex minus .1ex, @@ -1262,7 +1249,7 @@ \clist_map_function:nN { {none, 000000,000000,000000}, - {forest, 005752,004986,a40000}, + {seaside, 13abae,004986,a40000}, {energy, f39800,00a0e9,893895}, {cyberpunk, 005982,eb6877,a4005b} } |