summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-03-28 15:02:29 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-03-28 15:02:29 +0000
commit6d881cc089df1edebd7e6b2aead5dcfdb3b9fdae (patch)
tree231a2f88ce48d0c4af07a9720953893861063a8f /Build/source/utils
parente0dedc18ba144254064155c1454434d667796ff6 (diff)
pmx: Add manpages, lua script, and a test case
git-svn-id: svn://tug.org/texlive/trunk@25762 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/pmx/ChangeLog6
-rw-r--r--Build/source/utils/pmx/Makefile.am25
-rw-r--r--Build/source/utils/pmx/Makefile.in345
-rwxr-xr-xBuild/source/utils/pmx/configure77
-rw-r--r--Build/source/utils/pmx/configure.ac5
-rw-r--r--Build/source/utils/pmx/pmx.1101
-rwxr-xr-xBuild/source/utils/pmx/pmx.lua154
-rwxr-xr-xBuild/source/utils/pmx/pmx.test26
-rw-r--r--Build/source/utils/pmx/pmxab.124
-rw-r--r--Build/source/utils/pmx/scor2prt.118
-rw-r--r--Build/source/utils/pmx/tests/barsant.midbin0 -> 3077 bytes
-rw-r--r--Build/source/utils/pmx/tests/barsant.pml24
-rw-r--r--Build/source/utils/pmx/tests/barsant.pmx68
-rw-r--r--Build/source/utils/pmx/tests/barsant.tex307
-rw-r--r--Build/source/utils/pmx/tests/barsant1.pmx48
-rw-r--r--Build/source/utils/pmx/tests/barsant2.pmx66
16 files changed, 1270 insertions, 24 deletions
diff --git a/Build/source/utils/pmx/ChangeLog b/Build/source/utils/pmx/ChangeLog
index 55f9ad34d9c..b01a3d422f8 100644
--- a/Build/source/utils/pmx/ChangeLog
+++ b/Build/source/utils/pmx/ChangeLog
@@ -3,6 +3,12 @@
* arith.h (new): Dummy header to avoid the need to run arithchk.
* Makefile.am, configure.ac: Modified to allow cross compilation.
+ * pmx.lua, pmx.1, pmxab.1, scor2prt.1: New files from CTAN
+ (http://mirrors.ctan.org/support/pmx/pmx-texmf.zip).
+ * pmx.test: New shell script for tests.
+ * tests/barsant*: Test input and expected output.
+ * Makefile.am, configure.ac: Add the new files.
+
2012-03-26 Peter Breitenlohner <peb@mppmu.mpg.de>
Adapt pmx-2.6.17 to the TeX Live build system.
diff --git a/Build/source/utils/pmx/Makefile.am b/Build/source/utils/pmx/Makefile.am
index 1e91f08e1e5..adcfc3a0e69 100644
--- a/Build/source/utils/pmx/Makefile.am
+++ b/Build/source/utils/pmx/Makefile.am
@@ -230,3 +230,28 @@ EXTRA_libf2c_a_SOURCES += \
EXTRA_libf2c_a_SOURCES += \
$(PMX_TREE)/libf2c/signbit.c
+lua_scripts = pmx
+
+scriptsdir = texmf/scripts/pmx
+nodist_bin_SCRIPTS =
+
+include $(srcdir)/../../texk/am/script_links.am
+
+texmfdir = $(datarootdir)/$(scriptsdir)
+texmf_SCRIPTS = $(lua_scripts:=.lua)
+
+install-data-hook: install-lua-links
+
+uninstall-hook: uninstall-links
+
+man1_MANS = pmx.1 pmxab.1 scor2prt.1
+
+## Tests
+##
+TESTS = pmx.test
+EXTRA_DIST += $(TESTS)
+
+## pmx.test
+EXTRA_DIST += tests/barsant*
+DISTCLEANFILES = barsant* pmxaerr.dat
+
diff --git a/Build/source/utils/pmx/Makefile.in b/Build/source/utils/pmx/Makefile.in
index 711629253c8..892876becd7 100644
--- a/Build/source/utils/pmx/Makefile.in
+++ b/Build/source/utils/pmx/Makefile.in
@@ -16,6 +16,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -34,16 +35,18 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = pmxab$(EXEEXT) scor2prt$(EXEEXT)
-subdir = .
DIST_COMMON = README $(am__configure_deps) \
$(srcdir)/../../build-aux/depcomp \
$(srcdir)/../../build-aux/install-sh \
- $(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \
+ $(srcdir)/../../build-aux/missing \
+ $(srcdir)/../../texk/am/script_links.am $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure \
../../build-aux/config.guess ../../build-aux/config.sub \
../../build-aux/depcomp ../../build-aux/install-sh \
../../build-aux/ltmain.sh ../../build-aux/missing \
../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog
+@WIN32_TRUE@@WIN32_WRAP_TRUE@am__append_1 = $(wrappers)
+subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \
$(top_srcdir)/../../m4/kpse-win32.m4 $(top_srcdir)/version.ac \
@@ -109,7 +112,8 @@ am_libf2c_a_OBJECTS = abort_.$(OBJEXT) cabs.$(OBJEXT) derf_.$(OBJEXT) \
wrtfmt.$(OBJEXT) wsfe.$(OBJEXT) wsle.$(OBJEXT) wsne.$(OBJEXT) \
xwsne.$(OBJEXT) dtime_.$(OBJEXT) etime_.$(OBJEXT)
libf2c_a_OBJECTS = $(am_libf2c_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(texmfdir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
am_pmxab_OBJECTS = pmxab.$(OBJEXT)
pmxab_OBJECTS = $(am_pmxab_OBJECTS)
@@ -119,6 +123,34 @@ am_scor2prt_OBJECTS = scor2prt.$(OBJEXT)
scor2prt_OBJECTS = $(am_scor2prt_OBJECTS)
scor2prt_LDADD = $(LDADD)
scor2prt_DEPENDENCIES = libf2c.a
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+SCRIPTS = $(nodist_bin_SCRIPTS) $(texmf_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -131,8 +163,13 @@ SOURCES = $(libf2c_a_SOURCES) $(EXTRA_libf2c_a_SOURCES) \
$(pmxab_SOURCES) $(scor2prt_SOURCES)
DIST_SOURCES = $(libf2c_a_SOURCES) $(EXTRA_libf2c_a_SOURCES) \
$(pmxab_SOURCES) $(scor2prt_SOURCES)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man1_MANS)
ETAGS = etags
CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -241,7 +278,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
-EXTRA_DIST = $(PMX_TREE) $(PMX_TREE)-PATCHES
+EXTRA_DIST = $(PMX_TREE) $(PMX_TREE)-PATCHES ../../build-aux/relpath \
+ $(TESTS) tests/barsant*
INCLUDES = -I$(srcdir)/$(PMX_TREE)/libf2c
AM_CFLAGS = #$(WARNING_CFLAGS)
pmxab_SOURCES = $(PMX_TREE)/pmxab.c
@@ -333,13 +371,24 @@ EXTRA_libf2c_a_SOURCES = $(PMX_TREE)/libf2c/uninit.c \
$(PMX_TREE)/libf2c/ftell64_.c $(PMX_TREE)/libf2c/pow_qq.c \
$(PMX_TREE)/libf2c/qbitbits.c $(PMX_TREE)/libf2c/qbitshft.c \
$(PMX_TREE)/libf2c/signbit.c
+lua_scripts = pmx
+scriptsdir = texmf/scripts/pmx
+nodist_bin_SCRIPTS = $(am__append_1)
+all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts)
+@WIN32_TRUE@@WIN32_WRAP_TRUE@wrappers = $(all_scripts:=.exe)
+@WIN32_TRUE@@WIN32_WRAP_TRUE@runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe
+texmfdir = $(datarootdir)/$(scriptsdir)
+texmf_SCRIPTS = $(lua_scripts:=.lua)
+man1_MANS = pmx.1 pmxab.1 scor2prt.1
+TESTS = pmx.test
+DISTCLEANFILES = barsant* pmxaerr.dat
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../texk/am/script_links.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -362,6 +411,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/../../texk/am/script_links.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -421,6 +471,70 @@ pmxab$(EXEEXT): $(pmxab_OBJECTS) $(pmxab_DEPENDENCIES) $(EXTRA_pmxab_DEPENDENCIE
scor2prt$(EXEEXT): $(scor2prt_OBJECTS) $(scor2prt_DEPENDENCIES) $(EXTRA_scor2prt_DEPENDENCIES)
@rm -f scor2prt$(EXEEXT)
$(LINK) $(scor2prt_OBJECTS) $(scor2prt_LDADD) $(LIBS)
+install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-nodist_binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+install-texmfSCRIPTS: $(texmf_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(texmfdir)" || $(MKDIR_P) "$(DESTDIR)$(texmfdir)"
+ @list='$(texmf_SCRIPTS)'; test -n "$(texmfdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(texmfdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(texmfdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-texmfSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(texmf_SCRIPTS)'; test -n "$(texmfdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(texmfdir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -2842,6 +2956,38 @@ scor2prt.obj: $(PMX_TREE)/scor2prt.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(PMX_TREE)/scor2prt.c' object='scor2prt.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o scor2prt.obj `if test -f '$(PMX_TREE)/scor2prt.c'; then $(CYGPATH_W) '$(PMX_TREE)/scor2prt.c'; else $(CYGPATH_W) '$(srcdir)/$(PMX_TREE)/scor2prt.c'; fi`
+install-man1: $(man1_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -2895,7 +3041,113 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ fi; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -3061,10 +3313,11 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS)
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -3093,6 +3346,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -3121,13 +3375,14 @@ info: info-am
info-am:
-install-data-am:
-
+install-data-am: install-man install-texmfSCRIPTS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS
+install-exec-am: install-binPROGRAMS install-nodist_binSCRIPTS
install-html: install-html-am
@@ -3137,7 +3392,7 @@ install-info: install-info-am
install-info-am:
-install-man:
+install-man: install-man1
install-pdf: install-pdf-am
@@ -3168,30 +3423,74 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-man \
+ uninstall-nodist_binSCRIPTS uninstall-texmfSCRIPTS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+uninstall-man: uninstall-man1
-.MAKE: install-am install-strip
+.MAKE: check-am install-am install-data-am install-strip uninstall-am
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-binPROGRAMS clean-generic clean-noinstLIBRARIES ctags \
- dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
+ clean clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
+ ctags dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-compile distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
+ install-data install-data-am install-data-hook install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-nodist_binSCRIPTS install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS
+ install-texmfSCRIPTS installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-hook uninstall-man uninstall-man1 \
+ uninstall-nodist_binSCRIPTS uninstall-texmfSCRIPTS
# in case of an SVN repository
dist-hook:
rm -rf `find $(distdir) -name .svn`
+.PHONY: install-lua-links install-perl-links install-shell-links \
+ install-links uninstall-links
+@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript)
+@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@
+
+install-lua-links:
+@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=lua EXT=lua install-links
+
+install-perl-links:
+@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=perl EXT=pl install-links
+
+install-shell-links:
+@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links
+
+# We support native builds, multiplatform or not, as well as distro builds.
+install-links:
+ @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
+ for f in $($(TYPE)_scripts); do \
+ rm -f $$f; \
+ echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+ $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+ done
+
+uninstall-links:
+@WIN32_FALSE@ @for f in $(all_scripts); do \
+@WIN32_FALSE@ echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+@WIN32_FALSE@ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+@WIN32_FALSE@ done
+
+install-data-hook: install-lua-links
+
+uninstall-hook: uninstall-links
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/Build/source/utils/pmx/configure b/Build/source/utils/pmx/configure
index 650b4018cc0..9036b95a01f 100755
--- a/Build/source/utils/pmx/configure
+++ b/Build/source/utils/pmx/configure
@@ -613,6 +613,10 @@ CPP
RANLIB
LN_S
AM_CPPFLAGS
+WIN32_WRAP_FALSE
+WIN32_WRAP_TRUE
+WIN32_FALSE
+WIN32_TRUE
WARNING_CFLAGS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
@@ -3736,8 +3740,71 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
-AM_CPPFLAGS='-DNON_UNIX_STDIO'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5
+$as_echo_n "checking for native WIN32 or MINGW32... " >&6; }
+if ${kpse_cv_have_win32+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef WIN32
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __MINGW32__
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ kpse_cv_have_win32=mingw32
+else
+ kpse_cv_have_win32=native
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ kpse_cv_have_win32=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5
+$as_echo "$kpse_cv_have_win32" >&6; }
+
+ if test "x$kpse_cv_have_win32" != xno; then
+ WIN32_TRUE=
+ WIN32_FALSE='#'
+else
+ WIN32_TRUE='#'
+ WIN32_FALSE=
+fi
+
+ if test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe; then
+ WIN32_WRAP_TRUE=
+ WIN32_WRAP_FALSE='#'
+else
+ WIN32_WRAP_TRUE='#'
+ WIN32_WRAP_FALSE=
+fi
+
+
+AM_CPPFLAGS='-DNON_UNIX_STDIO'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5
@@ -4587,6 +4654,14 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
+ as_fn_error $? "conditional \"WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WIN32_WRAP_TRUE}" && test -z "${WIN32_WRAP_FALSE}"; then
+ as_fn_error $? "conditional \"WIN32_WRAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
diff --git a/Build/source/utils/pmx/configure.ac b/Build/source/utils/pmx/configure.ac
index 619ba223f67..d0c9afb24f8 100644
--- a/Build/source/utils/pmx/configure.ac
+++ b/Build/source/utils/pmx/configure.ac
@@ -21,6 +21,11 @@ AC_PROG_CC
KPSE_COMPILER_WARNINGS
+KPSE_CHECK_WIN32
+AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno])
+AM_CONDITIONAL([WIN32_WRAP],
+ [test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe])
+
dnl initial value for AM_CPPFLAGS
AC_SUBST([AM_CPPFLAGS], ['-DNON_UNIX_STDIO'])
diff --git a/Build/source/utils/pmx/pmx.1 b/Build/source/utils/pmx/pmx.1
new file mode 100644
index 00000000000..5d699c826b3
--- /dev/null
+++ b/Build/source/utils/pmx/pmx.1
@@ -0,0 +1,101 @@
+.\" This manpage is licensed under the GNU Public License
+.TH pmx 1 2011-11-28 "pmx script, version 0.2" ""
+
+.SH NAME
+pmx \- This script processes pmx files and then deletes intermediate files
+
+.SH SYNOPSIS
+[ texlua ]
+.B pmx[.lua]
+{
+.IR option
+|
+.IR jobname
+[ .pmx ]
+} ...
+.TP
+The default effect is to process each file using
+.TP 12
+.BR pmxab (1)
+(pre-processing pass)
+.TP
+.BR etex (1)
+(first pass)
+.TP
+.BR musixflx (1)
+(second pass)
+.TP
+.BR etex (1)
+(third pass)
+.TP
+.BR dvips (1)
+(dvi to Postscript)
+.TP
+.BR ps2pdf (1)
+(Postscript to Portable Document Format)
+.TP
+followed by removal of intermediate files.
+
+.SH OPTIONS
+.TP 8
+.B -v
+output program name and version number, and quit
+.TP
+.B -h
+output usage summary and quit
+.TP
+.B -l
+changes the TeX processor to
+.BR latex (1)
+or
+.BR pdflatex (1)
+.TP
+.B -p
+changes the TeX processor to
+.BR pdfetex (1)
+or
+.BR pdflatex (1)
+(and doesn't run
+.BR dvips (1)
+and
+.BR ps2pdf (1)
+or
+.BR dvipdfm (1)
+)
+.TP
+.B -d
+changes the dvi processor to
+.BR dvipdfm (1)
+.TP
+.B -s
+stops processing at the dvi file
+.TP
+.B -t
+stops processing at the tex (and midi) files
+.TP
+.B -i
+retain intermediate files
+.TP
+.B -f
+default processing
+.TP 0
+Options affect processing of all succeeding PMX files unless changed by another option.
+
+.SH SEE ALSO
+.BR pmxab (1)
+.BR scor2prt (1)
+.BR etex (1),
+.BR latex (1),
+.BR pdfetex (1),
+.BR pdflatex (1),
+.BR musixflx (1),
+.BR dvipdfm (1),
+.BR dvips (1),
+.BR ps2pdf (1).
+.br
+pmx260.pdf
+.br
+pmxccn.pdf
+
+.SH AUTHOR
+This manual page was written by Bob Tennent <rdt@cs.queensu.ca>.
diff --git a/Build/source/utils/pmx/pmx.lua b/Build/source/utils/pmx/pmx.lua
new file mode 100755
index 00000000000..035c9515d93
--- /dev/null
+++ b/Build/source/utils/pmx/pmx.lua
@@ -0,0 +1,154 @@
+#!/usr/bin/env texlua
+
+VERSION = "0.2"
+
+--[[
+ pmx.lua: processes MusiXTeX files using pmxab as a pre-processor (and deletes intermediate files)
+
+ (c) Copyright 2011 Bob Tennent rdt@cs.queensu.ca
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+--]]
+
+--[[
+
+ ChangeLog:
+ version 0.2 2011-11-28 RDT
+ added -i (retain intermediate files) option
+
+ version 0.1 2011-07-12 RDT
+
+--]]
+
+function usage()
+ print("Usage: [texlua] pmx.lua { option | basename[.pmx] } ... ")
+ print("options: -v version")
+ print(" -h help")
+ print(" -l latex (or pdflatex)")
+ print(" -p pdfetex (or pdflatex)")
+ print(" -d dvipdfm")
+ print(" -s stop at dvi")
+ print(" -t stop at tex/mid")
+ print(" -i retain intermediate files")
+ print(" -f restore default processing")
+end
+
+function whoami ()
+ print("This is pmx.lua version ".. VERSION .. ".")
+end
+
+whoami()
+if #arg == 0 then
+ usage()
+ os.exit(0)
+end
+
+-- defaults:
+tex = "etex"
+musixflx = "musixflx"
+dvi = "dvips"
+ps2pdf = "ps2pdf"
+intermediate = 1
+
+exit_code = 0
+narg = 1
+repeat
+ this_arg = arg[narg]
+ if this_arg == "-v" then
+ os.exit(0)
+ elseif this_arg == "-h" then
+ usage()
+ os.exit(0)
+ elseif this_arg == "-l" then
+ if tex == "pdfetex" then
+ tex = "pdflatex"
+ else
+ tex = "latex"
+ end
+ elseif this_arg == "-p" then
+ if tex == "latex" then
+ tex = "pdflatex"
+ else
+ tex = "pdfetex"
+ end
+ dvi = ""; ps2pdf = ""
+ elseif this_arg == "-d" then
+ dvi = "dvipdfm"; ps2pdf = ""
+ elseif this_arg == "-s" then
+ dvi = ""; ps2pdf = ""
+ elseif this_arg == "-f" then
+ tex = "etex"; dvi = "dvips"; ps2pdf = "ps2pdf"; intermediate = 1
+ elseif this_arg == "-t" then
+ tex = ""; dvi = ""; ps2pdf = ""
+ elseif this_arg == "-i" then
+ intermediate = 0
+ else
+ filename = this_arg
+ if filename ~= "" and string.sub(filename, -4, -1) == ".pmx" then
+ filename = string.sub(filename, 1, -5)
+ end
+ if not io.open(filename .. ".pmx", "r") then
+ print("Non-existent file: ", filename .. ".pmx")
+ else
+ print("Processing ".. filename .. ".pmx.")
+ os.remove( filename .. ".mx2" )
+ os.execute("pmxab" .. " " .. filename )
+ pmxaerr = io.open("pmxaerr.dat", "r")
+ if (not pmxaerr) then
+ print("No log file.")
+ os.exit(1)
+ end
+ linebuf = pmxaerr:read()
+ err = tonumber(linebuf)
+ pmxaerr:close()
+ if ( err == 0 ) and
+ ((tex == "") or os.execute(tex .. " " .. filename) == 0) and
+ ((tex == "") or os.execute(musixflx .. " " .. filename) == 0) and
+ ((tex == "") or os.execute(tex .. " " .. filename) == 0) and
+ ((tex ~= "latex" and tex ~= "pdflatex")
+ or (os.execute(tex .. " " .. filename) == 0)) and
+ (dvi == "" or (os.execute(dvi .. " " .. filename) == 0)) and
+ (ps2pdf == "" or (os.execute(ps2pdf .. " " .. filename .. ".ps") == 0) )
+ then
+ if ps2pdf ~= "" then
+ print(filename .. ".pdf generated by " .. ps2pdf .. ".")
+ end
+ if intermediate == 1 then -- clean-up:
+ os.remove( "pmxaerr.dat" )
+ os.remove( filename .. ".mx1" )
+ os.remove( filename .. ".mx2" )
+ if dvi ~= "" then
+ os.remove( filename .. ".dvi" )
+ end
+ if ps2pdf ~= "" then
+ os.remove( filename .. ".ps" )
+ end
+ end
+ else
+ print("pmx/MusiXTeX processing of " .. filename .. ".pmx fails.\n")
+ exit_code = 2
+ --[[ uncomment for debugging
+ print("tex = ", tex)
+ print("dvi = ", dvi)
+ print("ps2pdf = ", ps2pdf)
+ --]]
+ end
+
+ end --if not io.open ...
+ end --if this_arg == ...
+ narg = narg+1
+until narg > #arg
+os.exit( exit_code )
diff --git a/Build/source/utils/pmx/pmx.test b/Build/source/utils/pmx/pmx.test
new file mode 100755
index 00000000000..61c4a8bbd39
--- /dev/null
+++ b/Build/source/utils/pmx/pmx.test
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+# Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+rm -f barsant* pmxaerr.dat
+
+cp $srcdir/tests/barsant.pmx .
+
+failed=
+
+./scor2prt barsant \
+ && diff barsant1.pmx $srcdir/tests/barsant1.pmx \
+ && diff barsant2.pmx $srcdir/tests/barsant2.pmx \
+ || failed="$failed scor2prt"
+
+./pmxab barsant \
+ && diff barsant.mid $srcdir/tests/barsant.mid \
+ && diff barsant.pml $srcdir/tests/barsant.pml \
+ && diff barsant.tex $srcdir/tests/barsant.tex \
+ || failed="$failed pmxab"
+
+test -z "$failed" && exit 0
+echo "failed tests:$failed"
+exit 1
+
diff --git a/Build/source/utils/pmx/pmxab.1 b/Build/source/utils/pmx/pmxab.1
new file mode 100644
index 00000000000..eddb52d8bd3
--- /dev/null
+++ b/Build/source/utils/pmx/pmxab.1
@@ -0,0 +1,24 @@
+.TH pmxab 1 "12 July 2011" "Version 2.6.03" "PMX Manual Page"
+.SH NAME
+pmxab \- a MusiXTeX preprocessor
+.SH SYNOPSIS
+.B pmxab
+.RI basename [.pmx]
+
+.SH DESCRIPTION
+pmxab is a preprocessor for MusiXTeX.
+It's usually invoked by its frontend pmx(1).
+To use it to its full benefit you should have installed MusiXTeX Version 1.15
+or higher, and TeX itself.
+The goal of PMX is to faciliate the efficient typesetting of scores and parts
+that have an almost professional appearance. To learn more about typesetting
+with PMX, please read the PMX Manual.
+
+When invoked directly, pmxab produces tex output utilizing the MusiXTeX
+macro set.
+.SH SEE ALSO
+pmx(1), scor2prt(1), musixtex(1)
+.SH AUTHORS
+PMX was written by Don Simons <dsimons@roadrunner.com>.
+This manual page was written by Roland Stigge <stigge@antcom.de> for the Debian
+project and revised by Bob Tennent <rdt@cs.queensu.ca>.
diff --git a/Build/source/utils/pmx/scor2prt.1 b/Build/source/utils/pmx/scor2prt.1
new file mode 100644
index 00000000000..4e38a161cb0
--- /dev/null
+++ b/Build/source/utils/pmx/scor2prt.1
@@ -0,0 +1,18 @@
+.TH scor2prt 1 "5 March 2012" "Version 2.6.17" "scor2prt Manual Page"
+.SH NAME
+scor2prt \- source-parts separation program for pmx, a MusiXTeX preprocessor
+.SH SYNOPSIS
+.B scor2prt
+.RI basename [.pmx]
+.SH DESCRIPTION
+scor2prt is part of pmx(1), a preprocessor for MusiXTeX. It can automatically
+create parts from a score by generating a set of .pmx files, one for each part,
+from a single .pmx file for the score. The appearance of the parts can be
+controlled by special commands in the main file. Read the PMX Manual for more
+information about that.
+.SH SEE ALSO
+pmx(1), pmxab(1), musixtex(1), PMX Manual
+.SH AUTHORS
+PMX was written by Don Simons <dsimons@roadrunner.com>.
+This manual page was written by Roland Stigge <stigge@antcom.de> for the Debian
+project and revised by Bob Tennent <rdt@cs.queensu.ca>.
diff --git a/Build/source/utils/pmx/tests/barsant.mid b/Build/source/utils/pmx/tests/barsant.mid
new file mode 100644
index 00000000000..48190b2ddac
--- /dev/null
+++ b/Build/source/utils/pmx/tests/barsant.mid
Binary files differ
diff --git a/Build/source/utils/pmx/tests/barsant.pml b/Build/source/utils/pmx/tests/barsant.pml
new file mode 100644
index 00000000000..d219f240277
--- /dev/null
+++ b/Build/source/utils/pmx/tests/barsant.pml
@@ -0,0 +1,24 @@
+This is PMX, Version 2617 , 28 Jan 12
+Opening barsant.pmx
+ Starting first PMX pass
+
+ Bar 1 Bar 2 Bar 3 Bar 4 Bar 5 Bar 6 Bar 7 Bar 8 Bar 9 Bar 10 Bar 11
+ Bar 12 Bar 13 Bar 14 Bar 15 Bar 16 Bar 17
+ Done with first pass
+
+ nlbuf: 50
+Starting second PMX pass
+
+WARNING
+ In a title block, you have specified instrument and/or
+ composer but no title for the piece.
+
+ Bar 1 Bar 2 Bar 3 Bar 4 Bar 5 Bar 6 Bar 7 Bar 8 Bar 9 Bar 10 Bar 11
+ Bar 12 Bar 13 Bar 14 Bar 15 Bar 16 Bar 17
+Writing ./barsant.tex
+ Done with second PMX pass. Now run TeX
+
+Writing barsant.mid
+MIDI instrument 0 is 74
+MIDI instrument 1 is 6
+ Bytes used: 2126 807 21
diff --git a/Build/source/utils/pmx/tests/barsant.pmx b/Build/source/utils/pmx/tests/barsant.pmx
new file mode 100644
index 00000000000..f10fd67b064
--- /dev/null
+++ b/Build/source/utils/pmx/tests/barsant.pmx
@@ -0,0 +1,68 @@
+%----------------%
+%
+% barsant.pmx Revised 29 June 2002
+%
+%----------------%
+%
+% nv,noinst,mtrnuml,mtrdenl,mtrnump,mtrdenp,xmtrnum0,isig,
+ 2 2 4 4 0 6 0 0
+%
+% npages,nsyst,musicsize,fracindent
+ 1 7 20 0.07
+Basso
+Recorder
+bt
+./
+Abep
+Iiharet60
+Tc
+Francesco Barsanti (1690-1772)
+%%
+AeI1.1
+%2S9
+% Bar 1-4
+h
+Adagio
+c43 r8 f 65 f 42 e 6 r c | [ b 6 c ] d 7 b 65 c4 r8 c 65 t |
+ \global\figdrop5\Figu{-1}{\fsmsh}\Figu{0}{4}\Figu{4}{2}\
+ c t bf4 65 x1842 a8 65 t a t #42 g 6 r g 65 t |
+ g t #42 f4 \global\figdrop8\ 65 x1842 \Figu06\ e8 d 54 dd1+ 3 c3 b8 6 g 7 /
+g85 Gf ed1 d3 [ c3 a8+ gd1x5n s+1 f e d c s+1 ] Gc b8 s c s r e |
+ [ d35 s c d s e op ] e s d e s f op [ f s e f s g ] g f e f
+ Gf ed1 d3 c8 r ad1+ g3 |
+ [ fs15 dd+ ] [ c3 \nbbbbl2\ bf1x3 s+2 a g ] s+2 Gfn [ e1 cd+ ] [ b3
+ \nbbbbl2\ a1x3 g f ] Ge ds8 ot e r ed1 dn3 |
+ [ cs15 ad+ ] [ g3 \nbbbbl2\ f1x3 s+2 e d s+2 ]
+ Gcn b1 c8 g1+ g3 s f e f s f8 op r1 f ed d3 /
+% Bar 5-6
+[ c84 f- 7 ] g 4 g- 3 c ed1 f3 gd1 f3 ed1 d3 | cs4 5 r8 c 65 d4 r8 fd1 e3 /
+[ e65 g c e s e1 s ] d6 c b a g f e d dd8 ot c1 c4 r8 ed1 f3 |
+ g85 gx3 s+1 fs g s+1 bf8 [ a3 s g fn e s ] [ f1 s d cs s d op ]
+ d s e f s gs op /
+% Bar 7-8
+ds43 5 r8 d 65 e # ed1 fs3 gs8 e 7 | a4 r8 a 6 g4 7 r8 g 6 /
+a85 ax3n+0+.7 s+2 gs a s+2 c8 bd1 ot a3 g1 Gfs ed8 r1 b+ bd ot a6 s b s |
+ c86x3 s+2 b a s+2 ax3 s+2 g f s+2 fx3 s+1 e f s+1 c+
+ bx3 s+2 a g s+2 gx3 s+2 f e s+2 ex3nf+0+.7 s+2 ds e s+2 b+ /
+% Bar 9-10
+f43 7 r8 d 65 e4 gs- 65 | a r r gs+ 65 /
+a85x3 s+2 g f s+2 fx3 s+2 e d s+2 dx3nf+0+.7 s+2 cs d s+2 a+
+ gs1 b d8 r1 d cd b3 s+0-.3 |
+ [ c1 s a s bf s gs s ] a s fs s gn s e s
+ [ fn s ds s e s cs s ] dn s f s e d s /
+% Bar 11-12
+[ a83 d- 7 ] e 4 e- #3 a ad1+ b3 c8 gs 65 | a4 # cs- 65 d8 dd1 e3 f8 d /
+c15 s+2 gs+ a s+1 d- Gc bd8 ot a1 a4 r8 ed1+ d3 |
+ cs1 e g bf [ a3 cs e1 s ] e6 s d s cn bf a g f e s
+ Ge fd1 e3 d8 ot r8 dd1 cn3 /
+% Bar 13-14
+g43 b- 65 [-1+1 c8 cd1 d3 ] ef8 b 6 | c4 -3 bf n42 af 6 an #6 /
+b14 d f a [ g3 b d1 t ] [+1 d6 t c b a g f e d ]
+ Gd ed1 ot d3 c8 r1 d dd ot c6 s d s |
+ ef1 c cd ot b6 s c s en1 c cd ot b6 s c s
+ f1 c cd ot b6 s c s fs1 c cd ot b6 s c s /
+% Bar 15-end
+b82 6 gd1 a3 b8 g 7 c4 -3 r | r2 r8 f e s 6 d s 6 | [-1 c f 7 g 4 g- 3 ] c2 /
+g45 r1 af gd f3 ef1 bn+ s c s an s [ bf s g s af s fs s ] |
+ g s e s f s d s [ ef s c s df s bn s ] c8 s a op g op f+ s |
+ [ e s a- dd ot c1 ] c2 /
diff --git a/Build/source/utils/pmx/tests/barsant.tex b/Build/source/utils/pmx/tests/barsant.tex
new file mode 100644
index 00000000000..fe003c3404e
--- /dev/null
+++ b/Build/source/utils/pmx/tests/barsant.tex
@@ -0,0 +1,307 @@
+%%%%%%%%%%%%%%%%%
+%
+% barsant.tex
+%
+%%%%%%%%%%%%%%%%
+\input musixtex
+\input pmx
+\def\fixdrop{\advance\sysno by 1\ifcase\sysno%
+\figdrop= 5 \figdtwo= 4 \or%
+\figdrop= 8 \figdtwo= 4 \or%
+\figdrop= 5 \figdtwo= 4 \or%
+\figdrop= 6 \figdtwo= 4 \or%
+\figdrop= 7 \figdtwo= 4 \or%
+\figdrop= 4 \figdtwo= 4 \or%
+\figdrop= 6 \figdtwo= 4 \fi}%
+\setmaxslurs{24}\setmaxinstruments{24}%
+\input musixps
+\normalmusicsize%
+\nopagenumbers
+\tracingstats=2\relax
+\hsize=524pt
+\vsize740pt
+\def\nbinstruments{2}
+\setstaffs11
+\setclef16
+\setname1{Basso}
+\setstaffs21
+\setclef20
+\setname2{Recorder}
+\generalsignature{ 0}%
+\generalmeter\meterC%
+\parindent 37pt
+\elemskip1pt\afterruleskip1.000pt\beforeruleskip0pt\relax
+\stafftopmarg0pt\staffbotmarg0pt\interstaff{7.9}\relax
+\readmod{barsant}
+\startmuflex\startpiece\addspace\afterruleskip%
+\bigaccid%
+\global\parskip 0pt plus 12\Interligne minus 99\Interligne%
+\def\upstrut{\znotes&\zcharnote{\upamt}{~}\en}%
+\Nosluradjust\Notieadjust\nohalfties
+\global\parskip 0pt plus 12\Interligne minus 99\Interligne%
+\def\upstrut{\znotes&\zcharnote{\upamt}{~}\en}%
+\znotes&\zcharnote{16}{\titles{.2}{}{0}%
+{}{.2}{Francesco Barsanti (1690-1772)}{.1}}\en%
+% Bar count 1
+\fixdrop%
+\starteq%
+\pnotes{2.00}\qu{'C}&\zcharnote{16}{\bigfont\kern-30pt Adagio}%
+\ibl2{'e}{-2}\qb2g\en%
+\pnotes{1.75}&\shlft8{\zcu{'f}}\nbbl2\qbp2e\en%
+\pnotes{1.05}\sk\ds&\tbbbl2\tbl2\qb2{'d}\ibbbl2e{-2}\rbbbl2\rbbl2\qb2c%
+\en%
+\pnotes{1.50}&\qb2{''a}\en%
+\pnotes{0.50}\Figu0{6}\Figu4{5}\cl{'F}&\en%
+\pnotes{0.83}&\isluru0{''a}\nbbbbl2\qb2{`g}\qb2f\qb2e\qb2d\tslur0d%
+\tbl2\qb2c\en%
+\pnotes{2.00}\ast{1.05}\Figu0{4}\Figu4{2}\ibl1{'F}{-1}\qb1F\Figu0{6}%
+\tbl1\qb1E\ds\cu C&\ast{1.05}\ibl2{'b}1\isluru0b\shlft8{\zcu c}\qb2b%
+\tslur0c\tbl2\qb2c\ds\cl e\en%
+% Bar count 2
+\xbar
+\pnotes{1.05}\Figu0{6}\ibu1{'B}1\qb1B\sk\sk\sk\tbu1\qb1C\sk\sk\sk\Figu0{%
+7}\ibu1C{-1}\qb1D\sk\sk\sk\Figu0{6}\Figu4{5}\tbu1\qb1B&\ibbbl2{'d}0%
+\isluru0d\qb2d\qb2c\tslur0d\qb2d\uppz e\tbl2\qb2e\ibbbl2e0\isluru0e\qb2e%
+\qb2d\tslur0e\qb2e\uppz f\tbl2\qb2f\ibbbl2f0\isluru0f\qb2f\qb2e\tslur0f%
+\qb2f\tbl2\qb2g\ibbbl2f0\qb2g\qb2f\qb2e\tbl2\qb2f\en%
+\pnotes{1.75}\ast{.83}\qu{'C}&\ast{.83}\ibbl2{'e}{-2}\shlft8{\zcu f}%
+\qbp2e\en%
+\pnotes{1.05}&\tbbbl2\tbbl2\qb2{'d}\en%
+\pnotes{2.00}\sk\ds&\tbl2\qb2{'c}\ds\en%
+\pnotes{1.75}\Figu0{6}\Figu4{5}\tieforisd\islurd0{'C}\cu C&%
+\ibbl2{''a}{-2}\qbp2a\en%
+\pnotes{1.05}&\tbbbl2\tbl2\qb2{'g}\en%
+% Bar count 3
+\fixdrop%
+\alaligne
+\pnotes{1.41}\global\figdrop5\Figu{-1}{\fsmsh}\Figu{0}{4}\Figu{4}{2}%
+\tieforts\tslur0{'C}\cu C&\ibbl2{'g}9\bigsh f\qb2f\en%
+\pnotes{1.15}&\tbl2\qbp2{''d}\en%
+\pnotes{0.58}\Figu0{6}\Figu4{5}\bigfl{'B}\qu B&\en%
+\pnotes{1.00}&\ibbbl2{''b}{-3}\qb2c\en%
+\pnotes{0.82}&\ast{.36}\nbbbbl2\isluru0{''d}\fl b\xnum{0.82}c3\qb2b\qb2a%
+\tslur0b\tbl2\qb2{`g}\en%
+\pnotes{1.41}\Figu0{4}\Figu4{2}&\ast{1.24}\ibbl2{'f}9\shlft8{\bigna f\zcu%
+ f}\qb2e\en%
+\pnotes{1.15}&\tbl2\qbp2{''c}\en%
+\pnotes{0.58}\Figu0{6}\Figu4{5}\tieforisd\islurd0{'A}\cu A&\en%
+\pnotes{1.00}&\ibbbl2{''a}{-3}\qb2b\en%
+\pnotes{0.82}&\nbbbbl2\xnum{0.82}{''b}3\qb2a\qb2{`g}\tbl2\qb2f\en%
+\pnotes{2.00}\ast{1.49}\Figu{-1}{\fsmsh}\Figu0{4}\Figu4{2}\ibu1{'A}{-1}%
+\tieforts\tslur0A\qb1A\Figu0{6}\tbu1\qb1{`G}\ds&\ast{1.49}\ibl2{'d}1%
+\shlft{13}{\zcu e}\shake g\sh d\qb2d\tbl2\qb2e\ds\en%
+\pnotes{1.73}\Figu0{6}\Figu4{5}\tieforisd\islurd0G\cu G&\ibbl2{'e}{-1}%
+\qbp2e\en%
+\pnotes{1.00}&\bigna{'d}\tbbbl2\tbl2\qb2d\en%
+% Bar count 4
+\xbar
+\pnotes{1.41}\Figu{-1}{\fsmsh}\Figu0{4}\Figu4{2}\tieforts\tslur0G\cu G&%
+\ibbl2{'d}9\bigsh c\qb2c\en%
+\pnotes{1.15}&\tbl2\qbp2{''a}\en%
+\pnotes{0.58}\Figu0{6}\Figu4{5}\qu F&\en%
+\pnotes{1.00}&\ibbbl2{'f}{-3}\qb2g\en%
+\pnotes{0.82}&\nbbbbl2\isluru0{''a}\xnum{0.82}{`g}3\qb2f\qb2e\tslur0f%
+\tbl2\qb2d\en%
+\pnotes{1.41}\Figu0{4}\Figu4{2}&\ast{1.24}\ibbl2{'c}4\shlft8{\bigna c\zcu%
+ c}\rbbl2\qb2b\en%
+\pnotes{1.00}\sk\global\figdrop8\Figu06\cu E&\qb2{'c}\en%
+\pnotes{1.41}&\tbbl2\tbl2\qb2{'g}\en%
+\pnotes{1.00}\Figu0{5}\Figu4{4}\ibu1{'A}3\qb1{`D}&\ibbbl2{'f}0\isluru0g%
+\qb2g\qb2f\qb2e\tslur0f\tbbbl2\tbbl2\qb2f\en%
+\pnotes{1.73}\Figu0{3}\nbbu1\qbp1{'D}&\uppz{'f}\tbl2\qb2f\en%
+\pnotes{1.00}\tbbbu1\tbu1\qb1{'C}&\en%
+\pnotes{1.41}\Figu0{6}\ibu1{'B}{-2}\qb1B&\qs\ibbl2{'f}{-2}\qb2f\en%
+\pnotes{1.73}\Figu0{7}\tbu1\qb1G&\qbp2{'e}\en%
+\pnotes{1.00}&\tbbbl2\tbl2\qb2{'d}\en%
+% Bar count 5
+\fixdrop%
+\alaligne
+\pnotes{0.81}\ibl1{''B}{-2}\qb1C&\ibbbbl2{'g}6\qb2e\qb2g\qb2{'c}%
+\isluru0e\tbbbbl2\tbbbl2\qb2e\en%
+\pnotes{1.48}&\tslur0{''e}\tbl2\qb2e\en%
+\pnotes{0.81}\Figu0{7}\tbl1\qb1{'F}&\ibbbbl2{''b}{-4}\qb2d\qb2c\qb2b%
+\qb2a\qb2{`g}\qb2f\qb2e\tbl2\qb2d\en%
+\pnotes{2.00}\Figu0{4}\ibu1{'E}{-9}\qb1G&\ibl2{'d}{-1}\shake g\qbp2d\en%
+\pnotes{1.00}\Figu0{3}\tbu1\qb1G&\en%
+\pnotes{1.48}&\tbbl2\tbl2\qb2{'c}\en%
+\pnotes{2.00}\ibl1{'D}2\qb1C&\ql{'c}\en%
+\pnotes{1.77}\nbbl1\qbp1{'E}&\en%
+\pnotes{1.10}\tbbbl1\tbl1\qb1{'F}&\en%
+\pnotes{1.77}\ibbl1{'F}{-2}\qbp1G&\ds\en%
+\pnotes{1.10}\tbbbl1\qb1{'F}&\en%
+\pnotes{1.77}\qbp1{'E}&\ibbl2{'e}2\qbp2e\en%
+\pnotes{1.10}\tbbbl1\tbl1\qb1{'D}&\tbbbl2\tbl2\qb2{'f}\en%
+% Bar count 6
+\hardspace{ .4pt}%
+\xbar
+\pnotes{2.00}\Figu0{5}\bigsh{'C}\qu C&\cl{'g}\en%
+\pnotes{1.24}&\xnum{1.37}{''a}3\ibbl2{`g}0\isluru0{'a}\qb2{`g}\ast{.15}%
+\sh f\qb2f\tslur0{'a}\tbl2\qb2{`g}\en%
+\pnotes{2.00}\ast{.15}\ds&\ast{.15}\fl{''b}\cl b\en%
+\pnotes{1.10}\Figu0{6}\Figu4{5}\cu{'C}&\ibbbl2{'g}{-3}\isluru0{'a}\qb2a%
+\qb2{`g}\ast{.29}\na f\qb2f\tslur0e\tbl2\qb2e\en%
+\pnotes{1.48}\qu{'D}\sk\sk\sk\ds\sk\ibbl1F{-1}\qbp1F&\ibbl2{'d}0%
+\isluru0f\qb2f\qb2d\tslur0c\bigsh c\qb2c\uppz e\tbl2\qb2d\ibbl2e2%
+\isluru0d\qb2d\qb2e\tslur0f\qb2f\en%
+\pnotes{0.74}&\uppz{'g}\bigsh g\tbl2\qb2g\en%
+\pnotes{1.10}\tbbbl1\tbl1\qb1{'E}&\en%
+% Bar count 7
+\fixdrop%
+\alaligne
+\pnotes{2.00}\ast{.54}\Figu0{5}\sh{'D}\qu D&\ast{.54}\cl{''a}\en%
+\pnotes{1.70}&\xnum{3.28}{''b}3\ibbl2a0\isluru0c\qb2a\ast{1.12}\sh{`g}%
+\qb2g\tslur0{'c}\tbl2\qb2a\en%
+\pnotes{2.00}\ds&\ibl2{''b}{-3}\qb2c\en%
+\pnotes{1.92}\Figu0{6}\Figu4{5}\cu{'D}&\shake{''d}\nbbl2\qbp2b\en%
+\pnotes{1.63}&\ast{.65}\tbbbl2\tbl2\qb2{''a}\en%
+\pnotes{1.80}\Figu{-1}{\sharpfig}\ibl1{'E}0\qb1E&\ibbl2{'g}{-6}%
+\rbbl2\qb2g\en%
+\pnotes{1.00}&\ast{2.47}\shlft8{\bigsh{'f}\zcu f}\tbl2\qbp2e\en%
+\pnotes{1.92}\nbbl1\qbp1{'E}&\en%
+\pnotes{1.63}\ast{1.80}\sh{'F}\tbbbl1\tbl1\qb1F&\en%
+\pnotes{1.80}\ast{1.19}\ibl1{'G}{-3}\sh G\qb1G&\ast{1.19}\qs\ibbl2{''a}0%
+\qb2b\en%
+\pnotes{1.92}\Figu0{7}\tbl1\qb1{'E}&\shake{''d}\qbp2b\en%
+\pnotes{1.47}&\ast{.65}\isluru0{''a}\nbbbbl2\qb2a\tslur0b\tbl2\qb2b\en%
+% Bar count 8
+\xbar
+\pnotes{1.70}\ql{''A}\sk\sk\sk\sk\sk\ds&\xnum{1.70}{''d}3\ibbl2b{-3}%
+\isluru0e\qb2c\qb2b\tslur0c\tbl2\qb2a\xnum{1.70}b3\ibbl2{`g}{-3}%
+\isluru0{'c}\qb2a\qb2{`g}\tslur0{'a}\tbl2\qb2{`f}\xnum{1.70}g3\ibbl2f0%
+\isluru0g\qb2f\qb2e\tslur0g\tbl2\qb2f\en%
+\pnotes{2.00}\Figu0{6}\cl{''A}&\cl{''c}\en%
+\pnotes{1.70}\Figu0{7}\ql{'G}\sk\sk\sk\sk\sk\ds&%
+\xnum{1.70}{''c}3\ibbl2a{-3}\isluru0d\qb2b\qb2a\tslur0b\tbl2\qb2{`g}%
+\xnum{1.70}{'a}3\ibbl2{`f}{-3}\isluru0{'b}\qb2{`g}\qb2f\tslur0g%
+\tbl2\qb2e\xnum{3.28}f3\ibbl2e0\isluru0g\qb2e\ast{1.12}\sh d\qb2d\tslur0g%
+\tbl2\qb2e\en%
+\pnotes{2.00}\Figu0{6}\cl{'G}&\cl{''b}\en%
+% Bar count 9
+\xbar
+\pnotes{1.70}\Figu0{7}\ql{'F}\sk\sk\sk\sk\sk\ds&%
+\xnum{1.70}{''b}3\ibbl2{`g}{-3}\isluru0{'c}\qb2a\qb2{`g}\tslur0{'a}%
+\tbl2\qb2{`f}\xnum{1.70}g3\ibbl2e{-3}\isluru0{'a}\qb2{`f}\qb2e\tslur0f%
+\tbl2\qb2d\xnum{3.28}e3\ibbl2d0\isluru0f\qb2d\ast{1.12}\sh c\qb2c\tslur0f%
+\tbl2\qb2d\en%
+\pnotes{2.00}\Figu0{6}\Figu4{5}\cu{'D}&\cl{''a}\en%
+\pnotes{1.80}\ast{.82}\ql{'E}&\ast{.82}\ibbl2{''a}6\sh{`g}\qb2g%
+\tbbl2\qb2{'b}\en%
+\pnotes{2.00}&\tbl2\qb2{''d}\en%
+\pnotes{1.80}\Figu0{6}\Figu4{5}\bigsh G\qu G&\qs\ibbl2{''c}0\qb2d\en%
+\pnotes{1.92}&\qbp2{''c}\en%
+\pnotes{1.63}&\ast{.65}\isu0{''b}{-.3}\tbbbl2\tbl2\qb2b\en%
+% Bar count 10
+\fixdrop%
+\def\raisebarno{7.5\internote}%
+\alaligne
+\def\raisebarno{3.5\internote}%
+\pnotes{1.77}\qu{'A}\sk\sk\sk\ast{1.44}\ast{1.44}\qp\sk\sk\sk\ast{1.44}%
+\ast{1.44}\ast{1.44}\qp\sk\sk\sk\ast{1.44}\ast{1.44}\ast{1.44}\Figu0{6}%
+\Figu4{5}\bigsh G\ql G&\ibbl2{''b}{-1}\tslur0c\qb2c\isluru0a\qb2a%
+\ast{1.44}\tslur0b\fl b\qb2b\ast{1.44}\isluru0{`g}\sh g\tbl2\qb2g%
+\ibbl2g{-1}\tslur0{'a}\qb2a\ast{1.44}\isluru0{`f}\sh f\qb2f\ast{1.44}%
+\tslur0g\na g\qb2g\isluru0e\tbl2\qb2e\ast{1.44}\ibbl2e{-1}\tslur0f\na f%
+\qb2f\ast{1.44}\isluru0d\sh d\qb2d\tslur0e\qb2e\ast{1.44}\isluru0c\sh c%
+\tbl2\qb2c\ast{1.44}\ibbl2e0\tslur0d\na d\qb2d\isluru0f\qb2f\qb2e\tslur0d%
+\tbl2\qb2d\en%
+% Bar count 11
+\xbar
+\pnotes{1.77}\ibl1{'G}{-6}\qb1{'A}\sk\ast{1.44}\Figu0{7}\tbl1\qb1{`D}&%
+\ibbl2{'e}1\isluru0e\qb2c\ast{1.44}\sh g\qb2g\tslur0{'b}\qb2a%
+\tbl2\qb2{`d}\en%
+\pnotes{2.00}\ast{2.36}\Figu0{4}\ibu1{'C}{-9}\qb1E&\ast{2.36}\ibu2{'b}{-2}%
+\shlft8{\zcu c}\shake{'c}\qbp2{`b}\en%
+\pnotes{1.00}\Figu{-1}{\fsmsh}\Figu0{3}\tbu1\qb1E&\en%
+\pnotes{1.77}&\tbbu2\tbu2\qb2{'a}\en%
+\pnotes{2.00}\ibl1{'C}9\qb1A&\qu{'a}\en%
+\pnotes{1.90}\nbbl1\qbp1{''A}&\en%
+\pnotes{1.56}\ast{1.01}\tbbbl1\tbl1\qb1{''B}&\en%
+\pnotes{2.00}\ibl1{''B}{-7}\qb1C&\ds\en%
+\pnotes{1.90}\ast{1.20}\Figu0{6}\Figu4{5}\sh{'G}\tbl1\qb1G&\ast{1.20}%
+\ibbl2{'e}{-3}\qbp2e\en%
+\pnotes{1.56}&\ast{1.01}\tbbbl2\tbl2\qb2{'d}\en%
+% Bar count 12
+\xbar
+\pnotes{1.77}\ast{.75}\Figu{-1}{\sharpfig}\ql{''A}&\ast{.75}\ibbl2{'d}6%
+\sh c\qb2c\qb2e\qb2g\ast{1.44}\fl{'b}\tbl2\qb2b\en%
+\pnotes{1.56}\Figu0{6}\Figu4{5}\bigsh{'C}\qu C&\ibbbl2{''b}6\qb2a%
+\ast{1.64}\sh c\tbbbl2\qb2c\en%
+\pnotes{1.77}&\isluru0{''e}\tbl2\qb2e\en%
+\pnotes{1.38}&\ibbbbl2{''c}{-4}\tslur0e\qb2e\isluru0d\qb2d\ast{1.82}\na c%
+\qb2c\ast{1.82}\fl b\qb2b\qb2a\qb2{`g}\qb2f\tslur0e\tbl2\qb2e\en%
+\pnotes{1.90}\ast{2.74}\ibl1{'D}0\qb1D&\ast{2.74}\ibbl2{'f}{-3}\shlft8{%
+\zcu e}\qbp2f\en%
+\pnotes{1.56}&\ast{1.01}\tbbbl2\tbbl2\qb2{'e}\en%
+\pnotes{1.90}\nbbl1\qbp1{'D}&\shake{'g}\tbl2\qb2d\en%
+\pnotes{1.56}\ast{1.01}\tbbbl1\tbl1\qb1{'E}&\en%
+\pnotes{2.00}\ibl1{'F}{-5}\qb1F&\ds\en%
+\pnotes{1.90}\tbl1\qb1{'D}&\ibbl2{'d}{-3}\qbp2d\en%
+\pnotes{1.56}&\ast{2.32}\na{'c}\tbbbl2\tbl2\qb2c\en%
+% Bar count 13
+\fixdrop%
+\alaligne
+\endeq%
+\pnotes{1.48}\ql{'G}&\ibbl2{'d}4\qb2b\qb2d\qb2f\tbl2\qb2{'a}\en%
+\pnotes{1.14}\Figu0{6}\Figu4{5}\qu{'B}&\ibbbl2{''a}5\qb2{`g}%
+\tbbbl2\qb2{'b}\en%
+\pnotes{1.48}&\tieforisu\isluru0{''d}\tbl2\qb2d\en%
+\pnotes{0.88}&\ibbbbl2{''c}{-4}\tieforts\tslur0d\qb2d\qb2c\qb2b\qb2a%
+\qb2{`g}\qb2f\qb2e\tbl2\qb2d\en%
+\pnotes{1.73}\ast{1.13}\ibu1{'C}1\qb1C&\ast{1.13}\ibbl2{'d}{-2}\shlft8{%
+\zcu d}\shake g\qbp2e\en%
+\pnotes{1.14}&\tbbbl2\tbbl2\qb2{'d}\en%
+\pnotes{1.73}\nbbu1\qbp1{'C}&\tbl2\qb2{'c}\en%
+\pnotes{1.14}\tbbbu1\tbu1\qb1{'D}&\en%
+\pnotes{1.48}\ast{.42}\ibu1{'D}{-3}\fl E\qb1E&\ast{.42}\qs\ibbl2{'c}0%
+\qb2d\en%
+\pnotes{1.73}\Figu0{6}\tbu1\qb1{'B}&\shake{'g}\qbp2d\en%
+\pnotes{0.88}&\isluru0{'c}\nbbbbl2\qb2c\tslur0d\tbl2\qb2d\en%
+% Bar count 14
+\xbar
+\pnotes{1.48}\Figu{-1}{\fsmfl}\Figu0{3}\qu{'C}&\ibbl2{'b}0\bigfl e\qb2e%
+\qb2c\en%
+\pnotes{1.73}&\shake{'g}\qbp2c\en%
+\pnotes{0.88}&\isluru0{'b}\nbbbbl2\qb2b\tslur0c\tbl2\qb2c\en%
+\pnotes{1.48}\ast{.68}\Figu{-1}{\fsmna}\Figu0{4}\Figu4{2}\bigfl{'B}\qu B%
+&\ast{.68}\ibbl2{'b}0\na e\qb2e\qb2c\en%
+\pnotes{1.73}&\shake{'g}\qbp2c\en%
+\pnotes{0.88}&\isluru0{'b}\nbbbbl2\qb2b\tslur0c\tbl2\qb2c\en%
+\pnotes{1.48}\Figu0{6}\bigfl{'A}\qu A&\ibbl2{'b}0\qb2f\qb2c\en%
+\pnotes{1.73}&\shake{'g}\qbp2c\en%
+\pnotes{0.88}&\isluru0{'b}\nbbbbl2\qb2b\tslur0c\tbl2\qb2c\en%
+\pnotes{1.48}\ast{.68}\Figu{-1}{\fsmsh}\Figu0{6}\bigna{'A}\qu A&%
+\ast{.68}\ibbl2{'b}0\sh f\qb2f\qb2c\en%
+\pnotes{1.73}&\shake{'g}\qbp2c\en%
+\pnotes{0.88}&\isluru0{'b}\nbbbbl2\qb2b\tslur0c\tbl2\qb2c\en%
+% Bar count 15
+\fixdrop%
+\alaligne
+\pnotes{2.00}\Figu0{6}\ibu1{'B}{-1}\qb1B&\ql{'g}\en%
+\pnotes{1.73}\nbbu1\qbp1G&\en%
+\pnotes{1.00}\tbbbu1\tbu1\qb1{'A}&\en%
+\pnotes{1.41}\ibu1{'A}{-2}\qb1B&\qs\ast{.11}\ibbl2{''a}{-2}\fl a\qb2a\en%
+\pnotes{1.73}\Figu0{7}\tbu1\qb1G&\qbp2{'g}\en%
+\pnotes{1.00}&\tbbbl2\tbl2\qb2{'f}\en%
+\pnotes{1.41}\ast{.53}\Figu{-1}{\fsmfl}\Figu0{3}\qu{'C}\sk\sk\sk%
+\ast{.11}\ast{.11}\ast{.11}\qp&\ast{.53}\ibbl2{'g}2\fl e\qb2e\ast{.11}%
+\isluru0{'b}\na b\qb2b\tslur0c\qb2c\ast{.11}\isluru0a\na a\tbl2\qb2a%
+\ast{.11}\ibbl2a{-1}\tslur0b\fl b\qb2b\isluru0{`g}\qb2g\ast{.11}%
+\tslur0{'a}\fl a\qb2a\ast{.11}\isluru0{`f}\sh f\tbl2\qb2f\en%
+% Bar count 16
+\xbar
+\pnotes{1.41}\hpause&\ibbl2{'f}{-1}\tslur0g\qb2g\isluru0e\qb2e\tslur0f%
+\qb2f\isluru0d\tbl2\qb2d\ast{.11}\ibbl2d{-1}\tslur0e\fl e\qb2e\isluru0c%
+\qb2c\ast{.11}\tslur0d\fl d\qb2d\ast{.11}\isluru0b\na b\tbl2\qb2b\en%
+\pnotes{2.00}\ds\ibl1{'F}{-2}\qb1F\Figu0{6}\isluru1E\qb1E\Figu0{6}%
+\tslur1D\tbl1\qb1D&\ibl2{'a}2\tslur0c\qb2c\uppz e\qb2a\uppz e\qb2{`g}%
+\isluru0{'f}\tbl2\qb2f\en%
+% Bar count 17
+\xbar
+\pnotes{2.00}\ibu1{'E}{-2}\qb1C\Figu0{7}\qb1F\Figu0{4}\qb1G&%
+\ibl2{'c}{-1}\tslur0e\qb2e\qb2a\shake g\qbp2d\en%
+\pnotes{1.00}\Figu0{3}\tbu1\qb1G&\en%
+\pnotes{1.41}&\tbbl2\tbl2\qb2{'c}\en%
+\pnotes{4.00}\hu{'C}&\hl{'c}\en%
+\Endpiece
+\vskip .1\Interligne\eject\endmuflex
+\bye
diff --git a/Build/source/utils/pmx/tests/barsant1.pmx b/Build/source/utils/pmx/tests/barsant1.pmx
new file mode 100644
index 00000000000..2aea3d406eb
--- /dev/null
+++ b/Build/source/utils/pmx/tests/barsant1.pmx
@@ -0,0 +1,48 @@
+%----------------%
+%
+% barsant.pmx Revised 29 June 2002
+%
+%----------------%
+%
+% nv,noinst,mtrnuml,mtrdenl,mtrnump,mtrdenp,xmtrnum0,isig,
+ 1
+ 1
+ 4
+ 4
+ 0
+ 6
+ .00
+ 0
+%
+% npages,nsyst,musicsize,fracindent
+ 1
+ 7
+ 20
+ .05
+
+b
+./
+Ti
+Basso
+Abep
+Tc
+Francesco Barsanti (1690-1772)
+% Bar 1-4
+h
+Adagio
+c43 r8 f 65 f 42 e 6 r c | [ b 6 c ] d 7 b 65 c4 r8 c 65 t |
+\global\figdrop5\Figu{-1}{\fsmsh}\Figu{0}{4}\Figu{4}{2}\
+c t bf4 65 x1842 a8 65 t a t #42 g 6 r g 65 t |
+g t #42 f4 \global\figdrop8\ 65 x1842 \Figu06\ e8 d 54 dd1+ 3 c3 b8 6 g 7 /
+% Bar 5-6
+[ c84 f- 7 ] g 4 g- 3 c ed1 f3 gd1 f3 ed1 d3 | cs4 5 r8 c 65 d4 r8 fd1 e3 /
+% Bar 7-8
+ds43 5 r8 d 65 e # ed1 fs3 gs8 e 7 | a4 r8 a 6 g4 7 r8 g 6 /
+% Bar 9-10
+f43 7 r8 d 65 e4 gs- 65 | a r r gs+ 65 /
+% Bar 11-12
+[ a83 d- 7 ] e 4 e- #3 a ad1+ b3 c8 gs 65 | a4 # cs- 65 d8 dd1 e3 f8 d /
+% Bar 13-14
+g43 b- 65 [-1+1 c8 cd1 d3 ] ef8 b 6 | c4 -3 bf n42 af 6 an #6 /
+% Bar 15-end
+b82 6 gd1 a3 b8 g 7 c4 -3 r | r2 r8 f e s 6 d s 6 | [-1 c f 7 g 4 g- 3 ] c2 /
diff --git a/Build/source/utils/pmx/tests/barsant2.pmx b/Build/source/utils/pmx/tests/barsant2.pmx
new file mode 100644
index 00000000000..a21386f4768
--- /dev/null
+++ b/Build/source/utils/pmx/tests/barsant2.pmx
@@ -0,0 +1,66 @@
+%----------------%
+%
+% barsant.pmx Revised 29 June 2002
+%
+%----------------%
+%
+% nv,noinst,mtrnuml,mtrdenl,mtrnump,mtrdenp,xmtrnum0,isig,
+ 1
+ 1
+ 4
+ 4
+ 0
+ 6
+ .00
+ 0
+%
+% npages,nsyst,musicsize,fracindent
+ 1
+ 7
+ 20
+ .05
+
+t
+./
+Ti
+Recorder
+Abep
+Tc
+Francesco Barsanti (1690-1772)
+S9
+% Bar 1-4
+h
+Adagio
+g85 Gf ed1 d3 [ c3 a8+ gd1x5n s+1 f e d c s+1 ] Gc b8 s c s r e |
+[ d35 s c d s e op ] e s d e s f op [ f s e f s g ] g f e f
+Gf ed1 d3 c8 r ad1+ g3 |
+[ fs15 dd+ ] [ c3 \nbbbbl2\ bf1x3 s+2 a g ] s+2 Gfn [ e1 cd+ ] [ b3
+\nbbbbl2\ a1x3 g f ] Ge ds8 ot e r ed1 dn3 |
+[ cs15 ad+ ] [ g3 \nbbbbl2\ f1x3 s+2 e d s+2 ]
+Gcn b1 c8 g1+ g3 s f e f s f8 op r1 f ed d3 /
+% Bar 5-6
+[ e65 g c e s e1 s ] d6 c b a g f e d dd8 ot c1 c4 r8 ed1 f3 |
+g85 gx3 s+1 fs g s+1 bf8 [ a3 s g fn e s ] [ f1 s d cs s d op ]
+d s e f s gs op /
+% Bar 7-8
+a85 ax3n+0+.7 s+2 gs a s+2 c8 bd1 ot a3 g1 Gfs ed8 r1 b+ bd ot a6 s b s |
+c86x3 s+2 b a s+2 ax3 s+2 g f s+2 fx3 s+1 e f s+1 c+
+bx3 s+2 a g s+2 gx3 s+2 f e s+2 ex3nf+0+.7 s+2 ds e s+2 b+ /
+% Bar 9-10
+a85x3 s+2 g f s+2 fx3 s+2 e d s+2 dx3nf+0+.7 s+2 cs d s+2 a+
+gs1 b d8 r1 d cd b3 s+0-.3 |
+[ c1 s a s bf s gs s ] a s fs s gn s e s
+[ fn s ds s e s cs s ] dn s f s e d s /
+% Bar 11-12
+c15 s+2 gs+ a s+1 d- Gc bd8 ot a1 a4 r8 ed1+ d3 |
+cs1 e g bf [ a3 cs e1 s ] e6 s d s cn bf a g f e s
+Ge fd1 e3 d8 ot r8 dd1 cn3 /
+% Bar 13-14
+b14 d f a [ g3 b d1 t ] [+1 d6 t c b a g f e d ]
+Gd ed1 ot d3 c8 r1 d dd ot c6 s d s |
+ef1 c cd ot b6 s c s en1 c cd ot b6 s c s
+f1 c cd ot b6 s c s fs1 c cd ot b6 s c s /
+% Bar 15-end
+g45 r1 af gd f3 ef1 bn+ s c s an s [ bf s g s af s fs s ] |
+g s e s f s d s [ ef s c s df s bn s ] c8 s a op g op f+ s |
+[ e s a- dd ot c1 ] c2 /