summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/easybook/README.md33
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.pdfbin0 -> 310688 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/easybook-demo.tex (renamed from macros/latex/contrib/easybook/easybook-demo.tex)19
-rw-r--r--macros/latex/contrib/easybook/doc/easybook.pdfbin173570 -> 236973 bytes
-rw-r--r--macros/latex/contrib/easybook/doc/pages/appendix.tex (renamed from macros/latex/contrib/easybook/pages/appendix.tex)0
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter1.tex (renamed from macros/latex/contrib/easybook/pages/chapter1.tex)48
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter2.tex (renamed from macros/latex/contrib/easybook/pages/chapter2.tex)6
-rw-r--r--macros/latex/contrib/easybook/doc/pages/chapter3.tex54
-rw-r--r--macros/latex/contrib/easybook/doc/pages/preface.tex (renamed from macros/latex/contrib/easybook/pages/preface.tex)9
-rw-r--r--macros/latex/contrib/easybook/doc/ref/refs.bib (renamed from macros/latex/contrib/easybook/ref/refs.bib)0
-rw-r--r--macros/latex/contrib/easybook/easybook-demo.pdfbin315098 -> 0 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.cls323
-rw-r--r--macros/latex/contrib/easybook/pages/chapter3.tex52
-rw-r--r--macros/luatex/generic/lua-visual-debug/doc/README.md4
-rw-r--r--macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.pdfbin209760 -> 210686 bytes
-rw-r--r--macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.tex4
-rw-r--r--macros/luatex/generic/lua-visual-debug/doc/sample-plain.pdfbin49093 -> 49217 bytes
-rw-r--r--macros/luatex/generic/lua-visual-debug/doc/sample.pdfbin45257 -> 45516 bytes
-rw-r--r--macros/luatex/generic/lua-visual-debug/lua-visual-debug.lua28
-rw-r--r--macros/luatex/generic/lua-visual-debug/lua-visual-debug.sty4
-rw-r--r--macros/musixtex/README2
-rw-r--r--macros/musixtex/doc/ChangeLog-131.txt4
-rw-r--r--macros/musixtex/doc/musixdoc.pdfbin1373998 -> 1374931 bytes
-rw-r--r--macros/musixtex/doc/musixdoc/barlines.tex4
-rw-r--r--macros/musixtex/doc/musixdoc/frontmatter.tex2
-rw-r--r--macros/musixtex/doc/musixdoc/layout.tex5
-rw-r--r--macros/musixtex/doc/musixdoc/repeats.tex2
-rw-r--r--macros/musixtex/doc/musixdoc/restsdoc.tex2
-rw-r--r--macros/musixtex/doc/scripts/musixtex.124
-rw-r--r--macros/musixtex/doc/scripts/musixtex.pdfbin23215 -> 23518 bytes
-rwxr-xr-xmacros/musixtex/scripts/musixtex.lua48
-rw-r--r--macros/musixtex/tex/musixps.tex5
-rw-r--r--macros/musixtex/tex/musixtex.tex60
-rw-r--r--macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man2
34 files changed, 445 insertions, 299 deletions
diff --git a/macros/latex/contrib/easybook/README.md b/macros/latex/contrib/easybook/README.md
index 8f75b0f891..6ad00b0e33 100644
--- a/macros/latex/contrib/easybook/README.md
+++ b/macros/latex/contrib/easybook/README.md
@@ -1,7 +1,11 @@
# Easybook book document class
-Easybook is a minimalist style template based on the ctexbook book document class. It is mainly suitable for typesetting Chinese books or notes, and can even be slightly modified to become a dissertation template. Some commonly used macro packages have been loaded to achieve general typesetting requirements. Although some details have been considered as much as possible, there are still deficiencies.
+
+Easybook is a minimalist style template based on the ctexbook book document class. It is mainly suitable for typesetting Chinese books or notes, and can even be slightly modified to become a dissertation template. Some commonly used macro packages have been loaded to achieve general typesetting requirements. Although some details have been considered as much as possible, there are still deficiencies.
+
## Compilation method
+
Please use the UTF8 encoding and enter the following command on the command line
+
```
xelatex -shell-escape easybook-demo
bibtex easybook-demo
@@ -9,22 +13,31 @@ makeindex easybook-demo
xelatex -shell-escape easybook-demo
xelatex -shell-escape easybook-demo
```
+
## Reference documents
+
- [CTeX macro collection manual](https://ctan.org/pkg/ctex)
- [Xiamen University graduation thesis template](https://github.com/CamuseCao/XMU-thesis)
- [Fudan University graduation thesis template](https://github.com/stone-zeng/fduthesis)
- [Wuhan University graduation thesis template](https://github.com/mtobeiyf/whu-thesis)
- [ElegantBook book template](https://ctan.org/pkg/elegantbook)
-## Website
-| [Gitee](https://gitee.com/TeX-doc/easybook) | [Github](https://github.com/TeX-doc/easybook) | [CTAN]() | [Font](https://wws.lanzous.com/b01ns361i) |
+## License
+
+This work may be distributed and/or modified under the conditions of the CC-BY-NC 4.0 License. The latest version of this license is in https://creativecommons.org/licenses/by-nc/4.0/legalcode.
+## Website
+
+| [Gitee](https://gitee.com/TeX-doc/easybook) | [Github](https://github.com/TeX-doc/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [Font](https://wws.lanzous.com/b01ns361i) |
# easybook 书籍文档类
easybook 是基于 ctexbook 书籍文档类的极简风格模板。它主要适用于中文书籍或笔记的排版,甚至可以稍作修改成为论文模板。已加载一些常用的宏程序包以实现一般的排版要求。尽管已尽可能多地考虑了一些细节,但仍然存在不足。
-## 编制方法
+
+## 编译方法
+
请使用 UTF8 编码,并在命令行上输入以下命令
+
```
xelatex -shell-escape easybook-demo
bibtex easybook-demo
@@ -32,11 +45,19 @@ makeindex easybook-demo
xelatex -shell-escape easybook-demo
xelatex -shell-escape easybook-demo
```
+
## 参考文档
+
- [CTeX 宏集手册](https://ctan.org/pkg/ctex)
- [厦门大学毕业论文模板](https://github.com/CamuseCao/XMU-thesis)
- [复旦大学毕业论文模板](https://github.com/stone-zeng/fduthesis)
- [武汉大学毕业论文模板](https://github.com/mtobeiyf/whu-thesis)
- [ElegantBook 书籍模板](https://ctan.org/pkg/elegantbook)
-## 网址
-| [Gitee](https://gitee.com/TeX-doc/easybook) | [Github](https://github.com/TeX-doc/easybook) | [CTAN]() | [字体](https://wws.lanzous.com/b01ns361i) | \ No newline at end of file
+
+## 协议
+
+可以使用 CC-BY-NC 4.0 许可协议传播和修改此作品。此许可协议的最新版本位于 https://creativecommons.org/licenses/by-nc/4.0/legalcode。
+
+## 网址
+
+| [Gitee](https://gitee.com/TeX-doc/easybook) | [Github](https://github.com/TeX-doc/easybook) | [CTAN](https://ctan.org/pkg/easybook) | [字体](https://wws.lanzous.com/b01ns361i) | \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/doc/easybook-demo.pdf b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
new file mode 100644
index 0000000000..a5e66104c1
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook-demo.tex b/macros/latex/contrib/easybook/doc/easybook-demo.tex
index 91a0848dd0..9f9531bd4f 100644
--- a/macros/latex/contrib/easybook/easybook-demo.tex
+++ b/macros/latex/contrib/easybook/doc/easybook-demo.tex
@@ -3,7 +3,7 @@
{
style =
{
- color = navygreen,
+ color = forest,
% cite = authoryear,
thmbox = true,
% capdash = true,
@@ -15,7 +15,7 @@
link =
{
hyperlink = various,
- linkcolor = lightblue,
+ linkcolor = skyblue,
linktopage = false
},
spread =
@@ -26,6 +26,14 @@
capspread = 1,
fnspread = 1
},
+ elfont =
+ {
+ tabfont = \sffamily\small,
+ figfont = \sffamily\small,
+ lstfont = \sffamily\small,
+ fnfont = \rmfamily,
+ marfont = \sffamily\footnotesize
+ },
% secnumdepth = 2,
% tocdepth = 2
}
@@ -35,12 +43,13 @@
\title{\sffamily easybook书籍文档类}
\author
{
- Qu Yi\thanks{texeasybook@foxmail.com.} \\
+ 瞿毅\thanks{texeasybook@foxmail.com.} \\
\textcolor[HTML]{c71d23}{\faGit}~\url{https://gitee.com/TeX-doc/easybook}\thanks{Gitee为项目的主要发布地址。} \\
\faGithub~\url{https://github.com/TeX-doc/easybook} \\
- \textcolor[HTML]{00c2ff}{\faEdge}~\url{https://latexstudio.net}
+ \textcolor[HTML]{00c2ff}{\faEdge}~\url{https://latexstudio.net} \\
+ \url{https://ctan.org/pkg/easybook}
}
- \date{2021/01/03\hskip\ccwd\relax v1.0}
+ \date{2021/01/08\hskip\ccwd\relax v1.1}
}
\begin{document}
diff --git a/macros/latex/contrib/easybook/doc/easybook.pdf b/macros/latex/contrib/easybook/doc/easybook.pdf
index 19b4476b98..43a82ee62d 100644
--- a/macros/latex/contrib/easybook/doc/easybook.pdf
+++ b/macros/latex/contrib/easybook/doc/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/pages/appendix.tex b/macros/latex/contrib/easybook/doc/pages/appendix.tex
index f5981487b1..f5981487b1 100644
--- a/macros/latex/contrib/easybook/pages/appendix.tex
+++ b/macros/latex/contrib/easybook/doc/pages/appendix.tex
diff --git a/macros/latex/contrib/easybook/pages/chapter1.tex b/macros/latex/contrib/easybook/doc/pages/chapter1.tex
index 280e356900..ffb86ee290 100644
--- a/macros/latex/contrib/easybook/pages/chapter1.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter1.tex
@@ -5,7 +5,7 @@
\chapter{常用环境}
\section{公式}\index{g@公式}
-\lstinline{amsmath} 宏包提供多种公式环境以及许多相关的排版命令,可用以改进和提高数学结构的排版效果。\textsf{注意,公式前不要空行。}
+\zhlipsum*[42][name = aspirin]
\begin{equation}\label{eq1}
\bm{A} = \left[
\begin{matrix}
@@ -22,7 +22,7 @@
\end{equation}
可以通过添加标签在正文中引用公式,如带有中文括号的引用\cref{eq1}。
-\lstinline{align} 环境用于\textsf{两个及以上}需要垂直对齐的公式,一般的像等于号之类的二元算符是被对齐的。变体的块环境 \lstinline{aligned} 使得内容的长度就是它的\textsf{实际长度},可以用作包含表达式的组件。\lstinline{split} 环境是针对\textsf{单个长公式},使用\& 标记对齐点。\lstinline{split} 环境不提供编号,只能在其他行间公式结构中使用。
+\zhlipsum*[56][name = aspirin]
\begin{equation}
\begin{split}
\iint_{A}E\rho(\bm{v}\cdot\bm{n})\mathrm{d}A+\frac{\partial}{\partial t}\iiint_{V}E\rho \mathrm{d}V & = \frac{\delta Q}{\mathrm{d}t}-\frac{\delta W}{\mathrm{d}t}
@@ -31,7 +31,7 @@
\end{split}
\end{equation}
-调用 \lstinline{cases} 括号宏包提供的左花括号 \lstinline{subnumcases} 环境,可将花括号右侧的每行公式都给出一个子序号。
+\zhlipsum*[42][name = aspirin]
\begin{subnumcases}{y =}
C_1e^{r_1x}+C_2e^{r_2x} & \quad $p^2-4q > 0$
\\
@@ -40,7 +40,7 @@
e^{\alpha x}\left(C_1\cos\beta x+C_2\sin\beta x\right) & \quad $p^2-4q<0$
\end{subnumcases}
-\lstinline{multline} 环境适用于一行无法放下的公式。\lstinline{multline} 的第一行在最左边,最后一行在最右边,除了在两边有缩进量,中间的任何其他行都会在行间公式宽度内独立居中,例子见\cref{defi1}。
+\zhlipsum*[57][name = aspirin]
\clearpage
\section{插图}\index{c@插图}
@@ -74,52 +74,30 @@
\clearpage
\section{列表}\index{l@列表}
-\lstinline{enumitem} 宏包为系统自带的列表环境提供了更灵活的标签以及间距的控制。已设置默认格式,若自定义标签可例如
-\begin{lstlisting}[numbers = none]
-\begin{enumerate}[label = \arabic*(a),leftmargin = 1cm,resume]
-\begin{itemize}[label = \textbullet]
-\begin{description}[font = \sffamily\bfseries,style = nextline]
-\end{lstlisting}
+\zhlipsum*[10][name = aspirin]
\subsection{排序列表}\label{subsec1}\index{l@列表!p@排序列表}
\begin{enumerate}
- \item 使用 \lstinline{enumerate} 环境可创建有序列表。
- \item 第二项
+ \item \zhlipsum*[41][name = aspirin]
\begin{enumerate}
- \item 第二项中的第一项
+ \item \zhlipsum*[42][name = aspirin]
\end{enumerate}
+ \item \zhlipsum*[41][name = aspirin]
\end{enumerate}
-使用 \lstinline{enumerate*} 环境产生行内部列表。可以使用\textsf{A、a、I、i和1}作为可选项为 \lstinline{enumerate*} 与 \lstinline{enumerate} 格式化标签,
-\begin{enumerate*}[(a)]
- \item 行内第一项
- \item 行内第二项
-\end{enumerate*}。
-若生成\textbf{Item I、Item II、Item III}格式可以这样
-\begin{lstlisting}[numbers = none]
-\begin{enumerate*}[(a)]
-\begin{enumerate}[\bfseries{Item}I]
-\end{lstlisting}
\subsection{常规列表}\index{l@列表!c@常规列表}
\begin{itemize}
- \item 第一项 \\
- 使用 \lstinline{itemize} 环境可创建不计数列表,若换行不缩进。 \par
- 若在列表中分段后则缩进两字符。
- \item 第二项
+ \item \zhlipsum[41-42][name = aspirin]
\begin{itemize}
- \item \lstinline{itemize*} 为行内常规列表,也提供一个可选参数。
+ \item \zhlipsum*[42][name = aspirin]
\end{itemize}
+ \item \zhlipsum*[41][name = aspirin]
\end{itemize}
-用$\star$取代默认的符号
-\begin{lstlisting}[numbers = none]
-\begin{itemize*}[$\star$]
-\begin{itemize}[$\star$]
-\end{lstlisting}
\subsection{主题列表}\index{l@列表!z@主题列表}
\begin{description}
- \item[主题一] 使用 \lstinline{description} 环境可创建带有主题词的列表。
- \item[主题二] 详细内容
+ \item[主题一] \zhlipsum*[42][name = aspirin]
+ \item[主题二] \zhlipsum*[42][name = aspirin]
\end{description}
\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/pages/chapter2.tex b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
index 5b59aad56b..b8ab64147d 100644
--- a/macros/latex/contrib/easybook/pages/chapter2.tex
+++ b/macros/latex/contrib/easybook/doc/pages/chapter2.tex
@@ -56,12 +56,12 @@ The Stokes formula is an extension of the basic calculus formula in the case of
\end{proof}
\begin{mybox}*[My title]\index{z@自定义盒子}
-环境 \lstinline{mybox} 创建一个段落盒子,可以添加可选参数的标题,否则无标题框。
+ \zhlipsum*[3][name = aspirin]
\tcblower
-带有星号的环境会生成浅灰背景,否则是纯白背景。
+ \zhlipsum*[8][name = aspirin]
\end{mybox}
-习题环境 \lstinline{exercise} 的标题紧接上一节编号并加入目录与页眉,当使用星号环境时不进行编号。它含有三个可选参数 \lstinline{[<颜色>][<编号>][<标题>]},其中颜色为自定义或 \lstinline{xcolor} 包含的颜色名称(深色),正文编号格式与\cref{subsec1} 相同,标题名默认为摘要,参数只能\textsf{从右往左}省略。
+\zhlipsum*[3][name = aspirin]
\begin{exercise}[black][1.][习题]\index{x@习题环境}
\item 设$w = f(x+y+z,xyz)$,$f$具有二阶连续偏导数,求$\dfrac{{\partial w}}{{\partial x}}$和$\dfrac{{{\partial ^2}w}}{{\partial x\partial z}}$。
\item 已知$y = y(x)$在任意点$x$处的增量$\Delta y = \dfrac{y\Delta x}{1+x^2}+\alpha$,其中$\alpha$是$\Delta x$的高阶无穷小($\Delta x\to 0$时),$y(0) = \pi$,则$y(1) = \uline{\mbox{\hspace{2em}}}$。
diff --git a/macros/latex/contrib/easybook/doc/pages/chapter3.tex b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
new file mode 100644
index 0000000000..6ca662ca0d
--- /dev/null
+++ b/macros/latex/contrib/easybook/doc/pages/chapter3.tex
@@ -0,0 +1,54 @@
+% Chapter 3
+\documentclass[../easybook-demo]{subfiles}
+\begin{document}
+
+\chapter{其它格式}\label{chap1}
+
+\section{代码}\index{d@代码}
+\zhlipsum[42][name = aspirin]
+\begin{lstlisting}[language = Python,caption = {python程序练习题}]
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+
+if __name__ == '__main__':
+ ptr = []
+ for i in range(5):
+ num = int(raw_input('please input a number:\n'))
+ ptr.append(num)
+ print ptr
+\end{lstlisting}
+
+\section{物理量}\index{w@物理量}
+阿司匹林还有三种作用方式 \num{-21x.3e5}。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子 \SI{.5}{mol}。
+
+\section{化学式}\index{h@化学式}
+阿司匹林还有三种作用方式。一是使线粒体的氧化磷酸化解偶联。阿司匹林会携带质子从线粒体膜间隙扩散进入线粒体基质,然后再次电离释放质子\ch{(NH4)2S}、\ch{[Cu(NH3)4]^2+}。
+\[\ch{$x$ Na(NH4)HPO4 ->[$\Delta$] (NaPO3)_{$x$} + $x$ NH3 ^ + $x$ H2O}\]
+阿司匹林还有三种作用方式。
+\[\zihao{-5}\chemfig[cram width=5pt]{*6((-HO)-=-(-(<[::60]OH)-[::-60]-[::-60,,,2]
+HN-[::+60]CH_3)=-(-HO)=)}\]
+
+\clearpage
+\section{引用}\index{y@引用}
+\zhlipsum[8][name = aspirin]
+\subsection{索引}\index{y@引用!s@索引}
+\zhlipsum[8][name = aspirin]
+
+\subsection{脚注}\index{y@引用!j@脚注}
+六年之后的1859年,冯·基尔姆让水杨酸和乙酰氯反应,制得了分析纯的乙酰水杨酸,他称之为“乙酰化水杨酸”(acetylierte*Salicyls+"aure)\footnote{这是一个悬挂缩进的脚注。\par 这是分段将会缩进两字符。}。
+
+60和70年代,约翰·范恩等人发现了阿司匹林的作用机理,60至80年代的其他研究和临床试验证明该药有抗凝血的药效,可降低血栓疾病的发病率\Footnote{*}{这是可以自定义标记的脚注。}。
+
+\subsection{边注}\index{y@引用!b@边注}
+对乙酰氨基酚和布洛芬\marginnote{这是一个边注。}于1956年和1959年相继问世以后,阿司匹林的使用率开始下降。
+
+\subsection{引用章节}\label{sec1}\index{y@引用!s@索引}
+兽医有时用阿司匹林来镇痛或抗血栓,主要给狗用\cref{chap1},有时给马用\cref{sec1},不过现在一般会用副作用较少的新疗法。
+
+\subsection{参考文献}\index{y@引用!c@参考文献}
+这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
+
+\section{行内盒子}\index{h@行内盒子}
+对乙酰氨基酚和布洛芬 \concise[Aqua][fontupper = \rmfamily]{concise} 于1956年和1959年相继问世以后,阿司匹林 \fuzzy[yellow][fontupper = \ttfamily,colupper = black]{fuzzy} 的使用率开始下降。
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/easybook/pages/preface.tex b/macros/latex/contrib/easybook/doc/pages/preface.tex
index 559df6d5be..de5c7d8a0c 100644
--- a/macros/latex/contrib/easybook/pages/preface.tex
+++ b/macros/latex/contrib/easybook/doc/pages/preface.tex
@@ -4,13 +4,14 @@
\chapter*{前言}
-\lstinline{easybook} 使用\LaTeX 3语法将选项扩展入\CTeX 宏集接口命令 \lstinline{\ctexset} 的列表。如果无法编译以及选项说明细节参见~\href{./doc/easybook.pdf}{easybook使用帮助}。
+\lstinline{easybook} 使用\LaTeX 3语法将选项扩展入\CTeX 宏集接口命令 \lstinline{\ctexset} 的列表。如果无法编译以及选项说明细节参见~\href{../easybook.pdf}{easybook用户手册}。
-\begin{enumerate}[label=\color{DarkBlue}\protect\circled{\arabic*}]
+\begin{enumerate}[label = \color{DarkBlue}\protect\circled{\arabic*}]
+\item 修复了 \lstinline{linktopage} 选项关闭时目录中标题编号无超链接的问题。
+\item 增加 \lstinline{elfont} 选项可以自定义图表、代码、脚注和边注的字体。
+\item 增加 \lstinline{config} 选项可以载入用户配置文件。
\item 优化页眉页脚,单面或双面排版适配了不同风格。
-\item 增加章前摘要、定理和段落、行内盒子,增加习题环境。
\item 更改草稿选项,与标准文类行为一致并显示页面边框。
-\item 增加超链接颜色风格及目录链接格式,调整配色,删除文章模式。
\item 使用功能更丰富的 \lstinline{thmtools} 设置定理环境。
\item 可自定义正文、表格、公式环境、图表标题以及脚注的行距。
\item 图表可以使用双语标题,增加代码索引和索引目录,脚注标记可以设置为自定义的符号。
diff --git a/macros/latex/contrib/easybook/ref/refs.bib b/macros/latex/contrib/easybook/doc/ref/refs.bib
index 187a693805..187a693805 100644
--- a/macros/latex/contrib/easybook/ref/refs.bib
+++ b/macros/latex/contrib/easybook/doc/ref/refs.bib
diff --git a/macros/latex/contrib/easybook/easybook-demo.pdf b/macros/latex/contrib/easybook/easybook-demo.pdf
deleted file mode 100644
index 7ec299677d..0000000000
--- a/macros/latex/contrib/easybook/easybook-demo.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.cls b/macros/latex/contrib/easybook/easybook.cls
index 71b1d47f47..318c80d9e6 100644
--- a/macros/latex/contrib/easybook/easybook.cls
+++ b/macros/latex/contrib/easybook/easybook.cls
@@ -5,17 +5,21 @@
%% The original source files were:
%%
%% easybook.dtx (with options: `class')
+%%
%% Copyright (C) 2021 by Qu Yi <texeasybook@foxmail.com>
+%%
%% This work may be distributed and/or modified under the
%% conditions of the CC-BY-NC 4.0 License.
-%% Gitee: https://gitee.com/TeX-doc/easybook
-%% Github: https://github.com/TeX-doc/easybook
+%% The latest version of this license is in
+%% https://creativecommons.org/licenses/by-nc/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/01/03}{v1.0}{}
+\ProvidesExplClass{easybook}{2021/01/08}{v1.1}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
+\cs_new_protected:Npn \__patch_cmd:Nnn #1#2#3
+ {\ctex_patch_cmd_once:NnnnTF #1{}{#2}{#3}{}{\ctex_patch_failure:N #1}}
\cs_new_protected:Npn \__appto_cmd:Nn #1#2
{\ctex_appto_cmd:NnnTF #1{}{#2}{}{\ctex_patch_failure:N #1}}
@@ -33,6 +37,7 @@
\bool_new:N \l__multoc_bool
\bool_new:N \l__chap_withpart_bool
\bool_new:N \l__foot_perpart_bool
+\bool_new:N \l__foot_perpage_bool
\clist_new:N \g__hyperref_clist
\clist_new:N \g__options_clist
@@ -117,16 +122,21 @@
\tl_new:N \g__math_spread_tl
\tl_new:N \g__cap_spread_tl
\tl_new:N \g__foot_spread_tl
+\tl_new:N \g__tab_font_tl
+\tl_new:N \g__fig_font_tl
+\tl_new:N \g__lst_font_tl
+\tl_new:N \g__foot_font_tl
+\tl_new:N \g__margin_font_tl
+\tl_new:N \g__config_tl
\ctex_define:n
{
style .meta:nn = {ctex/style}{#1},
link .meta:nn = {ctex/link}{#1},
spread .meta:nn = {ctex/spread}{#1},
- style/color .choices:nn =
- {black,navygreen,navyblue}
- {\tl_set_eq:NN \g__keys_color_tl\l_keys_choice_tl},
- style/color .initial:n = black,
+ elfont .meta:nn = {ctex/elfont}{#1},
+ config .tl_set:N = \g__config_tl,
+
style/cite .choices:nn =
{number,authoryear}
{\tl_set_eq:NN \g__keys_cite_tl\l_keys_choice_tl},
@@ -162,21 +172,22 @@
spread/fnspread .tl_set:N = \g__foot_spread_tl,
spread/fnspread .initial:n = 1,
+ elfont/tabfont .tl_set:N = \g__tab_font_tl,
+ elfont/tabfont .initial:n = \sffamily\small,
+ elfont/figfont .tl_set:N = \g__fig_font_tl,
+ elfont/figfont .initial:n = \sffamily\small,
+ elfont/lstfont .tl_set:N = \g__lst_font_tl,
+ elfont/lstfont .initial:n = \sffamily\small,
+ elfont/fnfont .tl_set:N = \g__foot_font_tl,
+ elfont/fnfont .initial:n = \rmfamily,
+ elfont/marfont .tl_set:N = \g__margin_font_tl,
+ elfont/marfont .initial:n = \rmfamily\footnotesize,
+
lstlistlistingname .tl_set:N = \lstlistlistingname,
lstlistingname .tl_set:N = \lstlistingname
}
\RequirePackage[svgnames]{xcolor}
-\cs_new_protected:Nn \__load_color_black:
- {\definecolorset{HTML}{ctex@}{}{frame,000000;emph,000000;verb,000000}}
-\cs_new_protected:Nn \__load_color_navygreen:
- {\definecolorset{HTML}{ctex@}{}{frame,005752;emph,004986;verb,a40000}}
-\cs_new_protected:Nn \__load_color_navyblue:
- {\definecolorset{HTML}{ctex@}{}{frame,005982;emph,eb6877;verb,a4005b}}
-\cs_new_protected:Nn \__load_color:
- {\use:c {__load_color_ \g__keys_color_tl :}}
-\ctex_at_end_preamble:n {\__load_color:}
-
\RequirePackage{pdfpages,subfiles}
\includepdfset{fitpaper = true}
\RequirePackage[hang,stable]{footmisc}
@@ -202,6 +213,17 @@
\RequirePackage[most]{tcolorbox}
\RequirePackage[sort&compress]{gbt7714}
\RequirePackage[xindy]{imakeidx}
+\RequirePackage[
+ lang = {chinese-utf8},
+ type = {CC},
+ modifier = {by-nc},
+ version = {4.0}
+ ]{doclicense}
+\ctex_at_end_preamble:n
+ {
+ \tl_if_empty:NF \g__config_tl
+ {\file_input:n {\g__config_tl}}
+ }
\sys_if_engine_xetex:TF
{
@@ -395,7 +417,7 @@
\fancyfoot[C]{\color{ctex@frame}\thepage}
\fancypagestyle{plain}
{
- \fancyhf{}\cs_gset:Npn\headrule{}
+ \fancyhf{}\cs_gset:Npn \headrule{}
\fancyfoot[C]{\color{ctex@frame}\thepage}
}
}
@@ -426,47 +448,58 @@
\titlecontents{part}
[0\ccwd]
{\addvspace{1pc}\sffamily\large}
- {}
- {}
+ {}{}
{\normalsize\titlerule*{}\bf\contentspage}
\titlecontents{chapter}
[0\ccwd]
{\addvspace{1pc}\sffamily\large}
- {\thecontentslabel\hspace{\ccwd}}
- {}
- {\normalsize\titlerule*[0.55pc]{\scalebox{1.2}{$\cdot$}}\bf\contentspage}
+ {}{}
+ {\normalsize\titlerule*[0.65pc]{\scalebox{1.2}{$\cdot$}}\bf\contentspage}
\titlecontents{section}
[1.5\ccwd]
{\addvspace{0.35pc}}
- {\thecontentslabel\hspace{\ccwd}}
- {}
- {\titlerule*[0.55pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
+ {}{}
+ {\titlerule*[0.65pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
\titlecontents{subsection}
[3.8\ccwd]
{\addvspace{0.35pc}}
- {\thecontentslabel\hspace{\ccwd}}
- {}
- {\titlerule*[0.55pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
+ {}{}
+ {\titlerule*[0.65pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
\titlecontents{figure}
[0\ccwd]
{\addvspace{0.2pc}}
- {\thecontentslabel\hspace{\ccwd}}
- {}
- {\titlerule*[0.55pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
+ {}{}
+ {\titlerule*[0.65pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
\titlecontents{table}
[0\ccwd]
{\addvspace{0.2pc}}
- {\thecontentslabel\hspace{\ccwd}}
- {}
- {\titlerule*[0.55pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
+ {}{}
+ {\titlerule*[0.65pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
\contentsuse{lstlisting}{lol}
\titlecontents{lstlisting}
[0\ccwd]
{\addvspace{0.2pc}}
- {\thecontentslabel\hspace{\ccwd}}
- {}
- {\titlerule*[0.55pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
+ {}{}
+ {\titlerule*[0.65pc]{\scalebox{1.2}{$\cdot$}}\contentspage}
+\ctex_patch_cmd:Nnn \caption@@@addcontentsline
+ {\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}}
+ {\addcontentsline{#1}{#2}{#3\hspace{\ccwd}#4}}
+\ctex_patch_cmd:Nnn \lst@MakeCaption
+ {
+ \addcontentsline{lol}{lstlisting}
+ {\protect\numberline{\thelstlisting}\lst@@caption}
+ }{
+ \addcontentsline{lol}{lstlisting}
+ {\thelstlisting\hspace{\ccwd}\lst@@caption}
+ }
+\cs_new_protected:Npn \__header_mark:n #1
+ {
+ \chapter*{\phantomsection#1}
+ \bool_if:NTF \l__page_twoside_bool
+ {\markboth{\MakeUppercase#1}{\MakeUppercase#1}}
+ {\markboth{\MakeUppercase#1}{}}
+ }
\cs_gset:Npn \tableofcontents
{
\if@twocolumn
@@ -476,10 +509,7 @@
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
- \chapter*{\contentsname}
- \bool_if:NTF \l__page_twoside_bool
- {\markboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
- {\markboth{\MakeUppercase\contentsname}{}}
+ \__header_mark:n {\contentsname}
\vspace*{-1pc}
\@starttoc{toc}
\if@restonecol
@@ -497,11 +527,8 @@
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
- \chapter*{\phantomsection\listfigurename}
- \addcontentsline{toc}{chapter}{\listfigurename}
- \bool_if:NTF \l__page_twoside_bool
- {\markboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}}
- {\markboth{\MakeUppercase\listfigurename}{}}
+ \__header_mark:n {\listfigurename}
+ \CTEX@addtocline{chapter}{\listfigurename}
\vspace*{-1pc}
\@starttoc{lof}
\if@restonecol
@@ -519,11 +546,8 @@
\@restonecolfalse
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
- \chapter*{\phantomsection\listtablename}
- \addcontentsline{toc}{chapter}{\listtablename}
- \bool_if:NTF \l__page_twoside_bool
- {\markboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
- {\markboth{\MakeUppercase\listtablename}{}}
+ \__header_mark:n {\listtablename}
+ \CTEX@addtocline{chapter}{\listtablename}
\vspace*{-1pc}
\@starttoc{lot}
\if@restonecol
@@ -534,7 +558,7 @@
}
\cs_new:Npn \listoflistings
{
- \begingroup
+ \group_begin:
\@ifundefined{@restonecoltrue}{}
{
\if@twocolumn
@@ -545,11 +569,8 @@
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
}
- \chapter*{\phantomsection\lstlistlistingname}
- \addcontentsline{toc}{chapter}{\lstlistlistingname}
- \bool_if:NTF \l__page_twoside_bool
- {\markboth{\MakeUppercase\lstlistlistingname}{\MakeUppercase\lstlistlistingname}}
- {\markboth{\MakeUppercase\lstlistlistingname}{}}
+ \__header_mark:n {\lstlistlistingname}
+ \CTEX@addtocline{chapter}{\lstlistlistingname}
\vspace*{-0.2pc}
\@starttoc{lol}
\@ifundefined{@restonecoltrue}{}
@@ -560,7 +581,7 @@
\onecolumn
\fi
}
- \endgroup
+ \group_end:
}
\cs_gset:Npn \bibsection{\chapter{\bibname}}
@@ -588,34 +609,49 @@
toclevel = chapter,
firstpagestyle = plain
}
-\patchcmd\imki@indexheaders
+\__patch_cmd:Nnn \imki@indexheaders
{\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
{
\bool_if:NTF \l__page_twoside_bool
{\markboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
{\markboth{\MakeUppercase\indexname}{}}
}
- {}{}
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
+\DeclareCaptionFont{tabfont}{\g__tab_font_tl}
+\DeclareCaptionFont{figfont}{\g__fig_font_tl}
+\DeclareCaptionFont{lstfont}{\g__lst_font_tl}
\captionsetup
{
format = hang,
% figurewithin = section,
% tablewithin = section,
- labelfont = {sf,small,color = ctex@frame},
labelsep = ccwd,
- textfont = {sf,small,stretch = \g__cap_spread_tl},
belowskip = 0pt,aboveskip = 10pt
}
+\captionsetup[table]
+ {
+ labelfont = {tabfont,color = ctex@frame},
+ textfont = {tabfont,stretch = \g__cap_spread_tl}
+ }
+\captionsetup[figure]
+ {
+ labelfont = {figfont,color = ctex@frame},
+ textfont = {figfont,stretch = \g__cap_spread_tl}
+ }
\captionsetup[subfigure]
{
labelfont = {sf,small,color = ctex@frame},
labelformat = parens,
belowskip = 2pt,aboveskip = 6pt
}
-\captionsetup[lstlisting]{singlelinecheck = false}
+\captionsetup[lstlisting]
+ {
+ singlelinecheck = false,
+ labelfont = {lstfont,color = ctex@frame},
+ textfont = {lstfont,stretch = \g__cap_spread_tl}
+ }
\captionsetup[figure][bi-second]{name = Figure}
\captionsetup[table][bi-second]{name = Table}
\cs_new:Npn \__arabic:n #1{\int_to_arabic:v {c@#1}}
@@ -683,34 +719,33 @@
\hbox{\tikz\draw(0pt,0pt)circle(.5\ccwd)node{\makebox[\ccwd][c]{\small#1}};}
}
-\tl_new:N \theoremname
-\tl_new:N \definitioname
-\tl_new:N \lemmaname
-\tl_new:N \corollaryname
-\tl_new:N \propositioname
-\tl_new:N \examplename
-\tl_new:N \remarkname
-\tl_new:N \exercisename
-
+\cs_new_protected:Npn \__thmname_set:nn #1#2
+ {\tl_const:cn {c__name_#1_tl}{#2}}
\bool_if:NTF \l__lang_chinese_bool
{
- \tl_set:Nn \theoremname{定理}
- \tl_set:Nn \definitioname{定义}
- \tl_set:Nn \lemmaname{引理}
- \tl_set:Nn \corollaryname{推论}
- \tl_set:Nn \propositioname{性质}
- \tl_set:Nn \examplename{例}
- \tl_set:Nn \remarkname{注}
- \tl_set:Nn \exercisename{练习}
- }{
- \tl_set:Nn \theoremname{Theorem}
- \tl_set:Nn \definitioname{Definition}
- \tl_set:Nn \lemmaname{Lemma}
- \tl_set:Nn \corollaryname{Corollary}
- \tl_set:Nn \propositioname{Proposition}
- \tl_set:Nn \examplename{Example}
- \tl_set:Nn \remarkname{Remark}
- \tl_set:Nn \exercisename{Exercise}
+ \clist_map_inline:nn
+ {
+ {theorem}{定理},
+ {definition}{定义},
+ {lemma}{引理},
+ {corollary}{推论},
+ {proposition}{性质},
+ {example}{例},
+ {remark}{注},
+ {exercise}{练习}
+ }{\__thmname_set:nn #1}
+ }{
+ \clist_map_inline:nn
+ {
+ {theorem}{Theorem},
+ {definition}{Definition},
+ {lemma}{Lemma},
+ {corollary}{Corollary},
+ {proposition}{Proposition},
+ {example}{Example},
+ {remark}{Remark},
+ {exercise}{Exercise}
+ }{\__thmname_set:nn #1}
}
\declaretheoremstyle[
@@ -726,16 +761,16 @@
numberwithin = chapter,
headformat = \NAME\space\NUMBER\NOTE
]{mythm}
-\declaretheorem[style = mythm,name = \theoremname]{theorem}
-\declaretheorem[style = mythm,name = \definitioname]{definition}
-\declaretheorem[style = mythm,name = \lemmaname]{lemma}
-\declaretheorem[style = mythm,name = \corollaryname]{corollary}
-\declaretheorem[style = mythm,name = \propositioname]{proposition}
-\declaretheorem[style = mythm,name = \examplename]{example}
+\declaretheorem[style = mythm,name = \c__name_theorem_tl]{theorem}
+\declaretheorem[style = mythm,name = \c__name_definition_tl]{definition}
+\declaretheorem[style = mythm,name = \c__name_lemma_tl]{lemma}
+\declaretheorem[style = mythm,name = \c__name_corollary_tl]{corollary}
+\declaretheorem[style = mythm,name = \c__name_proposition_tl]{proposition}
+\declaretheorem[style = mythm,name = \c__name_example_tl]{example}
\cs_gset_eq:NN \proof\relax
\declaretheorem{remark}[
style = mythm,
- name = \faCommentingO\space\remarkname,
+ name = \faCommentingO\space\c__name_remark_tl,
numbered = no
]
\declaretheorem{proof}[
@@ -842,12 +877,12 @@
\end{outlinelist}
\end{tcolorbox}
}
-\NewDocumentEnvironment{exercise}{sO{black}O{1.}O{\exercisename}}
+\NewDocumentEnvironment{exercise}{sO{black}O{1.}O{\c__name_exercise_tl}}
{
\IfBooleanF{#1}
{
\refstepcounter{section}
- \addcontentsline{toc}{section}{\CTEXthesection\hspace{\ccwd}#4}
+ \CTEX@addtocline{section}{#4}
\markright
{
\ifnum\c@secnumdepth>\z@
@@ -920,19 +955,15 @@
\counterwithin*{footnote}{page}
}
}
-\patchcmd\@footnotetext
- {\def\baselinestretch{\ZhLS@footlinespread}}
- {\def\baselinestretch{\g__foot_spread_tl}}
- {}{}
-\patchcmd\@mpfootnotetext
- {\def\baselinestretch{\ZhLS@footlinespread}}
- {\def\baselinestretch{\g__foot_spread_tl}}
- {}{}
-\patchcmd\@makefnmark
- {\normalfont}
- {\normalfont\rmfamily}
- {}{}
-\cs_gset:Npn \marginfont{\sffamily\footnotesize}
+\__patch_cmd:Nnn \@footnotetext
+ {\def\baselinestretch{\ZhLS@footlinespread}\reset@font}
+ {\def\baselinestretch{\g__foot_spread_tl}\g__foot_font_tl}
+\__patch_cmd:Nnn \@mpfootnotetext
+ {\def\baselinestretch{\ZhLS@footlinespread}\reset@font}
+ {\def\baselinestretch{\g__foot_spread_tl}\g__foot_font_tl}
+\__patch_cmd:Nnn \@makefnmark
+ {\normalfont}{\g__foot_font_tl}
+\cs_gset:Npn \marginfont{\g__margin_font_tl}
\lstdefinestyle{mystyle}
{
@@ -950,7 +981,7 @@
emphstyle = \color{ctex@emph},
emph =
{
- amsmath,align,aligned,chemfig,cleveref,cases,caption,chemformula,compactenum,description,enumitem,enumerate,exercise,easybook,footmisc,hang,itemize,imakeidx,listings,LaTeX,multline,mybox,paralist,Python,siunitx,split,subnumcases,subcaption,tabularx,thmtools,xcolor
+ caption,config,easybook,elfont,linktopage,subcaption,tabularx,thmtools
},
keywordstyle = \lst@ifdisplaystyle\bfseries\color{ctex@emph}\else\color{ctex@verb}\fi,
morekeywords =
@@ -980,7 +1011,9 @@
{\clist_gput_right:Nn \g__hyperref_clist{#1}}
\cs_new_protected:Npn \__define_linkcolor:nnn #1#2#3
{\definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3}}
-\cs_new:Npn \__set_linkcolor:n #1
+\cs_new_protected:Npn \__define_themecolor:nnn #1#2#3
+ {\definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3}}
+\cs_new:Npn \__linkcolor_set:n #1
{
linkcolor/\clist_item:nn {#1}{1} .code:n =
{
@@ -996,6 +1029,17 @@
}
},
}
+\cs_new:Npn \__themecolor_set:n #1
+ {
+ color/\clist_item:nn {#1}{1} .code:n =
+ {
+ \__define_themecolor:nnn
+ {\clist_item:nn {#1}{2}}
+ {\clist_item:nn {#1}{3}}
+ {\clist_item:nn {#1}{4}}
+ },
+ }
+
\cs_new:Npn \__allow_urlbreak:
{
\cs_new:Npn \__add_urlbreak_points:
@@ -1009,7 +1053,6 @@
\keys_define:nx {ctex/link}
{
hyperlink .choice:,
- hyperlink .value_required:n = true,
hyperlink/edge .code:n = {},
hyperlink/various .code:n = {\__clist_put_hyperref:n {colorlinks}},
hyperlink/none .code:n = {\__clist_put_hyperref:n {hidelinks}},
@@ -1017,32 +1060,37 @@
hyperlink .initial:n = edge,
linkcolor .choice:,
- linkcolor .value_required:n = true,
\clist_map_function:nN
{
- {darkgray, 626262,0000B2,005752},
- {lightblue, 0000ff,004986,eb6877},
- {crimson, dc143c,00c1c9,afcd20},
- {hotpink, ff69b4,9d5196,57b5e5}
+ {graphite, 626262,0000B2,005752},
+ {cutepink, ff69b4,9d5196,57b5e5},
+ {skyblue, 0000ff,004986,eb6877},
+ {crimson, dc143c,00c1c9,afcd20}
}
- \__set_linkcolor:n,
- linkcolor .default:n = darkgray,
- linkcolor .initial:n = darkgray,
+ \__linkcolor_set:n,
+ linkcolor .default:n = graphite,
+ linkcolor .initial:n = graphite,
linktopage .choice:,
- linktopage .value_required:n = true,
linktopage/true .code:n = {\__clist_put_hyperref:n {linktocpage}},
- linktopage/false .code:n = {\__clist_put_hyperref:n {linktocpage = false}},
+ linktopage/false .code:n = {},
linktopage .default:n = true,
linktopage .initial:n = false
}
-
-\RequirePackage[
- lang = {chinese-utf8},
- type = {CC},
- modifier = {by-nc},
- version = {4.0}
- ]{doclicense}
+\keys_define:nx {ctex/style}
+ {
+ color .choice:,
+ color .value_required:n = true,
+ \clist_map_function:nN
+ {
+ {none, 000000,000000,000000},
+ {forest, 005752,004986,a40000},
+ {energy, f39800,00a0e9,893895},
+ {cyberpunk, 005982,eb6877,a4005b}
+ }
+ \__themecolor_set:n,
+ color .initial:n = none
+ }
\ctex_at_end_preamble:n
{
@@ -1129,12 +1177,15 @@
\bool_if:NF \l__newline_bool{\centering}
},
aftername =
- {\bool_if:NTF \l__newline_bool{\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}},
+ {
+ \bool_if:NTF \l__newline_bool
+ {\par\nobreak\vskip 1.5pc}{\hspace{\ccwd}}
+ },
beforeskip = -1.5ex,
afterskip = 3ex,
lotskip = 0.8pc,
lofskip = 0.8pc,
- tocline = {\CTEXifname{\protect\numberline{\CTEXthechapter}}{}#2}
+ tocline = {\CTEXifname{\CTEXthechapter\hspace{\ccwd}}{}#2}
},
section =
{
@@ -1143,7 +1194,7 @@
aftername = {\hspace{0.5\ccwd}},
beforeskip = 1.5ex plus .2ex minus .1ex,
afterskip = 1.5ex plus .2ex minus .1ex,
- tocline = {\CTEXifname{\protect\numberline{\CTEXthesection}}{}#2}
+ tocline = {\CTEXifname{\CTEXthesection\hspace{\ccwd}}{}#2}
},
subsection =
{
@@ -1152,7 +1203,7 @@
aftername = {\hspace{0.5\ccwd}},
beforeskip = 1.3ex plus .2ex minus .1ex,
afterskip = 1.3ex plus .2ex minus .1ex,
- tocline = {\CTEXifname{\protect\numberline{\CTEXthesubsection}}{}#2}
+ tocline = {\CTEXifname{\CTEXthesubsection\hspace{\ccwd}}{}#2}
},
subsubsection =
{
diff --git a/macros/latex/contrib/easybook/pages/chapter3.tex b/macros/latex/contrib/easybook/pages/chapter3.tex
deleted file mode 100644
index 2c7c27ce7f..0000000000
--- a/macros/latex/contrib/easybook/pages/chapter3.tex
+++ /dev/null
@@ -1,52 +0,0 @@
-% Chapter 3
-\documentclass[../easybook-demo]{subfiles}
-\begin{document}
-
-\chapter{其它格式}\label{chap1}
-
-\section{代码}\index{d@代码}
-使用 \lstinline{listings} 宏包可以对代码格式进行高度定制,默认语言为 \lstinline{LaTeX},这里以 \lstinline{Python} 为例
-\begin{lstlisting}[language = Python,caption = {python程序练习题}]
-#!/usr/bin/python
-# -*- coding: UTF-8 -*-
-
-if __name__ == '__main__':
- ptr = []
- for i in range(5):
- num = int(raw_input('please input a number:\n'))
- ptr.append(num)
- print ptr
-\end{lstlisting}
-
-\section{物理量}\index{w@物理量}
-\lstinline{siunitx} 宏包的 \lstinline{\num} 命令可以输出科学计数法 \num{-21x.3e5},而 \lstinline{\SI} 命令可用来输出带有单位的量,比如 \SI{.5}{mol}。
-
-\section{化学式}\index{h@化学式}
-除了以普通公式的方式,化学式还可用 \lstinline{chemformula} 实现,无机化学式例如\ch{(NH4)2S}、\ch{[Cu(NH3)4]^2+}。
-\[\ch{$x$ Na(NH4)HPO4 ->[$\Delta$] (NaPO3)_{$x$} + $x$ NH3 ^ + $x$ H2O}\]
-有机化学式推荐使用 \lstinline{chemfig} 完成。
-\[\zihao{-5}\chemfig[cram width=5pt]{*6((-HO)-=-(-(<[::60]OH)-[::-60]-[::-60,,,2]
-HN-[::+60]CH_3)=-(-HO)=)}\]
-
-\clearpage
-\section{引用}\index{y@引用}
-使用 \lstinline{cleveref} 宏包的 \lstinline{\cref} 命令进行引用,将会自动检测环境并添加相应的前缀。
-\subsection{索引}\index{y@引用!s@索引}
-使用 \lstinline{imakeidx} 生成索引,仅做了简单的设置如将索引设为双栏并加入目录,其他选项可另外配置。
-
-\subsection{脚注}\index{y@引用!j@脚注}
-脚注应在注释与正文之间加细线分隔,使用 \lstinline{footmisc} 宏包设置,选项为悬挂缩进(\lstinline{hang})形式\footnote{这是一个悬挂缩进的脚注。\par 这是分段将会缩进两字符。}。这是自定义标记的脚注且不影响正常编号\Footnote{*}{这是可以自定义标记的脚注。}。
-
-\subsection{边注}\index{y@引用!b@边注}
-命令 \lstinline{\marginnote} 可以生成简单的边注\marginnote{这是一个边注。}。
-
-\subsection{引用章节}\label{sec1}\index{y@引用!s@索引}
-如引用\cref{chap1}、\cref{sec1}。
-
-\subsection{参考文献}\index{y@引用!c@参考文献}
-这是一个参考文献引用的范例\cite{1979Prospect}。引用多个文献,将引用标号中的多个文献序号按升序排列,若其中有2个以上的连续序号,则改用范围序号,例如\cite{1979Prospect,1989The,2010An}。
-
-\section{行内盒子}\index{h@行内盒子}
-设置了两个行内盒子,这个盒子 \concise[Aqua][fontupper = \rmfamily]{concise} 可以为抄录盒子有三个参数 \lstinline{[<颜色>][<配置>][<内容>]},行内盒子内容是必选参数其他可选。设置等宽字体可在配置参数中 \lstinline{fontupper = \ttfamily}。这个盒子 \fuzzy[yellow][fontupper = \ttfamily,colupper = black]{fuzzy} 的参数选项与上个盒子相同,具有模糊边缘类似高亮的效果。
-
-\end{document} \ No newline at end of file
diff --git a/macros/luatex/generic/lua-visual-debug/doc/README.md b/macros/luatex/generic/lua-visual-debug/doc/README.md
index a45bbcb16e..0e07af14c1 100644
--- a/macros/luatex/generic/lua-visual-debug/doc/README.md
+++ b/macros/luatex/generic/lua-visual-debug/doc/README.md
@@ -20,9 +20,9 @@ Requirements: The package has only been tested with LuaTeX and
but other engines only show a warning message.
-Copyright 2012–2019 Patrick Gundlach (<patrick@gundla.ch>) and others (see Git information)
+Copyright 2012–2021 Patrick Gundlach (<patrick@gundla.ch>) and others (see Git information)
-Package version: 0.7
+Package version: 0.8
Public repository: <https://github.com/pgundlach/lvdebug>
diff --git a/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.pdf b/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.pdf
index 71b2936a29..c05b287e37 100644
--- a/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.pdf
+++ b/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.pdf
Binary files differ
diff --git a/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.tex b/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.tex
index c87c2b49a4..736096e2c8 100644
--- a/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.tex
+++ b/macros/luatex/generic/lua-visual-debug/doc/lvdebug-doc.tex
@@ -1,6 +1,6 @@
\documentclass{article}
\usepackage{graphicx,listings,lmodern,luatextra}
-\newcommand\pkgversion{0.7}
+\newcommand\pkgversion{0.8}
\newcommand*\pgsmall{\fontsize{8.5}{8.7}\selectfont\ttfamily}
\lstset{basicstyle=\pgsmall,
@@ -64,7 +64,7 @@ A strut box (zero width box) is marked with a red rule:
\section{Copying}
-Copyright 2012–2019 Patrick Gundlach (patrick@gundla.ch) and other authors (see Git for information), licensed under the MIT license. See the Lua file for details.
+Copyright 2012–2021 Patrick Gundlach (patrick@gundla.ch) and other authors (see Git for information), licensed under the MIT license. See the Lua file for details.
\end{document}
diff --git a/macros/luatex/generic/lua-visual-debug/doc/sample-plain.pdf b/macros/luatex/generic/lua-visual-debug/doc/sample-plain.pdf
index 2aaafad75f..6d9b740524 100644
--- a/macros/luatex/generic/lua-visual-debug/doc/sample-plain.pdf
+++ b/macros/luatex/generic/lua-visual-debug/doc/sample-plain.pdf
Binary files differ
diff --git a/macros/luatex/generic/lua-visual-debug/doc/sample.pdf b/macros/luatex/generic/lua-visual-debug/doc/sample.pdf
index 81cf4fc223..8583f2d291 100644
--- a/macros/luatex/generic/lua-visual-debug/doc/sample.pdf
+++ b/macros/luatex/generic/lua-visual-debug/doc/sample.pdf
Binary files differ
diff --git a/macros/luatex/generic/lua-visual-debug/lua-visual-debug.lua b/macros/luatex/generic/lua-visual-debug/lua-visual-debug.lua
index b6fb5907c9..4fb7465a81 100644
--- a/macros/luatex/generic/lua-visual-debug/lua-visual-debug.lua
+++ b/macros/luatex/generic/lua-visual-debug/lua-visual-debug.lua
@@ -1,6 +1,6 @@
--- Copyright 2012-2019 Patrick Gundlach, patrick@gundla.ch
+-- Copyright 2012-2021 Patrick Gundlach, patrick@gundla.ch
-- Public repository: https://github.com/pgundlach/lvdebug (issues/pull requests,...)
--- Version: 0.7
+-- Version: 0.8
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
-- "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
@@ -55,6 +55,7 @@ local number_sp_in_a_pdf_point = 65782
local HLIST = node.id("hlist")
local VLIST = node.id("vlist")
local RULE = node.id("rule")
+local DIR = node.id("dir")
local DISC = node.id("disc")
local GLUE = node.id("glue")
local KERN = node.id("kern")
@@ -68,10 +69,13 @@ function math.round(num, idp)
return math.floor(num + 0.5)
end
+local curdir = {}, pardir
function show_page_elements(parent)
local head = parent.list
while head do
+ local has_dir = false
+ if head.dir == "TLT" then table.insert(curdir,"ltr") has_dir=true elseif head.dir == "TRT" then table.insert(curdir,"rtl") has_dir=true end
if head.id == HLIST or head.id == VLIST then
local rule_width = 0.1
@@ -82,6 +86,7 @@ function show_page_elements(parent)
-- recurse into the contents of the box
show_page_elements(head)
local rectangle = node.new("whatsit","pdf_literal")
+ if curdir[#curdir] == "rtl" then wd = wd * -1 end
if head.id == HLIST then -- hbox
rectangle.data = string.format("q 0.5 G %g w %g %g %g %g re s Q", rule_width, -rule_width / 2, -dp, wd, ht)
else
@@ -107,6 +112,19 @@ function show_page_elements(parent)
hyphen_marker.data = "q 0 0 1 RG 0.3 w 0 -1 m 0 0 l S Q"
parent.list = node.insert_before(parent.list,head,hyphen_marker)
+ elseif head.id == DIR then
+ local mode = string.sub(head.dir,1,1)
+ local texdir = string.sub(head.dir,2,4)
+ local ldir
+ if texdir == "TLT" then ldir = "ltr" else ldir = "rtl" end
+ if mode == "+" then
+ table.insert(curdir,ldir)
+ elseif mode == "-" then
+ local x = table.remove(curdir)
+ if x ~= ldir then
+ warning("paragraph direction incorrect, found %s, expected %s",ldir,x)
+ end
+ end
elseif head.id == GLUE then
local head_spec = head.spec
@@ -124,6 +142,8 @@ function show_page_elements(parent)
end
local pdfstring = node.new("whatsit","pdf_literal")
local wd_bp = math.round(wd / number_sp_in_a_pdf_point,2)
+ if curdir[#curdir] == "rtl" then wd_bp = wd_bp * -1 end
+
if parent.id == HLIST then
pdfstring.data = string.format("q %s [0.2] 0 d 0.5 w 0 0 m %g 0 l s Q",color,wd_bp)
else -- vlist
@@ -131,7 +151,6 @@ function show_page_elements(parent)
end
parent.list = node.insert_before(parent.list,head,pdfstring)
-
elseif head.id == KERN then
local rectangle = node.new("whatsit","pdf_literal")
local color = "1 1 0 rg"
@@ -154,6 +173,9 @@ function show_page_elements(parent)
rectangle.data = string.format("q %s 0 w 0 0 1 1 re B Q",color)
parent.list = node.insert_before(parent.list,head,rectangle)
end
+ if has_dir then
+ table.remove(curdir)
+ end
head = head.next
end
return true
diff --git a/macros/luatex/generic/lua-visual-debug/lua-visual-debug.sty b/macros/luatex/generic/lua-visual-debug/lua-visual-debug.sty
index 9d5b22337a..8f3aac8ea3 100644
--- a/macros/luatex/generic/lua-visual-debug/lua-visual-debug.sty
+++ b/macros/luatex/generic/lua-visual-debug/lua-visual-debug.sty
@@ -1,7 +1,7 @@
% see lua file for copyright information (MIT License)
-\def\lvdebugpkgdate{2019/01/07}
-\def\lvdebugpkgversion{0.7}
+\def\lvdebugpkgdate{2021/01/07}
+\def\lvdebugpkgversion{0.8}
\ifx\ProvidesPackage\undefined
\input ifluatex.sty\relax
diff --git a/macros/musixtex/README b/macros/musixtex/README
index 3e87b0e509..248beeb18b 100644
--- a/macros/musixtex/README
+++ b/macros/musixtex/README
@@ -1,4 +1,4 @@
-This is MusiXTeX, version 1.30 (2020-03-20).
+This is MusiXTeX, version 1.31 (2021-01-07).
MusiXTeX is a TeX-based system for typesetting music.
The main author was Daniel Taupin, who died in a climbing
diff --git a/macros/musixtex/doc/ChangeLog-131.txt b/macros/musixtex/doc/ChangeLog-131.txt
new file mode 100644
index 0000000000..93fac608e5
--- /dev/null
+++ b/macros/musixtex/doc/ChangeLog-131.txt
@@ -0,0 +1,4 @@
+
+Changes from MusiXTeX 130 to 131:
+
+ * defined \zzdoublebar, \zzbar, \zendpiece
diff --git a/macros/musixtex/doc/musixdoc.pdf b/macros/musixtex/doc/musixdoc.pdf
index 073774546f..6c62fbdec4 100644
--- a/macros/musixtex/doc/musixdoc.pdf
+++ b/macros/musixtex/doc/musixdoc.pdf
Binary files differ
diff --git a/macros/musixtex/doc/musixdoc/barlines.tex b/macros/musixtex/doc/musixdoc/barlines.tex
index 92cd5624c7..b3f1d545a7 100644
--- a/macros/musixtex/doc/musixdoc/barlines.tex
+++ b/macros/musixtex/doc/musixdoc/barlines.tex
@@ -17,7 +17,9 @@ by a double bar.
There is no specific command to print a thin-thick double bar line, but
\keyindex{setdoubleBAR} will cause one in the same cases where
\verb|\setdoublebar| would cause a thin-thin double bar line.
-To typeset a double-bar line in the middle of a bar, use \keyindex{zdoublebar}.
+To typeset a double-bar line in the middle of a bar, use \keyindex{zdoublebar};
+use \keyindex{zzdoublebar} to force the mid-bar double-bar line to the end
+of a system.
To make the next bar line invisible, use \keyindex{setemptybar} before
\verb|\bar|.
diff --git a/macros/musixtex/doc/musixdoc/frontmatter.tex b/macros/musixtex/doc/musixdoc/frontmatter.tex
index 64be0c29fe..e1402cfb3e 100644
--- a/macros/musixtex/doc/musixdoc/frontmatter.tex
+++ b/macros/musixtex/doc/musixdoc/frontmatter.tex
@@ -1,6 +1,6 @@
\title{\Huge\bfseries\musixtex\\[\bigskipamount]
\LARGE\bfseries Using \TeX{} to write polyphonic\\or
-instrumental music\\\Large\itshape Version 1.30}
+instrumental music\\\Large\itshape Version 1.31}
\author{}
diff --git a/macros/musixtex/doc/musixdoc/layout.tex b/macros/musixtex/doc/musixdoc/layout.tex
index 5d2b353b79..a22a88255c 100644
--- a/macros/musixtex/doc/musixdoc/layout.tex
+++ b/macros/musixtex/doc/musixdoc/layout.tex
@@ -11,7 +11,8 @@ You can force a line or page break by replacing \keyindex{bar} with
to forbid line-breaking at a particular bar, replace \verb|\bar|
with \keyindex{xbar}. To force a line or page break where there is
no bar line, use \keyindex{zalaligne} or \keyindex{zalapage}. To mark any
-mid-bar location as an optional line-breaking point, use \keyindex{zbar}.
+mid-bar location as an optional line-breaking point, use \keyindex{zbar};
+to force the mid-bar bar line to the end of a system, use \keyindex{zzbar}.
The heavy final double bar of a piece is one of the consequences of
\keyindex{Endpiece} or \keyindex{Stoppiece}. If you just want to terminate
@@ -19,7 +20,7 @@ the text with a simple bar, say \keyindex{stoppiece} or \keyindex{endpiece}.
To terminate it with no bar line at all, code \keyindex{zstoppiece}.
If you want to suppress right-justification of the last line of a score,
use \keyindex{raggedstoppiece}; the bar line can be suppressed by
-using \keyindex{setemptybar}.
+using \keyindex{zendpiece} (or \keyindex{setemptybar}).
Once you have stopped the score by any of these means, you may want to restart
it, and there are several ways to do so. If you don't need to change the key
diff --git a/macros/musixtex/doc/musixdoc/repeats.tex b/macros/musixtex/doc/musixdoc/repeats.tex
index 5924d92d43..a0c89b5f59 100644
--- a/macros/musixtex/doc/musixdoc/repeats.tex
+++ b/macros/musixtex/doc/musixdoc/repeats.tex
@@ -73,7 +73,7 @@ correctly adjusted, using \keyindex{writezbarno} for the continuation
if \keyindex{systemnumbers} is in use.
As an example, here is
-a \emph{bour\'ee} by G.-F.~Handel coded using \verb|\zleftrepeat| at the beginning
+a \emph{bourr\'ee} by G.-F.~Handel coded using \verb|\zleftrepeat| at the beginning
of the \textbf{A} section and \verb|\zzleftrightrepeat|
between the \textbf{A} and the \textbf{B} sections:
diff --git a/macros/musixtex/doc/musixdoc/restsdoc.tex b/macros/musixtex/doc/musixdoc/restsdoc.tex
index 1e3a33431c..2bf4aebfb6 100644
--- a/macros/musixtex/doc/musixdoc/restsdoc.tex
+++ b/macros/musixtex/doc/musixdoc/restsdoc.tex
@@ -83,6 +83,7 @@ half rest. The ordinary \verb|\pause| or
must be added to distinguish between the whole and the half rest. The commands,
which are non-spacing\footnote{Editor's note: The reason for having defined these
as non-spacing is not obvious}, are
+are
\begin{itemize}\setlength{\itemsep}{0ex}
\item \keyindex{liftpause}~$n$ to get a
\hbox to10pt{\liftpause{-2}\hss}
@@ -95,6 +96,7 @@ as non-spacing is not obvious}, are
\item \keyindex{lifthpausep}~$n$ to get
\hbox to10pt{\lifthpausep{-1}\hss} raised the same way.
\end{itemize}
+
%\check
\section{Bar-centered rests}\label{barcentered}
Sometimes it is necessary to place a rest (or some other symbols) exactly in the middle
diff --git a/macros/musixtex/doc/scripts/musixtex.1 b/macros/musixtex/doc/scripts/musixtex.1
index 839d07a882..59b6c8874e 100644
--- a/macros/musixtex/doc/scripts/musixtex.1
+++ b/macros/musixtex/doc/scripts/musixtex.1
@@ -1,9 +1,9 @@
.\" This manpage is licensed under the GNU Public License
-.TH MUSIXTEX 1 2020-03-20 "musixtex version 0.22" ""
+.TH MUSIXTEX 1 2020-05-21 "musixtex version 0.23" ""
.SH NAME
-musixtex \- processes MusiXTeX files, using pre-processors prepmx, pmxab and autosp as necessary,
-and then deletes intermediate and log files (unless
+musixtex \- processes MusiXTeX files, using pre-processors prepmx, xml2pmx, pmxab and autosp
+as necessary, and then deletes intermediate and log files (unless
.B -i
is used)
.SH SYNOPSIS
@@ -13,7 +13,7 @@ is used)
.I option
|
.I jobname
-[ .mtx | .pmx | .aspc | .tex | .ltx ] } ...
+[ .xml | .mtx | .pmx | .aspc | .tex | .ltx ] } ...
.SH DESCRIPTION
.TP
If a jobname argument has a .tex extension, the default effect is to process the file using
@@ -39,6 +39,10 @@ If a jobname argument has a .pmx extension, the file is first preprocessed using
.BR pmxab (1)
and the resulting .tex file is processed as above.
.P
+If a jobname argument has a .xml extension, the file is first preprocessed using
+.BR xml2pmx (1)
+and the resulting .pmx file is processed as above.
+.P
If a jobname argument has a .mtx extension, the file is first preprocessed using
.BR prepmx (1)
and the resulting .pmx file is processed as above.
@@ -55,6 +59,8 @@ If a jobname argument has a .aspc extension, the file is first preprocessed usin
and the resulting .tex or .ltx file is processed as above.
.P
If a jobname argument has none of these extensions, the script will look for a file
+.IR jobname .xml
+or
.IR jobname .mtx
or
.IR jobname .pmx
@@ -128,6 +134,11 @@ use
.B aspcx
as the aspc preprocessor; e.g., -A "autosp -l".
.TP
+.B -L xmlx
+use
+.B xmlx
+as the xml preprocessor; e.g., -L "./XML2PMX".
+.TP
.B -t
stop processing at the tex/mid files
.TP
@@ -184,9 +195,10 @@ If the -F option is used, options -l and -p need to be set if the engine name do
.BR dvipdfm (1),
.BR dvips (1),
.BR pmxab (1),
-.BR pmxchords (1)
+.BR pmxchords (1),
.BR prepmx (1),
-.BR ps2pdf (1)
+.BR ps2pdf (1),
+.BR xml2pmx (1)
and musixdoc.pdf.
.SH AUTHOR
This manual page was written by Bob Tennent <rdt@cs.queensu.ca>.
diff --git a/macros/musixtex/doc/scripts/musixtex.pdf b/macros/musixtex/doc/scripts/musixtex.pdf
index ec49d4a3d6..30246ff59f 100644
--- a/macros/musixtex/doc/scripts/musixtex.pdf
+++ b/macros/musixtex/doc/scripts/musixtex.pdf
Binary files differ
diff --git a/macros/musixtex/scripts/musixtex.lua b/macros/musixtex/scripts/musixtex.lua
index 5f600b9955..930e90d70f 100755
--- a/macros/musixtex/scripts/musixtex.lua
+++ b/macros/musixtex/scripts/musixtex.lua
@@ -1,10 +1,10 @@
#!/usr/bin/env texlua
-VERSION = "0.22"
+VERSION = "0.23a"
--[[
- musixtex.lua: processes MusiXTeX files using prepmx and/or pmxab and/or
- autosp as pre-processors (and deletes intermediate files)
+ musixtex.lua: processes MusiXTeX files using xml2pmx and/or prepmx and/or pmxab
+ and/or autosp as pre-processors (and deletes intermediate files)
(c) Copyright 2011-2020 Bob Tennent rdt@cs.queensu.ca
and Dirk Laurie dirk.laurie@gmail.com
@@ -29,6 +29,12 @@ VERSION = "0.22"
ChangeLog:
+ version 0.23a 2020-08-14 RDT
+ pmxprep files now deleted by xml2pmx
+
+ version 0.23 2020-05-21 RDT
+ added support for xml2pmx pre-preprocessing
+
version 0.22 2020-03-20 RDT
add -X option
add -version, --version, -help, --help options
@@ -131,12 +137,12 @@ local orig_print = print
function usage()
orig_print
[[
-Usage: [texlua] musixtex.lua { option | basename[.mtx | .pmx | .aspc | .tex | .ltx] } ...
+Usage: [texlua] musixtex.lua { option | basename[ .xml | .mtx | .pmx | .aspc | .tex | .ltx] } ...
When no extension is given, extensions are tried in the above order
- until a source file is found. Preprocessing goes mtx-pmx-tex or
- aspc-etex/ltx, with the entry point determined by the extension.
+ until a source file is found. Preprocessing goes xml-pmx-tex or mtx-pmx-tex or
+ aspc-tex, with the entry point determined by the extension.
The normal route after preprocessing goes tex-dvi-ps-pdf, but shorter
- routes are also available, see the options. The default processing route
+ routes are also available, see the options. The default 3-pass processing route
for .tex files is etex-musixflx-etex.
Options: -v, --version version
-h, --help help
@@ -148,9 +154,10 @@ Options: -v, --version version
-P ps2pdfxx use ps2pdfxx as the Postscript processor
-c preprocess pmx file using pmxchords
-m stop at pmx
- -M prepmxx use prepmxx as the mtx preprocessor
- -A autospx use autospx as the aspc preprocessor
- -X pmxabx use pmxabx as the pmx preprocessor
+ -M prepmxx use prepmxx as the mtx preprocessor
+ -A autospx use autospx as the aspc preprocessor
+ -X pmxabx use pmxabx as the pmx preprocessor
+ -L xmlx use xmlx as the xml preprocessor
-t stop at tex/mid
-s stop at dvi
-g stop at ps
@@ -207,6 +214,7 @@ end
-- dvi == false "do not process the DVI file" (but stop after TeX)
local dvips = "dvips -e0"
function defaults()
+ xml2pmx = "xml2pmx"
prepmx = "prepmx"
pmx = "pmxab"
autosp = "autosp"
@@ -340,6 +348,9 @@ function process_option(this_arg)
elseif this_arg == "-A" then
narg = narg+1
autosp = arg[narg]
+ elseif this_arg == "-L" then
+ narg = narg+1
+ xml2pmx = arg[narg]
elseif this_arg == "-q" then
if not tempname then
tempname = tempname or os.tmpname()
@@ -360,19 +371,19 @@ end
function find_file(this_arg)
basename, extension = this_arg:match"(.*)%.(.*)"
- extensions = {["mtx"] = true, ["pmx"] = true, ["aspc"] = true, ["tex"] = true, ["ltx"] = true}
+ extensions = {["xml"] = true, ["mtx"] = true, ["pmx"] = true, ["aspc"] = true, ["tex"] = true, ["ltx"] = true}
if extensions[extension] then
return basename, extension
end
basename, extension = this_arg, null
- for ext in ("mtx,pmx,aspc,tex,ltx"):gmatch"[^,]+" do
+ for ext in ("xml,mtx,pmx,aspc,tex,ltx"):gmatch"[^,]+" do
if exists (basename .. "." .. ext) then
extension = ext
break
end
end
if extension == null then
- print("!! No file " .. basename .. ".[mtx|pmx|aspc|tex|ltx]")
+ print("!! No file " .. basename .. ".[xml|mtx|pmx|aspc|tex|ltx]")
exit_code = exit_code+1
return
end
@@ -381,14 +392,21 @@ end
function preprocess(basename,extension)
if not (basename and extension) then return end
- if extension == "mtx" then
+ if extension == "xml" then
+ if execute(xml2pmx .. " " .. basename .. ".xml" .. " " .. basename .. ".pmx" ) == 0 then
+ extension = "pmx"
+ else
+ print ("!! xml2pmx preprocessing of " .. basename .. ".xml fails.")
+ return
+ end
+ elseif extension == "mtx" then
if execute(prepmx .. " " .. basename ) == 0 then
extension = "pmx"
else
print ("!! prepmx preprocessing of " .. basename .. ".mtx fails.")
return
end
- end
+ end
if extension == "pmx" then
local OK = true
if pmx then
diff --git a/macros/musixtex/tex/musixps.tex b/macros/musixtex/tex/musixps.tex
index 6e877494e7..9ab8b0ce3f 100644
--- a/macros/musixtex/tex/musixps.tex
+++ b/macros/musixtex/tex/musixps.tex
@@ -1,11 +1,12 @@
%% PostScript slurs, ties and crescendos
% Coded by Stanislav Kneifl
% RDT added \psRslurskip \iRslur \tRslur \psRtieskip \tRtie \psLtieskip \tLtie 2019/06/17
+% RDT added \iRtieu \iRtied 2020/09/07
\ifx\undefined\startpiece\errmessage{Input musixtex.tex before musixps.tex}\fi
\ifx\undefined\liftcresc\else\endinput\fi
-\immediate\write16{MusiXPS PostScript slurs, ties and crescendos 0.93 (17.2.2015)}%
+\immediate\write16{MusiXPS PostScript slurs, ties and crescendos 0.94 (07.09.2020)}%
\catcode`\@=11
@@ -603,6 +604,8 @@
\def\iltied#1#2{\iTied{#1}{#2}{\pslslurskip}}
\def\irtieu#1#2{\iTieu{#1}{#2}{\psrslurskip}}
\def\irtied#1#2{\iTied{#1}{#2}{\psrslurskip}}
+\def\iRtieu#1#2{\iTieu{#1}{#2}{\psRslurskip}}
+\def\iRtied#1#2{\iTied{#1}{#2}{\psRslurskip}}
\def\ttie#1{\tTie{#1}{\psttieskip}}
\def\tltie#1{\tTie{#1}{\psltieskip}}
\def\trtie#1{\tTie{#1}{\psrtieskip}}
diff --git a/macros/musixtex/tex/musixtex.tex b/macros/musixtex/tex/musixtex.tex
index b11caaa6b5..ba5b4f3880 100644
--- a/macros/musixtex/tex/musixtex.tex
+++ b/macros/musixtex/tex/musixtex.tex
@@ -25,33 +25,37 @@
\def\mufl@x{0.83}%
\def\mxmajorvernumber{1}
-\def\mxminorvernumber{30}
+\def\mxminorvernumber{31}
\def\mxvernumber{\mxmajorvernumber\mxminorvernumber}% make it possible to compare with \ifnum
-\def\mxversuffix{beta}%
+\def\mxversuffix{}%
\edef\mxversion{\mxmajorvernumber.\mxminorvernumber\mxversuffix}
-\def\mxdate{2018-08-09}
+\def\mxdate{2021-01-07}
\immediate\write16{MusiXTeX(c) \mxversion\space<\mxdate>}%
\everyjob{\immediate\write16{MusiXTeX(c) \mxversion\space<\mxdate>}}%
+% version 1.31
+%
+% defined \zzdoublebar, \zzbar, \zendpiece
% version 1.30
+%
% defined \zdoublebar for use within a bar
% defined \hbp and \hbpp
% version 1.29
-
+%
% defined \tabfnt, \tabcleffnt, \tabstringfnt, \tab etc. to support tablature
% version 1.28
-
+%
% defined
% \z[left|right|leftright]repeat, for use *within* a bar
% \zz...repeat, to force to the end of a system
% corrected definition of \C@Inter for \nblines < 4
% version 1.27
-
+%
% introduced \meterN
% eliminated \ds@oup
% introduced \nqqb \nqqh \nqqqb \nqqqh abbreviations and
@@ -62,18 +66,18 @@
% introduced \xxtuplet
% version 1.26
-
+%
% deleted spurious definition in \resetlayout and
% spurious space in definition of \interfacteur...
% version 1.25
-
+%
% included a "dummy" tuplet.tex in the distribution
% added \ignorespaces in musixltx.tex
% defined \qap, \qapp, \tqsk
% version 1.24
-
+%
% preserve changes to \transpose in an hboxed tremolo command
% test that musixtex.tex has already been loaded in some extensions:
% musixps, musixec, musixhv, musixplt, musixtmr, musixppff
@@ -83,13 +87,13 @@
% correct typos \twtybf[g] \svtbf[g]
% version 1.23
-
+%
% added \xtr and \ptr ornaments
% adjusted spacing of \tr
% corrected definition of \C@Inter for \nblines > 6
% version 1.22
-
+%
% bi and sc font definitions added; sl and tt definitions for musixsty moved
% explicit font choices for \txtfont replaced by generic commands \smalltype\it etc.
% \pdlud \halfwidthbigwedge and \raise-height font-dependent
@@ -97,7 +101,7 @@
% version 1.21
-
+%
% RDT adjusted the offsets and/or vertical positions for some tremolos
% RDT moved \lastbarpos\lin@pos after calls to \Writ@meters
% to correct \centerbar positioning
@@ -108,24 +112,24 @@
% RDT added support for piano-pedal bracket notation
% version 1.20
-
+%
% RDT re-defined tremolo commands to allow for numerical pitches;
% use of \raise and \hbox suggested by Jean-Pierre Colon
% version 1.19:
-
+%
% RDT corrected typos in the definition of \comput@fonts
% affecting ppff fonts for \Largemusicsize
% RDT introduced definitions for tremolo commands \trml, \trmu, etc.
% RDT turned off lyrics for \metron and \metronequiv notes
% version 1.18:
-
+%
% RDT added definitions of \raggedstoppiece and \slide from musixext.tex
% RDT increased the length of beam stems (adapted from J.-P. Coulon)
% version 1.17:
-
+%
% RDT re-defined \txtfont for non-normal staff sizes
% RDT defined \tinyppff and \ppfftwelve, and re-defined \ppff to be staffsize dependent
% RDT introduced \tqqb \tqqh \tqqqb \tqqqh abbreviations
@@ -136,7 +140,7 @@
% RDT introduced double-dotted rests \qppp, \dspp, \qspp, etc.
% version 1.16:
-
+%
% RDT corrected the definitions of \nnotes and \nnnotes
% HM corrected the definitions for cautionary small accidentals
@@ -162,7 +166,7 @@
% added dynamic-mark macros \sfz \sfzp
% version 1.15:
-
+%
% moved out:
% - 1/128th beams -> musixbm
% - triple pointed notes -> musixtri
@@ -2288,7 +2292,7 @@
% if you need a line which appears ragged
\def\raggedstoppiece{\ifx\ragg@d\empty \fil@{r}\fi % version 1.18 RDT (from musixext)
\check@nopen\n@wbar\hfill\z@suspend\@nds@ction}
-\def\zendpiece{\setemptybar\raggedstoppiece}
+\def\zendpiece{\setemptybar\raggedstoppiece} % RDT version 1.31
\def\Stoppiece{\setdoubleBAR\stoppiece}
\let\Endpiece\Stoppiece
@@ -2303,6 +2307,7 @@
\let\T@bil\iftrue \let\everyst@ff\everystaff \let\fil@spc\empty
\let\fil@termskip\empty \let\fil@signs\empty \let\fil@barno\empty
\let\leftrepeat\leftrepeat@II \let\leftrightrepeat\leftrightrepeat@II
+ \let\doublebar\doublebar@II
\piece@beginc\Writ@meters\lastbarpos\lin@pos\let\pdl@cut\empty\addspace\afterruleskip}
%%% 1.21: added \lastbarpos and \pdl@cut settings
@@ -2550,7 +2555,7 @@
\let\leftrepeat\leftrepeat@II
\let\zleftrepeat\zleftrepeat@II % RDT 1.28
-\def\zzleftrepeat{% % RDT 1.28
+\def\zzleftrepeat{% % RDT 1.28
\advance\barno\m@ne%
\stoppiece%
\let\z@sw\@ne%
@@ -2610,6 +2615,21 @@
\def\zdoublebar{\advance\barno\m@ne\doublebar} % RDT 1.30
+\def\zzdoublebar{% % RDT 1.31
+\advance\barno\m@ne%
+\setdoublebar%
+\stoppiece%
+\let\z@sw\@ne%
+\contpiece%
+}
+
+\def\zzbar{% % RDT 1.31
+\advance\barno\m@ne%
+\stoppiece%
+\let\z@sw\@ne%
+\contpiece%
+}
+
\def\alapage{\stoppiece\eject\contpiece}
\def\zalapage{\zstoppiece\eject\contpiece}
diff --git a/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man b/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man
index 545c16fa00..2f931b9c3e 100644
--- a/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man
+++ b/macros/pdftex/mptopdf/doc/context/scripts/mkii/mptopdf.man
@@ -1,4 +1,4 @@
-.TH "mptopdf" "1" "01-01-2020" "version 1.4.1" "convert MetaPost figures to PDF"
+.TH "mptopdf" "1" "01-01-2021" "version 1.4.1" "convert MetaPost figures to PDF"
.SH NAME
mptopdf - convert MetaPost figures to PDF
.SH SYNOPSIS