summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/doc
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/easybook/doc')
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin0 -> 310688 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex74
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin173570 -> 236973 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/pages/appendix.tex11
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter1.tex103
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter2.tex77
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter3.tex54
-rw-r--r--macros/latex/contrib/easybook/doc/pages/preface.tex22
-rw-r--r--macros/latex/contrib/easybook/doc/ref/refs.bib31
9 files changed, 372 insertions, 0 deletions
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
new file mode 100644
index 0000000000..a5e66104c1
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
new file mode 100644
index 0000000000..9f9531bd4f
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -0,0 +1,74 @@
+\documentclass[zihao = -4,openany]{easybook}
+\ctexset
+ {
+ style =
+ {
+ color = forest,
+ % cite = authoryear,
+ thmbox = true,
+ % capdash = true,
+ % multoc = true,
+ % withpart = true,
+ % perpart = true,
+ perpage = true
+ },
+ link =
+ {
+ hyperlink = various,
+ linkcolor = skyblue,
+ linktopage = false
+ },
+ spread =
+ {
+ linespread = 1.355,
+ tabspread = 1.05,
+ mathspread = 1,
+ capspread = 1,
+ fnspread = 1
+ },
+ elfont =
+ {
+ tabfont = \sffamily\small,
+ figfont = \sffamily\small,
+ lstfont = \sffamily\small,
+ fnfont = \rmfamily,
+ marfont = \sffamily\footnotesize
+ },
+ % secnumdepth = 2,
+ % tocdepth = 2
+ }
+
+\AfterPreamble
+ {
+ \title{\sffamily easybook书籍文档类}
+ \author
+ {
+ 瞿毅\thanks{texeasybook@foxmail.com.} \\
+ \textcolor[HTML]{c71d23}{\faGit}~\url{https://gitee.com/TeX-doc/easybook}\thanks{Gitee为项目的主要发布地址。} \\
+ \faGithub~\url{https://github.com/TeX-doc/easybook} \\
+ \textcolor[HTML]{00c2ff}{\faEdge}~\url{https://latexstudio.net} \\
+ \url{https://ctan.org/pkg/easybook}
+ }
+ \date{2021/01/08\hskip\ccwd\relax v1.1}
+ }
+
+\begin{document}
+\frontmatter
+\maketitle
+\subfile{pages/preface}
+\tableofcontents
+
+\mainmatter
+\part{使用示例}
+\subfile{pages/chapter1}
+\subfile{pages/chapter2}
+\subfile{pages/chapter3}
+\subfile{pages/appendix}
+
+\backmatter
+\bibliography{ref/refs}
+\listoffigures
+\listoftables
+\listoflistings
+\printindex
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 19b4476b98..43a82ee62d 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/doc/pages/appendix.tex b/macros/latex/contrib/easybook/doc/pages/appendix.tex
new file mode 100644
index 0000000000..f5981487b1
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/pages/appendix.tex
@@ -0,0 +1,11 @@
+% 附录
+\documentclass[../easybook-demo]{subfiles}
+\begin{document}
+
+\appendix
+\chapter{维基百科}
+
+\section{阿司匹林}
+\zhlipsum[50-52][name = aspirin]
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter1.tex b/macros/latex/contrib/easybook/doc/pages/chapter1.tex
new file mode 100644
index 0000000000..ffb86ee290
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/pages/chapter1.tex
@@ -0,0 +1,103 @@
+% Chapter 1
+\documentclass[../easybook-demo]{subfiles}
+\begin{document}
+
+\chapter{常用环境}
+
+\section{公式}\index{g@公式}
+\zhlipsum*[42][name = aspirin]
+\begin{equation}\label{eq1}
+ \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}
+可以通过添加标签在正文中引用公式,如带有中文括号的引用\cref{eq1}。
+
+\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}
+
+\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}
+
+\zhlipsum*[57][name = aspirin]
+
+\clearpage
+\section{插图}\index{c@插图}
+当我们需要排列一组子图共享标题的图片时,可以使用依赖于 \lstinline{caption} 宏包的 \lstinline{subcaption} 宏包的功能,效果见\cref{fig1}。
+\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{fig1}
+\end{figure}
+
+\section{表格}\index{b@表格}
+合并表格列使用 \lstinline{\multicolumn} 命令,合并行使用 \lstinline{\multirowcell} 命令。当插入的表格内容过长以至于一行放不下的情况可以使用 \lstinline{tabularx} 环境,设置了\textsf{L、C和R}三个列对齐选项,一个例子如\cref{tab1} 所示。
+\begin{table}[htbp]
+ \centering
+ \bicaption{使用tabularx创建内容过长表格}{Use tabularx to create a table with too long content}\label{tab1}\small
+ \begin{tabularx}{0.87\textwidth}{@{}llL@{}}
+ \toprule
+ Aliquam & Integer & Pellentesque tincidunt purus
+ vel magna. \\
+ \midrule
+ viverra & \multirowcell{3}[0ex][l]{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}{\multirowcell{3}{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}
+
+\clearpage
+\section{列表}\index{l@列表}
+\zhlipsum*[10][name = aspirin]
+
+\subsection{排序列表}\label{subsec1}\index{l@列表!p@排序列表}
+\begin{enumerate}
+ \item \zhlipsum*[41][name = aspirin]
+ \begin{enumerate}
+ \item \zhlipsum*[42][name = aspirin]
+ \end{enumerate}
+ \item \zhlipsum*[41][name = aspirin]
+\end{enumerate}
+
+\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]
+\end{itemize}
+
+\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
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter2.tex b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
new file mode 100644
index 0000000000..b8ab64147d
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
@@ -0,0 +1,77 @@
+% Chapter 2
+\documentclass[../easybook-demo]{subfiles}
+\begin{document}
+
+\chapter{定理盒子}
+
+\begin{outline}\index{zhaiyao@摘要盒子}
+ \item 这是一个摘要盒子。
+ \item 它的标题是可选参数,默认标题是摘要。
+\end{outline}
+
+\section{定理}\index{d@定理}
+\begin{theorem}[(高斯公式\footnote{选自高等数学公式。})]\label{theo1}\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)$处的法向量的方向余弦。引用这个公式如\cref{theo1}。
+\end{theorem}
+
+\begin{definition}[(Stokes formula)]\label{defi1}\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
+ \\
+ = \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}
+
+\begin{corollary}
+这是一个推论。
+\end{corollary}
+
+\begin{proposition}
+这是一个性质。
+\end{proposition}
+
+\begin{example}
+这是一个例。
+\end{example}
+
+\begin{remark}
+这是一个注。
+\end{remark}
+
+\begin{proof}
+这是一个证明,末尾自动添加证明结束符。
+\end{proof}
+
+\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@习题环境}
+ \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}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter3.tex b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
new file mode 100644
index 0000000000..6ca662ca0d
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
@@ -0,0 +1,54 @@
+% Chapter 3
+\documentclass[../easybook-demo]{subfiles}
+\begin{document}
+
+\chapter{其它格式}\label{chap1}
+
+\section{代码}\index{d@代码}
+\zhlipsum[42][name = aspirin]
+\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
+\end{lstlisting}
+
+\section{物理量}\index{w@物理量}
+阿司匹林还有三种作用方式 \num{-21x.3e5}。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子 \SI{.5}{mol}。
+
+\section{化学式}\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)=)}\]
+
+\clearpage
+\section{引用}\index{y@引用}
+\zhlipsum[8][name = aspirin]
+\subsection{索引}\index{y@引用!s@索引}
+\zhlipsum[8][name = aspirin]
+
+\subsection{脚注}\index{y@引用!j@脚注}
+六年之后的1859年,冯·基尔姆让水杨酸和乙酰氯反应,制得了分析纯的乙酰水杨酸,他称之为“乙酰化水杨酸”(acetylierte*Salicyls+"aure)\footnote{这是一个悬挂缩进的脚注。\par 这是分段将会缩进两字符。}。
+
+60和70年代,约翰·范恩等人发现了阿司匹林的作用机理,60至80年代的其他研究和临床试验证明该药有抗凝血的药效,可降低血栓疾病的发病率\Footnote{*}{这是可以自定义标记的脚注。}。
+
+\subsection{边注}\index{y@引用!b@边注}
+对乙酰氨基酚和布洛芬\marginnote{这是一个边注。}于1956年和1959年相继问世以后,阿司匹林的使用率开始下降。
+
+\subsection{引用章节}\label{sec1}\index{y@引用!s@索引}
+兽医有时用阿司匹林来镇痛或抗血栓,主要给狗用\cref{chap1},有时给马用\cref{sec1},不过现在一般会用副作用较少的新疗法。
+
+\subsection{参考文献}\index{y@引用!c@参考文献}
+这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
+
+\section{行内盒子}\index{h@行内盒子}
+对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[yellow][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/pages/preface.tex b/macros/latex/contrib/easybook/doc/pages/preface.tex
new file mode 100644
index 0000000000..de5c7d8a0c
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/pages/preface.tex
@@ -0,0 +1,22 @@
+% Preface
+\documentclass[../easybook-demo]{subfiles}
+\begin{document}
+
+\chapter*{前言}
+
+\lstinline{easybook} 使用\LaTeX 3语法将选项扩展入\CTeX 宏集接口命令 \lstinline{\ctexset} 的列表。如果无法编译以及选项说明细节参见~\href{../easybook.pdf}{easybook用户手册}。
+
+\begin{enumerate}[label = \color{DarkBlue}\protect\circled{\arabic*}]
+\item 修复了 \lstinline{linktopage} 选项关闭时目录中标题编号无超链接的问题。
+\item 增加 \lstinline{elfont} 选项可以自定义图表、代码、脚注和边注的字体。
+\item 增加 \lstinline{config} 选项可以载入用户配置文件。
+\item 优化页眉页脚,单面或双面排版适配了不同风格。
+\item 更改草稿选项,与标准文类行为一致并显示页面边框。
+\item 使用功能更丰富的 \lstinline{thmtools} 设置定理环境。
+\item 可自定义正文、表格、公式环境、图表标题以及脚注的行距。
+\item 图表可以使用双语标题,增加代码索引和索引目录,脚注标记可以设置为自定义的符号。
+\end{enumerate}
+
+\vfill{\small\doclicenseThis}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/ref/refs.bib b/macros/latex/contrib/easybook/doc/ref/refs.bib
new file mode 100644
index 0000000000..187a693805
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/ref/refs.bib
@@ -0,0 +1,31 @@
+% Encoding: UTF-8
+
+@article{1979Prospect,
+ title={Prospect Theory: An Analysis of Decision under Risk},
+ author={ Tversky, Kahneman Amos },
+ journal={Econometrica},
+ volume={47},
+ number={2},
+ pages={263-291},
+ year={1979},
+}
+
+@article{2010An,
+ title={An Introduction to Sociolinguistics},
+ author={ Grabe, William and Wardhaugh, Ronald },
+ journal={Language in Society},
+ volume={36},
+ number={2},
+ pages={605-605},
+ year={2010},
+}
+
+@article{1989The,
+ title={The structural transformation of the public sphere: an inquiry into a cstergory of burgeois society},
+ author={ Scaff, Lawrence A. and Habermas, Jurgen and Burger, Thomas and Nicholson, Shierry Weber },
+ journal={American Political Science Review},
+ volume={84},
+ number={3},
+ pages={967},
+ year={1989},
+} \ No newline at end of file