summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-03-18 03:01:43 +0000
committerNorbert Preining <norbert@preining.info>2021-03-18 03:01:43 +0000
commitca17f652236af2ce3a16cb0125fb6e190d59cc17 (patch)
tree1664d8d4a3ba38eacabed5fe0e3d4ff7f2dd966c /macros/latex
parentbb51b61cfc3fcb367f52d31948039a1468fbcf80 (diff)
CTAN sync 202103180301
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin287470 -> 287472 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex2
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin254673 -> 254660 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.tex698
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx (renamed from macros/latex/contrib/easybook/easybook.cls)782
-rw-r--r--macros/latex/contrib/intopdf/intopdf.dtx60
-rw-r--r--macros/latex/contrib/intopdf/intopdf.pdfbin396617 -> 378812 bytes
-rw-r--r--macros/latex/contrib/langsci-affiliations/README.md32
-rw-r--r--macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx493
-rw-r--r--macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdfbin64385 -> 0 bytes
-rw-r--r--macros/latex/contrib/mindflow/README.md11
-rw-r--r--macros/latex/contrib/mindflow/mindflow.dtx153
-rw-r--r--macros/latex/contrib/mindflow/mindflow.pdfbin168685 -> 198276 bytes
13 files changed, 912 insertions, 1319 deletions
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
index b4c9858e55..8354c965ff 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.pdf
+++ 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
index a8a4d2e0e9..234e9dd482 100644
--- a/macros/latex/contrib/easybook/doc/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -98,7 +98,7 @@
\url{https://latexstudio.net} \\
\url{https://gitee.com/texl3/easybook}\thanks{Gitee为项目的主要发布地址。}
}
-\date{2021/03/16\hskip\ccwd\relax v1.23s}
+\date{2021/03/17\hskip\ccwd\relax v1.23t}
\frontmatter[roman]
\maketitle
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 7ff104be61..ae23b7ad64 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/easybook.tex b/macros/latex/contrib/easybook/doc/easybook.tex
deleted file mode 100644
index bd6c66ebc8..0000000000
--- a/macros/latex/contrib/easybook/doc/easybook.tex
+++ /dev/null
@@ -1,698 +0,0 @@
-\documentclass{ctxdoc}
-
-\title{\sffamily easybook书籍文档类}
-\author{瞿毅}
-\date{2021/03/16\hskip\ccwd\relax v1.23s\thanks{\url{https://gitee.com/texl3/easybook}}}
-
-\begin{document}
-\maketitle
-\changes{v1.20}{2021/01/09}{修改和完善用户文档。}
-\changes{v1.20}{2021/01/09}{模板更改为使用CC-BY许可协议。}
-\begin{abstract}
- \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
-\end{abstract}
-\tableofcontents
-
-\section{编译方式}
-模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
-\begin{itemize}
- \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
- \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
- \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
-\end{itemize}
-
-\subsection{编译步骤}
-\begin{frameverb}
- xelatex -shell-escape easybook-demo
- bibtex easybook-demo
- makeindex easybook-demo
- xelatex -shell-escape easybook-demo
- xelatex -shell-escape easybook-demo
-\end{frameverb}
-
-需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
-\begin{frameverb}
- LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
-\end{frameverb}
-
-\subsection{字体设置}
-\label{subsec:font settings}
-默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
-
-如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
-\begin{ctexexam}
- \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
- \setCJKsansfont{SimHei}
- \setCJKmonofont{FangSong}
-\end{ctexexam}
-
-\section{文档类选项}
-\label{sec:document class options}
-标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
-\begin{itemize}
- \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
- \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
-\end{itemize}
-
-\begin{function}[rEXP,added = 2021-01-05]{draft}
-开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05]{newline}
-章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
-\begin{flushleft}\sffamily\LARGE
- Chapter 1\vskip 1.3pc
- This is a title
-\end{flushleft}
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05]{entitle}
-部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
-\end{function}
-\begin{function}[rEXP,added = 2021-01-05]{english}
-使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
-\end{function}
-\begin{function}[rEXP,added = 2021-01-05]{enstyle}
-同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
-\begin{syntax}
- font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
-\end{syntax}
-传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
-\changes{v1.21}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
-\end{function}
-
-\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
-\begin{syntax}
- paper = <(a4paper)|b5paper|letterpaper|...>
-\end{syntax}
-设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
-\end{function}
-
-\subsection{article 风格}
-\begin{function}[rEXP,added = 2021-03-16]{class}
-\begin{syntax}
- class = <(book)|article>
-\end{syntax}
-设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
-\changes{v1.23s}{2021/03/16}{增加 article 文章风格,可用于短篇幅的文章。}
-\end{function}
-
-\subsection{文档命令}
-\label{subsec: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{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.23s}{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.23s}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
-\end{function}
-
-\section{接口选项}
-\begin{function}[added = 2021-01-05]{\ctexset}
-\begin{syntax}
- \tn{ctexset}\marg{键值列表}
-\end{syntax}
-\cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
-\end{function}
-
-\begin{function}[EXP,added = 2021-01-08]{config}
-\begin{syntax}
- config = <配置文件名>
-\end{syntax}
-\opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
-\changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
-\end{function}
-
-\subsection{风格}
-\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>
- multoc = <true|(false)>
- withpart = <true|(false)>
- perpart = <true|(false)>
- perpage = <true|(false)>
- notomath = <(true)|false>
- rulewidth = <(0.75pt)>
- uppercase = <(true)|false>
- figure-sep = <(.)>
- table-sep = <(.)>
- listing-sep = <(.)>
- equation-sep = <(.)>
- number-sep = <(.)>
-\end{syntax}
-\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
-\changes{v1.23s}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
-\changes{v1.23s}{2021/02/09}{增加控制页面横线粗细的选项。}
-\changes{v1.23s}{2021/03/15}{增加控制编号连接符的选项。}
-\end{function}
-
-\begin{optdesc}
- \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
- \begin{function}{ctex@frame,ctex@emph,ctex@verb}
- \begin{syntax}
- \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
- \end{syntax}
- 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
- \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
- \end{function}
- \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
- \item[withpart] 使章跟随每一部分编号,默认不跟随。
- \item[perpart] 使脚注跟随每一部分编号,默认不跟随。
- \item[perpage] 使脚注跟随每一页编号,默认不跟随。
- \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{subsec:hyperlinks}
-\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)>
-\end{syntax}
-\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
-\end{function}
-
-\begin{optdesc}
- \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
- \item[linkcolor] 超链接颜色样式。
- \begin{function}{ctex@link,ctex@url,ctex@cite}
- \begin{syntax}
- \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
- \end{syntax}
- 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
- \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
- \end{function}
- \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
-\end{optdesc}
-
-\subsection{行距}
-\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} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
-\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
-\changes{v1.23s}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
-\end{function}
-
-\begin{optdesc}
- \item[line] 正文行距。
- \item[table] 表格行距。
- \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
- \item[caption] 图表代码标题行距。
- \item[footnote] 脚注行距。
-\end{optdesc}
-
-\subsection{其它字体}
-\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}>
- footnote = <\tn{rmfamily}>
- marginpart = <\tn{rmfamily}\tn{footnotesize}>
-\end{syntax}
-\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
-\changes{v1.23s}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
-\end{function}
-
-\begin{optdesc}
- \item[table-cap] 表格标题的字体设置。
- \item[figure-cap] 图片标题的字体设置。
- \item[listing-cap] 代码标题的字体设置。
- \item[footnote] 脚注的字体设置,请不要使用字号命令。
- \item[marginpar] 边注的字体设置。
-\end{optdesc}
-
-\subsection{参考文献}
-\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{bibset/...,backend,bib-style,cite-style,bibfile}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{bibset/...}
- backend = <(bibtex)|biblatex>
- bib-style = <(numerical)|authoryear|其它格式>
- cite-style = <标注风格>
- bibfile = <refs.bib>
-\end{syntax}
-\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
-\changes{v1.23s}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
-\end{function}
-
-\begin{optdesc}
- \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
- \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} 命名的文件。
-\end{optdesc}
-
-\begin{function}[added = 2021-01-11,updated = 2021-03-15]{\printbibliography}
-\begin{syntax}
- \tn{printbibliography}\oarg{键值列表}
-\end{syntax}
-两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
-\end{function}
-
-\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}
-
-\subsection{定理样式}
-\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/...,thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{thmset/...}
- thmbox = <true|(false)>
- numberwith = <(chapter)|section|其它环境|空置>
- headpunct = <(未设置)>
- bodyfont = <(未设置)>
- notefont = <(未设置)>
- headfont = <(\tn{color}\marg{ctex@emph}\tn{sffamily})>
- headindent = <(0\tn{ccwd})>
- spaceabove = <(0.75ex plus .1ex)>
- spacebelow = <(0.75ex plus .1ex)>
- spacepost = <(\tn{ccwd})>
-\end{syntax}
-\changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-\end{function}
-
-\begin{optdesc}
- \item[thmbox] 开启定理及习题环境的盒子边框。
- \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
- \item[headpunct] 定理标题后的标记。
- \item[bodyfont] 定理内容部分的字体。
- \item[notefont] 定理标题内容的字体。
- \item[headfont] 定理类型标题名的字体。
- \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
- \item[spaceabove] 定理环境前的间距。
- \item[spacebelow] 定理环境后的间距。
- \item[spacepost] 定理标题后与内容的间距。
-\end{optdesc}
-
-\begin{function}[added = 2021-01-12,updated = 2021-03-13]{\newtheorem, \declaretheoremstyle}
-\begin{syntax}
- \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
- \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
-\end{syntax}
-\changes{v1.23s}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
-\end{function}
-
-\begin{optdesc}
- \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令 \tn{declaretheorem} 的参数一致。常用的选项如下
- \begin{description}
- \item[name] 定理的标题。默认值是环境的名称,并且首字母大写(英文标题)。
- \item[numbered] 值为 \opt{no}、\opt{yes} 或 \opt{unless unique}。定理将被编号,而不是编号,或者只有在文档中多次出现时才被编号。
- \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
- \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
- \end{description}
- \item[\tn{declaretheoremstyle}] 定义新的定理样式,可选参数中除了包括上述定理样式选项,还包括 \tn{newtheorem} 的选项。
-\end{optdesc}
-
-\subsubsection{新的定理样式}
-定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
-\begin{ctexexam}
- \newtheorem[style = mythm,name = 定理名]{定理环境名}
-\end{ctexexam}
-若要给定理环境增加边框,可以如下进行设置
-\begin{ctexexam}
- \tcolorboxenvironment{定理环境名}{thmsty}
-\end{ctexexam}
-定义一个新的定理样式可用于 \tn{newtheorem} 的 \opt{style} 选项。
-\begin{ctexexam}
- \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
-\end{ctexexam}
-
-\subsection{页面边距}
-\begin{function}[EXP,added = 2021-01-13]{geoset/...,left,top,hmargin,textwidth,includehead,...}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{geoset/...}
- left = <长度>
- top = <长度>
- hmargin = \marg{左边距,右边距}
- textwidth = <长度>
- includehead = <true|(false)>
-\end{syntax}
-\opt{geoset} 将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
-\begin{ctexexam}
- \ctexset
- {
- geoset =
- {
- top = 2.5cm,
- bottom = 2.5cm,
- left = 3.2cm,
- right = 3.2cm
- }
- }
-\end{ctexexam}
-\changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
-\end{function}
-
-\subsection{页眉页脚}
-\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/...,head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
-\begin{syntax}
- 以下选项路径为 \tn{ctexset}\marg{hdrset/...}
- head-foot = <页眉页脚中的内容>
- chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
- sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
- headrule = <页眉横线格式>
- footrule = <页脚横线格式>
- footnoterule = <脚注横线格式>
-\end{syntax}
-\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
-\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
-\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
-\changes{v1.23s}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
-\changes{v1.23s}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
-\end{function}
-
-\begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
-\begin{syntax}
- \tn{easyhead}\oarg{位置}\marg{内容}
- \tn{easyfoot}\oarg{位置}\marg{内容}
-\end{syntax}
-命令 \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 =
- {
- head-foot =
- {
- \easyhead[ER]{\leftmark}
- \easyhead[OL]{\rightmark}
- \easyhead[EL,OR]{\textbf{\thepage}}
- },
- sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
- headrule = {\hrule width \textwidth height 1pt}
- }
- }
-\end{ctexexam}
-\end{function}
-
-\subsection{目录样式}
-\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{tocset/.../format,tocset/.../indent,tocset/.../rule,lists/lolskip,lists/belowoffset,tocset/belowoffset}
-\begin{syntax}
- format = <目录标题格式>
- indent = <目录标题左边缩进>
- rule = <目录引导线样式>
- lolskip = <(0.8pc)>
- lists/belowoffset = <(0pc)>
- belowoffset = <(-1pc)>
-\end{syntax}
-\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。
-
-\opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8pc。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。\opt{lists} 中的 \opt{belowoffset} 意义类似,但是一般为正值,在 \opt{lolskip = 0pc} 时使用。建议 \opt{lolskip+lists/format/addvspace = -belowoffset}。
-\changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
-\end{function}
-
-\begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
-\begin{syntax}
- \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
-\end{syntax}
-\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
-\begin{ctexexam}
- \ctexset
- {
- tocset =
- {
- chapter =
- {
- format = \addvspace{8pt}\large,
- indent = 1.5\ccwd,
- rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
- }
- }
- }
-\end{ctexexam}
-\end{function}
-
-\section{常用环境}
-
-\subsection{公式}
-\begin{function}[added = 2021-01-05]{equation,multline,gather,align}
-\begin{syntax}
- \tn{begin}\marg{环境名}
- \tn{item} <行间公式>
- \tn{end}\marg{环境名}
-\end{syntax}
-\opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
-\end{function}
-
-\subsection{列表}
-\begin{function}[added = 2021-01-05]{enumerate,itemize,description}
-\begin{syntax}
- \tn{begin}\marg{环境名}\oarg{键值列表}
- \tn{item} <列表内容>
- \tn{end}\marg{环境名}
-\end{syntax}
-\pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
-\begin{ctexexam}
- \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
- \begin{itemize}[label = \textbullet]
- \begin{description}[font = \sffamily\bfseries,style = nextline]
-\end{ctexexam}
-\end{function}
-
-\subsubsection{排序列表}
-\label{subsec: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)]
- \begin{enumerate}[\bfseries{Item} I]
-\end{ctexexam}
-
-\subsubsection{常规列表}
-使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
-
-用$\star$取代默认的符号
-\begin{ctexexam}
- \begin{itemize*}[$\star$]
- \begin{itemize}[$\star$]
-\end{ctexexam}
-
-\subsubsection{主题列表}
-使用 \opt{description} 环境可创建带有主题词的列表。
-\begin{ctexexam}
- \begin{description}
- \item[主题一] 内容一
- \item[主题二] 内容二
- \end{description}
-\end{ctexexam}
-
-\subsection{定理}
-\begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
-\begin{syntax}
- \tn{begin}\marg{环境名}
- <定理内容>
- \tn{end}\marg{环境名}
-\end{syntax}
-这些是预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。
-\end{function}
-
-\subsection{习题}
-\label{subsec:exercise}
-\begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
-\begin{syntax}
- \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
- \tn{item} <习题内容>
- \tn{end}\marg{exercise}
-\end{syntax}
-习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
-\begin{ctexexam}
- \begin{exercise}[LightYellow][1.][习题]
- \item 习题内容
- \item 习题内容
- \end{exercise}
-\end{ctexexam}
-\changes{v1.23s}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
-\end{function}
-
-\subsection{盒子}
-盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
-
-\subsubsection{摘要盒子}
-\begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
-\begin{syntax}
- \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
- \tn{item} <摘要内容>
- \tn{end}\marg{outline}
-\end{syntax}
-摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
-\begin{ctexexam}
- \begin{outline}[标题名称]
- \item 摘要内容
- \item 摘要内容
- \end{outline}
-\end{ctexexam}
-\end{function}
-
-\subsubsection{段落盒子}
-\begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
-\begin{syntax}
- \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
- <盒子内容>
- \tn{end}\marg{mybox}
-\end{syntax}
-环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
-\begin{ctexexam}
- \begin{mybox}*[段落标题][MintCream]
- 盒子内容
- \tcblower % 盒子上下部分分界线
- 盒子内容
- \end{mybox}
-\end{ctexexam}
-\end{function}
-
-\subsubsection{行内盒子}
-\begin{function}[added = 2021-03-13]{\concise,\fuzzy}
-\begin{syntax}
- \tn{concise}\oarg{颜色名}\marg{内容}\oarg{配置选项}
- \tn{fuzzy}\oarg{颜色名}\marg{内容}\oarg{配置选项}
-\end{syntax}
-设置了两个参数选项相同的行内盒子,盒子 \opt{concise} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{fuzzy} 也是抄录盒子,具有模糊边缘类似高亮的效果。
-\end{function}
-
-\section{其它用法}
-
-\subsection{代码}
-\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
-\begin{syntax}
- \tn{lstinline}\oarg{键值列表}\marg{行内代码}
- \tn{begin}\marg{lstlisting}\oarg{键值列表}
- <行间代码>
- \tn{end}\marg{lstlisting}
-\end{syntax}
-加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。
-\end{function}
-
-\subsection{物理量}
-\begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
-\begin{syntax}
- \tn{num}\oarg{选项}\marg{数字}
- \tn{si}\oarg{选项}\marg{单位}
- \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
- \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
-\end{syntax}
-\pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
-\begin{ctexexam}
- \num{-21x.3e5}
- \si{mL.min^{-1}}
- \SI{5}{\mole}
- \SIrange[unit-color = green]{1.5}{4}{kg}
-\end{ctexexam}
-\end{function}
-
-\subsection{化学式}
-\begin{function}[added = 2021-01-05]{\ch,\chemfig}
-\begin{syntax}
- \tn{ch}\oarg{选项}\marg{输入}
- \tn{chemfig}\oarg{键值列表}\marg{分子代码}
-\end{syntax}
-除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
-\end{function}
-
-\subsection{引用}
-\begin{function}[added = 2021-01-05]{\cref}
- \begin{syntax}
- \tn{cref}\marg{标签}
- \end{syntax}
-使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
-\end{function}
-
-\subsubsection{索引}
-\begin{function}[added = 2021-01-05]{\index,\printindex}
-\begin{syntax}
- \tn{index}\marg{标签}
- \tn{printindex}\oarg{索引名}
-\end{syntax}
-使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
-\end{function}
-
-\subsubsection{自定义脚注}
-\begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
-\begin{syntax}
- \tn{Footnote}\marg{标记}\marg{插入文本}
- \tn{Footnotetext}\marg{标记}\marg{插入文本}
- \tn{Footnotemark}\marg{标记}
-\end{syntax}
-自定义标记且不影响正常编号的脚注命令。
-\begin{ctexexam}
- \Footnote{*}{这是可以自定义标记的脚注。}
-\end{ctexexam}
-\end{function}
-
-\subsubsection{边注}
-\begin{function}[added = 2021-01-05]{\marginnote}
-\begin{syntax}
- \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
-\end{syntax}
-命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
-\end{function}
-
-\subsection{插入文档}
-\begin{function}[added = 2021-03-14]{\includepdf}
-\begin{syntax}
- \tn{includepdf}\oarg{键值列表}\marg{文档名}
-\end{syntax}
-该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
-\end{function}
-
-\subsection{横向页面}
-\begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
-\begin{syntax}
- \tn{begin}\marg{环境名}\oarg{位置}
- <插入图片或表格>
- \tn{end}\marg{环境名}
-\end{syntax}
-该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
-\end{function}
-
-\subsection{指定行距的段落}
-\begin{function}[added = 2021-03-14]{spacing}
-\begin{syntax}
- \tn{begin}\marg{spacing}\marg{浮点数}
- <段落内容>
- \tn{end}\marg{spacing}
-\end{syntax}
-该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
-\end{function}
-
-\IndexLayout
-\PrintChanges
-\PrintIndex
-\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.dtx
index 97f532796f..d11b30abfc 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -1,15 +1,770 @@
-%%
-%% This is file `easybook.cls'.
-%%
-%% Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
-%%
-%% This work may be distributed and/or modified under the
-%% conditions of the CC-BY 4.0 License.
-%% The latest version of this license is in
-%% https://creativecommons.org/licenses/by/4.0/legalcode
+%\iffalse meta-comment
+%
+%Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+%
+%This work may be distributed and/or modified under the
+%conditions of the CC-BY 4.0 License.
+%The latest version of this license is in
+% https://creativecommons.org/licenses/by/4.0/legalcode
+%<*driver>
+\def\nameofplainTeX{plain}
+\ifx\fmtname\nameofplainTeX\else
+ \expandafter\begingroup
+\fi
+%<*install>
+\input ctxdocstrip
+\keepsilent
+\askforoverwritefalse
+%
+\preamble
+Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+
+This work may be distributed and/or modified under the
+conditions of the CC-BY 4.0 License.
+The latest version of this license is in
+ https://creativecommons.org/licenses/by/4.0/legalcode
+\endpreamble
+%
+\generate
+ {
+ \usedir{tex/latex/\jobname}
+ \file{\jobname.cls}{\from{\jobname.dtx}{class}}
+ }
+%</install>
+\ifx\fmtname\nameofplainTeX
+ \expandafter\endbatchfile
+\else
+ \expandafter\endgroup
+\fi
+%</driver>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+%<*driver>
+\documentclass{ctxdoc}
+\OnlyDescription
+\begin{document}
+ \DocInput{\jobname.dtx}
+ \IndexLayout
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+%\fi
+%
+%\changes{v1.20}{2021/01/09}{修改和完善用户文档。}
+%\changes{v1.20}{2021/01/09}{模板更改为使用CC-BY许可协议。}
+%
+%\CheckSum{0}
+%
+%\CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%\title{\sffamily easybook书籍文档类}
+%\author{瞿毅}
+%\date{2021/03/17\hskip\ccwd\relax v1.23t\thanks{\url{https://gitee.com/texl3/easybook}}}
+%\maketitle
+%\begin{abstract}
+% \cls{easybook} 是基于 \cls{ctexbook} 书籍文档类创建以极简为风格的模板,可以看作对 \cls{ctexbook} 的进一步包装。虽然\CTeX 文档类提供了较好的中文支持,但想实现个性化功能一般需要在其基础上载入更多宏包来定制。\cls{easybook} 考虑了一些细节并载入一些常用宏包实现一般的排版需求,它适用于排版中英文书籍或笔记,甚至可稍加调整成为学位论文模板。
+%\end{abstract}
+%\tableofcontents
+%
+%\begin{documentation}
+%\section{编译方式}
+%模板含有一个使用示例文件 \opt{easybook-demo.tex},编译前建议满足以下的条件
+%\begin{itemize}
+% \item 使用 \hologo{XeLaTeX}(推荐)或 \hologo{LuaLaTeX} 两种编译方式。
+% \item 参考文献支持用 \hologo{BibTeX}(默认)或 \hologo{biber} 后端处理。
+% \item 由于用到了一些较新的宏包,建议安装最新的\TeX 发行版并将宏包升级为最新。
+%\end{itemize}
+%
+%\subsection{编译步骤}
+%\begin{frameverb}
+% xelatex -shell-escape easybook-demo
+% bibtex easybook-demo
+% makeindex easybook-demo
+% xelatex -shell-escape easybook-demo
+% xelatex -shell-escape easybook-demo
+%\end{frameverb}
+%
+%需注意,正确\textbf{编译索引}需要增加 \opt{-shell-escape} 命令行选项。若不需要索引和参考文献,可以在正文中注释掉命令。若出现以下警告,再编译一次即可。
+%\begin{frameverb}
+% LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
+%\end{frameverb}
+%
+%\subsection{字体设置}
+%\label{subsec:font settings}
+%默认使用\CTeX 预置中文字库,当开启 \opt{font = noto} 选项时需要安装开源字体,中文使用方正系列的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}和{\fangsong 方正仿宋},英文使用思源系列的{\rmfamily Noto Serif}、{\sffamily Noto Sans}和{\ttfamily Noto Sans Mono},数学字体使用 \pkg{notomath}。相关选项可以见节 \ref{sec:document class options} 中的 \opt{font} 选项,字体点击此处下载\href{https://wws.lanzous.com/b01ns361i}{下载地址}。
+%
+%如果您不想使用\CTeX 默认字体和方正、思源字体,\textbf{自定义字体}需启用选项 \opt{font = none},并可在导言区设置中文字体,粗体与斜体不设置会产生警告。
+%\begin{ctexexam}
+% \setCJKmainfont{SimSun}[BoldFont = SimHei,ItalicFont = KaiTi]
+% \setCJKsansfont{SimHei}
+% \setCJKmonofont{FangSong}
+%\end{ctexexam}
+%
+%\section{文档类选项}
+%\label{sec:document class options}
+%标准 \cls{book} 文类与 \cls{ctexbook} 文类的选项同样适用于本文档。除此之外选项分为两类
+%\begin{itemize}
+% \item 带有 \rexptarget\rexpstar{} 号的选项,需要在引入文档类的时候设定。
+% \item 带有 \exptarget\expstar{} 号的选项,需要通过\CTeX 宏集提供的用户接口命令 \tn{ctexset} 设定。
+%\end{itemize}
+%
+%\begin{function}[rEXP,added = 2021-01-05]{draft}
+%开启草稿模式会加快编译速度,表现有显示页面边框、行溢出的地方显示黑色方块、图片变成占位方框、显示当前日期和关闭超链接渲染。
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05]{newline}
+%章标题风格为另起一行,英文模式使用较为常见。类似下面的效果
+%\begin{flushleft}\sffamily\LARGE
+% Chapter 1\vskip 1.3pc
+% This is a title
+%\end{flushleft}
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05]{entitle}
+%部分标题编号由中文数字变为大写罗马数字,章标题编号由中文数字变为阿拉伯数字。比如\textbf{第一部分}变为\textbf{第I部分},\textbf{第一章}变为\textbf{第1章}。
+%\end{function}
+%\begin{function}[rEXP,added = 2021-01-05]{english}
+%使各类标题变为英文形式。包括章节标题、图表标题和定理标题等。如\textbf{第一章}变为\textbf{Chapter 1},\textbf{图1.1} 变为 \textbf{Table 1.1}。
+%\end{function}
+%\begin{function}[rEXP,added = 2021-01-05]{enstyle}
+%同时开启 \opt{newline}、\opt{entitle} 和 \opt{english} 三个选项以符合英文原生风格。
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05,updated = 2021-02-02]{font}
+%\begin{syntax}
+% font = <adobe|founder|mac|windows|linux|(overleaf)|noto|none>
+%\end{syntax}
+%传递给 \cls{ctexbook} 设置字体,最好不要使用原有的 \opt{fontset} 选项,默认情况下使用自定义字体而不开启这个选项,可根据安装的字体及电脑系统选取。\opt{noto} 与 \opt{none} 选项的相关描述见小节 \ref{subsec:font settings},\opt{overleaf} 是一个各系统通用选项,会检测系统环境选取对应字体。
+%\changes{v1.21}{2021/01/12}{默认字体与\CTeX 一致,不再是自定义字体。}
+%\end{function}
+%
+%\begin{function}[rEXP,added = 2021-01-05,updated = 2021-01-13]{paper}
+%\begin{syntax}
+% paper = <(a4paper)|b5paper|letterpaper|...>
+%\end{syntax}
+%设置页面大小,交给 \pkg{geometry} 宏包处理,可使用它支持的所有规格。建议选项 \opt{b5paper} 和 \opt{zihao = 5},选项 \opt{a4paper} 和 \opt{zihao = -4} 配合。
+%\end{function}
+%
+%\subsection{article 风格}
+%\begin{function}[rEXP,added = 2021-03-16]{class}
+%\begin{syntax}
+% class = <(book)|article>
+%\end{syntax}
+%设置文类风格,默认为 \opt{book} 文档类。选用 \opt{article} 使文档编号、结构等与 \cls{article} 文档类的特性相似,可用于短篇幅的文章,不要再使用 \tn{chapter} 命令,此时设置双栏目录的 \opt{style/multoc} 选项、小节 \ref{subsec:document command} 中打印目录命令的 \opt{multoc} 及 \opt{book} 选项均会失效,会以 \opt{section} 标题级别输出目录。
+%\changes{v1.23t}{2021/03/16}{增加 article 文章风格,可用于短篇幅的文章。}
+%\end{function}
+%
+%\subsection{文档命令}
+%\label{subsec: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{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.23t}{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.23t}{2021/03/15}{为几个目录增加键值列表的选项,可设置标题输出级别以及是否加入主目录。}
+%\end{function}
+%
+%\section{接口选项}
+%\begin{function}[added = 2021-01-05]{\ctexset}
+%\begin{syntax}
+% \tn{ctexset}\marg{键值列表}
+%\end{syntax}
+%\cls{easybook} 扩展了\CTeX 宏集\LaTeX 3风格键值的通用控制命令 \tn{ctexset},接口选项同样用它设置, 原有的键值列表仍然可用。
+%\end{function}
+%
+%\begin{function}[EXP,added = 2021-01-08]{config}
+%\begin{syntax}
+% config = <配置文件名>
+%\end{syntax}
+%\opt{config}为载入用户配置选项,配置文件名不需加括号但需带有后缀名如 \opt{tex}、\opt{def} 和 \opt{cfg}。
+%\changes{v1.10}{2021/01/08}{加入载入用户配置选项。}
+%\end{function}
+%
+%\subsection{风格}
+%\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>
+% multoc = <true|(false)>
+% withpart = <true|(false)>
+% perpart = <true|(false)>
+% perpage = <true|(false)>
+% notomath = <(true)|false>
+% rulewidth = <(0.75pt)>
+% uppercase = <(true)|false>
+% figure-sep = <(.)>
+% table-sep = <(.)>
+% listing-sep = <(.)>
+% equation-sep = <(.)>
+% number-sep = <(.)>
+%\end{syntax}
+%\changes{v1.10}{2021/01/08}{更改颜色实现方式与选项名。}
+%\changes{v1.23t}{2021/02/02}{noto风格的数学字体独立出来,可自定义设置。}
+%\changes{v1.23t}{2021/02/09}{增加控制页面横线粗细的选项。}
+%\changes{v1.23t}{2021/03/15}{增加控制编号连接符的选项。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[color] 主题颜色,包括标题、页眉颜色等,选项 \opt{none} 为黑白页面,但不包括超链接。
+% \begin{function}{ctex@frame,ctex@emph,ctex@verb}
+% \begin{syntax}
+% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
+% \end{syntax}
+% 主题颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改,类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
+% \changes{v1.10}{2021/01/08}{可以自定义主题颜色。}
+% \end{function}
+% \item[multoc] 开启双栏目录,可与 \opt{onecolumn} 和 \opt{twocolumn} 选项配合出单栏正文、单栏目录,双栏正文、单栏目录,单栏正文、双栏目录和双栏正文、双栏目录四种方式 。
+% \item[withpart] 使章跟随每一部分编号,默认不跟随。
+% \item[perpart] 使脚注跟随每一部分编号,默认不跟随。
+% \item[perpage] 使脚注跟随每一页编号,默认不跟随。
+% \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{subsec:hyperlinks}
+%\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)>
+%\end{syntax}
+%\changes{v1.10}{2021/01/08}{修复了 \opt{linktopage} 选项关闭时目录中标题编号无超链接的问题。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[hyperlink] \opt{edge} 使超链接为边框形式,\opt{various} 使超链接为彩色字体,有四种颜色风格。\opt{none} 关闭超链接边框与颜色,此时 \opt{linkcolor} 选项无效。
+% \item[linkcolor] 超链接颜色样式。
+% \begin{function}{ctex@link,ctex@url,ctex@cite}
+% \begin{syntax}
+% \tn{definecolor}\oarg{类型}\marg{名称}\marg{模式列表}\marg{参数列表}
+% \end{syntax}
+% 超链接颜色用到这三个颜色,可以使用 \tn{definecolor} 命令进行更改。
+% \changes{v1.10}{2021/01/08}{可以自定义超链接颜色。}
+% \end{function}
+% \item[linktopage] 将目录中的超链接置于页码上,默认是置于标题上。
+%\end{optdesc}
+%
+%\subsection{行距}
+%\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} 失效。各行距既可在导言区全局设置也可正文中设置对后面生效,行距的意义为
+%\changes{v1.21}{2021/01/12}{增加脚注线间的距离选项。}
+%\changes{v1.23t}{2021/02/09}{取消使用 \pkg{zhlineskip} 宏包设置数学间距。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[line] 正文行距。
+% \item[table] 表格行距。
+% \item[math] 数学环境行距,包括 \pkg{amsmath} 和 \pkg{mathtools} 宏包附带的环境,但并未加载 \pkg{mathtools} 宏包。
+% \item[caption] 图表代码标题行距。
+% \item[footnote] 脚注行距。
+%\end{optdesc}
+%
+%\subsection{其它字体}
+%\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}>
+% footnote = <\tn{rmfamily}>
+% marginpart = <\tn{rmfamily}\tn{footnotesize}>
+%\end{syntax}
+%\changes{v1.10}{2021/01/08}{加入自定义非正文字体选项。}
+%\changes{v1.23t}{2021/02/08}{修复使用 \tn{zihao} 命令设置字体失效的问题。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[table-cap] 表格标题的字体设置。
+% \item[figure-cap] 图片标题的字体设置。
+% \item[listing-cap] 代码标题的字体设置。
+% \item[footnote] 脚注的字体设置,请不要使用字号命令。
+% \item[marginpar] 边注的字体设置。
+%\end{optdesc}
+%
+%\subsection{参考文献}
+%\begin{function}[EXP,added = 2021-01-11,updated = 2021-03-15]{bibset/...,backend,bib-style,cite-style,bibfile}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{bibset/...}
+% backend = <(bibtex)|biblatex>
+% bib-style = <(numerical)|authoryear|其它格式>
+% cite-style = <标注风格>
+% bibfile = <refs.bib>
+%\end{syntax}
+%\changes{v1.21}{2021/01/11}{增加 \opt{bibset} 选项,可以使用 \hologo{BibTeX} 或 \hologo{biber} 编译参考文献。}
+%\changes{v1.23t}{2021/02/23}{使用 \opt{bibset} 选项时可设置标注风格。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[backend] 参考文献处理后端,默认用传统的 \hologo{BibTeX} 处理参考文献。
+% \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} 命名的文件。
+%\end{optdesc}
+%
+%\begin{function}[added = 2021-01-11,updated = 2021-03-15]{\printbibliography}
+%\begin{syntax}
+% \tn{printbibliography}\oarg{键值列表}
+%\end{syntax}
+%两种方式\textbf{均使用}此命令打印参考文献,不同处理后端此命令的键值列表不同。使用 \hologo{BibTeX} 处理时选项与小节 \ref{subsec:document command} 目录的选项相同,使用 \hologo{biber} 处理时常用的选项如下
+%\end{function}
+%
+%\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}
+%
+%\subsection{定理样式}
+%\begin{function}[EXP,added = 2021-01-12,updated = 2021-03-13]{thmset/...,thmbox,numberwith,headpunct,bodyfont,notefont,headfont,headindent,spaceabove,spacebelow,spacepost}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{thmset/...}
+% thmbox = <true|(false)>
+% numberwith = <(chapter)|section|其它环境|空置>
+% headpunct = <(未设置)>
+% bodyfont = <(未设置)>
+% notefont = <(未设置)>
+% headfont = <(\tn{color}\marg{ctex@emph}\tn{sffamily})>
+% headindent = <(0\tn{ccwd})>
+% spaceabove = <(0.75ex plus .1ex)>
+% spacebelow = <(0.75ex plus .1ex)>
+% spacepost = <(\tn{ccwd})>
+%\end{syntax}
+%\changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[thmbox] 开启定理及习题环境的盒子边框。
+% \item[numberwith] 定理编号跟随的计数器,默认跟随章的编号,也可以跟随其它定理环境的编号,当计数器增加时定理编号会从零开始,空置时不跟随其它计数器。
+% \item[headpunct] 定理标题后的标记。
+% \item[bodyfont] 定理内容部分的字体。
+% \item[notefont] 定理标题内容的字体。
+% \item[headfont] 定理类型标题名的字体。
+% \item[headindent] 定理标题的缩进,默认无缩进,可用 \tn{parindent} 命令设置为段落缩进。
+% \item[spaceabove] 定理环境前的间距。
+% \item[spacebelow] 定理环境后的间距。
+% \item[spacepost] 定理标题后与内容的间距。
+%\end{optdesc}
+%
+%\begin{function}[added = 2021-01-12,updated = 2021-03-13]{\newtheorem, \declaretheoremstyle}
+%\begin{syntax}
+% \tn{newtheorem}\oarg{键值列表}\marg{定理环境名}
+% \tn{declaretheoremstyle}\oarg{键值列表}\marg{定理样式名}
+%\end{syntax}
+%\changes{v1.23t}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
+%\end{function}
+%
+%\begin{optdesc}
+% \item[\tn{newtheorem}] 定义新的定理类环境,可选参数与 \pkg{thmtools} 宏包定理命令 \tn{declaretheorem} 的参数一致。常用的选项如下
+% \begin{description}
+% \item[name] 定理的标题。默认值是环境的名称,并且首字母大写(英文标题)。
+% \item[numbered] 值为 \opt{no}、\opt{yes} 或 \opt{unless unique}。定理将被编号,而不是编号,或者只有在文档中多次出现时才被编号。
+% \item[numberlike] 定理将使用此计数器进行编号,通常这是另一个定理环境的名称。
+% \item[style] 用 \tn{declaretheoremstyle} 定义的定理样式的名称,定理将使用这种样式的设置。
+% \end{description}
+% \item[\tn{declaretheoremstyle}] 定义新的定理样式,可选参数中除了包括上述定理样式选项,还包括 \tn{newtheorem} 的选项。
+%\end{optdesc}
+%
+%\subsubsection{新的定理样式}
+%定理由 \pkg{thmtools} 设置,预置定理的样式为 \opt{mythm},上述定理样式选项将对这个定理样式生效。如果使用这个样式而只是增加新的定理名称,可以这样
+%\begin{ctexexam}
+% \newtheorem[style = mythm,name = 定理名]{定理环境名}
+%\end{ctexexam}
+%若要给定理环境增加边框,可以如下进行设置
+%\begin{ctexexam}
+% \tcolorboxenvironment{定理环境名}{thmsty}
+%\end{ctexexam}
+%定义一个新的定理样式可用于 \tn{newtheorem} 的 \opt{style} 选项。
+%\begin{ctexexam}
+% \declaretheoremstyle[bodyfont = \rmfamily,spacepost = 0.5\ccwd]{定理样式名}
+%\end{ctexexam}
+%
+%\subsection{页面边距}
+%\begin{function}[EXP,added = 2021-01-13]{geoset/...,left,top,hmargin,textwidth,includehead,...}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{geoset/...}
+% left = <长度>
+% top = <长度>
+% hmargin = \marg{左边距,右边距}
+% textwidth = <长度>
+% includehead = <true|(false)>
+%\end{syntax}
+%\opt{geoset} 将选项交给 \pkg{geometry} 宏包接口命令 \tn{geometry} 处理,并且选项的键值列表与之相同,支持的参数可查阅宏包帮助文档。当在此设置页面大小时,会覆盖 \opt{paper} 选项的设置。
+%\begin{ctexexam}
+% \ctexset
+% {
+% geoset =
+% {
+% top = 2.5cm,
+% bottom = 2.5cm,
+% left = 3.2cm,
+% right = 3.2cm
+% }
+% }
+%\end{ctexexam}
+%\changes{v1.21}{2021/01/13}{增加配置页面边距的选项。}
+%\end{function}
+%
+%\subsection{页眉页脚}
+%\begin{function}[EXP,added = 2021-01-13,updated = 2021-03-14]{hdrset/...,head-foot,chap-mark,sec-mark,headrule,footrule,footnoterule}
+%\begin{syntax}
+% 以下选项路径为 \tn{ctexset}\marg{hdrset/...}
+% head-foot = <页眉页脚中的内容>
+% chap-mark = <\tn{chaptermark} 标志命令 \tn{markboth} 中的内容>
+% sec-mark = <\tn{sectionmark} 标志命令 \tn{markright} 中的内容>
+% headrule = <页眉横线格式>
+% footrule = <页脚横线格式>
+% footnoterule = <脚注横线格式>
+%\end{syntax}
+%\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,\opt{headrule}、\opt{footrule} 和 \opt{footnoterule} 三个横线选项一般可以使用 \tn{hrule} width \meta{长度} height \meta{高度} 命令来绘制,脚注横线默认为空。当然,手动绘制横线时线条粗细选项 \opt{style/rulewidth} 会失效。
+%\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
+%\changes{v1.21}{2021/01/13}{增加配置页眉页脚的选项。}
+%\changes{v1.23t}{2021/03/08}{优化页眉页脚设置,增加 \opt{chap-mark} 和 \opt{sec-mark} 选项。}
+%\changes{v1.23t}{2021/03/14}{可以手动绘制页眉、页脚和脚注的横线。}
+%\end{function}
+%
+%\begin{function}[added = 2021-01-13,updated = 2021-03-14]{,\easyhead,\easyfoot}
+%\begin{syntax}
+% \tn{easyhead}\oarg{位置}\marg{内容}
+% \tn{easyfoot}\oarg{位置}\marg{内容}
+%\end{syntax}
+%命令 \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 =
+% {
+% head-foot =
+% {
+% \easyhead[ER]{\leftmark}
+% \easyhead[OL]{\rightmark}
+% \easyhead[EL,OR]{\textbf{\thepage}}
+% },
+% sec-mark = {\CTEXthesection\hspace{0.5\ccwd}},
+% headrule = {\hrule width \textwidth height 1pt}
+% }
+% }
+%\end{ctexexam}
+%\end{function}
+%
+%\subsection{目录样式}
+%\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{tocset/.../format,tocset/.../indent,tocset/.../rule,lists/lolskip,lists/belowoffset,tocset/belowoffset}
+%\begin{syntax}
+% format = <目录标题格式>
+% indent = <目录标题左边缩进>
+% rule = <目录引导线样式>
+% lolskip = <(0.8pc)>
+% lists/belowoffset = <(0pc)>
+% belowoffset = <(-1pc)>
+%\end{syntax}
+%\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。
+%
+%\opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8pc。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。\opt{lists} 中的 \opt{belowoffset} 意义类似,但是一般为正值,在 \opt{lolskip = 0pc} 时使用。建议 \opt{lolskip + lists/format/addvspace = -belowoffset}。
+%\changes{v1.21}{2021/01/13}{增加配置目录样式的选项。}
+%\end{function}
+%
+%\begin{function}[added = 2021-01-13,updated = 2021-01-15]{\tocrule}
+%\begin{syntax}
+% \tn{tocrule} = \oarg{引导点间距|(0.7pc)}\oarg{引导点大小|(1.2)}\marg{引导点}\oarg{页码格式}
+%\end{syntax}
+%\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
+%\begin{ctexexam}
+% \ctexset
+% {
+% tocset =
+% {
+% chapter =
+% {
+% format = \addvspace{8pt}\large,
+% indent = 1.5\ccwd,
+% rule = \tocrule[0.6pc][1.1]{.}[\zihao{5}]
+% }
+% }
+% }
+%\end{ctexexam}
+%\end{function}
+%
+%\section{常用环境}
+%
+%\subsection{公式}
+%\begin{function}[added = 2021-01-05]{equation,multline,gather,align}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}
+% \tn{item} <行间公式>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%\opt{amsmath} 宏包提供了一系列数学环境,它们可以排布各种对齐或不对齐的公式组。\opt{multline} 环境用于一行无法放下的长公式,\opt{gather} 环境用于每行居中的公式组,\opt{align} 环境用于多列对齐的公式组。
+%\end{function}
+%
+%\subsection{列表}
+%\begin{function}[added = 2021-01-05]{enumerate,itemize,description}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}\oarg{键值列表}
+% \tn{item} <列表内容>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%\pkg{enumitem} 宏包为系统预置的列表环境提供了更灵活的标签以及间距的控制,可使用 \tn{setlist} 命令设置原有的三种列表格式。已设置默认格式,若自定义标签可例如
+%\begin{ctexexam}
+% \begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
+% \begin{itemize}[label = \textbullet]
+% \begin{description}[font = \sffamily\bfseries,style = nextline]
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{排序列表}
+%\label{subsec: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)]
+% \begin{enumerate}[\bfseries{Item} I]
+%\end{ctexexam}
+%
+%\subsubsection{常规列表}
+%使用 \opt{itemize} 环境可创建不计数列表,列表环境中若换行不缩进,若在列表中分段后则缩进两字符。 \opt{itemize*} 为行内常规列表,也提供一个可选参数。
+%
+%用$\star$取代默认的符号
+%\begin{ctexexam}
+% \begin{itemize*}[$\star$]
+% \begin{itemize}[$\star$]
+%\end{ctexexam}
+%
+%\subsubsection{主题列表}
+%使用 \opt{description} 环境可创建带有主题词的列表。
+%\begin{ctexexam}
+% \begin{description}
+% \item[主题一] 内容一
+% \item[主题二] 内容二
+% \end{description}
+%\end{ctexexam}
+%
+%\subsection{定理}
+%\begin{function}[added = 2021-01-05,updated = 2021-01-08]{theorem,definition,lemma,corollary,proposition,example,remark,proof}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}
+% <定理内容>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%这些是预置的定理环境,定理环境除了注和证明跟随章编号并可带有边框,边框和习题标题盒子可使用 \opt{thmbox = false} 开启,证明末尾会自动添加证明结束符。
+%\end{function}
+%
+%\subsection{习题}
+%\label{subsec:exercise}
+%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{exercise}
+%\begin{syntax}
+% \tn{begin}\marg{exercise}\oarg{颜色名|(LightYellow)}\oarg{编号|(1.)}\oarg{标题|(习题)}\oarg{配置选项}
+% \tn{item} <习题内容>
+% \tn{end}\marg{exercise}
+%\end{syntax}
+%习题环境 \opt{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。三个可选参数中颜色为自定义或 \pkg{xcolor} 包含的颜色名称,正文编号格式与小节 \ref{subsec:sort list} 排序列表相同,标题名默认为摘要,参数只能\textbf{从右往左}省略。
+%\begin{ctexexam}
+% \begin{exercise}[LightYellow][1.][习题]
+% \item 习题内容
+% \item 习题内容
+% \end{exercise}
+%\end{ctexexam}
+%\changes{v1.23t}{2021/02/08}{增加准确的习题盒子标题目录锚点。}
+%\end{function}
+%
+%\subsection{盒子}
+%盒子以及小节 \ref{subsec:exercise} 中 \opt{exercise} 环境配置的选项由 \pkg{tcolorbox} 提供支持,具体选项可见宏包文档的 Option Keys 一节,可以进行边距、字体及背景颜色等各种个性化设置,一些配置会覆盖之前预置的设置。
+%
+%\subsubsection{摘要盒子}
+%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{outline}
+%\begin{syntax}
+% \tn{begin}\marg{outline}\oarg{标题名称}\oarg{配置选项}
+% \tn{item} <摘要内容>
+% \tn{end}\marg{outline}
+%\end{syntax}
+%摘要盒子可用于章前摘要,它的标题是可选参数,默认标题是摘要。
+%\begin{ctexexam}
+% \begin{outline}[标题名称]
+% \item 摘要内容
+% \item 摘要内容
+% \end{outline}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{段落盒子}
+%\begin{function}[added = 2021-01-05,updated = 2021-03-13]{mybox}
+%\begin{syntax}
+% \tn{begin}\marg{mybox}\oarg{段落标题}\oarg{颜色名|(MintCream)}\oarg{配置选项}
+% <盒子内容>
+% \tn{end}\marg{mybox}
+%\end{syntax}
+%环境 \opt{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。当使用带有星号的环境时 \oarg{颜色名} 选项生效,可以自定义背景颜色,否则无背景颜色。
+%\begin{ctexexam}
+% \begin{mybox}*[段落标题][MintCream]
+% 盒子内容
+% \tcblower % 盒子上下部分分界线
+% 盒子内容
+% \end{mybox}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{行内盒子}
+%\begin{function}[added = 2021-03-13]{\concise,\fuzzy}
+%\begin{syntax}
+% \tn{concise}\oarg{颜色名}\marg{内容}\oarg{配置选项}
+% \tn{fuzzy}\oarg{颜色名}\marg{内容}\oarg{配置选项}
+%\end{syntax}
+%设置了两个参数选项相同的行内盒子,盒子 \opt{concise} 为抄录盒子有三个参数,行内盒子内容是必选参数其他可选。盒子 \opt{fuzzy} 也是抄录盒子,具有模糊边缘类似高亮的效果。
+%\end{function}
+%
+%\section{其它用法}
+%
+%\subsection{代码}
+%\begin{function}[added = 2021-01-05]{\lstinline,lstlisting,\listoflistings}
+%\begin{syntax}
+% \tn{lstinline}\oarg{键值列表}\marg{行内代码}
+% \tn{begin}\marg{lstlisting}\oarg{键值列表}
+% <行间代码>
+% \tn{end}\marg{lstlisting}
+%\end{syntax}
+%加载 \pkg{listings} 宏包以对代码格式进行高度定制,代码样式可使用 \tn{lstset} 命令设置,\tn{listoflistings} 命令用于输出代码目录。
+%\end{function}
+%
+%\subsection{物理量}
+%\begin{function}[added = 2021-01-05,updated = 2021-02-23]{\num,\si,\SI,\SIrange}
+%\begin{syntax}
+% \tn{num}\oarg{选项}\marg{数字}
+% \tn{si}\oarg{选项}\marg{单位}
+% \tn{SI}\oarg{选项}\marg{数字}\oarg{前缀}\marg{单位}
+% \tn{SIrange}\oarg{选项}\marg{数字1}\marg{数字2}\marg{单位}
+%\end{syntax}
+%\pkg{siunitx} 宏包的 \tn{num} 命令可以输出科学计数法,\tn{si} 命令支持数学模式,可以代替数学行内公式输入,而 \tn{SI} 命令可用来输出带有单位的量,\tn{SIrange} 可以输出带有范围和单位的量。
+%\begin{ctexexam}
+% \num{-21x.3e5}
+% \si{mL.min^{-1}}
+% \SI{5}{\mole}
+% \SIrange[unit-color = green]{1.5}{4}{kg}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsection{化学式}
+%\begin{function}[added = 2021-01-05]{\ch,\chemfig}
+%\begin{syntax}
+% \tn{ch}\oarg{选项}\marg{输入}
+% \tn{chemfig}\oarg{键值列表}\marg{分子代码}
+%\end{syntax}
+%除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐使用 \pkg{chemfig}(并未载入)的 \tn{chemfig} 命令完成。
+%\end{function}
+%
+%\subsection{引用}
+%\begin{function}[added = 2021-01-05]{\cref}
+% \begin{syntax}
+% \tn{cref}\marg{标签}
+% \end{syntax}
+%使用 \pkg{cleveref} 宏包的 \tn{cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
+%\end{function}
+%
+%\subsubsection{索引}
+%\begin{function}[added = 2021-01-05]{\index,\printindex}
+%\begin{syntax}
+% \tn{index}\marg{标签}
+% \tn{printindex}\oarg{索引名}
+%\end{syntax}
+%使用 \pkg{imakeidx} 生成索引,\tn{printindex} 命令用于生成索引目录。仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
+%\end{function}
+%
+%\subsubsection{自定义脚注}
+%\begin{function}[added = 2021-01-05]{\Footnote,\Footnotetext,\Footnotemark}
+%\begin{syntax}
+% \tn{Footnote}\marg{标记}\marg{插入文本}
+% \tn{Footnotetext}\marg{标记}\marg{插入文本}
+% \tn{Footnotemark}\marg{标记}
+%\end{syntax}
+%自定义标记且不影响正常编号的脚注命令。
+%\begin{ctexexam}
+% \Footnote{*}{这是可以自定义标记的脚注。}
+%\end{ctexexam}
+%\end{function}
+%
+%\subsubsection{边注}
+%\begin{function}[added = 2021-01-05]{\marginnote}
+%\begin{syntax}
+% \tn{marginnote}\oarg{左文本}\marg{右文本}\oarg{垂直偏移}
+%\end{syntax}
+%命令 \tn{marginnote} 可以生成简单的边注,如果只给定了 \meta{右文本},那么边注在奇偶数页文字相同。如果同时给定了 \meta{左文本},则偶数页使用 \meta{左文本} 的文字。
+%\end{function}
+%
+%\subsection{插入文档}
+%\begin{function}[added = 2021-03-14]{\includepdf}
+%\begin{syntax}
+% \tn{includepdf}\oarg{键值列表}\marg{文档名}
+%\end{syntax}
+%该命令由 \pkg{pdfpages} 提供,将其他 pdf 文档插入当前文档,比如插入封面,可以指定插入页数、逻辑页和横向等,详情查看宏包文档。
+%\end{function}
+%
+%\subsection{横向页面}
+%\begin{function}[added = 2021-03-14]{sidewaysfigure,sidewaystable}
+%\begin{syntax}
+% \tn{begin}\marg{环境名}\oarg{位置}
+% <插入图片或表格>
+% \tn{end}\marg{环境名}
+%\end{syntax}
+%该环境由 \pkg{rotfloat} 提供,用于横向插入宽大的图片或表格,用法与 \opt{figure} 和 \opt{table} 环境类似。
+%\end{function}
+%
+%\subsection{指定行距的段落}
+%\begin{function}[added = 2021-03-14]{spacing}
+%\begin{syntax}
+% \tn{begin}\marg{spacing}\marg{浮点数}
+% <段落内容>
+% \tn{end}\marg{spacing}
+%\end{syntax}
+%该环境由 \pkg{setspace} 提供,可以指定环境内段落的行距,使用浮点数控制行距倍数。
+%\end{function}
+%\end{documentation}
+%
+%\StopEventually{}
+%<*class>
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/03/16}{1.23s}{}
+\ProvidesExplClass{easybook}{2021/03/17}{1.23t}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -454,7 +1209,7 @@
section/format .tl_set:N = \l__toc_section_format_tl,
section/format .initial:n = \addvspace{0.35pc},
section/indent .tl_set:N = \l__toc_section_indent_tl,
- section/indent .initial:n = 1.5\ccwd,
+ section/indent .initial:n = 1.5\ccwd,
section/rule .tl_set:N = \l__toc_section_rule_tl,
section/rule .initial:n = \tocrule{$\cdot$},
@@ -1508,5 +2263,6 @@
chapter/hang = true
}
}
-%%
-%% End of file `easybook.cls'. \ No newline at end of file
+%</class>
+%\Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/intopdf/intopdf.dtx b/macros/latex/contrib/intopdf/intopdf.dtx
index 2cd472f0db..86d1454acc 100644
--- a/macros/latex/contrib/intopdf/intopdf.dtx
+++ b/macros/latex/contrib/intopdf/intopdf.dtx
@@ -46,14 +46,14 @@
%
% \GetFileInfo{intopdf.dtx}
% \title{The \pkg{intopdf} package\thanks{This document
-% corresponds to \pkg{intopdf}~0.3.0, dated~2020/03/13.}}
+% corresponds to \pkg{intopdf}~0.4.0, dated~2021/02/26.}}
% \author{Marcel Kr\"uger \\ \href{mailto:tex@2krueger.de}{tex@2krueger.de}}
%
% \maketitle
%
% \begin{documentation}
% This package defines a command \cmd\attachandlink{} which allows to attach an arbitrary file to your PDF document and linking to it from the main text.
-% It is inspired by the \TeX Stack Exchange question \href{https://tex.stackexchange.com/questions/418606/embed-non-pdf-files-e-g-bibtex-into-pdf-with-hyperlink-in-the-pdf/418827#418827}{Embed non-PDF files (e.g., BibTex) into PDF with hyperlink in the PDF}. The engines pdf\LaTeX\ and \LuaLaTeX\ are supported.
+% It is inspired by the \TeX Stack Exchange question \href{https://tex.stackexchange.com/questions/418606/embed-non-pdf-files-e-g-bibtex-into-pdf-with-hyperlink-in-the-pdf/418827#418827}{Embed non-PDF files (e.g., BibTex) into PDF with hyperlink in the PDF}.
%
% \section{Usage}
% \begin{function}{\attachandlink}
@@ -89,52 +89,36 @@
\RequirePackage{expl3,xparse}
\ProvidesExplPackage
{intopdf}
- {2020/03/13}
- {0.3.0}
+ {2021/02/26}
+ {0.4.0}
{Embed non-PDF files into PDF with hyperlink}
-\RequirePackage{l3pdf,hyperref}
+\RequirePackage{hyperref}
%</package>
% \fi
-% \changes{v0.1.0}{2018/03/15}{Added \LuaLaTeX\ support}
-% Only \pdfTeX{} and \LuaLaTeX{} are supported.
-% For other engines we show an error.
-% \begin{macrocode}
-\msg_new:nnnn{intopdf}{engine-unsupported}
- {Your~TeX~engine~is~not~supported~by~intopdf.}
- {To~use~intopdf,~you~have~to~use~pdfLaTeX~or~LuaLaTeX.}
-% \end{macrocode}
-% Then we define some wrappers for the primitives.
-% \begin{macrocode}
-\cs_generate_variant:Nn\str_case:nnF{VnF}
-\str_case:VnF\c_sys_engine_str{
- {pdftex}{
- \cs_new:Nn\__intopdf_escape_name:n{\pdfescapename{#1}}
- \cs_new:Nn\__intopdf_escape_string:n{(\pdfescapestring{#1})}
- }
- {luatex}{
- \RequirePackage{pdftexcmds}
- \cs_new:Nn\__intopdf_escape_name:n{\pdf@escapename{#1}}
- \cs_new:Nn\__intopdf_escape_string:n{(\pdf@escapestring{#1})}
- }
-}{
- \msg_critical:nn{intopdf}{engine-unsupported}
-}
-% \end{macrocode}
% \begin{macro}{\attachandlink,\intopdf_attach_link:nnnnn,\intopdf_attach_link:nnnn}
% \changes{v0.2.0}{2019/05/21}{Added filespec support. (The first optional argument) Added \cs{intopdf_attach_link:nnnnn}.}
% \changes{v0.3.0}{2020/03/13}{Switched to \texttt{l3pdf} instead of using primitives directly. Currently some internal functions from \texttt{l3backend} are needed too for handling links.}
+% \changes{v0.4.0}{2021/02/26}{Update to new \texttt{l3pdf} names and support more engines.}
% The main functionality.
% \begin{macrocode}
+\str_new:N \l__intopdf_mime_str
+\str_new:N \l__intopdf_filename_str
+\str_new:N \l__intopdf_description_str
+
\cs_new_protected:Nn\intopdf_attach_link:nnnnn{
- \pdf_object_now:nx {fstream} { {
- /Subtype /\__intopdf_escape_name:n { #3 }
+ \leavevmode
+ \str_set_convert:Nnnn \l__intopdf_mime_str { #3 } { default } { utf8/name }
+ \pdf_object_unnamed_write:nx {fstream} { {
+ /Subtype /\l__intopdf_mime_str
} { #2 } }
- \pdf_object_now:nx {dict} {
+ \str_set_convert:Nnnn \l__intopdf_filename_str { #1 } { default } { utf16/string }
+ \str_set_convert:Nnnn \l__intopdf_description_str { #4 } { default } { utf16/string }
+ \pdf_object_unnamed_write:nx {dict} {
/Type /Filespec
- /F \__intopdf_escape_string:n { #1 }
- /EF << /F~\pdf_object_last: >>
- /Desc \__intopdf_escape_string:n { #4 }
+ /F (\l__intopdf_filename_str)
+ /EF << /F~\pdf_object_ref_last: >>
+ /Desc (\l__intopdf_description_str)
}
\__pdf_backend_link_begin_user:nnw {
\Hy@setpdfborder
@@ -149,10 +133,10 @@
}
\__pdf_backend_link_begin_user:nnw { } {
/Subtype /FileAttachment
- /FS~\pdf_object_last:
+ /FS~\pdf_object_ref_last:
/F~416
/CA~0
- /Contents \__intopdf_escape_string:n{#4}
+ /Contents (\l__intopdf_description_str)
}
#5
\__pdf_backend_link_end:
diff --git a/macros/latex/contrib/intopdf/intopdf.pdf b/macros/latex/contrib/intopdf/intopdf.pdf
index e569531492..99a5f4338f 100644
--- a/macros/latex/contrib/intopdf/intopdf.pdf
+++ b/macros/latex/contrib/intopdf/intopdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/langsci-affiliations/README.md b/macros/latex/contrib/langsci-affiliations/README.md
deleted file mode 100644
index 4ee26be641..0000000000
--- a/macros/latex/contrib/langsci-affiliations/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-langsci-affiliations collects, orders, and outputs author-affiliation pairs.
-It makes use of data types from LaTeX3.
-
-The package is aimed to be helpful to class authors, i.e. those who design
-and maintain document templates in publishing houses, universities, etc. The
-package is probably of only limited use to document authors/end users.
-
-langsci-affiliations was developed at Language Science Press to help in the
-production of scientific texts in linguistics.
-
-Copyright (C) 2021 by Felix Kopecky, Language Science Press
-
-This work consists of the file langsci-affiliations.dtx
- and the derived file langsci-affiliations.pdf.
-
-It may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), either version 1.3c of this
-license or (at your option) any later version. The latest version
-of this license is at <http://www.latex-project.org/lppl.txt>.
-
-This work is ``maintained'' (per LPPL maintenance status) by
-Felix Kopecky <felix.kopecky@langsci-press.org>.
-
-The development version can be found at
-
- https://github.com/langsci/langsci-affiliations
-
-for those who are interested. Pull requests are welcome.
-
-Please report any bugs or feature requests to
-
- https://github.com/langsci/langsci-affiliations/issues
diff --git a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx b/macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx
deleted file mode 100644
index 7126f830cc..0000000000
--- a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.dtx
+++ /dev/null
@@ -1,493 +0,0 @@
-% \iffalse meta-comment
-% !TeX program = xelatex
-% !TeX encoding = utf-8
-%<*internal>
-\begingroup
-%</internal>
-%<*install>
-\input{l3docstrip.tex}
-\keepsilent
-\askforoverwritefalse
-\preamble
-------------------------------------------------------------------------------
-
-langsci-affiliations collects, orders, and outputs author-affiliation pairs.
-It makes use of data types from LaTeX3.
-
-The package is aimed to be helpful to class authors, i.e. those who design
-and maintain document templates in publishing houses, universities, etc. The
-package is probably of only limited use to document authors/end users.
-
-langsci-affiliations was developed at Language Science Press to help in the
-production of scientific texts in linguistics.
-
-Copyright (C) 2021 by Felix Kopecky, Language Science Press
-
-This work consists of the file langsci-affiliations.dtx
- and the derived files langsci-affiliations.ins,
- langsci-affiliations.pdf.
-
-It may be distributed and/or modified under the conditions of the
-LaTeX Project Public License (LPPL), either version 1.3c of this
-license or (at your option) any later version. The latest version
-of this license is at <http://www.latex-project.org/lppl.txt>.
-
-This work is ``maintained'' (per LPPL maintenance status) by
-Felix Kopecky <felix.kopecky@langsci-press.org>.
-
-The development version can be found at
-
- https://github.com/langsci/langsci-affiliations
-
-for those who are interested. Pull requests are welcome.
-
-Please report any bugs or feature requests to
-
- https://github.com/langsci/langsci-affiliations/issues
-
-------------------------------------------------------------------------------
-\endpreamble
-\declarepreamble\minimalpreamble
-\endpreamble
-\postamble
-\endpostamble
-\usedir{tex/latex/langsci-affiliations}
-\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
-%</install>
-%<install>\endbatchfile
-%<*internal>
-\usepreamble\minimalpreamble
-\usepostamble\defaultpostamble
-\usedir{source/latex/langsci-affiliations}
-\generate{\file{\jobname.ins}{\from{\jobname.dtx}{install}}}
-\endgroup
-%</internal>
-%<*driver>
-\documentclass{l3doc}
-\usepackage{langsci-affiliations}
-\usepackage[british]{babel}
-\usepackage{tikz}
- \usetikzlibrary{arrows, arrows.meta, positioning}
-\usepackage{enumitem}
- \setlist[description]{font=\normalfont}
-\begin{document}
- \DocInput{\jobname.dtx}
-\end{document}
-%</driver>
-% \fi
-% \title{\pkg{langsci-affiliations}}
-% \author{Felix Kopecky\thanks{\protect\url{mailto:felix.kopecky@langsci-press.org}.
-% Please submit bug reports and feature requests to
-% \protect\url{https://github.com/langsci/langsci-affiliations/issues}.
-% }}
-% \date{Version 1.0.1 -- \today}
-% \maketitle
-% \frenchspacing
-% \begin{documentation}
-% \section{User guide}
-% This package provides a command \cmd{\ResolveAffiliations}, which collects author--affiliation pairs and outputs them according to the user configuration. It is aimed at class authors, i.e. maintainers of document templates in publishing houses, universities, etc. It is probably not that useful to document authors.
-
-% \begin{function}{\ResolveAffiliations}
-% \begin{syntax}
-% \cs{ResolveAffiliations} \oarg{options} \marg{pairs of authors and affiliations}
-% \end{syntax}
-% Takes the \marg{pairs of authors and affiliations}, orders them internally and outputs them according to the \oarg{options}.
-%
-% \marg{Pairs of authors and affiliations} is a list of authors and affiliations, where authors are separated by \verb+and+ and affiliations by \verb+;+. Affiliations are given within a phantom command \cs{affiliation} within the \marg{pairs} argument -- i.e. the command is not defined by this package and possibly existing definitions are left unchanged.
-%
-% For example:
-%
-% \begin{verbatim}
-% \ResolveAffiliations{
-% A. U. Thor\affiliation{University of the Moon; University of Mars}
-% and B. U. Thor\affiliation{University of Mars}
-% }
-% \end{verbatim}
-% results in:\\
-%
-% \noindent\ResolveAffiliations[output authors font=\normalsize]{
-% A. U. Thor\affiliation{University of the Moon; University of Mars}
-% and B. U. Thor\affiliation{University of Mars}
-% }\\
-%
-% The output can be customised using the \oarg{options}. They are described below.
-% \end{function}
-
-% \begin{function}{\SetupAffiliations}
-% \begin{syntax}
-% \cs{SetupAffiliations} \marg{options}
-% \end{syntax}
-% Options can be set either globally or locally. With \cs{SetupAffiliations}\marg{options}, they apply globally. If they are set with \cs{ResolveAffiliations}\oarg{options}, they apply locally.
-%
-% \begin{description}[style=nextline]
-% \item[|mark style =| \meta{style}\hfill (initially |alphabetic|)] Controls which markers should be used in the indexes of affiliations. Can be a either of \{|alphabetic|, |numeric|, |circled|, |none|\}.
-% \item[|output affiliation =| \meta{boolean}\hfill (initially |true|)] Affiliations are output if true, otherwise not.
-% \item[|output in groups =| \meta{boolean}\hfill (initially |true|)] If |true|, authors and affiliations are output in the same line. When |false| each author and affiliation gets its own line.
-% \item[|output authors font =| \meta{font commands}\hfill (initially |\cs{Large}|)] Stores the font settings for the ouput of authors.
-% \item[|output affiliation font =| \meta{font commands}\hfill (initially |\cs{normalsize}|)] Stores the font settings for outputting affiliations.
-% \end{description}
-%
-% \noindent Output separators between authors and affiliations are customisable as well:
-%
-% \begin{description}[style=nextline]
-% \item[|separator between two =| \meta{tokens}\hfill (initially |\char`~\&\char`~|)]
-% If there are only two authors, use these \meta{tokens} to separate them.
-% \item[|separator between multiple =| \meta{tokens}\hfill (initially |,\char`~|)]
-% If there are more than two authors, use these \meta{tokens} to separate every pair except the last one.
-% \item[|separator between final two =| \meta{tokens}\hfill (initially |\char`~\&\char`~|)]
-% Use these \meta{tokens} to separate the last pair of authors if ther are more than two.
-% \item[|separator between affiliations =| \meta{tokens}\hfill (initially |,|)]
-% Use these to separate affiliations after each authors. The affiliations in the affiliation line are always separated by a space ().
-% \end{description}
-%
-% \noindent The way the input is digested can be customised with these two settings:
-%
-% \begin{description}[style=nextline]
-% \item[|input names separator =| \meta{tokens}\hfill (initially |\char`~and\char`~|)]
-% Separates the author names in the input.
-% \item[|input affiliation separator =| \meta{tokens}\hfill (intially |;|)]
-% Separates the affiliations in the input, within dummy command \cs{affiliation}.
-% \end{description}
-%
-% \end{function}
-% \end{documentation}
-%
-% \newpage
-%
-% \begin{implementation}
-% \section{Implementation}
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-% \begin{macrocode}
-%<@@=affiliations>
-% \end{macrocode}
-% \begin{macrocode}
-\RequirePackage{xparse}
-\ProvidesExplPackage {langsci-affiliations}
-{2021-02-24} {1.0.1}
-{A LaTeX3 package to collect and order authors and affiliations}
-% \end{macrocode}
-
-% \begin{macro}{\ResolveAffiliations}
-% The top-level document command. It is grouped to keep assignments local.
-% \begin{macrocode}
-\NewDocumentCommand{\ResolveAffiliations}{ O{} +m }
- {%
- \group_begin:
- \keys_set:nn { affiliations } { #1 }%
- \exp_args:No \affiliations_resolve:n { #2 }%
- \group_end:
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}{\SetupAffiliations}
-% A command to define options.
-% \begin{macrocode}
-\NewDocumentCommand{\SetupAffiliations}{ m }
- {%
- \keys_set:nn { affiliations } { #1 }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\keys_define:nn { affiliations }
- {
- mark~style .tl_set:N
- = \l__affiliations_style_tl,
- mark~style .initial:n
- = { alphabetic },
- output~affiliation .bool_set:N
- = \l__affiliations_output_affiliation_bool,
- output~affiliation .initial:n
- = { true },
- output~in~groups .bool_set:N
- = \l__affiliations_output_grouped_bool,
- output~in~groups .initial:n
- = { true },
- separator~between~two .tl_set:N
- = \l__affiliations_separator_between_two_tl,
- separator~between~two .initial:n
- = {~\&~},
- separator~between~multiple .tl_set:N
- = \l__affiliations_separator_between_mult_tl,
- separator~between~multiple .initial:n
- = {,~},
- separator~between~final~two .tl_set:N
- = \l__affiliations_separator_between_last_two_tl,
- separator~between~final~two .initial:n
- = {~\&~},
- separator~between~affiliations .tl_set:N
- = \l__affiliations_afil_separator_tl,
- separator~between~affiliations .initial:n
- = {,},
- output~authors~font .cs_set:Np
- = \__affiliations_output_authors_font:,
- output~authors~font .initial:n
- = {\Large},
- output~affiliation~font .cs_set:Np
- = \__affiliations_output_affiliation_font:,
- output~affiliation~font .initial:n
- = {\normalsize},
- input~names~separator .tl_set:N
- = \l__affiliations_input_names_sep_tl,
- input~names~separator .initial:n
- = {~and~},
- input~affiliation~separator .tl_set:N
- = \l_affiliations_input_afil_sep_tl,
- input~affiliation~separator .initial:n
- = {;}
- }
-% \end{macrocode}
-% \begin{variable}[int]{
-% \prop_put:Nxx,
-% \prop_put:Nnx,
-% \seq_set_split:Nvn,
-% \l__affiliations_tmpa_clist,
-% \l__affiliations_tmpa_int,
-% \l__affiliations_affiliations_seq,
-% \l__affiliations_authors_seq,
-% \l__affiliations_names_seq,
-% \l__affiliations_tmpa_seq,
-% \l__affiliations_tmpb_seq,
-% \l__affiliations_tmpa_tl,
-% \l__affiliations_tmpb_tl,
-% \l__affiliations_output_prop,
-% \l__affiliations_affiliations_prop}
-% Internal variants and variables
-% \begin{macrocode}
-
-\cs_generate_variant:Nn \prop_put:Nnn { Nxx }
-\cs_generate_variant:Nn \prop_put:Nnn { Nnx }
-\cs_generate_variant:Nn \seq_set_split:Nnn { NVn }
-\clist_new:N \l__affiliations_tmpa_clist
-\int_new:N \l__affiliations_tmpa_int
-\prop_new:N \l__affiliations_tmpa_prop
-\seq_new:N \l__affiliations_affiliations_seq
-\seq_new:N \l__affiliations_authors_seq
-\seq_new:N \l__affiliations_names_seq
-\seq_new:N \l__affiliations_tmpa_seq
-\seq_new:N \l__affiliations_tmpb_seq
-\tl_new:N \l__affiliations_tmpa_tl
-\tl_new:N \l__affiliations_tmpb_tl
-\prop_new:N \l__affiliations_output_prop
-\prop_new:N \l__affiliations_affiliations_prop
-% \end{macrocode}
-% \end{variable}
-% \begin{variable}[int]{\l__affiliations_icons_prop}
-% The data for the |circled| mark style. Since this uses the \cs{char}, it is
-% only available in XeLaTeX.
-% \begin{macrocode}
-\prop_const_from_keyval:Nn \l__affiliations_icons_prop
- {
- 0 = \char"2460, 1 = \char"2461, 2 = \char"2462, 3 = \char"2463,
- 4 = \char"2464, 5 = \char"2465, 6 = \char"2466, 7 = \char"2467,
- 8 = \char"2468, 9 = \char"2469, 10 = \char"246A, 11 = \char"246B,
- 12 = \char"246C, 13 = \char"246D, 14 = \char"246E, 15 = \char"246F,
- 16 = \char"2470, 17 = \char"2471, 18 = \char"2472, 19 = \char"2473
- }
-% \end{macrocode}
-% \end{variable}
-% \begin{macro}[int]{\__affiliations_resolve_affiliations:}
-% A helper macro to order affiliations. Is called by
-% \cs{affiliations_resolve:n}.
-% \begin{macrocode}
-\cs_new:Npn \__affiliations_resolve_affiliations: #1#2
- {
- \clist_clear:N \l__affiliations_tmpa_clist
- \tl_if_empty:nTF {#2}
- {
- \prop_put:Nnn \l__affiliations_output_prop {#1} {}
- }
- {
- \seq_set_split:NVn \l__affiliations_tmpa_seq
- \l_affiliations_input_afil_sep_tl
- { #2 }
- \seq_map_inline:Nn \l__affiliations_tmpa_seq
- {
- \prop_get:NnNTF \l__affiliations_affiliations_prop
- {##1}
- \l__affiliations_tmpa_tl
- {
- \clist_put_right:NV \l__affiliations_tmpa_clist
- \l__affiliations_tmpa_tl
- }
- {
- %Not yet present
- \clist_put_right:Nx \l__affiliations_tmpa_clist
- {
- \prop_count:N \l__affiliations_affiliations_prop
- }
- \prop_put:Nnx \l__affiliations_affiliations_prop {##1}
- { \prop_count:N \l__affiliations_affiliations_prop }
- }
- }
- \prop_put:NnV \l__affiliations_output_prop
- {#1}
- \l__affiliations_tmpa_clist
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}[int]{\__affiliations_output_affiliations:}
-% A helper macro that outputs the list of affiliations, usually below
-% the list of authors.
-% \begin{macrocode}
-\cs_new:Nn \__affiliations_output_affiliations:
- {
- \prop_map_inline:Nn \l__affiliations_affiliations_prop
- {
- \int_set:Nn \l__affiliations_tmpa_int { ##2 }
- \str_case_e:nn { \l__affiliations_style_tl }
- {
- {alphabetic}
- {
- \textsuperscript{\int_to_alph:n{ \int_eval:n
- { \l__affiliations_tmpa_int + 1 }
- } }
- }
- {numeric}
- { \textsuperscript{\int_eval:n {\l__affiliations_tmpa_int + 1} } }
- {circled}
- {
- \prop_item:Nn \l__affiliations_icons_prop
- {\l__affiliations_tmpa_int}
- }
- {none} { }
- }
- ##1 ~
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}[int]{\__affiliations_return_afil_text:n}
-% A helper macro that returns the affiliation marks.
-% \begin{macrocode}
-\cs_new:Npn \__affiliations_return_afil_text:n #1
- {
- \int_set:Nn \l__affiliations_tmpa_int { #1 }
- \str_case_e:nn { \l__affiliations_style_tl }
- {
- {alphabetic}
- {
- \seq_put_right:Nx \l__affiliations_tmpb_seq
- { \int_to_alph:n{ \int_eval:n {#1 + 1} } }
- }
- {numeric}
- {
- \seq_put_right:Nx \l__affiliations_tmpb_seq
- { \int_eval:n {\l__affiliations_tmpa_int + 1} }
- }
- {circled}
- {
- \seq_put_right:Nx \l__affiliations_tmpb_seq
- { \prop_item:Nn \l__affiliations_icons_prop
- { \l__affiliations_tmpa_int} }
- }
- {none} { }
- }
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}[int]{\__affiliations_output_authors:}
-% A helper macro to output the list of authors, with affiliation marks (if any).
-% \begin{macrocode}
-\cs_new:Nn \__affiliations_output_authors:
- {
- \seq_clear:N \l__affiliations_tmpa_seq
- \prop_map_inline:Nn \l__affiliations_output_prop
- {
- \seq_clear:N \l__affiliations_tmpb_seq
- \clist_map_function:nN {##2} \__affiliations_return_afil_text:n
- \tl_set:Nn \l__affiliations_tmpb_tl
- {
- \seq_use:Nn \l__affiliations_tmpb_seq
- {\l__affiliations_afil_separator_tl}
- }
- \seq_put_right:Nx \l__affiliations_tmpa_seq
- {
- \tl_rescan:nn {} {##1}
- \exp_not:N \textsuperscript{\tl_use:N \l__affiliations_tmpb_tl}
- }
- }
- \seq_use:Nnnn \l__affiliations_tmpa_seq
- {\l__affiliations_separator_between_two_tl}
- {\l__affiliations_separator_between_mult_tl}
- {\l__affiliations_separator_between_last_two_tl}
- }
-% \end{macrocode}
-% \end{macro}
-
-% \begin{macro}[int]{\affiliations_resolve:n}
-% The main macro.
-% \begin{macrocode}
-\cs_new:Npn \affiliations_resolve:n #1
- {
- \seq_set_split:NVn \l__affiliations_names_seq
- \l__affiliations_input_names_sep_tl
- { #1 }
- \seq_map_inline:Nn \l__affiliations_names_seq
- {
- \seq_clear_new:N \l__affiliations_names_tmp_seq
- \seq_set_split:Nnn \l__affiliations_names_tmp_seq { \affiliation }
- { ##1 }
- \prop_put:Nxx \l__affiliations_tmpa_prop
- { \seq_item:Nn \l__affiliations_names_tmp_seq {1} }
- { \seq_item:Nn \l__affiliations_names_tmp_seq {2} }
- }
- \bool_if:NTF \l__affiliations_output_affiliation_bool
- {
- \bool_if:NTF \l__affiliations_output_grouped_bool
- {
- \prop_map_function:NN \l__affiliations_tmpa_prop
- \__affiliations_resolve_affiliations:
- \group_begin:
- \__affiliations_output_authors_font:
- \__affiliations_output_authors:
- \group_end:\\[0.5ex]
- \group_begin:
- \__affiliations_output_affiliation_font:
- \__affiliations_output_affiliations:
- \group_end:
- }
- {
- \prop_map_inline:Nn \l__affiliations_tmpa_prop
- {
- \__affiliations_output_authors_font:
- \tl_rescan:nn {} {##1}\\[0.5ex]
- \group_begin:
- \__affiliations_output_affiliation_font:
- \tl_rescan:nn {} {##2}
- \group_end:
- \medskip\\
- }
- \vspace*{-\baselineskip}
- }
- }
- {
- \group_begin:
- \__affiliations_output_authors_font:
- \seq_clear:N \l__affiliations_tmpa_seq
- \prop_map_inline:Nn \l__affiliations_tmpa_prop
- {
- \seq_put_right:Nx \l__affiliations_tmpa_seq
- {\tl_rescan:nn {} {##1} }
- }
- \seq_use:Nnnn \l__affiliations_tmpa_seq
- {\l__affiliations_separator_between_two_tl}
- {\l__affiliations_separator_between_mult_tl}
- {\l__affiliations_separator_between_last_two_tl}
- \group_end:
- }
- }
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \end{implementation}
-
-% \PrintIndex
diff --git a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdf b/macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdf
deleted file mode 100644
index c74e18a734..0000000000
--- a/macros/latex/contrib/langsci-affiliations/langsci-affiliations.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/mindflow/README.md b/macros/latex/contrib/mindflow/README.md
index 728aa95efd..5b8f135fb0 100644
--- a/macros/latex/contrib/mindflow/README.md
+++ b/macros/latex/contrib/mindflow/README.md
@@ -1,15 +1,10 @@
<!-- Copyright (C) 2021 by Jinwen XU -->
-[Github](https://github.com/Jinwen-XU/mindflow) | [CTAN](https://ctan.org/pkg/mindflow) | [Download](https://github.com/Jinwen-XU/mindflow/releases)
-
-![License](https://img.shields.io/ctan/l/mindflow.svg) ![CTAN Version](https://img.shields.io/ctan/v/mindflow.svg) ![Github Version](https://img.shields.io/github/release/Jinwen-XU/mindflow.svg) ![Repo Size](https://img.shields.io/github/repo-size/Jinwen-XU/mindflow.svg)
-
----
-
# The mindflow package
-This package provides an environment that is separated from the main text and
-has its own line numbers, for writing ideas or annotations.
+`mindflow` is a LaTeX package that allows you to write your ideas and annotations in a clear way.
+
+More specifically, it provides a LaTeX environment with its own line numbers or markers, which can be well distinguished from the main text.
# License
diff --git a/macros/latex/contrib/mindflow/mindflow.dtx b/macros/latex/contrib/mindflow/mindflow.dtx
index 43fadef53e..8fa703d938 100644
--- a/macros/latex/contrib/mindflow/mindflow.dtx
+++ b/macros/latex/contrib/mindflow/mindflow.dtx
@@ -18,15 +18,16 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mindflow}
%<*package>
- [2021/03/12 Mindflow environment]
+ [2021/03/17 Mindflow environment]
%</package>
%
%<*driver>
\documentclass{article}
\usepackage{doc}
-\usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.5in,right=1.2in]{geometry}
+\usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.6in,right=1.2in]{geometry}
\usepackage{titling}
\setlength{\droptitle}{-.5in}
+\PassOptionsToPackage{mathlines}{lineno}
\usepackage[linenumber,rightmarker]{mindflow}
\usepackage{enumitem}
\setlist{noitemsep}
@@ -42,7 +43,7 @@
%</driver>
% \fi
%
-% \CheckSum{125}
+% \CheckSum{186}
%
% \GetFileInfo{mindflow.dtx}
%
@@ -55,11 +56,9 @@
%
% \section{Introduction}
%
-% The \textsf{mindflow} package provides you a way to write your ideas,
-% annotations or writing plans.
-
-% For example (with option
-% \verb|linenumber| and \verb|rightmarker|):
+% The \textsf{mindflow} package provides you a way to write your ideas
+% and annotations clearly. For exmaple, with the options
+% \verb|linenumber| and \verb|rightmarker|, you will get:
% \begin{mindflow}
% What to write next:
% \begin{itemize}
@@ -69,14 +68,15 @@
% \item the complete code.
% \end{itemize}
% \end{mindflow}
-% You can also add line numbers to the other part of your document in the usual way.
-% Line numbers within the \textsf{mindflow} environments are independent from
-% those of the main text.
%
% \section{Usage}
%
-% Simply load the package with \verb|\usepackage{mindflow}|. By default
-% it has no line numbers or markers. You can use the following options:
+% Simply load the package with
+% \begin{verbatim}
+% \usepackage{mindflow}
+% \end{verbatim}
+% \vspace{-.5\baselineskip}
+% By default, it has no line numbers or markers. You can use the following options:
%
% \begin{tabular}{ll}
% \verb|linenumber| & Enable line numbers\\
@@ -87,58 +87,106 @@
% \end{tabular}
%
% \DescribeEnv{mindflow}
-% Then you can use the mindflow environment as
+% Then you can use the \verb|mindflow| environment as
% \begin{verbatim}
% \begin{mindflow}
% ...
% \end{mindflow}
% \end{verbatim}
%
-% \section{Some technical details}
+% \linenumbers
+%
+% You can also add line numbers to the other part of your document in the usual
+% way. For example, line numbers have been turned on for this paragraph with
+% \verb|\linenumbers|.
+%
+% \begin{mindflow}
+% Line numbers within the \textsf{mindflow} environments are independent from
+% those of the main text.
+% \end{mindflow}
+% (\emph{I recommend that you put an empty line before and after the mindflow
+% environments. This way, your paragraph structure won't get changed when you
+% use the }\verb|off|\emph{ option.})
+%
+% \nolinenumbers
+%
+% The feature of line numbering is provided by the package \textsf{lineno}. You
+% can read its documentation to learn more about it. Notice that, by default,
+% displayed equations are not numbered. You can add the following line before
+% \verb|\usepackage{mindflow}|:\\[.5\baselineskip]
+% \null\hspace{1.5em}{\small\verb|\PassOptionsToPackage{mathlines}{lineno}|}\\[.5\baselineskip]
+% to enable the line numbers for displayed equations.
+%
+% \begin{mindflow}\vspace{-\baselineskip}
+% \begin{align*}
+% (a + b)^2 &= a^2 + 2ab + b^2\\
+% (a + b)^3 &= a^3 + 3a^2b + 3ab^2 + b^3
+% \end{align*}
+% \end{mindflow}
+%
+%
+% \section{Some \TeX{}nical details}
%
% \DescribeMacro{\mindflowTextFont}
% \DescribeMacro{\mindflowNumFont}
-% The font for texts and line numbers within the \verb|mindflow|
-% environments can be specified by redefining \verb|\mindflowTextFont| and
-% \verb|\mindflowNumFont|. By default they are defined as:
+% The font for text, line numbers and markers within the \verb|mindflow|
+% environments can be specified by redefining \verb|\mindflowTextFont|,
+% \verb|\mindflowNumFont| and \verb|\mindflowMarkerFont|. By default,
+% they are defined as:
% \begin{verbatim}
% \newcommand{\mindflowTextFont}{\normalfont\footnotesize}
% \newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily}
+% \newcommand{\mindflowMarkerFont}{\normalfont\scriptsize\ttfamily}
% \end{verbatim}
+% \vspace{-.5\baselineskip}
+%
% \DescribeMacro{\mindflowLeft}
% \DescribeMacro{\mindflowRight}
-% The left and right marker can be changed by redefining
+% The left and right markers can be changed by redefining
% \verb|\mindflowLeft| and \verb|\mindflowRight|. Both have the default
% value as ``\verb|*|''.
%
% \DescribeMacro{\mindflowLineHeight}
-% The height of the separation line is a length macro named \verb|\mindflowLineHeight|,
+% The height of the separation lines is a length macro named \verb|\mindflowLineHeight|,
% with default value \verb|0.4pt|. You can change this with \verb|\setlength|.
%
-% And finally, the color for texts and line numbers within the \verb|mindflow|
-% environments are called \verb|mindflowText| and \verb|mindflowNum|,
-% respectively. By default, they have the same color as the context, with
-% opacity 30\% and 8\%, respectively.
-
+% \DescribeMacro{mindflowLine}
+% \DescribeMacro{mindflowText}
+% \DescribeMacro{mindflowNum}
+% \DescribeMacro{mindflowMarker}
+% And finally, the colors for the separation lines, text, line numbers and
+% markers within the \verb|mindflow| environments are called
+% \verb|mindflowLine|, \verb|mindflowText|, \verb|mindflowNum| and
+% \verb|mindflowMarker|, respectively. By default, they have the same color as
+% the context, with opacity 30\% for the separation lines, text and markers, and
+% 8\% for the line numbers.
+%
% \section{An example}
% With option \verb|linenumber, leftmarker, rightmarker| and the following settings:
% \begin{verbatim}
-% \colorlet{mindflowText}{blue!50!cyan!80}
-% \colorlet{mindflowNum}{blue!50!cyan!80}
+% \colorlet{mindflowLine}{green!50!black}
+% \colorlet{mindflowText}{blue!50!cyan}
+% \colorlet{mindflowNum}{red!50!orange}
+% \colorlet{mindflowMarker}{orange}
% \renewcommand{\mindflowTextFont}{\normalfont\footnotesize\sffamily\itshape}
-% \renewcommand{\mindflowNumFont}{\normalfont\footnotesize\sffamily}
+% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\sffamily}
+% \renewcommand{\mindflowMarkerFont}{\normalfont\footnotesize\sffamily}
% \renewcommand{\mindflowLeft}{\hspace{1em}\(\succ\)}
% \renewcommand{\mindflowRight}{\(\prec\)}
% \setlength{\mindflowLineHeight}{1pt}
% \end{verbatim}
+% \vspace{-.5\baselineskip}
% One gets:
% \makeatletter
% \@mindflow@leftmarkertrue
% \makeatother
-% \colorlet{mindflowText}{blue!50!cyan!80}
-% \colorlet{mindflowNum}{blue!50!cyan!80}
+% \colorlet{mindflowLine}{green!50!black}
+% \colorlet{mindflowText}{blue!50!cyan}
+% \colorlet{mindflowNum}{red!50!orange}
+% \colorlet{mindflowMarker}{orange}
% \renewcommand{\mindflowTextFont}{\normalfont\footnotesize\sffamily\itshape}
-% \renewcommand{\mindflowNumFont}{\normalfont\footnotesize\sffamily}
+% \renewcommand{\mindflowNumFont}{\normalfont\small\footnotesize\sffamily}
+% \renewcommand{\mindflowMarkerFont}{\normalfont\footnotesize\sffamily}
% \renewcommand{\mindflowLeft}{\hspace{1em}\(\succ\)}
% \renewcommand{\mindflowRight}{\(\prec\)}
% \setlength{\mindflowLineHeight}{1pt}
@@ -177,11 +225,14 @@
\RequirePackage{xcolor}
\colorlet{mfSavedColor}{.}
+\colorlet{mindflowLine}{mfSavedColor!30}
\colorlet{mindflowText}{mfSavedColor!30}
+\colorlet{mindflowMarker}{mfSavedColor!30}
\colorlet{mindflowNum}{mfSavedColor!8}
\newcommand{\mindflowTextFont}{\normalfont\footnotesize}
\newcommand{\mindflowNumFont}{\normalfont\scriptsize\ttfamily}
+\newcommand{\mindflowMarkerFont}{\normalfont\scriptsize\ttfamily}
\newcommand{\mindflowLeft}{*}
\newcommand{\mindflowRight}{*}
\newlength{\mindflowLineHeight}
@@ -221,16 +272,17 @@
\setcounter{linenumber}{\value{mfLN}}%
\LNturnsONfalse%
\ifLineNumbers\LNturnsONtrue\fi\nolinenumbers%
+ \color{mindflowLine}\mfSepLine%
\mindflowTextFont\color{mindflowText}%
- \mfSepLine%
\linenumbers%
\renewcommand\makeLineNumber{%
- \hss\color{mindflowNum}%
+ \hss%
\if@mindflow@linenumber%
- \mindflowNumFont\LineNumber~%
+ \mindflowNumFont\color{mindflowNum}\LineNumber\hspace{1em}%
\fi%
+ \color{mindflowMarker}%
\if@mindflow@leftmarker%
- \mindflowLeft\hspace{1em}%
+ \mindflowMarkerFont\mindflowLeft\hspace{1em}%
\fi%
\if@mindflow@rightmarker%
\rlap{\hskip\textwidth\hspace{1em}\mindflowRight}%
@@ -239,12 +291,41 @@
}
{%
\par%
- \vspace{-.5\baselineskip}\mfSepLine%
+ \vspace{-.5\baselineskip}\color{mindflowLine}\mfSepLine%
\ifLNturnsON\linenumbers\fi%
\setcounter{mfLN}{\value{linenumber}}%
\setcounter{linenumber}{\value{recordLN}}%
}
\fi
+
+\ifdefined\linenomathpatch\else
+ \RequirePackage{amsmath}
+ \RequirePackage{etoolbox}
+ \newcommand*\linenomathpatch[1]{%
+ \cspreto{#1}{\linenomath}%
+ \cspreto{#1*}{\linenomath}%
+ \cspreto{end#1}{\endlinenomath}%
+ \cspreto{end#1*}{\endlinenomath}%
+ }
+ \newcommand*\linenomathpatchAMS[1]{%
+ \cspreto{#1}{\linenomathAMS}%
+ \cspreto{#1*}{\linenomathAMS}%
+ \csappto{end#1}{\endlinenomath}%
+ \csappto{end#1*}{\endlinenomath}%
+ }
+ \expandafter\ifx\linenomath\linenomathWithnumbers
+ \let\linenomathAMS\linenomathWithnumbers
+ \patchcmd\linenomathAMS{\advance\postdisplaypenalty\linenopenalty}{}{}{}
+ \else
+ \let\linenomathAMS\linenomathNonumbers
+ \fi
+ \linenomathpatch{equation}
+ \linenomathpatchAMS{gather}
+ \linenomathpatchAMS{multline}
+ \linenomathpatchAMS{align}
+ \linenomathpatchAMS{alignat}
+ \linenomathpatchAMS{flalign}
+\fi
% \end{macrocode}
%
% \Finale
diff --git a/macros/latex/contrib/mindflow/mindflow.pdf b/macros/latex/contrib/mindflow/mindflow.pdf
index b9448dbd48..753bb68053 100644
--- a/macros/latex/contrib/mindflow/mindflow.pdf
+++ b/macros/latex/contrib/mindflow/mindflow.pdf
Binary files differ