diff options
author | Karl Berry <karl@freefriends.org> | 2021-04-18 20:19:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-04-18 20:19:22 +0000 |
commit | 7390f2fd1bbcb605894627d5b9214a79be7e37f5 (patch) | |
tree | d8d5f928dadd82960c0e334f0b3c0ceeabbcf07f | |
parent | 2a141a45d1c30aec1e0bfe3ea8bd36e40689c686 (diff) |
easybook (18apr21)
git-svn-id: svn://tug.org/texlive/trunk@58905 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter1.tex | 155 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter2.tex | 165 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/chapter3.tex | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf | bin | 262460 -> 268601 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook-demo.tex | 12 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/easybook/easybook.pdf | bin | 449460 -> 454141 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/easybook/easybook.dtx | 105 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 66 |
8 files changed, 280 insertions, 240 deletions
diff --git a/Master/texmf-dist/doc/latex/easybook/chapter1.tex b/Master/texmf-dist/doc/latex/easybook/chapter1.tex index d6c964f4eb2..99e06cc2d27 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter1.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter1.tex @@ -1,111 +1,70 @@ % Chapter 1 -\chapter{常用环境} +\chapter{多彩盒子} -\section{公式} -\index{g@公式} -\zhlipsum*[42][name = aspirin] -\begin{equation}\label{eq:matrix} - \bm{A} = \left[ - \begin{matrix} - a_{11} & a_{12} & \cdots & a_{1n} \\ - a_{21} & a_{22} & \cdots & a_{2n} \\ - \vdots & \vdots & \ddots & \vdots \\ - a_{m1} & a_{m2} & \cdots & a_{mn} \\ - \end{matrix} - \right] = \left[ - \begin{matrix} - \bm{a}_1 & \bm{a}_2 & \cdots & \bm{a}_n - \end{matrix} - \right] -\end{equation} -可以通过添加标签在正文中引用公式,如带有中文括号的引用\ref{eq:matrix}。 +\begin{outline} +\index{zhaiyao@摘要盒子} + \item 这是一个摘要盒子。 + \item 它的标题是可选参数,默认标题是摘要。 +\end{outline} -\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}\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} +\section{定理} +\index{d@定理} +\begin{theorem}[(中文定理\footnote{选自鲁迅的祝福\ref{theorem:gauss formula}。})] +\label{theorem:gauss formula} +\index{d@定理!g@中文定理} +\zhlipsum*[31][name = zhufu] +\end{theorem} -\zhlipsum*[42][name = aspirin] -\begin{subnumcases}{y =} - 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$ - \\ - e^{\alpha x}\left(C_1\cos\beta x + C_2\sin\beta x\right) & \quad $p^2 - 4q < 0$ -\end{subnumcases} +\begin{definition}[(English definition)] +\index{d@定理!s@English definition} +\lipsum*[19] +\end{definition} -\zhlipsum*[57][name = aspirin] +\begin{lemma} +这是一个引理。 +\end{lemma} -\clearpage -\section{插图} -\index{c@插图} -当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\ref{fig:example}。 -\begin{figure}[htbp] - \centering - \subcaptionbox{并排子图1} - {\includegraphics[width = 0.4\textwidth]{example-image-4x3}} - \hspace{1.2em} - \subcaptionbox{并排子图2} - {\includegraphics[width = 0.4\textwidth]{example-image-4x3}} - \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} +\begin{corollary} +这是一个推论。 +\end{corollary} -\section{表格} -\index{b@表格} -合并表格列使用 \lstinline{\multicolumn} 命令,合并行可以使用 \lstinline{multirow} 宏包的 \lstinline{\multirow} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,文档类设置了\textsf{L、C和R}三个列对齐选项,一个例子如\ref{tab:example} 所示。 -\begin{table}[htbp] - \centering - \bicaption{使用 tabularx 创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab:example}\small - \begin{tabularx}{0.87\textwidth}{@{}llL@{}} - \toprule - Aliquam & Integer & Pellentesque tincidunt purus - vel magna. \\ - \midrule - viverra & \multirow[c]{3}*{metus} & Nulla malesuada porttitor diam. Vestibulum lectus. Proin mauris. Proin eu nunc eu urna hendrerit faucibus. \\ - semper & & Nullam elementum, urna vel imperdiet sodales, elit ipsum pharetra ligula, ac pretium ante justo a nulla. Curabitur tristique arcu eu metus. \\ - \multicolumn{2}{c}{\multirow{3}*[0ex]{convallis}} & Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. \\ - \bottomrule - \end{tabularx} -\end{table} +\begin{proposition} +这是一个性质。 +\end{proposition} \clearpage -\section{列表} -\index{l@列表} +\begin{example} +这是一个例。 +\end{example} + +\begin{remark} +这是一个注。 +\end{remark} + +\begin{proof} +这是一个证明,末尾自动添加证明结束符。 +\end{proof} + +\begin{easybox}[DarkCyan](An introduction to aspirin on Wikipedia) +\index{z@自定义盒子} + \zhlipsum*[59][name = aspirin] + \tcblower + \zhlipsum*[59][name = aspirin] +\end{easybox} -\subsection{排序列表} -\index{l@列表!p@排序列表} -\begin{enumerate} - \item \zhlipsum[41-42][name = aspirin] - \begin{enumerate} - \item \zhlipsum*[42][name = aspirin] - \begin{enumerate} - \item \zhlipsum*[42][name = aspirin] - \end{enumerate} - \end{enumerate} -\end{enumerate} +\begin{ebparbox}*[Teal](阿司匹林) + \zhlipsum*[59][name = aspirin] +\end{ebparbox} -\subsection{常规列表} -\index{l@列表!c@常规列表} -\begin{itemize} - \item \zhlipsum[41-42][name = aspirin] - \begin{itemize} - \item \zhlipsum*[42][name = aspirin] - \begin{itemize} - \item \zhlipsum*[42][name = aspirin] - \end{itemize} - \end{itemize} -\end{itemize} +\begin{ebparbox} + \zhlipsum*[59][name = aspirin] +\end{ebparbox} -\subsection{主题列表} -\index{l@列表!z@主题列表} -\begin{description} - \item[主题一] \zhlipsum*[42][name = aspirin] - \begin{description} - \item[主题二] \zhlipsum*[42][name = aspirin] - \end{description} -\end{description}
\ No newline at end of file +\begin{exercise}[LightYellow][1.](习题) +\index{x@习题环境} + \item \zhlipsum*[20][name = zhufu] + \begin{tasks} + \task \zhlipsum*[20][name = zhufu] + \end{tasks} +\end{exercise}
\ 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 d72ee6424a6..a6bb1afb5da 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter2.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter2.tex @@ -1,80 +1,111 @@ % Chapter 2 -\chapter{定理盒子} +\chapter{常用环境} -\begin{outline} -\index{zhaiyao@摘要盒子} - \item 这是一个摘要盒子。 - \item 它的标题是可选参数,默认标题是摘要。 -\end{outline} +\section{公式} +\index{g@公式} +\zhlipsum*[42][name = aspirin] +\begin{equation}\label{eq:matrix} + \bm{A} = \left[ + \begin{matrix} + a_{11} & a_{12} & \cdots & a_{1n} \\ + a_{21} & a_{22} & \cdots & a_{2n} \\ + \vdots & \vdots & \ddots & \vdots \\ + a_{m1} & a_{m2} & \cdots & a_{mn} \\ + \end{matrix} + \right] = \left[ + \begin{matrix} + \bm{a}_1 & \bm{a}_2 & \cdots & \bm{a}_n + \end{matrix} + \right] +\end{equation} +可以通过添加标签在正文中引用公式,如带有中文括号的引用\ref{eq:matrix}。 -\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 - \\ - & =\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)$处的法向量的方向余弦。引用这个公式如\ref{theorem:gauss formula}。 -\end{theorem} +\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}\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} -\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 +\zhlipsum*[42][name = aspirin] +\begin{subnumcases}{y =} + C_1e^{r_1x} + C_2e^{r_2x} & \quad $p^2 - 4q > 0$ \\ - + \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 -\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} - -\clearpage -\begin{lemma} -定理环境的边框和习题标题盒子可使用 \lstinline{thmbox = false} 关闭。 -\end{lemma} + \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$ +\end{subnumcases} -\begin{corollary} -这是一个推论。 -\end{corollary} +\zhlipsum*[57][name = aspirin] -\begin{proposition} -这是一个性质。 -\end{proposition} +\clearpage +\section{插图} +\index{c@插图} +当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\ref{fig:example}。 +\begin{figure}[htbp] + \centering + \subcaptionbox{并排子图1} + {\includegraphics[width = 0.4\textwidth]{example-image-4x3}} + \hspace{1.2em} + \subcaptionbox{并排子图2} + {\includegraphics[width = 0.4\textwidth]{example-image-4x3}} + \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} -\begin{example} -这是一个例。 -\end{example} +\section{表格} +\index{b@表格} +合并表格列使用 \lstinline{\multicolumn} 命令,合并行可以使用 \lstinline{multirow} 宏包的 \lstinline{\multirow} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,文档类设置了\textsf{L、C和R}三个列对齐选项,一个例子如\ref{tab:example} 所示。 +\begin{table}[htbp] + \centering + \bicaption{使用 tabularx 创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab:example}\small + \begin{tabularx}{0.87\textwidth}{@{}llL@{}} + \toprule + Aliquam & Integer & Pellentesque tincidunt purus + vel magna. \\ + \midrule + viverra & \multirow[c]{3}*{metus} & Nulla malesuada porttitor diam. Vestibulum lectus. Proin mauris. Proin eu nunc eu urna hendrerit faucibus. \\ + semper & & Nullam elementum, urna vel imperdiet sodales, elit ipsum pharetra ligula, ac pretium ante justo a nulla. Curabitur tristique arcu eu metus. \\ + \multicolumn{2}{c}{\multirow{3}*[0ex]{convallis}} & Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. \\ + \bottomrule + \end{tabularx} +\end{table} -\begin{remark} -这是一个注。 -\end{remark} +\clearpage +\section{列表} +\index{l@列表} -\begin{proof} -这是一个证明,末尾自动添加证明结束符。 -\end{proof} +\subsection{排序列表} +\index{l@列表!p@排序列表} +\begin{enumerate} + \item \zhlipsum[41-42][name = aspirin] + \begin{enumerate} + \item \zhlipsum*[42][name = aspirin] + \begin{enumerate} + \item \zhlipsum*[42][name = aspirin] + \end{enumerate} + \end{enumerate} +\end{enumerate} -\begin{easybox}*[MintCream](Aspirin) -\index{z@自定义盒子} - \zhlipsum*[3][name = aspirin] - \tcblower - \zhlipsum*[8][name = aspirin] -\end{easybox} +\subsection{常规列表} +\index{l@列表!c@常规列表} +\begin{itemize} + \item \zhlipsum[41-42][name = aspirin] + \begin{itemize} + \item \zhlipsum*[42][name = aspirin] + \begin{itemize} + \item \zhlipsum*[42][name = aspirin] + \end{itemize} + \end{itemize} +\end{itemize} -\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})} - \begin{tasks} - \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)$的极值点。 - \end{tasks} -\end{exercise}
\ No newline at end of file +\subsection{主题列表} +\index{l@列表!z@主题列表} +\begin{description} + \item[主题一] \zhlipsum*[42][name = aspirin] + \begin{description} + \item[主题二] \zhlipsum*[42][name = aspirin] + \end{description} +\end{description}
\ 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 252551e7dcf..d7630a59f41 100644 --- a/Master/texmf-dist/doc/latex/easybook/chapter3.tex +++ b/Master/texmf-dist/doc/latex/easybook/chapter3.tex @@ -9,13 +9,10 @@ \begin{lstlisting}[language = Python,caption = python 程序练习题] #!/usr/bin/python # -*- coding: UTF-8 -*- - -if __name__ == '__main__': - ptr = [] - for i in range(5): - num = int(raw_input('please input a number:\n')) - ptr.append(num) - print ptr + +i = ['a','b'] +l = [1,2] +print dict([i,l]) \end{lstlisting} \section{物理量} @@ -47,8 +44,4 @@ if __name__ == '__main__': \subsection{参考文献} \index{y@引用!c@参考文献} -这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。 - -\section{行内盒子} -\index{h@行内盒子} -阿司匹林及其复方制剂都能有效治疗某几种头痛,但对另外几 \concise[Aqua]{concise}[fontupper = \rmfamily] 种则效果不明。因其他疾病或创伤导致的 \fuzzy[DarkSeaGreen]{fuzzy}[fontupper = \ttfamily,colupper = black] 继发性头痛需要及时在医疗机构接受治疗。
\ No newline at end of file +这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
\ 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 9d626ff4522..4dd19a04ce0 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 8940bd758d5..a98428c2881 100644 --- a/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex +++ b/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex @@ -24,7 +24,7 @@ link = { hyperlink = various, - linkcolor = skyblue, + linkcolor = navyblue, linktoc = all }, spread = @@ -63,9 +63,9 @@ % headrule = {}, head-foot = { - \easyhead[EC]{\color{SeaGreen}\kaishu\leftmark} - \easyhead[OC]{\color{SeaGreen}\kaishu\rightmark} - \easyhead[EL,OR]{\color{SeaGreen}\thepage} + \easyhead[EC]{\color{DarkOrchid}\kaishu\leftmark} + \easyhead[OC]{\color{DarkOrchid}\kaishu\rightmark} + \easyhead[EL,OR]{\color{DarkOrchid}\thepage} } }, tocset = @@ -94,7 +94,7 @@ % tocdepth = 2 } -\usepackage{zhlipsum,bicaption,tasks,tcolorbox,imakeidx} +\usepackage{lipsum,zhlipsum,bicaption,tasks,tcolorbox,imakeidx} \begin{document} \title{\sffamily easybook 书籍文档类} @@ -104,7 +104,7 @@ \url{https://latexstudio.net} \\ \url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。} } -\date{2021/04/17\hskip\ccwd\relax v1.24m} +\date{2021/04/18\hskip\ccwd\relax v1.24n} \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 07582b235b8..e840fa99d30 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/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx index 09fa1194ae9..e031600dbba 100644 --- a/Master/texmf-dist/source/latex/easybook/easybook.dtx +++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx @@ -55,7 +55,7 @@ The latest version of this license is in % % \title{\sffamily easybook 书籍文档类} % \author{瞿毅} -% \date{2021/04/17\hskip\ccwd\relax v1.24m\thanks{\url{https://gitee.com/texl3/easybook}}} +% \date{2021/04/18\hskip\ccwd\relax v1.24n\thanks{\url{https://gitee.com/texl3/easybook}}} % \maketitle % \begin{abstract} % \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。 @@ -174,7 +174,7 @@ The latest version of this license is in % \end{syntax} % \opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。已经预置了中英文的目录标题,可以使用 \opt{title} 选项更改目录标题的名称。\opt{book} 选项使目录标题按照 \opt{chapter} 级别输出,\opt{article} 选项使目录标题按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。 % \changes{v1.23}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。} -% \changes{v1.24m}{2021/04/04}{目录命令的可选参数增加标题键值。} +% \changes{v1.24n}{2021/04/04}{目录命令的可选参数增加标题键值。} % \end{function} % % \section{接口选项} @@ -255,17 +255,17 @@ The latest version of this license is in % % \subsection{超链接} % \label{subsec:hyperlinks} -% \begin{function}[EXP,added = 2021-01-05,updated = 2021-04-11]{hyperlink,linkcolor,linkcol-all,linktoc} +% \begin{function}[EXP,added = 2021-01-05,updated = 2021-04-18]{hyperlink,linkcolor,linkcol-all,linktoc} % \begin{syntax} % hyperlink = <(edge)|various|none> -% linkcolor = <(fresh)|cutepink|skyblue|crimson> +% linkcolor = <fresh|cutepink|(navyblue)|crimson> % linkcol-all = <HTML颜色代码> % linktoc = <none|section|page|(all)> % \end{syntax} % \ding{229} 以上选项路径为 \opt{link/...} \\ % \opt{link} 将超链接选项(包括以上选项)交给 \pkg{hyperref} 处理,除了一些关于 pdf 书签的选项可能会失效,其它由键值选项命令 \tn{hypersetup} 支持的多数选项可用。 % \changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。} -% \changes{v1.24m}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} +% \changes{v1.24n}{2021/04/05}{增加 \pkg{hyperref} 超链接选项完整的支持。} % \end{function} % % \begin{optdesc} @@ -342,7 +342,7 @@ The latest version of this license is in % \ding{229} 以上选项路径为 \opt{bibset/...} % \changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。} % \changes{v1.23}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。} -% \changes{v1.24m}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。} +% \changes{v1.24n}{2021/04/09}{可以不载入参考文献包手动配置参考文献格式。} % \end{function} % % \begin{optdesc} @@ -490,7 +490,7 @@ The latest version of this license is in % \changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。} % \changes{v1.23}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 标志选项。} % \changes{v1.23}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。} -% \changes{v1.24m}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。} +% \changes{v1.24n}{2021/04/09}{增加 \opt{subsec-mark} 标志选项,仅在 \opt{article} 模式生效。} % \end{function} % % \begin{function}[added = 2021-01-13,updated = 2021-03-14]{\easyhead,\easyfoot} @@ -560,8 +560,8 @@ The latest version of this license is in % line-align = <(true)|false> % \end{syntax} % \opt{lolskip} 是代码目录中章之间的代码标题的距离,与\CTeX 的表格目录和图片目录中章之间的标题距离选项 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8 pc,在 \opt{article} 模式中此选项失效。目录标签整体使用 \opt{tocline} 设置,也可使用小节 \ref{subsec:page margins} 的 \opt{list-labelsep} 选项只设置编号与标题的间距。在图表标签的参数中,\#1与\#2分别代表编号和标题,代码标签的编号和标题则是 \tn{thelstlisting} 和 \tn{lstcaption},标签中还可包含标签名称,默认标签名称与图、表和代码环境的标题名称一致。下面举个设置标签的例子 -% \changes{v1.24m}{2021/04/05}{可以设置图、表和代码目录的标签。} -% \changes{v1.24m}{2021/04/06}{增加目录引导线右边对齐方式。} +% \changes{v1.24n}{2021/04/05}{可以设置图、表和代码目录的标签。} +% \changes{v1.24n}{2021/04/06}{增加目录引导线右边对齐方式。} % \end{function} % % \begin{ctexexam} @@ -594,7 +594,7 @@ The latest version of this license is in % \tn{end}\marg{环境名} % \end{syntax} % \pkg{enumitem} 宏包为系统预置的列表环境 \env{enumerate}、\env{itemize}和 \env{description} 提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已为三种列表预置了三个级别的格式可相互嵌套,默认标签与 \cls{book} 文档类相同,若自定义标签可例如 -% \changes{v1.24m}{2021/04/08}{重新优化列表环境的配置。} +% \changes{v1.24n}{2021/04/08}{重新优化列表环境的配置。} % \end{function} % % \begin{ctexexam} @@ -667,7 +667,7 @@ The latest version of this license is in % % \subsection{盒子} % \label{subsec:box} -% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包,它们的配置的选项同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。 +% 使用盒子以及小节 \ref{subsec:exercise} 中的 \env{exercise} 环境需要在导言区\textbf{手动载入} \pkg{tcolorbox} 宏包,它们的配置选项同样由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。 % % \subsubsection{摘要盒子} % \begin{function}[added = 2021-01-05,updated = 2021-03-19]{outline} @@ -687,13 +687,13 @@ The latest version of this license is in % \end{ctexexam} % % \subsubsection{段落盒子} -% \begin{function}[added = 2021-01-05,updated = 2021-03-19]{easybox} +% \begin{function}[added = 2021-01-05,updated = 2021-04-18]{easybox} % \begin{syntax} -% \tn{begin}\marg{easybox}\oarg{颜色名|(MintCream)}\parg{段落标题}\oarg{配置选项} +% \tn{begin}\marg{easybox}*\oarg{颜色名|(DarkCyan)}\parg{段落标题}\oarg{配置选项} % \ <盒子内容> % \tn{end}\marg{easybox} % \end{syntax} -% 环境 \opt{easybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。 +% 环境 \env{easybox} 创建一个带有三个可选参数的扁平盒子。使用带有星号的环境时给盒子添加边框,\oarg{颜色名} 选项设置背景颜色,\parg{段落标题} 选项可以设置标题,默认无标题。 % \end{function} % % \begin{ctexexam} @@ -704,6 +704,15 @@ The latest version of this license is in % \end{easybox} % \end{ctexexam} % +% \begin{function}[added = 2021-04-18]{ebparbox} +% \begin{syntax} +% \tn{begin}\marg{ebparbox}*\oarg{颜色名|(Purple)}\parg{段落标题}\oarg{配置选项} +% \ <盒子内容> +% \tn{end}\marg{ebparbox} +% \end{syntax} +% 环境 \env{ebparbox} 与 \env{easybox} 类似,同样带有三个可选参数。当使用带有星号的环境时盒子左边带有一条竖线,\oarg{颜色名} 选项可以自定义竖线颜色,使用不带有星号的环境则盒子带有竖线颜色的浅色背景。\parg{段落标题} 选项可以设置标题,默认无标题。 +% \end{function} +% % \subsubsection{行内盒子} % \begin{function}[added = 2021-03-13]{\concise,\fuzzy} % \begin{syntax} @@ -760,7 +769,7 @@ The latest version of this license is in % \tn{labelformat}\marg{计数器}\marg{标签引用格式} % \end{syntax} % 使用 \tn{ref} 命令进行引用将会自动检测环境并添加相应的前缀,\tn{labelformat} 可以设置标签引用格式,第二个参数中\#1代表 \tn{the}\meta{计数器},可以设置引用序号的前缀和后缀。 -% \changes{v1.24m}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。} +% \changes{v1.24n}{2021/04/11}{取消载入 \pkg{cleveref} 宏包来交叉引用。} % \end{function} % % \subsubsection{索引} @@ -870,7 +879,7 @@ The latest version of this license is in %<*class> \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplClass{easybook}{2021/04/17}{1.24m}{beta} +\ProvidesExplClass{easybook}{2021/04/18}{1.24n}{beta} \cs_generate_variant:Nn \__ctex_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -1342,8 +1351,8 @@ The latest version of this license is in \bool_if:NT \l__eb_draft_bool { \bool_if:NTF \l__eb_page_twoside_bool - {\easyfoot[C]{\color{gray!60}\sffamily\today}} - {\easyhead[C]{\color{gray!60}\sffamily\today}} + {\easyfoot[C]{\color{SlateGray}\sffamily\today}} + {\easyhead[C]{\color{SlateGray}\sffamily\today}} \geometry{showframe} } } @@ -1992,7 +2001,7 @@ The latest version of this license is in enhanced~jigsaw,pad~at~break* = 3pt, opacityback = 0, colframe = ctex@emph, - left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc, + left = 6pt,right = 6pt,top = 8pt,bottom = 8pt,middle= 8pt, arc = 0pt }, tc-outline/.style = @@ -2004,21 +2013,20 @@ The latest version of this license is in fonttitle = \large\sffamily,fontupper = \itshape, boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt}, attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2}, - arc = 3pt, + arc = 3pt,boxsep = 5pt, after~skip = 3ex, - left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc, - boxsep = 5pt + left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc }, tc-exercise/.style = { enhanced,on~line, - arc = 5pt, fontupper = \sffamily\Large, - boxrule = 1pt,boxsep = 0pt, + boxrule = 1pt,arc = 5pt, left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt, before~skip = 4ex,after~skip = 2.25ex }, breakable, + boxsep = 0pt, boxrule = \l__eb_rule_width_dim } \NewDocumentEnvironment{outline}{D(){\abstractname}o+b} @@ -2065,20 +2073,44 @@ The latest version of this license is in #6 \end{enumerate} }{} - \DeclareTColorBox{easybox}{sO{MintCream}d()O{}} + \DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}} { enhanced~jigsaw,pad~at~break* = 3pt, - IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph}, + IfBooleanTF = {#1} + {toptitle = 8pt,top = 8pt} + {frame~hidden,boxrule = 0pt,toptitle = 8pt,top = 0pt}, IfValueT = {#3}{title = #3}, - coltitle = black,colbacktitle = white, + colback = #2!8!white,colbacktitle = #2!8!white, + coltitle = black,colframe = black, fonttitle = \sffamily, - left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc, - arc = 0pt, - toptitle = 2pt,bottomtitle = 2pt, - beforeafter~skip=2ex, + left = 6pt,right = 6pt,bottom = 8pt,middle= 8pt, + bottomtitle = 8pt,arc = 0pt, + beforeafter~skip = 2ex, halign~upper = left,halign~lower = left, center~title,#4 } + \DeclareTColorBox{ebparbox}{sO{Purple}d()O{}} + { + frame~hidden, + enhanced~jigsaw,pad~at~break* = 3pt, + boxrule = 0pt, + borderline~west = {3pt}{0pt}{#2}, + IfBooleanTF = {#1} + { + colback = white, + IfValueT = {#3}{title = #3}, + top = 0pt,bottom = 0pt,toptitle = 0pt + }{ + colback = #2!8!white,colbacktitle = #2!8!white, + IfValueTF = {#3}{title = #3,top = 0pt}{top = 8pt}, + bottom = 8pt,toptitle = 8pt + }, + left = 8pt,right = 8pt,middle= 8pt, + bottomtitle = 8pt,arc = 0pt, + beforeafter~skip = 1.5ex, + colframe = #2,coltitle = #2, + fonttitle = \sffamily,#4 + } \DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}} { nobeforeafter,tcbox~raise~base, @@ -2249,6 +2281,7 @@ The latest version of this license is in } \__eb_patch_cmd:Nnn \@makefnmark {\normalfont}{\l__eb_font_footnote_tl} +\cs_gset:Npn \thempfootnote{\int_to_alph:n {\c@mpfootnote}} \lstdefinestyle{easy-lst-sty} { @@ -2285,7 +2318,7 @@ The latest version of this license is in framesep = 3pt, frame = single, rulecolor = \color{ctex@frame}, - commentstyle = \color{gray}, + commentstyle = \color{SlateGray}, emphstyle = \color{ctex@emph}, emph = {caption,multirow,subcaption,tabularx}, morekeywords = @@ -2376,12 +2409,12 @@ The latest version of this license is in { {fresh, 62d71f,0000B2,005752}, {cutepink, ff69b4,9d5196,57b5e5}, - {skyblue, 0000ff,004986,eb6877}, + {navyblue, 000080,004986,eb6877}, {crimson, dc143c,00c1c9,afcd20} } \__eb_linkcolor_set:n - linkcolor .default:n = fresh, - linkcolor .initial:n = fresh, + linkcolor .default:n = navyblue, + linkcolor .initial:n = navyblue, linkcol-all .code:n = \__eb_define_linkcolor:n {\exp_not:n {#1}}, linktoc .choice:, @@ -2406,7 +2439,7 @@ The latest version of this license is in \clist_map_function:nN { {none, 000000,000000,000000}, - {seaside, 4682B4,004986,2E8B57}, + {seaside, 4169e1,708090,9932cc}, {energy, f39800,00a0e9,893895}, {cyberpunk, 601986,eb6877,a4005b} } diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 2d61f167c12..c63f009edcb 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -13,7 +13,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplClass{easybook}{2021/04/17}{1.24m}{beta} +\ProvidesExplClass{easybook}{2021/04/18}{1.24n}{beta} \cs_generate_variant:Nn \__ctex_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -485,8 +485,8 @@ \bool_if:NT \l__eb_draft_bool { \bool_if:NTF \l__eb_page_twoside_bool - {\easyfoot[C]{\color{gray!60}\sffamily\today}} - {\easyhead[C]{\color{gray!60}\sffamily\today}} + {\easyfoot[C]{\color{SlateGray}\sffamily\today}} + {\easyhead[C]{\color{SlateGray}\sffamily\today}} \geometry{showframe} } } @@ -1135,7 +1135,7 @@ enhanced~jigsaw,pad~at~break* = 3pt, opacityback = 0, colframe = ctex@emph, - left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc, + left = 6pt,right = 6pt,top = 8pt,bottom = 8pt,middle= 8pt, arc = 0pt }, tc-outline/.style = @@ -1147,21 +1147,20 @@ fonttitle = \large\sffamily,fontupper = \itshape, boxed~title~style = {size = normal,opacityframe = 0,boxrule = 0pt}, attach~boxed~title~to~top~center = {yshift = -\tcboxedtitleheight/2}, - arc = 3pt, + arc = 3pt,boxsep = 5pt, after~skip = 3ex, - left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc, - boxsep = 5pt + left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc }, tc-exercise/.style = { enhanced,on~line, - arc = 5pt, fontupper = \sffamily\Large, - boxrule = 1pt,boxsep = 0pt, + boxrule = 1pt,arc = 5pt, left = 6pt,right = 6pt,top = 3.5pt,bottom = 3.5pt, before~skip = 4ex,after~skip = 2.25ex }, breakable, + boxsep = 0pt, boxrule = \l__eb_rule_width_dim } \NewDocumentEnvironment{outline}{D(){\abstractname}o+b} @@ -1208,20 +1207,44 @@ #6 \end{enumerate} }{} - \DeclareTColorBox{easybox}{sO{MintCream}d()O{}} + \DeclareTColorBox{easybox}{sO{DarkCyan}d()O{}} { enhanced~jigsaw,pad~at~break* = 3pt, - IfBooleanTF = {#1}{colback = #2}{opacityback = 0,colframe = ctex@emph}, + IfBooleanTF = {#1} + {toptitle = 8pt,top = 8pt} + {frame~hidden,boxrule = 0pt,toptitle = 8pt,top = 0pt}, IfValueT = {#3}{title = #3}, - coltitle = black,colbacktitle = white, + colback = #2!8!white,colbacktitle = #2!8!white, + coltitle = black,colframe = black, fonttitle = \sffamily, - left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc, - arc = 0pt, - toptitle = 2pt,bottomtitle = 2pt, - beforeafter~skip=2ex, + left = 6pt,right = 6pt,bottom = 8pt,middle= 8pt, + bottomtitle = 8pt,arc = 0pt, + beforeafter~skip = 2ex, halign~upper = left,halign~lower = left, center~title,#4 } + \DeclareTColorBox{ebparbox}{sO{Purple}d()O{}} + { + frame~hidden, + enhanced~jigsaw,pad~at~break* = 3pt, + boxrule = 0pt, + borderline~west = {3pt}{0pt}{#2}, + IfBooleanTF = {#1} + { + colback = white, + IfValueT = {#3}{title = #3}, + top = 0pt,bottom = 0pt,toptitle = 0pt + }{ + colback = #2!8!white,colbacktitle = #2!8!white, + IfValueTF = {#3}{title = #3,top = 0pt}{top = 8pt}, + bottom = 8pt,toptitle = 8pt + }, + left = 8pt,right = 8pt,middle= 8pt, + bottomtitle = 8pt,arc = 0pt, + beforeafter~skip = 1.5ex, + colframe = #2,coltitle = #2, + fonttitle = \sffamily,#4 + } \DeclareTotalTCBox{\fuzzy}{O{DarkSeaGreen}vO{}} { nobeforeafter,tcbox~raise~base, @@ -1392,6 +1415,7 @@ } \__eb_patch_cmd:Nnn \@makefnmark {\normalfont}{\l__eb_font_footnote_tl} +\cs_gset:Npn \thempfootnote{\int_to_alph:n {\c@mpfootnote}} \lstdefinestyle{easy-lst-sty} { @@ -1428,7 +1452,7 @@ framesep = 3pt, frame = single, rulecolor = \color{ctex@frame}, - commentstyle = \color{gray}, + commentstyle = \color{SlateGray}, emphstyle = \color{ctex@emph}, emph = {caption,multirow,subcaption,tabularx}, morekeywords = @@ -1519,12 +1543,12 @@ { {fresh, 62d71f,0000B2,005752}, {cutepink, ff69b4,9d5196,57b5e5}, - {skyblue, 0000ff,004986,eb6877}, + {navyblue, 000080,004986,eb6877}, {crimson, dc143c,00c1c9,afcd20} } \__eb_linkcolor_set:n - linkcolor .default:n = fresh, - linkcolor .initial:n = fresh, + linkcolor .default:n = navyblue, + linkcolor .initial:n = navyblue, linkcol-all .code:n = \__eb_define_linkcolor:n {\exp_not:n {#1}}, linktoc .choice:, @@ -1549,7 +1573,7 @@ \clist_map_function:nN { {none, 000000,000000,000000}, - {seaside, 4682B4,004986,2E8B57}, + {seaside, 4169e1,708090,9932cc}, {energy, f39800,00a0e9,893895}, {cyberpunk, 601986,eb6877,a4005b} } |