diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-08 22:56:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-08 22:56:55 +0000 |
commit | 65000d871813c9f47499e7dedfab6836e3d35fe3 (patch) | |
tree | 3594f2b43d577764334bdc578c68f2eb4afe4634 /Master | |
parent | 9cee7b4a26ed50b271d40de2712666df8ae4a59d (diff) |
easybook (8mar21)
git-svn-id: svn://tug.org/texlive/trunk@58234 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter1.tex | 10 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter2.tex | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf | bin | 290313 -> 290305 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.tex | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.pdf | bin | 233131 -> 235058 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.tex | 44 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 114 |
7 files changed, 103 insertions, 94 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/chapter1.tex b/Master/texmf-dist/doc/latex/easybook/chapter1.tex index aa0beaed738..fa4dfb88698 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter1.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter1.tex @@ -24,19 +24,19 @@ \zhlipsum*[56][name = aspirin] \begin{equation} \begin{split} - \iint_{A}E\rho(\bm{v}\cdot\bm{n})\mathrm{d}A+\frac{\partial}{\partial t}\iiint_{V}E\rho \mathrm{d}V & = \frac{\delta Q}{\mathrm{d}t}-\frac{\delta W}{\mathrm{d}t} + \iint_{A}E\rho(\bm{v}\cdot\bm{n})\mathrm{d}A + \frac{\partial}{\partial t}\iiint_{V}E\rho \mathrm{d}V &= \frac{\delta Q}{\mathrm{d}t} - \frac{\delta W}{\mathrm{d}t} \\ - \iint_{A}\left(U+\frac{v^{2}}{2}+gz+\frac{P}{\rho}\right)\rho(\bm{v}\cdot\bm{n})\mathrm{d}A+\frac{\partial}{\partial t}\iiint_{V}E\rho\mathrm{d}V & = \frac{\delta Q}{\mathrm{d}t}-\frac{\delta W_{s}}{\mathrm{d}t} + \iint_{A}\left(U + \frac{v^{2}}{2} + gz + \frac{P}{\rho}\right)\rho(\bm{v}\cdot\bm{n})\mathrm{d}A + \frac{\partial}{\partial t}\iiint_{V}E\rho\mathrm{d}V &= \frac{\delta Q}{\mathrm{d}t} - \frac{\delta W_{s}}{\mathrm{d}t} \end{split} \end{equation} \zhlipsum*[42][name = aspirin] \begin{subnumcases}{y =} - C_1e^{r_1x}+C_2e^{r_2x} & \quad $p^2-4q > 0$ + C_1e^{r_1x} + C_2e^{r_2x} & \quad $p^2 - 4q > 0$ \\ - \left(C_1+C_2\right)e^{r_1x} & \quad $p^2-4q = 0$ + \left(C_1 + C_2\right)e^{r_1x} & \quad $p^2 - 4q = 0$ \\ - e^{\alpha x}\left(C_1\cos\beta x+C_2\sin\beta x\right) & \quad $p^2-4q < 0$ + e^{\alpha x}\left(C_1\cos\beta x + C_2\sin\beta x\right) & \quad $p^2 - 4q < 0$ \end{subnumcases} \zhlipsum*[57][name = aspirin] diff --git a/Master/texmf-dist/doc/latex/easybook/chapter2.tex b/Master/texmf-dist/doc/latex/easybook/chapter2.tex index 6c094eb9f69..01bfdf7dc2a 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter2.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter2.tex @@ -15,9 +15,9 @@ \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 + \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 \\ - & =\oiint_\Sigma \left(P\cos\alpha+Q\cos\beta+R\cos\gamma\right)\mathrm{d}S + & =\oiint_\Sigma \left(P\cos\alpha + Q\cos\beta + R\cos\gamma\right)\mathrm{d}S \end{align} 这里$\Sigma$是整个边界曲面$\Omega$的外侧,$\cos\alpha,\cos\beta,\cos\gamma$是$\Sigma$在点$(x,y,z)$处的法向量的方向余弦。引用这个公式如\cref{theorem:gauss formula}。 \end{theorem} @@ -26,9 +26,9 @@ \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 + \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 \\ - = \oint_\Gamma P\mathrm{d}x+Q\mathrm{d}y+R\mathrm{d}z + = \oint_\Gamma P\mathrm{d}x + Q\mathrm{d}y + R\mathrm{d}z \end{multline} The Stokes formula is an extension of the basic calculus formula in the case of surface integration. It is also an extension of the Green formula. This formula gives the second type of surface integral on the surface block and the second type of curve on the boundary curve Link between points. \end{definition} @@ -68,11 +68,11 @@ The Stokes formula is an extension of the basic calculus formula in the case of \zhlipsum*[3][name = aspirin] \begin{exercise}[LightYellow][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})} + \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})} \begin{tasks} - \task 若$f(x)$在$(-\infty,+\infty)$上可导且单调增加,则对一切$x\in (-\infty,+\infty)$,都有$f'(x) > 0$。 + \task 若$f(x)$在$( - \infty, + \infty)$上可导且单调增加,则对一切$x\in ( - \infty, + \infty)$,都有$f'(x) > 0$。 \task 若$f(x)$在点$x_0$处取得极值,则$f'(x_0) = 0$。 \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)$的极值点。 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 e844013e3c0..0422aff9679 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 f98cbd19076..5a587d21c13 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex @@ -58,9 +58,12 @@ }, hdrset = { - \easyhead[EC]{\color{SeaGreen}\kaishu\leftmark} - \easyhead[OC]{\color{SeaGreen}\kaishu\rightmark} - \easyhead[EL,OR]{\color{SeaGreen}\thepage} + head-foot = + { + \easyhead[EC]{\color{SeaGreen}\kaishu\leftmark} + \easyhead[OC]{\color{SeaGreen}\kaishu\rightmark} + \easyhead[EL,OR]{\color{SeaGreen}\thepage} + } }, tocset = { @@ -80,7 +83,7 @@ bibset = { backend = bibtex, - bibstyle = numerical + bib-style = numerical }, % secnumdepth = 2, % tocdepth = 2 @@ -95,7 +98,7 @@ \github~\url{https://github.com/texl3/easybook} \\ \edge~\url{https://latexstudio.net} } -\date{2021/03/06\hskip\ccwd\relax v1.23j} +\date{2021/03/08\hskip\ccwd\relax v1.23k} \frontmatter[roman] \maketitle diff --git a/Master/texmf-dist/doc/latex/easybook/easybook.pdf b/Master/texmf-dist/doc/latex/easybook/easybook.pdf Binary files differindex 7d3e9a99dbd..200e2d1a96d 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 caa87380f76..a2660c75852 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook.tex @@ -3,7 +3,7 @@ \title{\sffamily easybook书籍文档类} \author{瞿毅} -\date{2021/03/06\hskip\ccwd\relax v1.23j\thanks{\url{https://gitee.com/texl3/easybook}}} +\date{2021/03/08\hskip\ccwd\relax v1.23k\thanks{\url{https://gitee.com/texl3/easybook}}} \begin{document} \maketitle @@ -98,7 +98,7 @@ \tn{frontmatter}\oarg{编号格式|(Roman)} \tn{printindex}\oarg{索引名} \end{syntax} -\changes{v1.23j}{2021/02/20}{重新定义文档结构划分命令。} +\changes{v1.23k}{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 +132,8 @@ uppercase = <(true)|false> \end{syntax} \changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。} -\changes{v1.23j}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} -\changes{v1.23j}{2021/02/09}{增加控制页面横线粗细的选项。} +\changes{v1.23k}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。} +\changes{v1.23k}{2021/02/09}{增加控制页面横线粗细的选项。} \opt{style} 选项控制文章的风格。 \end{function} @@ -190,7 +190,7 @@ footnote = <(1)> \end{syntax} \changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。} -\changes{v1.23j}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} +\changes{v1.23k}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。} 行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项\opt{linespread}失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为 \end{function} @@ -212,7 +212,7 @@ marginpart = <\tn{rmfamily}\tn{footnotesize}> \end{syntax} \changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。} -\changes{v1.23j}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} +\changes{v1.23k}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。} \end{function} \begin{optdesc} @@ -224,22 +224,22 @@ \end{optdesc} \subsection{参考文献} -\begin{function}[EXP,added = 2021-01-11,updated = 2021-02-23]{bibset/backend,bibset/bibstyle,bibset/citestyle,bibset/bibfile,\printbibliography} +\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-08]{bibset/backend,bibset/bib-style,bibset/cite-style,bibset/bibfile,\printbibliography} \begin{syntax} backend = <(bibtex)|biblatex> - bibstyle = <(numerical)|authoryear|其它格式> - citestyle = <引用格式> + bib-style = <(numerical)|authoryear|其它格式> + cite-style = <标注风格> bibfile = <ref/refs.bib> \tn{printbibliography}\oarg{选项列表} \end{syntax} \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。} -\changes{v1.23j}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} +\changes{v1.23k}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} \end{function} \begin{optdesc} \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。 - \item[bibstyle] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。 - \item[citestyle] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(上标标注,默认)或 \opt{numbers}(普通标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。 + \item[bib-style] 参考文献格式为中国的参考文献推荐标准GB/T 7714-2015,有顺序编码制和著者-出版年制两种风格,理工科类一般使用顺序编码制,文科类一般使用著者-出版年制。若使用其它格式,使用 \hologo{BibTeX} 处理时需确保正确的 \opt{bst} 文件,使用 \hologo{biber} 处理可使用 \pkg{biblatex} 宏包支持的参考文献风格名称。 + \item[cite-style] 标注参考文献的风格,\opt{backend = bibtex} 选项下可使用 \opt{super}(上标标注,默认)或 \opt{numbers}(普通标注)等 \pkg{natbib} 宏包带有的标注风格,\opt{backend = biblatex} 选项下可使用 \pkg{biblatex} 宏包支持的标注风格名称。 \item[bibfile] 参考文献的数据文件,使用 \hologo{biber} 处理时要带有 \opt{bib} 后缀,默认为一个在 \opt{ref} 文件夹中以 \opt{refs.bib} 命名的文件。 \item[\tn{printbibliography}] 两种方式\textbf{均使用}此命令打印参考文献,其中可选项仅在 \hologo{biber} 处理时有效。 \end{optdesc} @@ -307,23 +307,29 @@ \end{function} \subsection{页眉页脚} -\begin{function}[EXP,added = 2021-01-13,updated = 2021-02-08]{hdrset,\easyhead,\easyfoot,...} +\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-08]{hdrset/head-foot,hdrset/chap-mark,hdrset/sec-mark,\easyhead,\easyfoot,...} \begin{syntax} - hdrset = <载入 \opt{fancyhdr} 的设置> + head-foot = <页眉页脚中的内容> + chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容> + sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容> \tn{easyhead}\oarg{位置}\marg{内容} \tn{easyfoot}\oarg{位置}\marg{内容} \end{syntax} \changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。} \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。} -\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,命令 \tn{easyhead} 和 \tn{easyfoot} 的含义与 \tn{fancyhead} 和 \tn{fancyfoot} 相同,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。 +\changes{v1.23k}{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 { hdrset = { - \easyhead[ER]{\leftmark} - \easyhead[OL]{\rightmark} - \easyhead[EL,OR]{\textbf{\thepage}} + head-foot = + { + \easyhead[ER]{\leftmark} + \easyhead[OL]{\rightmark} + \easyhead[EL,OR]{\textbf{\thepage}} + } } } \end{ctexexam} @@ -432,7 +438,7 @@ \tn{item} <习题内容> \tn{end}\marg{exercise} \end{syntax} -\changes{v1.23j}{2021/02/08}{增加准确的习题盒子标题目录锚点。} +\changes{v1.23k}{2021/02/08}{增加准确的习题盒子标题目录锚点。} 习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。 \begin{ctexexam} \begin{exercise}[LightYellow][1.][习题] diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 29fce05d8af..29fb884d845 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/03/06}{1.23j}{} +\ProvidesExplClass{easybook}{2021/03/08}{1.23k}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -103,6 +103,7 @@ bibset .meta:nn = {ctex/bibset}{#1}, thmset .meta:nn = {ctex/thmset}{#1}, geoset .meta:nn = {ctex/geoset}{#1}, + hdrset .meta:nn = {ctex/hdrset}{#1}, tocset .meta:nn = {ctex/tocset}{#1}, config .tl_set:N = \g__config_tl, lstlistlistingname .tl_set:N = \lstlistlistingname, @@ -321,14 +322,36 @@ \cs_gset_eq:NN \easyhead\fancyhead \cs_gset_eq:NN \easyfoot\fancyfoot \cs_gset_eq:NN \easypagestyle\fancypagestyle -\ctex_define:n +\__ctex_define:nn {hdrset} { - hdrset .tl_set:N = \l__fancyhf_content_tl, - hdrset .initial:n = + head-foot .tl_set:N = \l__fancyhf_content_tl, + head-foot .initial:n = { \easyhead[EC]{\color{ctex@frame}\kaishu\leftmark} \easyhead[OC]{\color{ctex@frame}\kaishu\rightmark} \easyhead[EL,OR]{\color{ctex@frame}\thepage} + }, + chap-mark .tl_set:N = \l__fancyhf_chap_mark_tl, + chap-mark .initial:n = + { + \int_compare:nT {\c@secnumdepth > -1} + { + \if@mainmatter + \ifodd\CTEX@chapter@numbering + \CTEXthechapter\hspace{\ccwd} + \fi + \fi + } + }, + sec-mark .tl_set:N = \l__fancyhf_sec_mark_tl, + sec-mark .initial:n = + { + \int_compare:nT {\c@secnumdepth > 0} + { + \ifodd\CTEX@section@numbering + \CTEXthesection\hspace{0.5\ccwd} + \fi + } } } \ctex_at_end_preamble:n @@ -343,26 +366,10 @@ \markboth { \bool_if:NT \l__uppercase_bool{\MakeUppercase} - { - \ifnum\c@secnumdepth>\m@ne - \if@mainmatter - \ifodd\CTEX@chapter@numbering - \CTEXthechapter\hspace{\ccwd} - \fi - \fi - \fi#1 - } + {\l__fancyhf_chap_mark_tl#1} }{ \bool_if:NT \l__uppercase_bool{\MakeUppercase} - { - \ifnum\c@secnumdepth>\m@ne - \if@mainmatter - \ifodd\CTEX@chapter@numbering - \CTEXthechapter\hspace{\ccwd} - \fi - \fi - \fi#1 - } + {\l__fancyhf_chap_mark_tl#1} } } \l__fancyhf_content_tl @@ -373,15 +380,7 @@ \markboth { \bool_if:NT \l__uppercase_bool{\MakeUppercase} - { - \ifnum\c@secnumdepth>\m@ne - \if@mainmatter - \ifodd\CTEX@chapter@numbering - \CTEXthechapter\hspace{\ccwd} - \fi - \fi - \fi#1 - } + {\l__fancyhf_chap_mark_tl#1} }{} } \l__fancyhf_content_tl @@ -392,13 +391,7 @@ \markright { \bool_if:NT \l__uppercase_bool{\MakeUppercase} - { - \ifnum\c@secnumdepth>\z@ - \ifodd\CTEX@section@numbering - \CTEXthesection\hspace{0.5\ccwd} - \fi - \fi#1 - } + {\l__fancyhf_sec_mark_tl#1} } } \cs_gset:Npn \headrule @@ -522,19 +515,26 @@ \cs_new_protected:Npn \__markboth:n #1 { \bool_if:NTF \l__page_twoside_bool - {\markboth{\MakeUppercase#1}{\MakeUppercase#1}} - {\markboth{\MakeUppercase#1}{}} + { + \markboth + {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1} + {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1} + }{ + \markboth + {\bool_if:NT \l__uppercase_bool{\MakeUppercase}#1} + {} + } } \cs_new_protected:Npn \__title_mark_intoc:n #1 { \chapter*{\phantomsection#1} \CTEX@addtocline{chapter}{#1} - \__markboth:n #1 + \__markboth:n {#1} } \cs_new_protected:Npn \__title_mark:n #1 { \chapter*{\phantomsection#1} - \__markboth:n #1 + \__markboth:n {#1} } \cs_gset:Npn \tableofcontents { @@ -635,7 +635,7 @@ } \__patch_cmd:Nnn \imki@indexheaders {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}} - {\__markboth:n \indexname} + {\__markboth:n {\indexname}} \tl_new:N \l__table_font_tl \tl_new:N \l__figure_font_tl @@ -1046,31 +1046,31 @@ \__ctex_define:nn {bibset} { - backend .choice:, - backend/bibtex .code:n = {}, - backend/biblatex .code:n = + backend .choice:, + backend/bibtex .code:n = {}, + backend/biblatex .code:n = {\bool_set_false:N \l__backend_bibtex_bool}, - bibstyle .choice:, - bibstyle .value_required:n = true, - bibstyle/numerical .code:n = + bib-style .choice:, + bib-style .value_required:n = true, + bib-style/numerical .code:n = { \tl_set:Nn \l__bib_style_tl{#1} \tl_clear:N \l__bib_mysty_tl }, - bibstyle/authoryear .code:n = + bib-style/authoryear .code:n = { \tl_set:Nn \l__bib_style_tl{#1} \tl_clear:N \l__bib_mysty_tl }, - bibstyle/unknown .code:n = + bib-style/unknown .code:n = {\tl_set_eq:NN \l__bib_mysty_tl\l_keys_value_tl}, - bibstyle .initial:n = numerical, + bib-style .initial:n = numerical, - citestyle .code:n = + cite-style .code:n = {\tl_set:Nn \l__bib_citesty_tl{#1}}, - bibfile .tl_set:N = \l__bib_file_tl, - bibfile .initial:n = ref/refs.bib + bibfile .tl_set:N = \l__bib_file_tl, + bibfile .initial:n = ref/refs.bib } \cs_new_protected:Npn \__bibtex_set: @@ -1092,7 +1092,7 @@ {\exp_args:NV \setcitestyle\l__bib_citesty_tl} \cs_set:Npn \bibsection{\__title_mark_intoc:n \bibname} \skip_set:Nn \bibsep{0ex} - \NewDocumentCommand\printbibliography{o} + \NewDocumentCommand{\printbibliography}{o} {\exp_args:NV \bibliography\l__bib_file_tl} } \cs_new_protected:Npn \__put_biblatex:n #1 @@ -1101,7 +1101,7 @@ { \tl_if_empty:NTF \l__bib_mysty_tl { - \tl_if_eq:VnT \l__bib_style_tl{number} + \tl_if_eq:VnT \l__bib_style_tl{numerical} {\__put_biblatex:n {style = gb7714-2015}} \tl_if_eq:VnT \l__bib_style_tl{authoryear} {\__put_biblatex:n {style = gb7714-2015ay}} |