summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook/doc/easybook.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/easybook/doc/easybook.tex')
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex97
1 files changed, 69 insertions, 28 deletions
diff --git a/macros/latex/contrib/easybook/doc/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
index b8b375c333..7d5f6e30e2 100644
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ b/macros/latex/contrib/easybook/doc/easybook.tex
@@ -2,7 +2,7 @@
\title{\sffamily easybook书籍文档类}
\author{瞿毅}
-\date{2021/03/14\hskip\ccwd\relax v1.23q\thanks{\url{https://gitee.com/texl3/easybook}}}
+\date{2021/03/15\hskip\ccwd\relax v1.23r\thanks{\url{https://gitee.com/texl3/easybook}}}
\begin{document}
\maketitle
@@ -92,13 +92,27 @@
\end{function}
\subsection{文档命令}
-\begin{function}[added = 2021-02-20]{\frontmatter,\mainmatter,\backmatter,\listoffigures,\listoftables,\listoflistings}
+\label{document command}
+\begin{function}[added = 2021-02-20,updated = 2021-03-15]{\frontmatter,\mainmatter,\backmatter,\tableofcontents,\listoffigures,\listoftables,\listoflistings}
\begin{syntax}
- \tn{frontmatter}\oarg{编号格式|(Roman)}
- \tn{printindex}\oarg{索引名}
+ \tn{frontmatter*}\oarg{编号格式|(Roman)}
+ \tn{mainmatter*}
+ \tn{backmatter}
+ \tn{tableofcontents*}\oarg{键值列表}
+ \tn{listoffigures*}\oarg{键值列表}
+ \tn{listoftables*}\oarg{键值列表}
+ \tn{listoflistings*}\oarg{键值列表}
\end{syntax}
-\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} 命令输出代码目录。
-\changes{v1.23q}{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} 命令输出代码目录。带有星号的目录命令不会添加进主文档目录中,目录的键值列表选项如下
+\changes{v1.23r}{2021/02/20}{重新定义文档结构划分命令。}
+\end{function}
+
+\begin{function}{multoc,book,article}
+\begin{syntax}
+ multoc = <true|(false)>
+\end{syntax}
+\opt{multoc} 与 \opt{style/multoc} 选项具有相同的效果,但是具有优先性且可单独设置不同目录是否双栏排版。\opt{book} 选项使目录按照 \opt{chapter} 级别输出,\opt{article} 选项使目录按照 \opt{article} 级别输出,默认为 \opt{chapter} 级别。
+\changes{v1.23r}{2021/03/15}{为几个目录增加键值列表的选项,可设置输出级别以及是否加入主目录。}
\end{function}
\section{接口选项}
@@ -118,10 +132,10 @@
\end{function}
\subsection{风格}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-27]{style/color,style/capdash,style/multoc,style/withpart,style/perpart,style/perpage,style/notomath,style/rulewidth,style/uppercase}
+\begin{function}[EXP,added = 2021-01-05,updated = 2021-03-15]{style/...,color,multoc,withpart,perpart,perpage,notomath,rulewidth,uppercase,figure-sep,table-sep,listing-sep,equation-sep,number-sep}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{style/...}
color = <(none)|seaside|energy|cyberpunk>
- capdash = <true|(false)>
multoc = <true|(false)>
withpart = <true|(false)>
perpart = <true|(false)>
@@ -129,11 +143,16 @@
notomath = <(true)|false>
rulewidth = <(0.75pt)>
uppercase = <(true)|false>
+ figure-sep = <(.)>
+ table-sep = <(.)>
+ listing-sep = <(.)>
+ equation-sep = <(.)>
+ number-sep = <(.)>
\end{syntax}
-\opt{style} 选项控制文章的风格。
\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-\changes{v1.23q}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-\changes{v1.23q}{2021/02/09}{增加控制页面横线粗细的选项。}
+\changes{v1.23r}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+\changes{v1.23r}{2021/02/09}{增加控制页面横线粗细的选项。}
+\changes{v1.23r}{2021/03/15}{增加控制编号连接符的选项。}
\end{function}
\begin{optdesc}
@@ -145,7 +164,6 @@
主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{hyperlinks}。
\changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
\end{function}
- \item[capdash] 将图表代码标题风格由例如\textbf{图1.1}变为\textbf{图1\textendash 1}的形式。
\item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
\item[withpart] 使章跟随每一部分编号,默认不跟随。
\item[perpart] 使脚注跟随每一部分编号,默认不跟随。
@@ -153,12 +171,18 @@
\item[notomath] 使用 \opt{noto} 风格的数学字体,将会加载 \pkg{newtxmath} 宏包。
\item[rulewidth] 调整页眉、定理盒子以及代码框线条的粗细。
\item[uppercase] 使用 \tn{rightmark} 及 \tn{leftmark} 获取标题内容设置页眉页脚时英文是否大小写。
+ \item[figure-sep] 图片标题编号的连接符。
+ \item[table-sep] 表格标题编号的连接符。
+ \item[listing-sep] 代码标题编号的连接符。
+ \item[equation-sep] 公式编号的连接符。
+ \item[number-sep] 统一设置所有编号的连接符。
\end{optdesc}
\subsection{超链接}
\label{hyperlinks}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/hyperlink,link/linkcolor,link/linktopage}
+\begin{function}[EXP,added = 2021-01-05,updated = 2021-01-08]{link/...,hyperlink,linkcolor,linktopage}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{link/...}
hyperlink = <(edge)|various|none>
linkcolor = <(fresh)|cutepink|skyblue|crimson>
linktopage = <true|(false)>
@@ -180,17 +204,18 @@
\end{optdesc}
\subsection{行距}
-\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{spread/line,spread/table,spread/math,spread/caption,spread/footnote}
+\begin{function}[EXP,added = 2021-01-05,updated = 2021-02-13]{spread/...,line,table,math,caption,footnote}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{link/...}
line = <(1.3)>
table = <(1.05)>
math = <(1.05)>
caption = <(1)>
footnote = <(1)>
\end{syntax}
-行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项\opt{linespread}失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
+行距因子用于设置各种行距倍数,只能是浮点数,不能带有长度单位。\tn{ctexset} 原有的行距选项 \opt{linespread} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-\changes{v1.23q}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+\changes{v1.23r}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
\end{function}
\begin{optdesc}
@@ -202,8 +227,9 @@
\end{optdesc}
\subsection{其它字体}
-\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{elfont/table-cap,elfont/figure-cap,elfont/listing-cap,elfont/footnote,elfont/marginpart}
+\begin{function}[EXP,added = 2021-01-08,updated = 2021-02-13]{elsefont/...,table-cap,figure-cap,listing-cap,footnote,marginpart}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{elsefont/...}
table-cap = <\tn{sffamily}\tn{small}>
figure-cap = <\tn{sffamily}\tn{small}>
listing-cap = <\tn{sffamily}\tn{small}>
@@ -211,7 +237,7 @@
marginpart = <\tn{rmfamily}\tn{footnotesize}>
\end{syntax}
\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-\changes{v1.23q}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+\changes{v1.23r}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
\end{function}
\begin{optdesc}
@@ -223,8 +249,9 @@
\end{optdesc}
\subsection{参考文献}
-\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-08]{bibset/backend,bibset/bib-style,bibset/cite-style,bibset/bibfile,\printbibliography}
+\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{bibset/...,backend,bib-style,cite-style,bibfile,\printbibliography}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{bibset/...}
backend = <(bibtex)|biblatex>
bib-style = <(numerical)|authoryear|其它格式>
cite-style = <标注风格>
@@ -232,7 +259,7 @@
\tn{printbibliography}\oarg{键值列表}
\end{syntax}
\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-\changes{v1.23q}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+\changes{v1.23r}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
\end{function}
\begin{optdesc}
@@ -240,12 +267,20 @@
\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{refs.bib} 命名的文件。
- \item[\tn{printbibliography}] 两种方式\textbf{均使用}此命令打印参考文献,其中可选项仅在 \hologo{biber} 处理时有效。
+ \item[\tn{printbibliography}] 两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
+ \begin{function}{heading,title}
+ \begin{syntax}
+ heading = <bibliography|subbibliography|(bibintoc)|subbibintoc>
+ title = <参考文献标题名>
+ \end{syntax}
+ \opt{heading} 为参考文献标题的处理方式,\opt{bibliography} 选项以 \opt{chapter} 级别输出参考文献,不加进目录,\opt{subbibliography} 选项以 \opt{section} 级别输出参考文献,不加进目录,\opt{bibintoc} 选项以 \opt{chapter} 级别输出参考文献,加进目录,\opt{subbibintoc} 选项以 \opt{section} 级别输出参考文献,加进目录。\opt{title} 选项覆盖由 \opt{heading} 选项提供的缺省标题名。除此之外其他支持选项可见 \pkg{biblatex} 宏包说明文档。
+ \end{function}
\end{optdesc}
\subsection{定理样式}
-\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/thmbox,thmset/numberwith,thmset/headpunct,thmset/bodyfont,thmset/notefont,thmset/headfont,thmset/headindent,thmset/spaceabove,thmset/spacebelow,thmset/spacepost,\newtheorem, \declaretheoremstyle}
+\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/...,thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost,\newtheorem, \declaretheoremstyle}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{thmset/...}
thmbox = <true|(false)>
numberwith = <(chapter)|section|其它环境|空置>
headpunct = <(未设置)>
@@ -260,7 +295,7 @@
\tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
\end{syntax}
\changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-\changes{v1.23q}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+\changes{v1.23r}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
\end{function}
\begin{optdesc}
@@ -299,8 +334,9 @@
\end{ctexexam}
\subsection{页面边距}
-\begin{function}[EXP,added = 2021-01-13]{geoset/left,geoset/top,geoset/hmargin,geoset/textwidth,geoset/includehead,...}
+\begin{function}[EXP,added = 2021-01-13]{geoset/...,left,top,hmargin,textwidth,includehead,...}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{geoset/...}
left = <长度>
top = <长度>
hmargin = \marg{左边距,右边距}
@@ -324,8 +360,9 @@
\end{function}
\subsection{页眉页脚}
-\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/head-foot,hdrset/chap-mark,hdrset/sec-mark,hdrset/headrule,hdrset/footrule,hdrset/footnoterule,\easyhead,\easyfoot,...}
+\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/...,head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule,\easyhead,\easyfoot,...}
\begin{syntax}
+ 以下选项路径为 \tn{ctexset}\marg{hdrset/...}
head-foot = <页眉页脚中的内容>
chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
@@ -356,8 +393,8 @@
\end{ctexexam}
\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-\changes{v1.23q}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-\changes{v1.23q}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+\changes{v1.23r}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+\changes{v1.23r}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
\end{function}
\subsection{目录样式}
@@ -471,7 +508,7 @@
\item 习题内容
\end{exercise}
\end{ctexexam}
-\changes{v1.23q}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+\changes{v1.23r}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
\end{function}
\subsection{盒子}
@@ -521,6 +558,10 @@
\section{其它用法}
+\subsection{article 风格}
+当最高级别的标题命令使用 \tn{section} 而不使用 \tn{chapter} 时,会自动转变为 \opt{article} 风格,与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,此时输出目录时需要配合 \opt{article} 选项使目录以 \opt{section} 级别输出,详情见小节 \ref{document command}。
+\changes{v1.23r}{2021/03/15}{增加 article 文章风格,可用于短篇幅的文章。}
+
\subsection{代码}
\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
\begin{syntax}