summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-05 03:00:50 +0000
committerNorbert Preining <norbert@preining.info>2021-07-05 03:00:50 +0000
commit500adb5fa10a924ea571a0d9d7754ed17dab5dbf (patch)
tree2949e54f3539d61c239be23aaf037d10264da5ba /macros
parent7994f86ec5e18f9d0d9f90161a2f26dd26d26af7 (diff)
CTAN sync 202107050300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx42
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin559175 -> 558968 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin463607 -> 463618 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx31
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin1330962 -> 1331253 bytes
-rw-r--r--macros/latex/contrib/semantex/README.md78
-rw-r--r--macros/latex/contrib/semantex/semantex.pdfbin384087 -> 384087 bytes
-rw-r--r--macros/latex/contrib/semantex/semantex.sty4
-rw-r--r--macros/latex/contrib/semantex/semantex.tex2
-rw-r--r--macros/latex/contrib/semantex/stripsemantex.lua620
-rw-r--r--macros/latex/contrib/semantex/stripsemantex.sty2
-rw-r--r--macros/latex/contrib/siunitx/CHANGELOG.md9
-rw-r--r--macros/latex/contrib/siunitx/siunitx-code.pdfbin1493737 -> 1493556 bytes
-rw-r--r--macros/latex/contrib/siunitx/siunitx-quantity.dtx23
-rw-r--r--macros/latex/contrib/siunitx/siunitx.dtx2
-rw-r--r--macros/latex/contrib/siunitx/siunitx.pdfbin635011 -> 635018 bytes
-rw-r--r--macros/musixtex/README2
-rw-r--r--macros/musixtex/doc/ChangeLog-133.txt8
-rw-r--r--macros/musixtex/doc/musixdoc.pdfbin1395131 -> 1410802 bytes
-rw-r--r--macros/musixtex/doc/musixdoc/examples.tex19
-rw-r--r--macros/musixtex/doc/musixdoc/extensions.tex19
-rw-r--r--macros/musixtex/doc/musixdoc/frontmatter.tex2
-rw-r--r--macros/musixtex/doc/musixdoc/introduction.tex13
-rw-r--r--macros/musixtex/doc/musixdoc/miscellaneous.tex266
-rw-r--r--macros/musixtex/doc/musixdoc/musixdoc.sty2
-rw-r--r--macros/musixtex/doc/scripts/musixtex.pdfbin23518 -> 23518 bytes
-rwxr-xr-xmacros/musixtex/scripts/musixtex.lua34
-rw-r--r--macros/musixtex/tex/musixtex.tex149
-rw-r--r--macros/musixtex/tex/musixvbm.tex11
29 files changed, 782 insertions, 556 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 17f6663350..f519420c42 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,7 +28,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/03\hskip\ccwd\relax v1.26q\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/04\hskip\ccwd\relax v1.26r\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -158,7 +158,7 @@
% floatpage = <true|(false)>
% \end{syntax}
% 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
-% \changes{v1.26q}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
+% \changes{v1.26r}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
% \end{function}
%
% \subsection{article 模式}
@@ -240,7 +240,7 @@
% \tn{EBeforeAddBitoc*}\marg{加入目录英文标题前的代码}
% \end{syntax}
% \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。
-% \changes{v1.26q}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
+% \changes{v1.26r}{2021/06/13}{增加调整英文目录格式的钩子 \tn{EBeforeAddBitoc}。}
% \end{function}
%
% \tn{EBeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。
@@ -255,7 +255,7 @@
% \ \oarg{水平偏移}\parg{下标代码}
% \end{syntax}
% 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
-% \changes{v1.26q}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
+% \changes{v1.26r}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
% \end{function}
%
% 垂直和水平偏移默认值都是 0 pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。\tn{textsuperscript} 和 \tn{textsubscript} 命令已被重新定义并且分别等价于 \tn{super} 和 \tn{sub},如果您需要使用它们的原始定义创建新命令,则可以使用 \tn{spb@textsuperscript@save} 和 \tn{spb@textsubscript@save} 命令。
@@ -306,7 +306,7 @@
% \tn{DeclareThemeColor}\{<风格名称>,<ctex@frame>,<ctex@emph>,<ctex@verb>\}
% \end{syntax}
% 可以使用 \tn{DeclareThemeColor} 命令声明新的主题颜色,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成主题颜色。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
-% \changes{v1.26q}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
+% \changes{v1.26r}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
% \end{function}
% \item[color-all] 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[multoc] 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
@@ -371,7 +371,7 @@
% \tn{DeclareLinkColor}\{<风格名称>,<ctex@link>,<ctex@url>,<ctex@cite>\}
% \end{syntax}
% 可以使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成超链接颜色。
-% \changes{v1.26q}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
+% \changes{v1.26r}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
% \end{function}
% \item[linkcol-all] 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[linktoc] 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
@@ -492,7 +492,7 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{thmset/...}
% \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-% \changes{v1.26q}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
+% \changes{v1.26r}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
% \end{function}
%
% \begin{optdesc}
@@ -519,7 +519,7 @@
% 文档类已预置 8 个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。
% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{EBNewTheorem}。}
-% \changes{v1.26q}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
+% \changes{v1.26r}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -625,7 +625,7 @@
% \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
% \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代表左、中、右部分。单面打印时,含有偶数的选项无效。
-% \changes{v1.26q}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
+% \changes{v1.26r}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
% \end{function}
%
% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 + 号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
@@ -963,7 +963,7 @@
% \tn{EBUseCounter*}\oarg{父计数器}\parg{编号|(arabic)}\marg{计数器}\marg{内容}\oarg{分隔符|(.)}\parg{数值}
% \end{syntax}
% \tn{newcounter} 是 \LaTeX 自带的创建计数器命令,\tn{EBUseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \tn{the}\meta{父计数器}\meta{分隔符}\tn{the}\meta{计数器}\meta{内容} 输出当前内容。
-% \changes{v1.26q}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
+% \changes{v1.26r}{2021/06/30}{增加计数器使用命令 \tn{EBUseCounter}。}
% \end{function}
%
% 需要注意的是 \tn{EBUseCounter} 仅具有 \textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。
@@ -1150,7 +1150,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/03}{1.26q}
+\ProvidesExplClass{easybook}{2021/07/04}{1.26r}
{Typeset Chinese books or notes}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1398,7 +1398,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/03}{1.26q}
+\ProvidesExplPackage{easybase}{2021/07/04}{1.26r}
{Typeset Chinese books or notes}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
@@ -3131,7 +3131,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/03}{1.26q}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/04}{1.26r}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
@@ -3178,7 +3178,13 @@
\newtcbox[auto~counter]{\eb@tc@exercise@box}[1]{tc-exercise,#1}
\tl_new:N \p@eb@exercise
\tl_new:N \eb@tc@list@prologue
-\tl_set:Nn \eb@tc@exercise@ifnametrue
+\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} }
+\cs_new:Npn \tcphanifname #1#2
+ {
+ \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1}
+ \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2}
+ }
+\tcphanifname
{
\markright
{
@@ -3190,13 +3196,7 @@
\eb_tcb_toc_counter_numsep:n { section }
\eb@tc@exercise@title
}
- }
-\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} }
-\cs_new:Npn \tcphanifname #1#2
- {
- \tl_gset:Nn \eb@tc@exercise@ifnametrue {#1}
- \tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2}
- }
+ }{}
\cs_set:Npn \eb_exercise_label_noempty_use:
{
\eb_current_label:n { eb@exercise }
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 94de411084..d43e951819 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index 30ae5840fa..e630974f2f 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index 5e195b9103..f9ae880666 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{5.17}
-\def\myfiledate{2021/07/01}
+\def\myfileversion{5.17a}
+\def\myfiledate{2021/07/04}
%
%
%<*batchfile>
@@ -9071,7 +9071,7 @@ version 2005/12/01 or later.
%
%
% \bigskip
-% \subsection{The redefinition of \textbackslash multicolumn}
+% \subsection*{The redefinition of \textbackslash multicolumn}
%
% \medskip
% The following command must \emph{not} be protected since it begins with
@@ -9079,8 +9079,15 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new:Npn \@@_multicolumn:nnn #1 #2 #3
{
+% \end{macrocode}
+% The following lines are from the definition of |\multicolumn| in \pkg{array}
+% (and \emph{not} in standard LaTeX). The first line aims to raise an error if
+% the user has put more that one column specifier in the preamble of
+% |\multicolumn|.
+% \begin{macrocode}
\multispan { #1 }
\begingroup
+ \cs_set:Npn \@addamp { \if@firstamp \@firstampfalse \else \@preamerr 5 \fi }
% \end{macrocode}
%
% \medskip
@@ -9100,10 +9107,12 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \medskip
-% The following line creates the preamble. This line is a adaptation of a line
-% of the initial definition of |\multicolumn|.
+% The following lines are an adaptation of the definition of |\multicolumn| in
+% \pkg{array}.
% \begin{macrocode}
\exp_args:NV \@mkpream \g_@@_preamble_tl
+ \@addtopreamble \@empty
+ \endgroup
% \end{macrocode}
%
% \medskip
@@ -9129,13 +9138,14 @@ version 2005/12/01 or later.
% The following lines were in the original definition of |\multicolumn|.
% \begin{macrocode}
\cs_set:Npn \@sharp { #3 }
- \set@typeset@protect
- \cs_set_eq:NN \@startpbox \@@startpbox
- \cs_set_eq:NN \@endpbox \@@endpbox
\@arstrut
\@preamble
- \hbox { }
- \endgroup
+ \null
+% \end{macrocode}
+%
+% \medskip
+% We add some lines.
+% \begin{macrocode}
\int_gadd:Nn \c@jCol { #1 - 1 }
\int_compare:nNnT \c@jCol > \g_@@_col_total_int
{ \int_gset_eq:NN \g_@@_col_total_int \c@jCol }
@@ -17831,6 +17841,7 @@ version 2005/12/01 or later.
%
% It's now possible to use a key |l|, |r| or |c| with the command
% |\pAutoNiceMatrix| (and the similar ones).
+%
%
% \PrintIndex
%
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index 2f690d6409..ca40e46907 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/semantex/README.md b/macros/latex/contrib/semantex/README.md
index 8c786f1d62..85732053e6 100644
--- a/macros/latex/contrib/semantex/README.md
+++ b/macros/latex/contrib/semantex/README.md
@@ -1,40 +1,40 @@
-SemanTeX -- semantic, keyval-based mathematics
---------------------------------------
-
-The SemanTeX package for LaTeX delivers a more semantic,
-systematized way of writing mathematics, compared to the
-classical math syntax in LaTeX. The system uses keyval
-syntax, and the user can define their own keys and
-customize the system down to the last detail. At the same
-time, care has been taken to make the syntax as simple,
-natural, practical, and lightweight as possible.
-
-Furthermore, the package has a companion package,
-called stripsemantex, which allows you to completely strip
-your documents of SemanTeX markup to prepare them e.g. for publication.
-
-The package is still in beta, but is considered feature-complete
-and more or less stable, so using it at this point should be safe.
-Still, suggestions, ideas, and bug reports are more than welcome!
-
-----------------------------------------------------------------
-SemanTeX -- semantic, keyval-based mathematics
-Maintained by Sebastian Ørsted
-E-mail: sorsted@gmail.com
-Released under the LaTeX Project Public License v1.3c or later
-See http://www.latex-project.org/lppl.txt
-----------------------------------------------------------------
-
-Copyright (C) 2021 by Sebastian Ørsted <sorsted@gmail.com>
-
-The package is loaded via \usepackage{semantex}
-
-This work 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 in the file:
-
-http://www.latex-project.org/lppl.txt
-
-This work is "maintained" (as per LPPL maintenance status) by
+SemanTeX -- semantic, keyval-based mathematics
+--------------------------------------
+
+The SemanTeX package for LaTeX delivers a more semantic,
+systematized way of writing mathematics, compared to the
+classical math syntax in LaTeX. The system uses keyval
+syntax, and the user can define their own keys and
+customize the system down to the last detail. At the same
+time, care has been taken to make the syntax as simple,
+natural, practical, and lightweight as possible.
+
+Furthermore, the package has a companion package,
+called stripsemantex, which allows you to completely strip
+your documents of SemanTeX markup to prepare them e.g. for publication.
+
+The package is still in beta, but is considered feature-complete
+and more or less stable, so using it at this point should be safe.
+Still, suggestions, ideas, and bug reports are more than welcome!
+
+----------------------------------------------------------------
+SemanTeX -- semantic, keyval-based mathematics
+Maintained by Sebastian Ørsted
+E-mail: sorsted@gmail.com
+Released under the LaTeX Project Public License v1.3c or later
+See http://www.latex-project.org/lppl.txt
+----------------------------------------------------------------
+
+Copyright (C) 2021 by Sebastian Ørsted <sorsted@gmail.com>
+
+The package is loaded via \usepackage{semantex}
+
+This work 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 in the file:
+
+http://www.latex-project.org/lppl.txt
+
+This work is "maintained" (as per LPPL maintenance status) by
Sebastian Ørsted. \ No newline at end of file
diff --git a/macros/latex/contrib/semantex/semantex.pdf b/macros/latex/contrib/semantex/semantex.pdf
index c05e9af057..71b9241a80 100644
--- a/macros/latex/contrib/semantex/semantex.pdf
+++ b/macros/latex/contrib/semantex/semantex.pdf
Binary files differ
diff --git a/macros/latex/contrib/semantex/semantex.sty b/macros/latex/contrib/semantex/semantex.sty
index a54891f132..b026a84023 100644
--- a/macros/latex/contrib/semantex/semantex.sty
+++ b/macros/latex/contrib/semantex/semantex.sty
@@ -1,5 +1,5 @@
\RequirePackage{xparse,l3keys2e,leftindex,semtex}
-\ProvidesExplPackage{semantex}{2021/07/03}{0.506}{}
+\ProvidesExplPackage{semantex}{2021/07/04}{0.507}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -8177,7 +8177,7 @@
set~lower~slot={ {-} },
% Upper left indices:
data~provide=upper~left,
- data~provide=next~upper~left~with~sep,
+ bool~provide=next~upper~left~with~sep,
int~provide=number~of~upper~left~indices,
data~provide=pre~upper~left,
data~provide=post~upper~left,
diff --git a/macros/latex/contrib/semantex/semantex.tex b/macros/latex/contrib/semantex/semantex.tex
index fd1e6a67e8..2d8e6457ae 100644
--- a/macros/latex/contrib/semantex/semantex.tex
+++ b/macros/latex/contrib/semantex/semantex.tex
@@ -42,7 +42,7 @@
\usepackage[nameinlink]{cleveref}
-\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.506)}
+\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.507)}
\date{\today}
\author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})}
diff --git a/macros/latex/contrib/semantex/stripsemantex.lua b/macros/latex/contrib/semantex/stripsemantex.lua
index 0d624cc72d..f50648dd23 100644
--- a/macros/latex/contrib/semantex/stripsemantex.lua
+++ b/macros/latex/contrib/semantex/stripsemantex.lua
@@ -1,311 +1,311 @@
--- aliases for protected environments
-local assert, io_open
- = assert, io.open
-
--- load the ltn12 module
-local ltn12 = require("ltn12")
-
--- No more global accesses after this point
-if _VERSION == "Lua 5.2" then _ENV = nil end
-
--- copy a file
-copy_file = function(path_src, path_dst)
- ltn12.pump.all(
- ltn12.source.file(assert(io_open(path_src, "rb"))),
- ltn12.sink.file(assert(io_open(path_dst, "wb")))
- )
-end
-
-openFile = function(file)
- f = io.open(file, "r")
- filecontent = f:read("*all")
- local beginDocPosition = filecontent:find('\\begin{document}')
- if not beginDocPosition then
- tex.sprint( [[\begingroup\ExplSyntaxOn
- \msg_fatal:nnn { stripsemantex } { begin_document_not_found } { ]] .. file .. [[ }
- \endgroup]] )
- return
- end
- precontent = filecontent:sub(1,beginDocPosition-1)
- content = filecontent:sub(beginDocPosition,-1)
- f:close()
-end
-
-closeFile = function(file)
- f = io.open(file, "w")
- f:write(precontent .. content)
- f:close()
-end
-
-removeStricttexFormatting = function(str)
- -- We do this in case the package "stricttex" was used
- str = str:gsub('numberZERO','0')
- str = str:gsub('numberONE','1')
- str = str:gsub('numberTWO','2')
- str = str:gsub('numberTHREE','3')
- str = str:gsub('numberFOUR','4')
- str = str:gsub('numberFIVE','5')
- str = str:gsub('numberSIX','6')
- str = str:gsub('numberSEVEN','7')
- str = str:gsub('numberEIGHT','8')
- str = str:gsub('numberNINE','9')
- str = str:gsub('symbolPRIME','\'')
- return str
-end
-
-addIDsToRegisters = function(str)
- str = removeStricttexFormatting(str)
- content = content:gsub('\\' .. str .. '([^%a])' ,'\\SemantexIDcommand{}\\' .. str .. '%1')
- -- '%f[^%a]' does not work here, as it will not react if the last character of str is a number,
- -- which stricttex allows.
- -- Because of this choice, there will be an issue if you use stricttex and let
- -- \<command> by a SemanTeX command and \<command>' be a non-SemanTeX command.
- -- So simply *don't do that*.
-end
-
-removeSuperfluousIDs = function()
- local p = content:find('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)')
- while p do
- content = content:gsub('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)','%1%2')
- p = content:find('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)')
- end
- content = content:gsub('parent(%s*)=(%s*)\\SemantexIDcommand{}','parent%1=%2')
- content = content:gsub('class(%s*)=(%s*)\\SemantexIDcommand{}','class%1=%2')
- content = content:gsub('clone(%s*)=(%s*)\\SemantexIDcommand{}','clone%1=%2')
- content = content:gsub('copy(%s*)=(%s*)\\SemantexIDcommand{}','copy%1=%2')
- content = content:gsub('\\New(%w+)Class(%s*{?)\\SemantexIDcommand{}','\\New%1Class%2')
- content = content:gsub('\\NewObject(%s*{?%s*)\\SemantexIDcommand{}(\\%w+%s*}?%s*{?%s*)\\SemantexIDcommand{}', '\\NewObject%1%2')
- content = content:gsub('\\SetupClass(%s*{?%s*)\\SemantexIDcommand{}', '\\SetupClass%1')
- content = content:gsub('\\SetupObject(%s*{?%s*)\\SemantexIDcommand{}', '\\SetupObject%1')
-end
-
-addNumbersToIDs = function()
- local n = 0
- local p,q = string.find(content,'\\SemantexIDcommand{}')
- while q do
- n = n + 1
- content = content:sub(1,q-1) .. n .. content:sub(q,-1)
- p, q = string.find(content,'\\SemantexIDcommand{}')
- end
-end
-
-semantexIDluacommand = function(id, source, output)
- local p, q = string.find(content, '\\SemantexIDcommand{' .. id .. '}')
-
- while p do
- content = content:sub(1,p-1) .. content:sub(q+1,-1)
-
- source = source:gsub('%s+', '')
-
- -- We do this in case the package "stricttex" was used
- source = removeStricttexFormatting(source)
-
- -- This is because #1's in the code becomes ##1
- -- in the .semtex file.
- source = source:gsub('#(%d)', '%1')
-
- local length = source:len()
-
- local i = 1
-
- local s
-
- while i <= length do
- s = content:sub(p,p)
- if s == source:sub(i,i) then
- content = content:sub(1 , p-1) .. content:sub(p+1, -1)
- i = i + 1
- elseif s:match('%s') then
- content = content:sub(1, p-1) .. content:sub(p+1, -1)
- elseif s == '%' then
- content = content:sub(1 , p-1) .. content:sub(p,-1):gsub('%%.-\n','',1)
- elseif s == '{' then
- -- In this case, we remove the corresponding right brace,
- -- once we find it
- local netto = 1 -- The current brace group level
- local q = 0 -- The position we have moved forward so far
- while netto > 0 do
- q = q + 1
- local e = content:sub(p+q,p+q)
- if e == '}' then
- netto = netto - 1
- elseif e == '{' then
- netto = netto + 1
- elseif e == '\\' then
- q = q + 1
- elseif e == '%' then
- content = content:sub(1, p+q-1) .. content:sub(p+q,-1):gsub('%%.-\n','',1)
- q = q - 1
- end
- end
- content = content:sub(1,p-1) .. content:sub(p+1,p+q-1) .. content:sub(p+q+1,-1)
- elseif s == '<' and content:sub(p+1,p+2) == '[>' then
- content = content:sub(1,p-1) .. content:sub(p+3,-1)
- i = i + 1
- elseif s == '<' and content:sub(p+1,p+2) == ']>' then
- content = content:sub(1,p-1) .. content:sub(p+3,-1)
- i = i + 1
- elseif source:sub(i,i) == '{' then
- -- In this case, we remove the corresponding right brace,
- -- once we find it
- local netto = 1 -- The current brace group level
- local q = 0 -- The position we have moved forward so far
- while netto > 0 do
- q = q + 1
- local e = source:sub(i+q,i+q)
- if e == '}' then
- netto = netto - 1
- elseif e == '{' then
- netto = netto + 1
- elseif e == '\\' then
- q = q + 1
- -- there is no chance that the source contains an unescaped %, so we do not
- -- check for this
- end
- end
- source = source:sub(1,i-1) .. source:sub(i+1,i+q-1) .. source:sub(i+q+1,-1)
- length = source:len()
- else
- tex.sprint( [[\begingroup\ExplSyntaxOn
- \msg_fatal:nnnn { stripsemantex } { source_not_expected } { ]] .. source:sub(i,i) .. [[ } { ]] .. s .. [[ }
- \endgroup]] )
- break
- end
- end
-
-
- output = output:gsub('%s*\\sp {', '^{')
- output = output:gsub('%s*\\sb {', '_{')
- output = output:gsub('\\mathopen \\big ', '\\bigl')
- output = output:gsub('\\mathclose \\big ', '\\bigr')
- output = output:gsub('\\mathopen \\Big ', '\\Bigl')
- output = output:gsub('\\mathclose \\Big ', '\\Bigr')
- output = output:gsub('\\mathopen \\bigg ', '\\biggl')
- output = output:gsub('\\mathclose \\bigg ', '\\biggr')
- output = output:gsub('\\mathopen \\Bigg ', '\\Biggl')
- output = output:gsub('\\mathclose \\Bigg ', '\\Biggr')
- output = output:gsub('\\mathopen %(', '(')
- output = output:gsub('\\mathclose %)', ')')
- output = output:gsub('\\mathopen %[', '[')
- output = output:gsub('\\mathclose %]', ']')
- output = output:gsub('\\mathopen \\{', '\\{')
- output = output:gsub('\\mathclose \\}', '\\}')
- output = output:gsub('\\mathopen \\lbrace', '\\lbrace')
- output = output:gsub('\\mathclose \\rbrace', '\\rbrace')
- output = output:gsub('\\mathopen \\lbrack', '\\lbrack')
- output = output:gsub('\\mathclose \\rbrack', '\\rbrack')
- output = output:gsub('\\mathopen \\langle', '\\langle')
- output = output:gsub('\\mathclose \\rangle', '\\rangle')
- output = output:gsub('\\mathopen \\lvert', '\\lvert')
- output = output:gsub('\\mathclose \\rvert', '\\rvert')
- output = output:gsub('\\mathopen \\vert', '\\lvert')
- output = output:gsub('\\mathclose \\vert', '\\rvert')
- output = output:gsub('\\mathopen \\lVert', '\\lVert')
- output = output:gsub('\\mathclose \\rVert', '\\rVert')
- output = output:gsub('\\mathopen \\Vert', '\\lVert')
- output = output:gsub('\\mathclose \\Vert', '\\rVert')
- output = output:gsub('%^{\\prime }', '\'')
- output = output:gsub('%^{\\prime \\prime }', '\'\'')
- output = output:gsub('%^{\\prime \\prime \\prime }', '\'\'\'')
- output = output:gsub('%^{\\prime \\prime \\prime \\prime }', '\'\'\'\'')
- output = output:gsub('%^{\\prime \\prime \\prime \\prime \\prime }', '\'\'\'\'\'')
-
- output = output:gsub('%s+%f[{}%[%]%(%)%$,]','')
- output = output:gsub('([}%]%)])%f[\\%w%+%-%(%[=]', '%1 ')
- output = output:gsub(',',', ')
- output = output:gsub('%s+$', '')
-
-
- -- We now check whether the string we add will follow right
- -- after a control sequence, causing it to be interpreted
- -- as part of that control sequence.
- -- Because we want to allow the user to use stricttex, we
- -- check for alphanumerical control sequences rather than
- -- just alphabetic ones. This could add spaces that
- -- the user might not have intended, but it's a minor issue.
- if output:sub(1,1):match('%w') and content:sub(1, p-1):match('\\%w+$') then
- content = content:sub(1,p-1) .. ' ' .. output .. content:sub(p,-1)
- else
- content = content:sub(1,p-1) .. output .. content:sub(p,-1)
- end
- p, q = string.find(content, '\\SemantexIDcommand{' .. id .. '}')
- end
-end
-
-stripRemainingSemantexIDs = function()
- content = content:gsub('\\SemantexIDcommand{%d+}', '')
-end
-
-removeParenthesisCommands = function()
- content = content:gsub('\\SemantexMathOpen \\bigg%s?', '\\biggl')
- content = content:gsub('\\SemantexMathClose \\bigg%s?', '\\biggr')
- content = content:gsub('\\SemantexMathOpen \\Bigg%s?', '\\Biggl')
- content = content:gsub('\\SemantexMathClose \\Bigg%s?', '\\Biggr')
- content = content:gsub('\\SemantexMathOpen \\big%s?', '\\bigl')
- content = content:gsub('\\SemantexMathClose \\big%s?', '\\bigr')
- content = content:gsub('\\SemantexMathOpen \\Big%s?', '\\Bigl')
- content = content:gsub('\\SemantexMathClose \\Big%s?', '\\Bigr')
- content = content:gsub('\\SemantexMathOpen{} %(', '(')
- content = content:gsub('%s*\\SemantexMathClose{}%)', ')')
- content = content:gsub('\\SemantexMathOpen{} %[', '[')
- content = content:gsub('%s*\\SemantexMathClose{}%]', ']')
- content = content:gsub('\\SemantexMathOpen{} \\{', '\\{')
- content = content:gsub('%s*\\SemantexMathClose{} \\}', '\\}')
- content = content:gsub('\\SemantexMathOpen{} \\lbrace', '\\lbrace')
- content = content:gsub('\\SemantexMathClose{} \\rbrace', '\\rbrace')
- content = content:gsub('\\SemantexMathOpen{} \\lbrack', '\\rbrack')
- content = content:gsub('\\SemantexMathClose{} \\rbrack', '\\rbrack')
- content = content:gsub('\\SemantexMathOpen{} \\langle', '\\langle')
- content = content:gsub('\\SemantexMathClose{} \\rangle', '\\rangle')
- content = content:gsub('\\SemantexMathOpen{} \\lvert', '\\lvert')
- content = content:gsub('\\SemantexMathClose{} \\rvert', '\\rvert')
- content = content:gsub('\\SemantexMathOpen{} \\vert', '\\lvert')
- content = content:gsub('\\SemantexMathClose{} \\vert', '\\rvert')
- content = content:gsub('\\SemantexMathOpen{} \\lVert', '\\lVert')
- content = content:gsub('\\SemantexMathClose{} \\rVert', '\\rVert')
- content = content:gsub('\\SemantexMathOpen{} \\Vert', '\\lVert')
- content = content:gsub('\\SemantexMathClose{} \\Vert', '\\rVert')
- content = content:gsub('\\SemantexMathOpen{} .%s?', '')
- content = content:gsub('\\SemantexMathClose{} .%s?', '')
- content = content:gsub('\\SemantexMathOpen{}', '\\mathopen ')
- content = content:gsub('\\SemantexMathClose{}', '\\mathclose ')
- content = content:gsub('\\SemantexMathOpenAuto%s?', '\\SemantexLeft')
- content = content:gsub('\\SemantexMathCloseAuto%s?', '\\SemantexRight')
- content = content:gsub('\\SemantexMathOpenNoPar%s?', '')
- content = content:gsub('\\SemantexMathCloseNoPar%s?', '')
- content = content:gsub('\\SemantexMathOpen%s?', '\\mathopen')
- content = content:gsub('\\SemantexMathClose%s?', '\\mathclose')
-end
-
-stripComments = function()
- content = content:gsub('\\%%', '\\StripSemantexEscapedPercent')
- content = content:gsub('(\\%w+)%%.-\n%s*', '%1 ')
- content = content:gsub('%%.-\n%s*', '')
- content = content:gsub('\\StripSemantexEscapedPercent', '\\%%')
-end
-
-addSemtexPackageToFile = function()
- content = [[% The following was added by "stripsemantex":
-
-\usepackage{semtex,leftindex,graphicx}
-
-\providecommand\SemantexLeft{%
- \mathopen{}\mathclose\bgroup\left
-}
-
-\providecommand\SemantexRight{%
- \aftergroup\egroup\right
-}
-
-\makeatletter
-\DeclareRobustCommand\SemantexBullet{%
- \mathord{\mathpalette\SemantexBullet@{0.5}}%
-}
-\newcommand\SemantexBullet@[2]{%
- \vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}%
-}
-\DeclareRobustCommand\SemantexDoubleBullet{\SemantexBullet \SemantexBullet}
-\makeatother
-
-]] .. content
+-- aliases for protected environments
+local assert, io_open
+ = assert, io.open
+
+-- load the ltn12 module
+local ltn12 = require("ltn12")
+
+-- No more global accesses after this point
+if _VERSION == "Lua 5.2" then _ENV = nil end
+
+-- copy a file
+copy_file = function(path_src, path_dst)
+ ltn12.pump.all(
+ ltn12.source.file(assert(io_open(path_src, "rb"))),
+ ltn12.sink.file(assert(io_open(path_dst, "wb")))
+ )
+end
+
+openFile = function(file)
+ f = io.open(file, "r")
+ filecontent = f:read("*all")
+ local beginDocPosition = filecontent:find('\\begin{document}')
+ if not beginDocPosition then
+ tex.sprint( [[\begingroup\ExplSyntaxOn
+ \msg_fatal:nnn { stripsemantex } { begin_document_not_found } { ]] .. file .. [[ }
+ \endgroup]] )
+ return
+ end
+ precontent = filecontent:sub(1,beginDocPosition-1)
+ content = filecontent:sub(beginDocPosition,-1)
+ f:close()
+end
+
+closeFile = function(file)
+ f = io.open(file, "w")
+ f:write(precontent .. content)
+ f:close()
+end
+
+removeStricttexFormatting = function(str)
+ -- We do this in case the package "stricttex" was used
+ str = str:gsub('numberZERO','0')
+ str = str:gsub('numberONE','1')
+ str = str:gsub('numberTWO','2')
+ str = str:gsub('numberTHREE','3')
+ str = str:gsub('numberFOUR','4')
+ str = str:gsub('numberFIVE','5')
+ str = str:gsub('numberSIX','6')
+ str = str:gsub('numberSEVEN','7')
+ str = str:gsub('numberEIGHT','8')
+ str = str:gsub('numberNINE','9')
+ str = str:gsub('symbolPRIME','\'')
+ return str
+end
+
+addIDsToRegisters = function(str)
+ str = removeStricttexFormatting(str)
+ content = content:gsub('\\' .. str .. '([^%a])' ,'\\SemantexIDcommand{}\\' .. str .. '%1')
+ -- '%f[^%a]' does not work here, as it will not react if the last character of str is a number,
+ -- which stricttex allows.
+ -- Because of this choice, there will be an issue if you use stricttex and let
+ -- \<command> by a SemanTeX command and \<command>' be a non-SemanTeX command.
+ -- So simply *don't do that*.
+end
+
+removeSuperfluousIDs = function()
+ local p = content:find('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)')
+ while p do
+ content = content:gsub('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)','%1%2')
+ p = content:find('([^\\]%%[^\n]-)\\SemantexIDcommand{}([^\n]-\n)')
+ end
+ content = content:gsub('parent(%s*)=(%s*)\\SemantexIDcommand{}','parent%1=%2')
+ content = content:gsub('class(%s*)=(%s*)\\SemantexIDcommand{}','class%1=%2')
+ content = content:gsub('clone(%s*)=(%s*)\\SemantexIDcommand{}','clone%1=%2')
+ content = content:gsub('copy(%s*)=(%s*)\\SemantexIDcommand{}','copy%1=%2')
+ content = content:gsub('\\New(%w+)Class(%s*{?)\\SemantexIDcommand{}','\\New%1Class%2')
+ content = content:gsub('\\NewObject(%s*{?%s*)\\SemantexIDcommand{}(\\%w+%s*}?%s*{?%s*)\\SemantexIDcommand{}', '\\NewObject%1%2')
+ content = content:gsub('\\SetupClass(%s*{?%s*)\\SemantexIDcommand{}', '\\SetupClass%1')
+ content = content:gsub('\\SetupObject(%s*{?%s*)\\SemantexIDcommand{}', '\\SetupObject%1')
+end
+
+addNumbersToIDs = function()
+ local n = 0
+ local p,q = string.find(content,'\\SemantexIDcommand{}')
+ while q do
+ n = n + 1
+ content = content:sub(1,q-1) .. n .. content:sub(q,-1)
+ p, q = string.find(content,'\\SemantexIDcommand{}')
+ end
+end
+
+semantexIDluacommand = function(id, source, output)
+ local p, q = string.find(content, '\\SemantexIDcommand{' .. id .. '}')
+
+ while p do
+ content = content:sub(1,p-1) .. content:sub(q+1,-1)
+
+ source = source:gsub('%s+', '')
+
+ -- We do this in case the package "stricttex" was used
+ source = removeStricttexFormatting(source)
+
+ -- This is because #1's in the code becomes ##1
+ -- in the .semtex file.
+ source = source:gsub('#(%d)', '%1')
+
+ local length = source:len()
+
+ local i = 1
+
+ local s
+
+ while i <= length do
+ s = content:sub(p,p)
+ if s == source:sub(i,i) then
+ content = content:sub(1 , p-1) .. content:sub(p+1, -1)
+ i = i + 1
+ elseif s:match('%s') then
+ content = content:sub(1, p-1) .. content:sub(p+1, -1)
+ elseif s == '%' then
+ content = content:sub(1 , p-1) .. content:sub(p,-1):gsub('%%.-\n','',1)
+ elseif s == '{' then
+ -- In this case, we remove the corresponding right brace,
+ -- once we find it
+ local netto = 1 -- The current brace group level
+ local q = 0 -- The position we have moved forward so far
+ while netto > 0 do
+ q = q + 1
+ local e = content:sub(p+q,p+q)
+ if e == '}' then
+ netto = netto - 1
+ elseif e == '{' then
+ netto = netto + 1
+ elseif e == '\\' then
+ q = q + 1
+ elseif e == '%' then
+ content = content:sub(1, p+q-1) .. content:sub(p+q,-1):gsub('%%.-\n','',1)
+ q = q - 1
+ end
+ end
+ content = content:sub(1,p-1) .. content:sub(p+1,p+q-1) .. content:sub(p+q+1,-1)
+ elseif s == '<' and content:sub(p+1,p+2) == '[>' then
+ content = content:sub(1,p-1) .. content:sub(p+3,-1)
+ i = i + 1
+ elseif s == '<' and content:sub(p+1,p+2) == ']>' then
+ content = content:sub(1,p-1) .. content:sub(p+3,-1)
+ i = i + 1
+ elseif source:sub(i,i) == '{' then
+ -- In this case, we remove the corresponding right brace,
+ -- once we find it
+ local netto = 1 -- The current brace group level
+ local q = 0 -- The position we have moved forward so far
+ while netto > 0 do
+ q = q + 1
+ local e = source:sub(i+q,i+q)
+ if e == '}' then
+ netto = netto - 1
+ elseif e == '{' then
+ netto = netto + 1
+ elseif e == '\\' then
+ q = q + 1
+ -- there is no chance that the source contains an unescaped %, so we do not
+ -- check for this
+ end
+ end
+ source = source:sub(1,i-1) .. source:sub(i+1,i+q-1) .. source:sub(i+q+1,-1)
+ length = source:len()
+ else
+ tex.sprint( [[\begingroup\ExplSyntaxOn
+ \msg_fatal:nnnn { stripsemantex } { source_not_expected } { ]] .. source:sub(i,i) .. [[ } { ]] .. s .. [[ }
+ \endgroup]] )
+ break
+ end
+ end
+
+
+ output = output:gsub('%s*\\sp {', '^{')
+ output = output:gsub('%s*\\sb {', '_{')
+ output = output:gsub('\\mathopen \\big ', '\\bigl')
+ output = output:gsub('\\mathclose \\big ', '\\bigr')
+ output = output:gsub('\\mathopen \\Big ', '\\Bigl')
+ output = output:gsub('\\mathclose \\Big ', '\\Bigr')
+ output = output:gsub('\\mathopen \\bigg ', '\\biggl')
+ output = output:gsub('\\mathclose \\bigg ', '\\biggr')
+ output = output:gsub('\\mathopen \\Bigg ', '\\Biggl')
+ output = output:gsub('\\mathclose \\Bigg ', '\\Biggr')
+ output = output:gsub('\\mathopen %(', '(')
+ output = output:gsub('\\mathclose %)', ')')
+ output = output:gsub('\\mathopen %[', '[')
+ output = output:gsub('\\mathclose %]', ']')
+ output = output:gsub('\\mathopen \\{', '\\{')
+ output = output:gsub('\\mathclose \\}', '\\}')
+ output = output:gsub('\\mathopen \\lbrace', '\\lbrace')
+ output = output:gsub('\\mathclose \\rbrace', '\\rbrace')
+ output = output:gsub('\\mathopen \\lbrack', '\\lbrack')
+ output = output:gsub('\\mathclose \\rbrack', '\\rbrack')
+ output = output:gsub('\\mathopen \\langle', '\\langle')
+ output = output:gsub('\\mathclose \\rangle', '\\rangle')
+ output = output:gsub('\\mathopen \\lvert', '\\lvert')
+ output = output:gsub('\\mathclose \\rvert', '\\rvert')
+ output = output:gsub('\\mathopen \\vert', '\\lvert')
+ output = output:gsub('\\mathclose \\vert', '\\rvert')
+ output = output:gsub('\\mathopen \\lVert', '\\lVert')
+ output = output:gsub('\\mathclose \\rVert', '\\rVert')
+ output = output:gsub('\\mathopen \\Vert', '\\lVert')
+ output = output:gsub('\\mathclose \\Vert', '\\rVert')
+ output = output:gsub('%^{\\prime }', '\'')
+ output = output:gsub('%^{\\prime \\prime }', '\'\'')
+ output = output:gsub('%^{\\prime \\prime \\prime }', '\'\'\'')
+ output = output:gsub('%^{\\prime \\prime \\prime \\prime }', '\'\'\'\'')
+ output = output:gsub('%^{\\prime \\prime \\prime \\prime \\prime }', '\'\'\'\'\'')
+
+ output = output:gsub('%s+%f[{}%[%]%(%)%$,]','')
+ output = output:gsub('([}%]%)])%f[\\%w%+%-%(%[=]', '%1 ')
+ output = output:gsub(',',', ')
+ output = output:gsub('%s+$', '')
+
+
+ -- We now check whether the string we add will follow right
+ -- after a control sequence, causing it to be interpreted
+ -- as part of that control sequence.
+ -- Because we want to allow the user to use stricttex, we
+ -- check for alphanumerical control sequences rather than
+ -- just alphabetic ones. This could add spaces that
+ -- the user might not have intended, but it's a minor issue.
+ if output:sub(1,1):match('%w') and content:sub(1, p-1):match('\\%w+$') then
+ content = content:sub(1,p-1) .. ' ' .. output .. content:sub(p,-1)
+ else
+ content = content:sub(1,p-1) .. output .. content:sub(p,-1)
+ end
+ p, q = string.find(content, '\\SemantexIDcommand{' .. id .. '}')
+ end
+end
+
+stripRemainingSemantexIDs = function()
+ content = content:gsub('\\SemantexIDcommand{%d+}', '')
+end
+
+removeParenthesisCommands = function()
+ content = content:gsub('\\SemantexMathOpen \\bigg%s?', '\\biggl')
+ content = content:gsub('\\SemantexMathClose \\bigg%s?', '\\biggr')
+ content = content:gsub('\\SemantexMathOpen \\Bigg%s?', '\\Biggl')
+ content = content:gsub('\\SemantexMathClose \\Bigg%s?', '\\Biggr')
+ content = content:gsub('\\SemantexMathOpen \\big%s?', '\\bigl')
+ content = content:gsub('\\SemantexMathClose \\big%s?', '\\bigr')
+ content = content:gsub('\\SemantexMathOpen \\Big%s?', '\\Bigl')
+ content = content:gsub('\\SemantexMathClose \\Big%s?', '\\Bigr')
+ content = content:gsub('\\SemantexMathOpen{} %(', '(')
+ content = content:gsub('%s*\\SemantexMathClose{}%)', ')')
+ content = content:gsub('\\SemantexMathOpen{} %[', '[')
+ content = content:gsub('%s*\\SemantexMathClose{}%]', ']')
+ content = content:gsub('\\SemantexMathOpen{} \\{', '\\{')
+ content = content:gsub('%s*\\SemantexMathClose{} \\}', '\\}')
+ content = content:gsub('\\SemantexMathOpen{} \\lbrace', '\\lbrace')
+ content = content:gsub('\\SemantexMathClose{} \\rbrace', '\\rbrace')
+ content = content:gsub('\\SemantexMathOpen{} \\lbrack', '\\rbrack')
+ content = content:gsub('\\SemantexMathClose{} \\rbrack', '\\rbrack')
+ content = content:gsub('\\SemantexMathOpen{} \\langle', '\\langle')
+ content = content:gsub('\\SemantexMathClose{} \\rangle', '\\rangle')
+ content = content:gsub('\\SemantexMathOpen{} \\lvert', '\\lvert')
+ content = content:gsub('\\SemantexMathClose{} \\rvert', '\\rvert')
+ content = content:gsub('\\SemantexMathOpen{} \\vert', '\\lvert')
+ content = content:gsub('\\SemantexMathClose{} \\vert', '\\rvert')
+ content = content:gsub('\\SemantexMathOpen{} \\lVert', '\\lVert')
+ content = content:gsub('\\SemantexMathClose{} \\rVert', '\\rVert')
+ content = content:gsub('\\SemantexMathOpen{} \\Vert', '\\lVert')
+ content = content:gsub('\\SemantexMathClose{} \\Vert', '\\rVert')
+ content = content:gsub('\\SemantexMathOpen{} .%s?', '')
+ content = content:gsub('\\SemantexMathClose{} .%s?', '')
+ content = content:gsub('\\SemantexMathOpen{}', '\\mathopen ')
+ content = content:gsub('\\SemantexMathClose{}', '\\mathclose ')
+ content = content:gsub('\\SemantexMathOpenAuto%s?', '\\SemantexLeft')
+ content = content:gsub('\\SemantexMathCloseAuto%s?', '\\SemantexRight')
+ content = content:gsub('\\SemantexMathOpenNoPar%s?', '')
+ content = content:gsub('\\SemantexMathCloseNoPar%s?', '')
+ content = content:gsub('\\SemantexMathOpen%s?', '\\mathopen')
+ content = content:gsub('\\SemantexMathClose%s?', '\\mathclose')
+end
+
+stripComments = function()
+ content = content:gsub('\\%%', '\\StripSemantexEscapedPercent')
+ content = content:gsub('(\\%w+)%%.-\n%s*', '%1 ')
+ content = content:gsub('%%.-\n%s*', '')
+ content = content:gsub('\\StripSemantexEscapedPercent', '\\%%')
+end
+
+addSemtexPackageToFile = function()
+ content = [[% The following was added by "stripsemantex":
+
+\usepackage{semtex,leftindex,graphicx}
+
+\providecommand\SemantexLeft{%
+ \mathopen{}\mathclose\bgroup\left
+}
+
+\providecommand\SemantexRight{%
+ \aftergroup\egroup\right
+}
+
+\makeatletter
+\DeclareRobustCommand\SemantexBullet{%
+ \mathord{\mathpalette\SemantexBullet@{0.5}}%
+}
+\newcommand\SemantexBullet@[2]{%
+ \vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}%
+}
+\DeclareRobustCommand\SemantexDoubleBullet{\SemantexBullet \SemantexBullet}
+\makeatother
+
+]] .. content
end \ No newline at end of file
diff --git a/macros/latex/contrib/semantex/stripsemantex.sty b/macros/latex/contrib/semantex/stripsemantex.sty
index d50c14c6e3..1d66144b50 100644
--- a/macros/latex/contrib/semantex/stripsemantex.sty
+++ b/macros/latex/contrib/semantex/stripsemantex.sty
@@ -1,5 +1,5 @@
\RequirePackage{xparse}
-\ProvidesExplPackage{stripsemantex}{2021/07/03}{0.506}{}
+\ProvidesExplPackage{stripsemantex}{2021/07/04}{0.507}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
diff --git a/macros/latex/contrib/siunitx/CHANGELOG.md b/macros/latex/contrib/siunitx/CHANGELOG.md
index 8cd9f6dfee..829db2c92a 100644
--- a/macros/latex/contrib/siunitx/CHANGELOG.md
+++ b/macros/latex/contrib/siunitx/CHANGELOG.md
@@ -7,6 +7,12 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
## [Unreleased]
+## [v3.0.18]
+
+### Fixed
+- Printing of reciprocal units when `per-mode = symbol` is active
+ (issue #500)
+
## [v3.0.17]
### Fixed
@@ -1414,7 +1420,8 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
### Added
- First public testing release (as `si`)
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.17...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.0.18...HEAD
+[v3.0.18]: https://github.com/josephwright/siunitx/compare/v3.0.17...v3.0.18
[v3.0.17]: https://github.com/josephwright/siunitx/compare/v3.0.16...v3.0.17
[v3.0.16]: https://github.com/josephwright/siunitx/compare/v3.0.15...v3.0.16
[v3.0.15]: https://github.com/josephwright/siunitx/compare/v3.0.14...v3.0.15
diff --git a/macros/latex/contrib/siunitx/siunitx-code.pdf b/macros/latex/contrib/siunitx/siunitx-code.pdf
index a3f4606a73..ed17e84c1c 100644
--- a/macros/latex/contrib/siunitx/siunitx-code.pdf
+++ b/macros/latex/contrib/siunitx/siunitx-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/siunitx/siunitx-quantity.dtx b/macros/latex/contrib/siunitx/siunitx-quantity.dtx
index 353fe94e6e..e4dc93200e 100644
--- a/macros/latex/contrib/siunitx/siunitx-quantity.dtx
+++ b/macros/latex/contrib/siunitx/siunitx-quantity.dtx
@@ -372,18 +372,29 @@
% }
% For printing a single part of a quantity. This is needed for compound
% quantities and so is public: that's also the reason for passing both
-% argument explicitly.
+% argument explicitly. The lazy test here is looking for the case where
+% a |1| has been inserted at the start of a format unit \emph{and} we
+% have some other number to print: the |1| is then removed and there is
+% no space inserted.
% \begin{macrocode}
\cs_new_protected:Npn \siunitx_quantity_print:nn #1#2
{
\siunitx_print_number:n {#1}
\tl_if_blank:nF {#2}
{
- \tl_use:N \l_@@_product_tl
- \bool_if:NTF \l_@@_break_bool
- { \penalty \binoppenalty }
- { \nobreak }
- \siunitx_print_unit:n {#2}
+ \bool_lazy_or:nnTF
+ { \tl_if_blank_p:n {#1} }
+ { ! \tl_if_head_eq_charcode_p:nN {#2} { 1 } }
+ {
+ \tl_use:N \l_@@_product_tl
+ \bool_if:NTF \l_@@_break_bool
+ { \penalty \binoppenalty }
+ { \nobreak }
+ \siunitx_print_unit:n {#2}
+ }
+ {
+ \exp_args:No \siunitx_print_unit:n { \use_none:n #2 }
+ }
}
}
\cs_generate_variant:Nn \siunitx_quantity_print:nn { nV , VV , xV }
diff --git a/macros/latex/contrib/siunitx/siunitx.dtx b/macros/latex/contrib/siunitx/siunitx.dtx
index 30afff3ae2..52da6d7b36 100644
--- a/macros/latex/contrib/siunitx/siunitx.dtx
+++ b/macros/latex/contrib/siunitx/siunitx.dtx
@@ -121,7 +121,7 @@
%
% Identify the package and give the over all version information.
% \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2021-06-29} {3.0.17}
+\ProvidesExplPackage {siunitx} {2021-07-04} {3.0.18}
{A comprehensive (SI) units package}
% \end{macrocode}
%
diff --git a/macros/latex/contrib/siunitx/siunitx.pdf b/macros/latex/contrib/siunitx/siunitx.pdf
index ed08b36163..57e3ffb45e 100644
--- a/macros/latex/contrib/siunitx/siunitx.pdf
+++ b/macros/latex/contrib/siunitx/siunitx.pdf
Binary files differ
diff --git a/macros/musixtex/README b/macros/musixtex/README
index da1567d60d..a9ae8ac381 100644
--- a/macros/musixtex/README
+++ b/macros/musixtex/README
@@ -1,4 +1,4 @@
-This is MusiXTeX, version 1.32a (2021-05-16).
+This is MusiXTeX, version 1.33 (2021-07-04).
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-133.txt b/macros/musixtex/doc/ChangeLog-133.txt
new file mode 100644
index 0000000000..e6e4a70cc9
--- /dev/null
+++ b/macros/musixtex/doc/ChangeLog-133.txt
@@ -0,0 +1,8 @@
+
+Changes from MusiXTeX 132 to 133:
+
+ * \tabfnt etc. now uses (Helvetica) bold for tablature notes
+ * replace ledger lines by slashes (/) for tablature notes below the staff
+ * new commands \tzqu, \tzcup, etc. for stems without noteheads, for use in
+ tablature
+
diff --git a/macros/musixtex/doc/musixdoc.pdf b/macros/musixtex/doc/musixdoc.pdf
index ec5eac0642..d3410b5dde 100644
--- a/macros/musixtex/doc/musixdoc.pdf
+++ b/macros/musixtex/doc/musixdoc.pdf
Binary files differ
diff --git a/macros/musixtex/doc/musixdoc/examples.tex b/macros/musixtex/doc/musixdoc/examples.tex
index d0aeb1e6cd..6ca863122c 100644
--- a/macros/musixtex/doc/musixdoc/examples.tex
+++ b/macros/musixtex/doc/musixdoc/examples.tex
@@ -79,14 +79,14 @@ to create staff-jumping doubly beamed notes.
\end{itemize}
-\section{Compiling \texttt{musixdoc.tex}}
+\section{Compiling \texttt{musixdoc.ltx}}
This manual is an excellent example of a primarily text document with embedded
musical excerpts. For this reason, it is a \LaTeX\ document and must be compiled
with \verb|latex| rather than \verb|etex|. Those wishing to combine text and
musical excerpts should carefully study how it is done here.
-Before compiling or recompiling \verb|musixdoc.tex|, you should remove all the auxiliary
+Before compiling or recompiling \verb|musixdoc.ltx|, you should remove all the auxiliary
files {\tt musixdoc.[mx1\|\allowbreak mx2\|\allowbreak aux\|\allowbreak toc\|\allowbreak ind\|\allowbreak idx\|\allowbreak ilg\|\allowbreak out]}
if they are present. Then the following command sequence will produce \verb|musixdoc.ps|:
\begin{quote}\begin{verbatim}
@@ -101,16 +101,17 @@ dvips -e0 musixdoc
The initial three steps \verb|latex|\allowbreak$\to$\allowbreak\verb|musixflx|\allowbreak$\to$\allowbreak\verb|latex| build up the basic appearance of the document including musical examples.
The \verb|makeindex| step produces the database for the index.
After that, \verb|latex| must be run at least twice to complete cross referencing.
-Finally, \verb|dvips| converts the \verb|.dvi| file into \verb|.ps|.
+Finally, \verb|dvips| converts the \verb|.dvi| file into \verb|.ps|;
+the \texttt{-e0} option prevents \texttt{dvips} from making pixel adjustments
+intended for letters in words.
To produce \verb|musixdoc.pdf|, use \verb|ps2pdf| or the Distiller component of Adobe Acrobat, or open \verb|musixdoc.ps| in \texttt{GSview}, go to
{\tt File\|Convert}, select \verb|pdfwrite| at 600 dpi resolution, and click
\verb|OK|.
-Or if you have the \verb|musixtex| script, just run
-\begin{quote}
-\verb|musixtex -l -x musixdoc|
-\end{quote}
-where the \verb|-l| option is to use \verb|latex| as the processing engine
-and \verb|-x| is to create a new index database.
+
+Alternatively, if you have the \verb|musixtex| script, just run
+\verb|musixtex -x musixdoc|
+(where
+the \verb|-x| option is only needed to create a new index database).
%If you use an older version of \LaTeX\ which doesn't automatically
%invoke $\varepsilon$\hbox{-}\nobreak\TeX, you will encounter the
diff --git a/macros/musixtex/doc/musixdoc/extensions.tex b/macros/musixtex/doc/musixdoc/extensions.tex
index c31772897e..3871f73268 100644
--- a/macros/musixtex/doc/musixdoc/extensions.tex
+++ b/macros/musixtex/doc/musixdoc/extensions.tex
@@ -2179,14 +2179,15 @@ Available are:
\section{musixvbm}\ixtt{musixvbm.tex}
\label{musixvbm}
By default, \texttt{musixtex} produces beams using special fonts. Unfortunately, long beams may have
-unsightly discontinuities (gaps or bumps). The \texttt{musixvbm} add-on
-by Hiroaki \textsc{Morimoto} produces smooth vectorized beams.
-Compare
+unsightly minor discontinuities (gaps or bumps). The \texttt{musixvbm} add-on
+by Hiroaki \textsc{Morimoto} produces smooth vectorized beams; simply input
+\texttt{musixvbm} in the preamble of your score (after inputting \texttt{musixtex}).
+For example, compare
\medskip
\begin{music}
\let\extractline\hbox
-\vectorizedbeamfalse
+\vectorizedbeamfalse % disable vectorized beams
\nostartrule
\setclef1{\bass}
\hbox to \hsize{%
@@ -2197,7 +2198,7 @@ Compare
\hss
\raise20pt\hbox{ and }
\hss
-\vectorizedbeamtrue
+\vectorizedbeamtrue % re-enable vectorized beams
\startextract
\nnotes\ibbl0G1\qb0{GJKLMLMLMLMLMLMK}\tqb0L\en
\zendextract
@@ -2206,8 +2207,10 @@ Compare
\medskip
\noindent
with various magnifications. The output on the left shows a font-based beam; the one
-on the right (like all the other beams in this report) shows the same beam with
-\texttt{musixvbm} activated.
+on the right
+shows the same beam with
+\texttt{musixvbm} activated.
+All the other beams in this report are vectorized.
The only known disadvantage with use of \texttt{musixvbm} is that many \texttt{dvi} viewers
@@ -2221,7 +2224,7 @@ output generated using \texttt{dvips} and \texttt{ps2pdf} (or using
or by processing the score using \texttt{pdfetex}) should be satisfactory.
If Postscript hairpins
-as described in Section~\ref{PostscriptSlurs} are not being used,
+(as described in Section~\ref{PostscriptSlurs}) are not being used,
the \texttt{musixvbm} add-on also vectorizes crescendos and
decrescendos.
diff --git a/macros/musixtex/doc/musixdoc/frontmatter.tex b/macros/musixtex/doc/musixdoc/frontmatter.tex
index 3eedf3665c..bd14bf64bd 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.32a}
+instrumental music\\\Large\itshape Version 1.33}
\author{}
diff --git a/macros/musixtex/doc/musixdoc/introduction.tex b/macros/musixtex/doc/musixdoc/introduction.tex
index e396c200f7..cb6d87fb0f 100644
--- a/macros/musixtex/doc/musixdoc/introduction.tex
+++ b/macros/musixtex/doc/musixdoc/introduction.tex
@@ -742,22 +742,21 @@ and \verb|etex| again. This will produce a \verb|.dvi| file. From this point
forward, this file can be processed like the device-independent output file
for any \TeX\ document. The most common approach and the only one to
be discussed here is to next generate a Postscript file. This is accomplished
-by running \verb|dvips|, which is included in every \TeX\ system. To view the
+by running \verb|dvips|, which is included in every \TeX\ system; to prevent
+inappropriate adjustments that \verb|dvips| makes by default, it is recommended to
+add the option \verb|-e0|. To view the
Postscript, most users run {\tt GSview} or {\tt gv}, a front-end to {\tt ghostscript}, which must
be separately downloaded and installed. Finally, you may produce a PDF file
using \verb|ps2pdf| or GSview, and view that with any PDF viewer, such as
the Adobe Reader or {\tt GSview}.
You also can view the \verb|.dvi| file directly using a DVI viewer such as Yap or \verb|xdvi|,
-but, if you are using type K Postscript slurs, some DVI viewers will not display them.
+but, if you are using type K Postscript slurs or vectorized beams, some DVI viewers will not display them.
Rather than executing all the foregoing programs separately, most users will
find it more convenient to use the \verb|musixtex| script that comes in most
-distributions of \musixtex. For example,
-
-\verb|musixtex jobname|
-
-\noindent will run the three passes described in Section~\ref{threepass},
+distributions of \musixtex. For example, \verb|musixtex jobname|
+will by default run the three passes described in Section~\ref{threepass},
convert the result to PDF and delete intermediate files.
There are many options available to
change the behavior; run
diff --git a/macros/musixtex/doc/musixdoc/miscellaneous.tex b/macros/musixtex/doc/musixdoc/miscellaneous.tex
index a9e8fad4bb..3375bd121b 100644
--- a/macros/musixtex/doc/musixdoc/miscellaneous.tex
+++ b/macros/musixtex/doc/musixdoc/miscellaneous.tex
@@ -844,7 +844,7 @@ are as follows:
\item \keyindex{tab}\verb|{|$n$\verb|}|\verb|{|$p$\verb|}|
puts $p$ on string $n$
(counting from top to bottom); $p$ is centered, using \verb|\ccharnote|.
-Ledger lines are added for $n$ less than $1$ or greater than the current number of staff lines.
+Ledger lines are replaced by slashes (/) for $n$ greater than the number of staff lines.
\item \keyindex{ltab}\verb|{|$n$\verb|}|\verb|{|$p$\verb|}|
uses \verb|\zcharnote| so $p$
spills to the right and
@@ -858,7 +858,7 @@ is a non-spacing \verb|\ltab| and
\keyindex{zrtab}\verb|{|$n$\verb|}|\verb|{|$p$\verb|}|
is a non-spacing \verb|\rtab|.
\end{itemize}
-A size-dependent font \keyindex{tabfnt} is used for tab characters; Helvetica is the default font family.
+A size-dependent font \keyindex{tabfnt} is used for tab characters; Helvetica bold is the default font family.
The default tablature style is to place the fingering notations \emph{on} the staff line;
Postscript specials are used to ``blank'' staff lines below
@@ -868,7 +868,9 @@ the command \keyindex{tabstylespacetrue}.
A size-dependent font \keyindex{tabstringfnt} is defined to allow string names to be
listed using \verb|\setname|.
-Here is an example of a guitar tablature (6th string lowered to D):
+Here is an example
+for baroque lute
+(from \emph{Ciaccona} in D~minor by J.S.~Bach):
\begin{music}
\input musixps
@@ -876,137 +878,225 @@ Here is an example of a guitar tablature (6th string lowered to D):
\instrumentnumber{2}
\songbottom1\songtop2
\generalmeter{\meterfrac34}
-\generalsignature{-1}
-\setlines16
-\setclefsymbol1\tabclef\setclefsymbol2\treblelowoct
-\setsize1\largevalue
-\setsign10
+\interinstrument=5\internote
\nobarnumbers
-\interinstrument=4\internote
+\setlines16\setclefsymbol1\tabclef\setsize1{1.2}\setsign10
+\setsign2{-1}\setclefsymbol2\treblelowoct
\parindent=2ex
-\setname1{\tabstringfnt\baselineskip=1.5\internote%
- \vbox{\hbox to\parindent{\hss E \hss}%
- \hbox to\parindent{\hss B \hss}%
- \hbox to\parindent{\hss G \hss}%
- \hbox to\parindent{\hss D \hss}%
- \hbox to\parindent{\hss A \hss}%
- \hbox to\parindent{\hss D \hss}%
-}}
+\setname1{\tabstringfnt\baselineskip=1.2\internote%
+\vbox{%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}}}
\startextract
-\NOtesp\zltab55\zltab43\ltab32&\zh{d}\zhl{f}\qu{.h}\en
-\Notes\ltab32&\cu{h}\en
+\scale{0.88}
+\NOtesp\zltab50\zltab40\ltab30&\zhl{d}\zhu{f}\qu{.h}\en
+\Notes\ltab30&\cu{h}\en
\bar%
-\NOtes\zltab55\zltab45\zltab33\ltab10&\zq d\zql g\zq i\qu l\en
-\NOtesp\zltab54\zltab45\zltab32\ltab10&\rhl{^c}\rhu{g}\zh{h}\qu{.l}\en
-\Notes\ltab10&\cu{l}\en
+\NOtes\zltab50\zltab42\zltab31\ltab22&\zql d\zqu g\zq i\qu l\en
+\NOtesp\zltab64\zltab55\zltab30\ltab22&\rhl{^c}\rhu{g}\zh{h}\qu{.l}\en
+\Notes\ltab22&\cu{l}\en
\bar%
-\NOtes\zltab40\zltab32\zltab23\ltab11&\zq d\zq h\zq k\qu{m}\en
-\NOtes\zltab51\zltab43\zltab33\ltab23&\zhl b\zh f\zq{.i}\qu{.k}\en
-\Notes\ltab35&\cu j\en
+\NOtes\zltab50\zltab40\zltab30\ltab10&\zql d\zq f\zq h\qu{m}\en
+\NOtes\zltab61\zltab40\ltab20&\zhl b\zh f\qu{.k}\en
+\Notes\ltab33&\cu j\en
\bar%
-\NOtes\zltab65\zltab45\ltab33&\zql N\zq g\qu i\en
-\NOtes\zltab50\zltab43\ltab32&\zql a\zq f\qu h\en
-\notes\zltab54\ltab45\ilsluru04\ltab43\ltab42\tlslur04\ltab43%
-&\zql{^c}\ibbu0g{-1}\qb0{g}\slur eed2\qb0{fe}\tqu0f\en
+\NOtes\zltab70\zltab55\ltab45&\zql N\zq g\qu i\en
+\NOtes\zltab60\zltab53\ltab44&\zql a\zq f\qu h\en
+\notes\zltab64\ltab42\ilsluru03\ltab53\ltab52\tlslur03\ltab53%
+&\zql{^c}\ibbu0g{-1}\qb0g\slur eed2\qb0{fe}\tqu0f\en
+\bar%
+\notes\ztab{10}0\ltab42\ilsluru03\ltab52\ltab53\tlslur03\ltab50%
+&\zql K\ibbu0g{-1}\qb0g\slur edd2\qb0e\qb0f\tqu0d\en
+\NOtesp\zltab50\zltab40\ltab30&\zhl{d}\zhu{f}\qu{.h}\en
+\Notes\ltab30&\cu{h}\en
\bar%
-\notes\zltab60\zltab50\ltab45\ilsluru04\ltab42\ltab43\tlslur04\ltab40%
-&\zq K\zql a\ibbu0g{-1}\qb0g\slur edd2\qb0e\qb0f\tqu0d\en
-\znotes&\lcn{14}{J.S. Bach}\en
\zendextract
\end{music}
-
\noindent
The coding is
\begin{footnotesize}
\begin{quote}\begin{verbatim}
\instrumentnumber{2}
\songbottom1\songtop2
-\setclefsymbol2\treblelowoct
\generalmeter{\meterfrac34}
-\generalsignature{-1}
-\setlines16\setclefsymbol1\tabclef\setsize1\largevalue\setsign10
-\nobarnumbers
\interinstrument=4\internote
+\nobarnumbers
+\setlines16\setclefsymbol1\tabclef\setsize1{1.2}\setsign10
+\setsign2{-1}\setclefsymbol2\treblelowoct
\parindent=2ex
-\setname1{\tabstringfnt\baselineskip=1.5\internote%
- \vbox{\hbox to\parindent{\hss E\hss}%
- \hbox to\parindent{\hss B\hss}%
- \hbox to\parindent{\hss G\hss}%
- \hbox to\parindent{\hss D\hss}%
- \hbox to\parindent{\hss A\hss}%
- \hbox to\parindent{\hss D\hss}}}
+\setname1{\tabstringfnt\baselineskip=1.2\internote%
+\vbox{%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}}}
\startextract
-\NOtesp\zltab55\zltab43\ltab32&\zh{d}\zhl{f}\qu{.h}\en
-\Notes\ltab32&\cu{h}\en
+\NOtesp\zltab50\zltab40\ltab30&\zhl{d}\zhu{f}\qu{.h}\en
+\Notes\ltab30&\cu{h}\en
\bar%
-\NOtes\zltab55\zltab45\zltab33\ltab10&\zq d\zql g\zq i\qu l\en
-\NOtesp\zltab54\zltab45\zltab32\ltab10&\rhl{^c}\rhu{g}\zh{h}\qu{.l}\en
-\Notes\ltab10&\cu{l}\en
+\NOtes\zltab50\zltab42\zltab31\ltab22&\zql d\zqu g\zq i\qu l\en
+\NOtesp\zltab64\zltab55\zltab30\ltab22&\rhl{^c}\rhu{g}\zh{h}\qu{.l}\en
+\Notes\ltab22&\cu{l}\en
\bar%
-\NOtes\zltab40\zltab32\zltab23\ltab11&\zq d\zq h\zq k\qu{m}\en
-\NOtes\zltab51\zltab43\zltab33\ltab23&\zhl b\zh f\zq{.i}\qu{.k}\en
-\Notes\ltab35&\cu j\en
+\NOtes\zltab50\zltab40\zltab30\ltab10&\zql d\zq f\zq h\qu{m}\en
+\NOtes\zltab61\zltab40\ltab20&\zhl b\zh f\qu{.k}\en
+\Notes\ltab33&\cu j\en
\bar%
-\NOtes\zltab65\zltab45\ltab33&\zql N\zq g\qu i\en
-\NOtes\zltab50\zltab43\ltab32&\zql a\zq f\qu h\en
-\notes\zltab54\ltab45\ilsluru04\ltab43\ltab42\tlslur04\ltab43%
-&\zql{^c}\ibbu0g{-1}\qb0{g}\slur eed2\qb0{fe}\tqu0f\en
+\NOtes\zltab70\zltab55\ltab45&\zql N\zq g\qu i\en
+\NOtes\zltab60\zltab53\ltab44&\zql a\zq f\qu h\en
+\notes\zltab64\ltab42\ilsluru03\ltab53\ltab52\tlslur03\ltab53%
+&\zql{^c}\ibbu0g{-1}\qb0g\slur eed2\qb0{fe}\tqu0f\en
+\bar%
+\notes\ztab{10}0\ltab42\ilsluru03\ltab52\ltab53\tlslur03\ltab50%
+&\zql K\ibbu0g{-1}\qb0g\slur edd2\qb0e\qb0f\tqu0d\en
+\NOtesp\zltab50\zltab40\ltab30&\zhl{d}\zhu{f}\qu{.h}\en
+\Notes\ltab30&\cu{h}\en
\bar%
-\notes\zltab60\zltab50\ltab45\ilsluru04\ltab42\ltab43\tlslur04\ltab40%
-&\zq K\zql a\ibbu0g{-1}\qb0g\slur edd2\qb0e\qb0f\tqu0d\en
-\znotes&\lcn{14}{J.S. Bach}\en
\zendextract
\end{verbatim}\end{quote}
\end{footnotesize}
\clearpage
+\par\noindent
Here is the same example with \verb|\tabstylespacetrue|:
\begin{music}
\input musixps
\def\psslurhgt{0.5}
+\tabstylespacetrue
\instrumentnumber{2}
\songbottom1\songtop2
\generalmeter{\meterfrac34}
+\interinstrument=4\internote
+\nobarnumbers
+\setlines16\setclefsymbol1\tabclef\setsize1{1.2}\setsign10
+\setsign2{-1}\setclefsymbol2\treblelowoct
+\parindent=2ex
+\setname1{\tabstringfnt\baselineskip=1.2\internote%
+\vbox{%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}}}
+\startextract
+\scale{0.88}
+\NOtesp\zltab50\zltab40\ltab30&\zhl{d}\zhu{f}\qu{.h}\en
+\Notes\ltab30&\cu{h}\en
+\bar%
+\NOtes\zltab50\zltab42\zltab31\ltab22&\zql d\zqu g\zq i\qu l\en
+\NOtesp\zltab64\zltab55\zltab30\ltab22&\rhl{^c}\rhu{g}\zh{h}\qu{.l}\en
+\Notes\ltab22&\cu{l}\en
+\bar%
+\NOtes\zltab50\zltab40\zltab30\ltab10&\zql d\zq f\zq h\qu{m}\en
+\NOtes\zltab61\zltab40\ltab20&\zhl b\zh f\qu{.k}\en
+\Notes\ltab33&\cu j\en
+\bar%
+\NOtes\zltab70\zltab55\ltab45&\zql N\zq g\qu i\en
+\NOtes\zltab60\zltab53\ltab44&\zql a\zq f\qu h\en
+\notes\zltab64\ltab42\ilsluru03\ltab53\ltab52\tlslur03\ltab53%
+&\zql{^c}\ibbu0g{-1}\qb0g\slur eed2\qb0{fe}\tqu0f\en
+\bar%
+\notes\ztab{10}0\ltab42\ilsluru03\ltab52\ltab53\tlslur03\ltab50%
+&\zql K\ibbu0g{-1}\qb0g\slur edd2\qb0e\qb0f\tqu0d\en
+\NOtesp\zltab50\zltab40\ltab30&\zhl{d}\zhu{f}\qu{.h}\en
+\Notes\ltab30&\cu{h}\en
+\bar%
+\zendextract
+\end{music}
+\medskip
+
+\noindent
+In pure tablature, note durations are typically specified by stems without noteheads immediately
+above the staff, as in:
+\medskip
+
+\begin{music}
+\input musixps
+\def\psslurhgt{0.5}
+\instrumentnumber{1}
+\generalmeter{\meterfrac34}
\generalsignature{-1}
-\setlines16
-\setclefsymbol1\tabclef\setclefsymbol2\treblelowoct
-\tabstylespacetrue
-\setsize1\largevalue
-\setsign10
+\setlines16\setclefsymbol1\tabclef\setsize1{1.2}\setsign10
\nobarnumbers
-\interinstrument=4\internote
\parindent=2ex
-\setname1{\tabstringfnt\baselineskip=1.5\internote%
- \vbox{\hbox to\parindent{\hss E \hss}%
- \hbox to\parindent{\hss B \hss}%
- \hbox to\parindent{\hss G \hss}%
- \hbox to\parindent{\hss D \hss}%
- \hbox to\parindent{\hss A \hss}%
- \hbox to\parindent{\hss D \hss}%
-}}
+\setname1{\tabstringfnt\baselineskip=1.2\internote%
+\vbox{\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}%
+\hbox to\parindent{\hss F\hss}%
+\hbox to\parindent{\hss D\hss}%
+\hbox to\parindent{\hss A\hss}}}
+\nostartrule
\startextract
-\NOtesp\zltab55\zltab43\ltab32&\zh{d}\zhl{f}\qu{.h}\en
-\Notes\ltab32&\cu{h}\en
+\scale{0.88}
+\NOtesp\zltab50\zltab40\tzqup\ltab30\en
+\Notes\tzcu\ltab30\en
\bar%
-\NOtes\zltab55\zltab45\zltab33\ltab10&\zq d\zql g\zq i\qu l\en
-\NOtesp\zltab54\zltab45\zltab32\ltab10&\rhl{^c}\rhu{g}\zh{h}\qu{.l}\en
-\Notes\ltab10&\cu{l}\en
+\NOtes\zltab50\zltab42\zltab31\tzqu\ltab22\en
+\NOtesp\zltab64\zltab35\zltab30\tzqup\ltab22\en
+\Notes\tzcu\ltab22\en
\bar%
-\NOtes\zltab40\zltab32\zltab23\ltab11&\zq d\zq h\zq k\qu{m}\en
-\NOtes\zltab51\zltab43\zltab33\ltab23&\zhl b\zh f\zq{.i}\qu{.k}\en
-\Notes\ltab35&\cu j\en
+\NOtes\zltab50\zltab30\zltab20\tzqu\ltab10\en
+\NOtes\zltab61\zltab40\tzqup\ltab20\en
+\Notes\tzcu\ltab33\en
\bar%
-\NOtes\zltab65\zltab45\ltab33&\zql N\zq g\qu i\en
-\NOtes\zltab50\zltab43\ltab32&\zql a\zq f\qu h\en
-\notes\zltab54\ltab45\ilsluru05\ltab43\ltab42\tlslur05\ltab43%
-&\zql{^c}\ibbu0g{-1}\qb0{g}\slur eed2\qb0{fe}\tqu0f\en
+\NOtes\zltab70\zltab55\tzqu\ltab45\en
+\NOtes\zltab60\zltab53\ltab44\en
+\notes\zltab64\tzccu\ltab42\ilsluru03\ltab53\ltab52\tlslur03\ltab53\en
+\bar%
+\notes\ztab{10}0\tzccu\ltab42\ilsluru03\ltab52\ltab53\tlslur03\ltab50\en
+\NOtesp\zltab50\zltab40\tzqup\ltab30\en
+\Notes\tzcu\ltab30\en
\bar%
-\notes\zltab60\zltab50\ltab45\ilsluru05\ltab42\ltab43\tlslur05\ltab40%
-&\zq K\zql a\ibbu0g{-1}\qb0g\slur edd2\qb0e\qb0f\tqu0d\en
-\znotes&\lcn{14}{J.S. Bach}\en
\zendextract
\end{music}
+\medskip
+\noindent
+Note that this notation does not
+specify the duration of \emph{every} note.
+
+\smallskip
+
+A stem (without a notehead) is generated immediately above the staff using one of the commands
+\keyindex{tzqu}, \keyindex{tzqup}, \keyindex{tzcu}, \keyindex{tzcup}, \keyindex{tzccu}, \ldots\
+\emph{before} a spacing command. Coding
+for the notes in the example above is as follows:
+\begin{footnotesize}
+\begin{quote}\begin{verbatim}
+\startextract
+\scale{0.88}
+\NOtesp\zltab50\zltab40\tzqup\ltab30\en
+\Notes\tzcu\ltab30\en
+\bar%
+\NOtes\zltab50\zltab42\zltab31\tzqu\ltab22\en
+\NOtesp\zltab64\zltab35\zltab30\tzqup\ltab22\en
+\Notes\tzcu\ltab22\en
+\bar%
+\NOtes\zltab50\zltab30\zltab20\tzqu\ltab10\en
+\NOtes\zltab61\zltab40\tzqup\ltab20\en
+\Notes\tzcu\ltab33\en
+\bar%
+\NOtes\zltab70\zltab55\tzqu\ltab45\en
+\NOtes\zltab60\zltab53\ltab44\en
+\notes\zltab64\tzccu\ltab42\ilsluru03\ltab53\ltab52\tlslur03\ltab53\en
+\bar%
+\notes\ztab{10}0\tzccu\ltab42\ilsluru03\ltab52\ltab53\tlslur03\ltab50\en
+\NOtesp\zltab50\zltab40\tzqup\ltab30\en
+\Notes\tzcu\ltab30\en
+\bar%
+\zendextract
+\end{verbatim}\end{quote}
+\end{footnotesize}
+
+\medskip
Tablature support in \musixtex\ has been adapted
from \verb|tabdefs.tex| by R.J.~Gelten, which is available
\href{http://icking-music-archive.org/software/musixtex/add-ons/tabdefs.tex}
diff --git a/macros/musixtex/doc/musixdoc/musixdoc.sty b/macros/musixtex/doc/musixdoc/musixdoc.sty
index d06328eb8e..d07d8ddcd4 100644
--- a/macros/musixtex/doc/musixdoc/musixdoc.sty
+++ b/macros/musixtex/doc/musixdoc/musixdoc.sty
@@ -22,7 +22,7 @@
\pagestyle{headings}
\usepackage{makeidx}
\usepackage{multicol}
-\usepackage{etex}
+%\usepackage{etex}
\usepackage{amssymb}
diff --git a/macros/musixtex/doc/scripts/musixtex.pdf b/macros/musixtex/doc/scripts/musixtex.pdf
index 30246ff59f..8df9e182dc 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 930e90d70f..b568bb8903 100755
--- a/macros/musixtex/scripts/musixtex.lua
+++ b/macros/musixtex/scripts/musixtex.lua
@@ -1,12 +1,12 @@
#!/usr/bin/env texlua
-VERSION = "0.23a"
+VERSION = "0.23b"
--[[
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
+ (c) Copyright 2011-2021 Bob Tennent rdt@cs.queensu.ca
and Dirk Laurie dirk.laurie@gmail.com
This program is free software; you can redistribute it and/or modify it
@@ -29,6 +29,9 @@ VERSION = "0.23a"
ChangeLog:
+ version 0.23b 2020-05-27 RDT
+ improve the -h output
+
version 0.23a 2020-08-14 RDT
pmxprep files now deleted by xml2pmx
@@ -138,15 +141,22 @@ function usage()
orig_print
[[
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 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 3-pass processing route
- for .tex files is etex-musixflx-etex.
+ When no extension is given, extensions are tried in the above order
+ until a source file is found. Preprocessing goes
+ .xml - .pmx - .tex
+ .mtx - .pmx - .tex
+ .pmx - .tex
+ .aspc - .tex
+ with the entry point determined by the filename extension.
+ The normal route after preprocessing goes .tex - .dvi - .ps - .pdf,
+ but shorter routes are also available; see the options.
+ The default 3-pass processing route for .tex files is
+ etex - musixflx - etex.
+ .ltx files, possibly after autosp preprocessing, are treated as latex
+ source and processed by latex (or pdflatex) rather than etex.
Options: -v, --version version
-h, --help help
- -l latex source
+ -l latex source; implied by .ltx extension
-p direct tex-pdf (pdftex etc)
-F fmt use fmt as the TeX processor
-d tex-dvi-pdf (using dvipdfm if -D not used)
@@ -212,7 +222,11 @@ end
-- possible by exploiting the the fact that Lua has two false values.
-- dvi == nil "do not produce a DVI file" (but maybe PDF)
-- dvi == false "do not process the DVI file" (but stop after TeX)
-local dvips = "dvips -e0"
+
+local dvips = "dvips -e0"
+-- option -e0 suppresses dvips "feature" of adjusting location to align
+-- characters in words of text
+
function defaults()
xml2pmx = "xml2pmx"
prepmx = "prepmx"
diff --git a/macros/musixtex/tex/musixtex.tex b/macros/musixtex/tex/musixtex.tex
index 9cf493ca18..a105d6dfb6 100644
--- a/macros/musixtex/tex/musixtex.tex
+++ b/macros/musixtex/tex/musixtex.tex
@@ -25,15 +25,21 @@
\def\mufl@x{0.83}%
\def\mxmajorvernumber{1}
-\def\mxminorvernumber{32}
+\def\mxminorvernumber{33}
\def\mxvernumber{\mxmajorvernumber\mxminorvernumber}% make it possible to compare with \ifnum
\def\mxversuffix{}%
\edef\mxversion{\mxmajorvernumber.\mxminorvernumber\mxversuffix}
-\def\mxdate{2021-05-13}
+\def\mxdate{2021-07-04}
\immediate\write16{MusiXTeX(c) \mxversion\space<\mxdate>}%
\everyjob{\immediate\write16{MusiXTeX(c) \mxversion\space<\mxdate>}}%
+% version 1.33
+%
+% \tabfnt etc. now uses (Helvetica) bold
+% replace ledger lines by slashes (/) for tablature notes below the staff
+% new commands \tzqu, \tzcup, etc. for stems without noteheads, for use in tablature
+
% version 1.32
% commented out spurious \let\doublebar\doublebar@II
@@ -645,14 +651,12 @@
\def\fontid{cm} % deprecated but used in pmx.tex
%%
-% Small sans serif fonts % version 1.29 RDT
+% Small bold sans serif fonts % version 1.33 RDT
%%
-\font\threess=phvr8t at 3pt
-\font\fourss=phvr8t at 4pt
-\font\fivess=phvr8t at 5pt
+\font\threedc=phvb8t at 3pt
+\font\fourdc=phvb8t at 4pt
\font\fivedc=phvb8t at 5pt
-\font\sixss=phvr8t at 6pt
\font\sixdc=phvb8t at 6pt
%%
@@ -690,6 +694,7 @@
\font\ninebi=cmbxti10 at 9pt % version 1.22 RDT
\font\ninesc=cmcsc10 at 9pt
\font\niness=phvr8t at 9pt % version 1.29 RDT
+\font\ninedc=phvb8t at 9pt
%%
% Ten point fonts
@@ -712,6 +717,7 @@
\font\elevenbi=cmbxti10 at 11pt % version 1.22 RDT
\font\elevensc=cmcsc10 at 11pt
\font\elevenss=phvr8t at 11pt % version 1.29 RDT
+\font\elevendc=phvb8t at 11pt
%%
% Twelve point fonts
@@ -1757,8 +1763,8 @@
\else\ifdim\internote<1.19\Internote \smalltype\it
\else\ifdim\internote<1.43\Internote \Smalltype\it
\else\normtype\it\fi\fi\fi}%
- \let\tabnorfnt\fivess \let\tablargefnt\sixss
- \let\tabLargefnt\eightss \let\tabsmallfnt\fourss
+ \let\tabnorfnt\fivedc \let\tablargefnt\sixdc % 1.33 RDT
+ \let\tabLargefnt\eightdc \let\tabsmallfnt\fourdc
\let\tabnorcleffnt\eightdc \let\tablargecleffnt\tendc
\let\tabLargecleffnt\twelvedc \let\tabsmallcleffnt\sixdc
\def\tabstringfnt{\ifdim\internote<.95\Internote \fourss % 1.29 RDT
@@ -1789,8 +1795,8 @@
\else\ifdim\internote<1.19\Internote \Smalltype\it
\else\ifdim\internote<1.43\Internote \normtype\it
\else\medtype\it\fi\fi\fi}%
- \let\tabnorfnt\eightss \let\tablargefnt\niness
- \let\tabLargefnt\elevenss \let\tabsmallfnt\sixss
+ \let\tabnorfnt\eightdc \let\tablargefnt\ninedc % 1.33 RDT
+ \let\tabLargefnt\elevendc \let\tabsmallfnt\sixdc
\let\tabnorcleffnt\twelvedc \let\tablargecleffnt\frtdc
\let\tabLargecleffnt\svtdc \let\tabsmallcleffnt\tendc
\def\tabstringfnt{\ifdim\internote<.95\Internote \sixss % 1.29 RDT
@@ -1823,8 +1829,8 @@
\else\ifdim\internote<1.19\Internote \medtype\it
\else\ifdim\internote<1.43\Internote \bigfont\it
\else\Bigfont\it\fi\fi\fi}%
- \let\tabnorfnt\niness \let\tablargefnt\elevenss
- \let\tabLargefnt\twelvess \let\tabsmallfnt\eightss
+ \let\tabnorfnt\ninedc \let\tablargefnt\elevendc % 1.33 RDT
+ \let\tabLargefnt\twelvedc \let\tabsmallfnt\eightdc
\let\tabnorcleffnt\frtdc \let\tablargecleffnt\svtdc
\let\tabLargecleffnt\twtydc \let\tabsmallcleffnt\twelvedc
\def\tabstringfnt{\ifdim\internote<.95\Internote \eightss % 1.29 RDT
@@ -1861,8 +1867,8 @@
\else\ifdim\internote<1.19\Internote \Smalltype\it
\else\ifdim\internote<1.43\Internote \normtype\it
\else\medtype\it\fi\fi\fi}%
- \let\tabnorfnt\sixss \let\tablargefnt\eightss
- \let\tabLargefnt\niness \let\tabsmallfnt\fivess
+ \let\tabnorfnt\sixdc \let\tablargefnt\eightdc % 1.33 RDT
+ \let\tabLargefnt\ninedc \let\tabsmallfnt\fivedc
\let\tabnorcleffnt\tendc \let\tablargecleffnt\twelvedc
\let\tabLargecleffnt\frtdc \let\tabsmallcleffnt\eightdc
\def\tabstringfnt{\ifdim\internote<.95\Internote \fivess % 1.29 RDT
@@ -5477,13 +5483,17 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Macros for tablature. They put numbers on or above the staff lines.%
-% Based on tabdefs.tex by R.J. Gelten %
-% version 1.29 RDT
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Macros for tablature. They put numbers on or above the staff lines. %
+% Based on tabdefs.tex by R.J. Gelten %
+% %
+% 1.33 RDT %
+% replace ledger lines by slashes (/) for string numbers > number of staff lines %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcount\stringraise
\newif\iftabstylespace\tabstylespacefalse
+
% \tabbox ensures a white background for the tab number in the ps-file
% so the stafflines don't overwrite the number. Symbols are centered.
\def\tabbox#1#2{%
@@ -5525,36 +5535,75 @@
\lcharnote{\the\stringraise}{\box0}%
}
+\newcount\stringnum
+\newcount\nslashes
+
% \tab takes two arguments.
% #1 is the string number
% #2 is the symbol to be put on the string
% the symbols are horizontally centered and a \sk is put behind it,
-% to jump to the position of the next symbol
-\newcount\stringraise
+% to jump to the position of the next symbol.
+% if the string number > \nblines, ledger lines are replaced by slashes (/)
\def\tab#1#2{%
- \tabbox{#1}{#2}\sk%
-}
+\stringnum=#1
+\ifnum\stringnum>\nblines
+\nslashes=\stringnum
+\advance\nslashes by -\nblines
+\def\numslashes{\the\nslashes}
+\ifcase\numslashes\or\ccn{-3}{\tabfnt/#2}\or\ccn{-3}{\tabfnt//#2}\or\ccn{-3}{\tabfnt///#2}\or\ccn{-3}{\tabfnt////#2}\ccn{-3}{\tabfnt/////#2}\or\ccn{-3}{\tabfnt//////#2}\or\ccn{-3}{\tabfnt///////#2}\fi%
+\else\tabbox{#1}{#2}\fi\sk}
+
% left spilling \tab
\def\ltab#1#2{%
- \ltabbox{#1}{#2}\sk%
-}
+\stringnum=#1
+\ifnum\stringnum>\nblines
+\nslashes=\stringnum
+\advance\nslashes by -\nblines
+\def\numslashes{\the\nslashes}
+\ifcase\numslashes\or\zcn{-3}{\tabfnt/#2}\or\zcn{-3}{\tabfnt//#2}\or\zcn{-3}{\tabfnt///#2}\or\zcn{-3}{\tabfnt////#2}\or\zcn{-3}{\tabfnt/////#2}\or\zcn{-3}{\tabfnt//////#2}\or\zcn{-3}{\tabfnt///////#2}\fi%
+\else\ltabbox{#1}{#2}\fi\sk}
+
% right spilling \tab
\def\rtab#1#2{%
- \rtabbox{#1}{#2}\sk%
-}
+\stringnum=#1
+\ifnum\stringnum>\nblines
+\nslashes=\stringnum
+\advance\nslashes by -\nblines
+\def\numslashes{\the\nslashes}
+\ifcase\numslashes\or\lcn{-3}{\tabfnt/#2}\or\lcn{-3}{\tabfnt//#2}\or\lcn{-3}{\tabfnt///#2}\or\lcn{-3}{\tabfnt////#2}\or\lcn{-3}{\tabfnt/////#2}\or\lcn{-3}{\tabfnt//////#2}\or\lcn{-3}{\tabfnt///////#2}\fi%
+\else\rtabbox{#1}{#2}\fi\sk}
+
% \chord-tab symbol. Same as \tab, but no \sk is given, so multiple
% symbols can be placed above one another
\def\ztab#1#2{%
- \tabbox{#1}{#2}%
-}
+\stringnum=#1
+\ifnum\stringnum>\nblines
+\nslashes=\stringnum
+\advance\nslashes by -\nblines
+\def\numslashes{\the\nslashes}
+\ifcase\numslashes\or\ccn{-3}{\tabfnt/#2}\or\ccn{-3}{\tabfnt//#2}\or\ccn{-3}{\tabfnt///#2}\or\ccn{-3}{\tabfnt////#2}\or\ccn{-3}{\tabfnt/////#2}\or\ccn{-3}{\tabfnt//////#2}\or\ccn{-3}{\tabfnt///////#2}\fi%
+\else\tabbox{#1}{#2}\fi}
+
% left spilling \ztab
\def\zltab#1#2{%
- \ltabbox{#1}{#2}%
-}
+\stringnum=#1
+\ifnum\stringnum>\nblines
+\nslashes=\stringnum
+\advance\nslashes by -\nblines
+\def\numslashes{\the\nslashes}
+\ifcase\numslashes\or\zcn{-3}{\tabfnt/#2}\or\zcn{-3}{\tabfnt//#2}\or\zcn{-3}{\tabfnt///#2}\or\zcn{-3}{\tabfnt////#2}\or\zcn{-3}{\tabfnt/////#2}\or\zcn{-3}{\tabfnt//////#2}\or\zcn{-3}{\tabfnt///////#2}\fi%
+\else\ltabbox{#1}{#2}\fi}
+
% right spilling \ztab
\def\zrtab#1#2{%
- \rtabbox{#1}{#2}%
-}
+\stringnum=#1
+\ifnum\stringnum>\nblines
+\nslashes=\stringnum
+\advance\nslashes by -\nblines
+\def\numslashes{\the\nslashes}
+\ifcase\numslashes\or\lcn{-3}{\tabfnt/#2}\or\lcn{-3}{\tabfnt//#2}\or\lcn{-3}{\tabfnt///#2}\or\lcn{-3}{\tabfnt////#2}\or\lcn{-3}{\tabfnt/////#2}\or\lcn{-3}{\tabfnt//////#2}\or\lcn{-3}{\tabfnt///////#2}\fi%
+\else\rtabbox{#1}{#2}\fi}
+
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5572,6 +5621,38 @@
\ifnum\nblines=6\lower1.5\internote\box1
\else\ifnum\nblines=4\lower3.5\internote\box1\else\lower2.5\internote\box1\fi\fi}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% stems without noteheads for use above tablature staff %
+% 1.33 RDT %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\newcount\stem@hgt % = 2 * \nblines -1
+\def\tzqu{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@qu{\the\stem@hgt}}
+\def\tzqup{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@qup{\the\stem@hgt}}
+\def\tzcu{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@cu{\the\stem@hgt}}
+\def\tzcup{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@cup{\the\stem@hgt}}
+\def\tzccu{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@ccu{\the\stem@hgt}}
+\def\tzccup{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@ccup{\the\stem@hgt}}
+\def\tzcccu{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@cccu{\the\stem@hgt}}
+\def\tzcccup{\advancefalse%
+\stem@hgt=\nblines\multiply\stem@hgt by 2\advance\stem@hgt by -1
+\def\q@u{}\@cccup{\the\stem@hgt}}
+
+
\let\origin@lwrit@staffs\writ@staffs
\def\writ@staffs{%
diff --git a/macros/musixtex/tex/musixvbm.tex b/macros/musixtex/tex/musixvbm.tex
index a22a60e4c9..9a2898c935 100644
--- a/macros/musixtex/tex/musixvbm.tex
+++ b/macros/musixtex/tex/musixvbm.tex
@@ -3,6 +3,7 @@
%% by tpic specials / pdfTeX raw literal
%%
%% Copyright (C) 2000-2007 Hiroaki MORIMOTO (Kuuku)
+%% 2021-05-17: RDT added comments on the tpic \specials
%%
%% This program is free software; you can redistribute it and/or
%% modify it under the terms of the GNU General Public License
@@ -31,7 +32,7 @@
%% This is a successor of `musixtpb.tex' ver.1.10.
%%
\ifx\ifvectorizedbeam\undefined\else\endinput\fi
-\immediate\write16{MusiXTeX Extension, Vectorized Beams and crescendos v1.20-beta6 <2007/01/01>}%
+\immediate\write16{MusiXTeX Extension, Vectorized Beams and crescendos <2007/01/01>}%
%
\edef\catcodeat{\the\catcode`\@}\catcode`\@=11
%
@@ -87,13 +88,13 @@
\advance\y@iv \tw@\b@amthick
\@dimentomil{-\y@iv}{\@Yend@u}%
% \special{pn 1}%
- \special{sh 1}% set beam shading to black
- \@addbeampath{0}{\@Ystart@l}% add points to define the beam perimeter
+ \special{sh 1}% RDT: set beam shading to black
+ \@addbeampath{0}{\@Ystart@l}% RDT: add points to define the beam perimeter
\@addbeampath{\@Xend}{\@Yend@l}%
\@addbeampath{\@Xend}{\@Yend@u}%
\@addbeampath{0}{\@Ystart@u}%
- \@addbeampath{0}{\@Ystart@l}% close the perimeter
- \special{ip}% draw the beam (without the outline)
+ \@addbeampath{0}{\@Ystart@l}% RDT: close the perimeter
+ \special{ip}% RDT: draw the beam (without the outline)
\kern\y@ii
}%
%