summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/makeindexk/ChangeLog13
-rw-r--r--Build/source/texk/makeindexk/Makefile.am14
-rw-r--r--Build/source/texk/makeindexk/Makefile.in17
-rwxr-xr-xBuild/source/texk/makeindexk/configure22
-rw-r--r--Build/source/texk/makeindexk/configure.ac2
-rw-r--r--Build/source/texk/makeindexk/mkind.h4
-rw-r--r--Build/source/texk/makeindexk/scanid.c37
-rwxr-xr-xBuild/source/texk/makeindexk/tests/makeindex.test77
-rw-r--r--Build/source/texk/makeindexk/tests/pprec5.ist3
-rw-r--r--Build/source/texk/makeindexk/tests/pprec6.ist3
-rw-r--r--Build/source/texk/makeindexk/tests/pprec7.ist3
-rw-r--r--Build/source/texk/makeindexk/tests/pprecB-0.ind5
-rw-r--r--Build/source/texk/makeindexk/tests/rangeA1.ind5
-rw-r--r--Build/source/texk/makeindexk/tests/rangeA2.ind5
-rw-r--r--Build/source/texk/makeindexk/tests/rangeA3.ind5
-rw-r--r--Build/source/texk/makeindexk/tests/romalpA-5.ind5
-rw-r--r--Build/source/texk/makeindexk/tests/romalpA-6.ind5
-rw-r--r--Build/source/texk/makeindexk/tests/romalpA.idx7
-rw-r--r--Build/source/texk/makeindexk/tests/romalpB-5.ind14
-rw-r--r--Build/source/texk/makeindexk/tests/romalpB-6.ind14
-rw-r--r--Build/source/texk/makeindexk/tests/romalpB-7.ind14
-rw-r--r--Build/source/texk/makeindexk/tests/romalpB.idx60
-rw-r--r--Build/source/texk/makeindexk/tests/romalpC-5.ind14
-rw-r--r--Build/source/texk/makeindexk/tests/romalpC.idx76
-rw-r--r--Build/source/texk/makeindexk/tests/romalpD-5.ind9
-rw-r--r--Build/source/texk/makeindexk/tests/romalpD-6.ind9
-rw-r--r--Build/source/texk/makeindexk/tests/romalpD-7.ind9
-rw-r--r--Build/source/texk/makeindexk/tests/romalpD.idx35
28 files changed, 439 insertions, 47 deletions
diff --git a/Build/source/texk/makeindexk/ChangeLog b/Build/source/texk/makeindexk/ChangeLog
index d99a3b8763a..4a87e0759d5 100644
--- a/Build/source/texk/makeindexk/ChangeLog
+++ b/Build/source/texk/makeindexk/ChangeLog
@@ -1,3 +1,16 @@
+2022-05-22 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * scanid.c:
+ Improve heuristic detection of page number types
+ for ambiguous ones between roman number and alphabet.
+ Ref. report from Frank Mittelbach,
+ https://tug.org/pipermail/tex-live/2022-May/048137.html
+ * tests/makeindex.test, tests/pprec[567].ist,
+ tests/romalp[ABCD].idx, tests/romalpA-[56].ind,
+ tests/romalp[BD]-[567].ind, tests/romalpC-5.ind, Makefile.am:
+ Update tests.
+ * configure.ac, mkind.h: Bump version to 2.17
+
2022-03-08 Karl Berry <karl@freefriends.org>
* mkindex.1: update contact info.
diff --git a/Build/source/texk/makeindexk/Makefile.am b/Build/source/texk/makeindexk/Makefile.am
index 64e2956757c..be95ad192cf 100644
--- a/Build/source/texk/makeindexk/Makefile.am
+++ b/Build/source/texk/makeindexk/Makefile.am
@@ -48,6 +48,16 @@ EXTRA_DIST += tests/nested-range.tex tests/nested-range.idx \
tests/nested-range-bb.tex tests/nested-range-bb.idx
DISTCLEANFILES = nested-range.ilg nested-range.ind
## tests/makeindex.test
-EXTRA_DIST += tests/sample.idx tests/sample.ind
-DISTCLEANFILES += sample.*
+EXTRA_DIST += tests/sample.idx tests/sample.ind \
+ tests/range.idx tests/range2.ist tests/range2.ist tests/range3.ist \
+ tests/range1.ind tests/range2.ind tests/range3.ind \
+ tests/pprec0.ist tests/pprec1.ist tests/pprec2.ist tests/pprec3.ist \
+ tests/pprec4.ist tests/pprec5.ist tests/pprec6.ist tests/pprec7.ist \
+ tests/pprecA.idx tests/pprecA-0.ind tests/pprecA-1.ind tests/pprecA-2.ind \
+ tests/pprecB.idx tests/pprecB-0.ind tests/pprecB-3.ind tests/pprecB-4.ind \
+ tests/romalpA.idx tests/romalpA-5.ind tests/romalpA-6.ind \
+ tests/romalpB.idx tests/romalpB-5.ind tests/romalpB-6.ind tests/romalpB-7.ind \
+ tests/romalpC.idx tests/romalpC-5.ind \
+ tests/romalpD.idx tests/romalpD-5.ind tests/romalpD-6.ind tests/romalpD-7.ind
+DISTCLEANFILES += sample.* range*.* pprec*.* romalp*.*
diff --git a/Build/source/texk/makeindexk/Makefile.in b/Build/source/texk/makeindexk/Makefile.in
index 63c8d298682..5f16ca91401 100644
--- a/Build/source/texk/makeindexk/Makefile.in
+++ b/Build/source/texk/makeindexk/Makefile.in
@@ -578,10 +578,23 @@ LDADD = $(KPATHSEA_LIBS)
dist_man1_MANS = makeindex.1 mkindex.1
EXTRA_DIST = CONTRIB NOTES ind-src $(TESTS) tests/nested-range.tex \
tests/nested-range.idx tests/nested-range-bb.tex \
- tests/nested-range-bb.idx tests/sample.idx tests/sample.ind
+ tests/nested-range-bb.idx tests/sample.idx tests/sample.ind \
+ tests/range.idx tests/range2.ist tests/range2.ist \
+ tests/range3.ist tests/range1.ind tests/range2.ind \
+ tests/range3.ind tests/pprec0.ist tests/pprec1.ist \
+ tests/pprec2.ist tests/pprec3.ist tests/pprec4.ist \
+ tests/pprec5.ist tests/pprec6.ist tests/pprec7.ist \
+ tests/pprecA.idx tests/pprecA-0.ind tests/pprecA-1.ind \
+ tests/pprecA-2.ind tests/pprecB.idx tests/pprecB-0.ind \
+ tests/pprecB-3.ind tests/pprecB-4.ind tests/romalpA.idx \
+ tests/romalpA-5.ind tests/romalpA-6.ind tests/romalpB.idx \
+ tests/romalpB-5.ind tests/romalpB-6.ind tests/romalpB-7.ind \
+ tests/romalpC.idx tests/romalpC-5.ind tests/romalpD.idx \
+ tests/romalpD-5.ind tests/romalpD-6.ind tests/romalpD-7.ind
TEST_EXTENSIONS = .pl .test
TESTS = tests/nested-range-test.pl tests/makeindex.test
-DISTCLEANFILES = nested-range.ilg nested-range.ind sample.*
+DISTCLEANFILES = nested-range.ilg nested-range.ind sample.* range*.* \
+ pprec*.* romalp*.*
all: c-auto.h
$(MAKE) $(AM_MAKEFLAGS) all-am
diff --git a/Build/source/texk/makeindexk/configure b/Build/source/texk/makeindexk/configure
index b583d40529e..8a0c56923a5 100755
--- a/Build/source/texk/makeindexk/configure
+++ b/Build/source/texk/makeindexk/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for makeindex (TeX Live) 2.16.
+# Generated by GNU Autoconf 2.71 for makeindex (TeX Live) 2.17.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -629,8 +629,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='makeindex (TeX Live)'
PACKAGE_TARNAME='makeindex--tex-live-'
-PACKAGE_VERSION='2.16'
-PACKAGE_STRING='makeindex (TeX Live) 2.16'
+PACKAGE_VERSION='2.17'
+PACKAGE_STRING='makeindex (TeX Live) 2.17'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1374,7 +1374,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures makeindex (TeX Live) 2.16 to adapt to many kinds of systems.
+\`configure' configures makeindex (TeX Live) 2.17 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1446,7 +1446,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of makeindex (TeX Live) 2.16:";;
+ short | recursive ) echo "Configuration of makeindex (TeX Live) 2.17:";;
esac
cat <<\_ACEOF
@@ -1565,7 +1565,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-makeindex (TeX Live) configure 2.16
+makeindex (TeX Live) configure 2.17
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2089,7 +2089,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by makeindex (TeX Live) $as_me 2.16, which was
+It was created by makeindex (TeX Live) $as_me 2.17, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -8411,7 +8411,7 @@ fi
# Define the identity of the package.
PACKAGE='makeindex--tex-live-'
- VERSION='2.16'
+ VERSION='2.17'
# Some tools Automake needs.
@@ -14563,7 +14563,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-makeindex (TeX Live) config.lt 2.16
+makeindex (TeX Live) config.lt 2.17
configured by $0, generated by GNU Autoconf 2.71.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16219,7 +16219,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by makeindex (TeX Live) $as_me 2.16, which was
+This file was extended by makeindex (TeX Live) $as_me 2.17, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16287,7 +16287,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-makeindex (TeX Live) config.status 2.16
+makeindex (TeX Live) config.status 2.17
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/makeindexk/configure.ac b/Build/source/texk/makeindexk/configure.ac
index 4ae1fc21feb..5c1b6cf4fef 100644
--- a/Build/source/texk/makeindexk/configure.ac
+++ b/Build/source/texk/makeindexk/configure.ac
@@ -6,7 +6,7 @@ dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([makeindex (TeX Live)], [2.16], [tex-k@tug.org])
+AC_INIT([makeindex (TeX Live)], [2.17], [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([mkind.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/makeindexk/mkind.h b/Build/source/texk/makeindexk/mkind.h
index 2860bbc03c5..33f65c269bc 100644
--- a/Build/source/texk/makeindexk/mkind.h
+++ b/Build/source/texk/makeindexk/mkind.h
@@ -343,9 +343,9 @@ If any array overflows, please report to tex-k@tug.org.
/*====================================================================*/
#if USE_KPATHSEA
-#define VERSION "version 2.16 [TeX Live " TEX_LIVE_VERSION "] (kpathsea + Thai support)"
+#define VERSION "version 2.17 [TeX Live " TEX_LIVE_VERSION "] (kpathsea + Thai support)"
#else
-#define VERSION "version 2.16 [19-Sep-2021] (with Thai support)"
+#define VERSION "version 2.17 [22-May-2022] (with Thai support)"
#endif
#define PUT_VERSION { \
diff --git a/Build/source/texk/makeindexk/scanid.c b/Build/source/texk/makeindexk/scanid.c
index aea5272d47e..cda14868147 100644
--- a/Build/source/texk/makeindexk/scanid.c
+++ b/Build/source/texk/makeindexk/scanid.c
@@ -418,6 +418,39 @@ static int
scan_no(char no[], int npg[], short *count, short *type)
{
int i = 1;
+ static int type_guess[PAGEFIELD_MAX] =
+ {EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY};
+
+ /* heuristic detection if a letter is Roman or Alpha ::
+ "IVX" as roman number since I=1, V=5, X=10 are quite small
+ "LCDM" as alphabet since L=50, C=100, D=100, M=1000 are quite large */
+ if (isdigit((unsigned char)no[0])) {
+ type_guess[*count] = ARAB;
+ } else if (IS_ROMAN_LOWER(no[0]) && IS_ALPHA_LOWER(no[0])
+ && strchr(page_prec,ROMAN_LOWER) && strchr(page_prec,ALPHA_LOWER)) {
+ if (strspn(no,"ivxlcdm")==1 /* ambiguous */
+ && type_guess[*count] != ROML && type_guess[*count] != ALPL) {
+ type_guess[*count] = strspn(no,"ivx")==1 ? ROML : ALPL;
+ }
+ if (strspn(no,"ivxlcdm")>1) type_guess[*count] = ROML;
+ } else if (IS_ROMAN_UPPER(no[0]) && IS_ALPHA_UPPER(no[0])
+ && strchr(page_prec,ROMAN_LOWER) && strchr(page_prec,ALPHA_LOWER)) {
+ if (strspn(no,"IVXLCDM")==1 /* ambiguous */
+ && type_guess[*count] != ROMU && type_guess[*count] != ALPU) {
+ type_guess[*count] = strspn(no,"IVX")==1 ? ROMU : ALPU;
+ }
+ if (strspn(no,"IVXLCDM")>1) type_guess[*count] = ROMU;
+ } else if (IS_ROMAN_LOWER(no[0]) && strchr(page_prec,ROMAN_LOWER)) {
+ type_guess[*count] = ROML;
+ } else if (IS_ROMAN_UPPER(no[0]) && strchr(page_prec,ROMAN_UPPER)) {
+ type_guess[*count] = ROMU;
+ } else if (IS_ALPHA_LOWER(no[0]) && strchr(page_prec,ALPHA_LOWER)) {
+ type_guess[*count] = ALPL;
+ } else if (IS_ALPHA_UPPER(no[0]) && strchr(page_prec,ALPHA_UPPER)) {
+ type_guess[*count] = ALPU;
+ } else {
+ type_guess[*count] = EMPTY;
+ }
if (isdigit((unsigned char)no[0])) {
*type = ARAB;
@@ -425,13 +458,13 @@ scan_no(char no[], int npg[], short *count, short *type)
return (FALSE);
/* simple heuristic to determine if a letter is Roman or Alpha */
} else if (IS_ROMAN_LOWER(no[0]) && strchr(page_prec,ROMAN_LOWER) &&
- (!strchr(page_prec,ALPHA_LOWER) || (!IS_COMPOSITOR))) {
+ (!strchr(page_prec,ALPHA_LOWER) || type_guess[*count] == ROML) ) {
*type = ROML;
if (!scan_roman_lower(no, npg, count))
return (FALSE);
/* simple heuristic to determine if a letter is Roman or Alpha */
} else if (IS_ROMAN_UPPER(no[0]) && strchr(page_prec,ROMAN_UPPER) &&
- (!strchr(page_prec,ALPHA_UPPER) || (!IS_COMPOSITOR))) {
+ (!strchr(page_prec,ALPHA_UPPER) || type_guess[*count] == ROMU) ) {
*type = ROMU;
if (!scan_roman_upper(no, npg, count))
return (FALSE);
diff --git a/Build/source/texk/makeindexk/tests/makeindex.test b/Build/source/texk/makeindexk/tests/makeindex.test
index 5790d8abdc4..5df437c638c 100755
--- a/Build/source/texk/makeindexk/tests/makeindex.test
+++ b/Build/source/texk/makeindexk/tests/makeindex.test
@@ -7,44 +7,67 @@
TEXMFCNF=$srcdir/../kpathsea
export TEXMFCNF
-rm -f sample.* range*.* pprec*.*
+rm -f sample.* range*.* pprec*.* romalp*.*
+rc=0
./makeindex $srcdir/tests/sample.idx -o sample.ind1 -t sample.ilg1 \
- && diff $srcdir/tests/sample.ind sample.ind1 || exit 1
+ && diff $srcdir/tests/sample.ind sample.ind1 || rc=1
cat $srcdir/tests/sample.idx | ./makeindex >sample.ind2 2>sample.ilg2 \
- && diff $srcdir/tests/sample.ind sample.ind2 || exit 1
+ && diff $srcdir/tests/sample.ind sample.ind2 || rc=2
+
# test for range suffix_2p, suffix_3p, suffix_mp
-./makeindex -s $srcdir/tests/range1.ist $srcdir/tests/range.idx \
- -o range1.ind1 -t range1.ilg \
- && diff $srcdir/tests/range1.ind range1.ind1 || exit 1
-./makeindex -s $srcdir/tests/range2.ist $srcdir/tests/range.idx \
- -o range2.ind1 -t range2.ilg \
- && diff $srcdir/tests/range2.ind range2.ind1 || exit 1
+for num in 1 2 3; do
+./makeindex -s $srcdir/tests/range$num.ist $srcdir/tests/range.idx \
+ -o range$num.ind1 -t range$num.ilg \
+ && diff $srcdir/tests/range$num.ind range$num.ind1 || rc=3
+done
-./makeindex -s $srcdir/tests/range3.ist $srcdir/tests/range.idx \
- -o range3.ind1 -t range3.ilg \
- && diff $srcdir/tests/range3.ind range3.ind1 || exit 1
# test for page_precedence and suffix_3p
-./makeindex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecA.idx \
- -o pprecA-0.ind1 -t pprecA-0.ilg \
- && diff $srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 1
-./makeindex -s $srcdir/tests/pprec1.ist $srcdir/tests/pprecA.idx \
- -o pprecA-1.ind1 -t pprecA-1.ilg \
- && diff $srcdir/tests/pprecA-1.ind pprecA-1.ind1 || exit 1
+sfx=A
+for num in 0 1 2; do
+./makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \
+ -o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \
+ && diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=4
+done
+sfx=B
+for num in 0 3 4; do
+./makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/pprec$sfx.idx \
+ -o pprec$sfx-$num.ind1 -t pprec$sfx-$num.ilg \
+ && diff $srcdir/tests/pprec$sfx-$num.ind pprec$sfx-$num.ind1 || rc=5
+done
+
+
+# test for page_precedence, heuristic detection if a letter is Roman or Alpha
-./makeindex -s $srcdir/tests/pprec2.ist $srcdir/tests/pprecA.idx \
- -o pprecA-2.ind1 -t pprecA-2.ilg \
- && diff $srcdir/tests/pprecA-2.ind pprecA-2.ind1 || exit 1
+sfx=A
+for num in 5 6; do
+./makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=6
+done
+sfx=B
+for num in 5 6 7; do
+./makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=7
+done
+sfx=C
+for num in 5; do
+./makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=8
+done
+sfx=D
+for num in 5 6 7; do
+./makeindex -s $srcdir/tests/pprec$num.ist $srcdir/tests/romalp$sfx.idx \
+ -o romalp$sfx-$num.ind1 -t romalp$sfx-$num.ilg \
+ && diff $srcdir/tests/romalp$sfx-$num.ind romalp$sfx-$num.ind1 || rc=9
+done
-./makeindex -s $srcdir/tests/pprec3.ist $srcdir/tests/pprecB.idx \
- -o pprecB-3.ind1 -t pprecB-3.ilg \
- && diff $srcdir/tests/pprecB-3.ind pprecB-3.ind1 || exit 1
-./makeindex -s $srcdir/tests/pprec4.ist $srcdir/tests/pprecB.idx \
- -o pprecB-4.ind1 -t pprecB-4.ilg \
- && diff $srcdir/tests/pprecB-4.ind pprecB-4.ind1 || exit 1
+exit $rc
diff --git a/Build/source/texk/makeindexk/tests/pprec5.ist b/Build/source/texk/makeindexk/tests/pprec5.ist
new file mode 100644
index 00000000000..400d70c7862
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/pprec5.ist
@@ -0,0 +1,3 @@
+% page_precedence "rnaRA"
+
+line_max 299
diff --git a/Build/source/texk/makeindexk/tests/pprec6.ist b/Build/source/texk/makeindexk/tests/pprec6.ist
new file mode 100644
index 00000000000..5463ac25a46
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/pprec6.ist
@@ -0,0 +1,3 @@
+page_precedence "rnR"
+
+line_max 299
diff --git a/Build/source/texk/makeindexk/tests/pprec7.ist b/Build/source/texk/makeindexk/tests/pprec7.ist
new file mode 100644
index 00000000000..f600c5b230f
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/pprec7.ist
@@ -0,0 +1,3 @@
+page_precedence "naA"
+
+line_max 299
diff --git a/Build/source/texk/makeindexk/tests/pprecB-0.ind b/Build/source/texk/makeindexk/tests/pprecB-0.ind
new file mode 100644
index 00000000000..1e23d9fb4a7
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/pprecB-0.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA[[delim0]]1[[sfx 3p]], a[[sfx 3p]], A[[sfx 3p]]
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/rangeA1.ind b/Build/source/texk/makeindexk/tests/rangeA1.ind
new file mode 100644
index 00000000000..e9bd52d62ae
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/rangeA1.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, II-10, II-20, I-13, I-15[[sfx mp]]
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/rangeA2.ind b/Build/source/texk/makeindexk/tests/rangeA2.ind
new file mode 100644
index 00000000000..7b2ccd6d6a9
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/rangeA2.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, II-10, II-20, I-13, I-15[[sfx 3p]]
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/rangeA3.ind b/Build/source/texk/makeindexk/tests/rangeA3.ind
new file mode 100644
index 00000000000..7b2ccd6d6a9
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/rangeA3.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, II-10, II-20, I-13, I-15[[sfx 3p]]
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpA-5.ind b/Build/source/texk/makeindexk/tests/romalpA-5.ind
new file mode 100644
index 00000000000..fd0b0ec4490
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpA-5.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, I-13, I-15--I-17, II-10, II-20, II-30
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpA-6.ind b/Build/source/texk/makeindexk/tests/romalpA-6.ind
new file mode 100644
index 00000000000..fd0b0ec4490
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpA-6.ind
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item foo, I-13, I-15--I-17, II-10, II-20, II-30
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpA.idx b/Build/source/texk/makeindexk/tests/romalpA.idx
new file mode 100644
index 00000000000..03b0646678b
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpA.idx
@@ -0,0 +1,7 @@
+\indexentry{foo}{I-13}
+\indexentry{foo}{I-15}
+\indexentry{foo}{I-16}
+\indexentry{foo}{I-17}
+\indexentry{foo}{II-10}
+\indexentry{foo}{II-20}
+\indexentry{foo}{II-30}
diff --git a/Build/source/texk/makeindexk/tests/romalpB-5.ind b/Build/source/texk/makeindexk/tests/romalpB-5.ind
new file mode 100644
index 00000000000..de3d9903bb8
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpB-5.ind
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-i-10-C-c, I-i-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c, I-l-10-C-c, I-l-20-C-c, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-m-10-C-c, I-m-20-C-c
+ \item baz, I-i-10-C-c, I-i-10-D-c, I-i-10-I-c, I-i-10-L-c, I-i-10-M-c, I-i-10-V-c, I-i-10-X-c, I-i-20-C-c, I-i-20-D-c, I-i-20-I-c, I-i-20-L-c, I-i-20-M-c, I-i-20-V-c, I-i-20-X-c
+
+ \indexspace
+
+ \item foo, I-i-10-C-c, I-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c, L-i-10-C-c, L-i-20-C-c, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, M-i-10-C-c, M-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-c, I-i-10-C-d, I-i-10-C-i, I-i-10-C-l, I-i-10-C-m, I-i-10-C-v, I-i-10-C-x, I-i-20-C-c, I-i-20-C-d, I-i-20-C-i, I-i-20-C-l, I-i-20-C-m, I-i-20-C-v, I-i-20-C-x
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpB-6.ind b/Build/source/texk/makeindexk/tests/romalpB-6.ind
new file mode 100644
index 00000000000..b5d7d040b54
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpB-6.ind
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-i-10-C-c, I-i-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c, I-l-10-C-c, I-l-20-C-c, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-m-10-C-c, I-m-20-C-c
+ \item baz, I-i-10-I-c, I-i-10-V-c, I-i-10-X-c, I-i-10-L-c, I-i-10-C-c, I-i-10-D-c, I-i-10-M-c, I-i-20-I-c, I-i-20-V-c, I-i-20-X-c, I-i-20-L-c, I-i-20-C-c, I-i-20-D-c, I-i-20-M-c
+
+ \indexspace
+
+ \item foo, I-i-10-C-c, I-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c, L-i-10-C-c, L-i-20-C-c, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, M-i-10-C-c, M-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-i, I-i-10-C-v, I-i-10-C-x, I-i-10-C-l, I-i-10-C-c, I-i-10-C-d, I-i-10-C-m, I-i-20-C-i, I-i-20-C-v, I-i-20-C-x, I-i-20-C-l, I-i-20-C-c, I-i-20-C-d, I-i-20-C-m
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpB-7.ind b/Build/source/texk/makeindexk/tests/romalpB-7.ind
new file mode 100644
index 00000000000..f65c311dfe4
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpB-7.ind
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-i-10-C-c, I-i-20-C-c, I-l-10-C-c, I-l-20-C-c, I-m-10-C-c, I-m-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c
+ \item baz, I-i-10-C-c, I-i-10-D-c, I-i-10-I-c, I-i-10-L-c, I-i-10-M-c, I-i-10-V-c, I-i-10-X-c, I-i-20-C-c, I-i-20-D-c, I-i-20-I-c, I-i-20-L-c, I-i-20-M-c, I-i-20-V-c, I-i-20-X-c
+
+ \indexspace
+
+ \item foo, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, I-i-10-C-c, I-i-20-C-c, L-i-10-C-c, L-i-20-C-c, M-i-10-C-c, M-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-c, I-i-10-C-d, I-i-10-C-i, I-i-10-C-l, I-i-10-C-m, I-i-10-C-v, I-i-10-C-x, I-i-20-C-c, I-i-20-C-d, I-i-20-C-i, I-i-20-C-l, I-i-20-C-m, I-i-20-C-v, I-i-20-C-x
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpB.idx b/Build/source/texk/makeindexk/tests/romalpB.idx
new file mode 100644
index 00000000000..a56460db3b7
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpB.idx
@@ -0,0 +1,60 @@
+\indexentry{foo}{I-i-10-C-c}
+\indexentry{foo}{I-i-20-C-c}
+\indexentry{foo}{V-i-10-C-c}
+\indexentry{foo}{V-i-20-C-c}
+\indexentry{foo}{X-i-10-C-c}
+\indexentry{foo}{X-i-20-C-c}
+\indexentry{foo}{L-i-10-C-c}
+\indexentry{foo}{L-i-20-C-c}
+\indexentry{foo}{C-i-10-C-c}
+\indexentry{foo}{C-i-20-C-c}
+\indexentry{foo}{D-i-10-C-c}
+\indexentry{foo}{D-i-20-C-c}
+\indexentry{foo}{M-i-10-C-c}
+\indexentry{foo}{M-i-20-C-c}
+
+\indexentry{bar}{I-i-10-C-c}
+\indexentry{bar}{I-i-20-C-c}
+\indexentry{bar}{I-v-10-C-c}
+\indexentry{bar}{I-v-20-C-c}
+\indexentry{bar}{I-x-10-C-c}
+\indexentry{bar}{I-x-20-C-c}
+\indexentry{bar}{I-l-10-C-c}
+\indexentry{bar}{I-l-20-C-c}
+\indexentry{bar}{I-c-10-C-c}
+\indexentry{bar}{I-c-20-C-c}
+\indexentry{bar}{I-d-10-C-c}
+\indexentry{bar}{I-d-20-C-c}
+\indexentry{bar}{I-m-10-C-c}
+\indexentry{bar}{I-m-20-C-c}
+
+\indexentry{baz}{I-i-10-C-c}
+\indexentry{baz}{I-i-20-C-c}
+\indexentry{baz}{I-i-10-D-c}
+\indexentry{baz}{I-i-20-D-c}
+\indexentry{baz}{I-i-10-I-c}
+\indexentry{baz}{I-i-20-I-c}
+\indexentry{baz}{I-i-10-L-c}
+\indexentry{baz}{I-i-20-L-c}
+\indexentry{baz}{I-i-10-M-c}
+\indexentry{baz}{I-i-20-M-c}
+\indexentry{baz}{I-i-10-V-c}
+\indexentry{baz}{I-i-20-V-c}
+\indexentry{baz}{I-i-10-X-c}
+\indexentry{baz}{I-i-20-X-c}
+
+\indexentry{qux}{I-i-10-C-c}
+\indexentry{qux}{I-i-20-C-c}
+\indexentry{qux}{I-i-10-C-d}
+\indexentry{qux}{I-i-20-C-d}
+\indexentry{qux}{I-i-10-C-i}
+\indexentry{qux}{I-i-20-C-i}
+\indexentry{qux}{I-i-10-C-l}
+\indexentry{qux}{I-i-20-C-l}
+\indexentry{qux}{I-i-10-C-m}
+\indexentry{qux}{I-i-20-C-m}
+\indexentry{qux}{I-i-10-C-v}
+\indexentry{qux}{I-i-20-C-v}
+\indexentry{qux}{I-i-10-C-x}
+\indexentry{qux}{I-i-20-C-x}
+
diff --git a/Build/source/texk/makeindexk/tests/romalpC-5.ind b/Build/source/texk/makeindexk/tests/romalpC-5.ind
new file mode 100644
index 00000000000..2edc90d1ef9
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpC-5.ind
@@ -0,0 +1,14 @@
+\begin{theindex}
+
+ \item bar, I-i-10-C-c, I-i-20-C-c, I-ii-10-C-c, I-ii-20-C-c, I-iii-10-C-c, I-iii-20-C-c, I-v-10-C-c, I-v-20-C-c, I-x-10-C-c, I-x-20-C-c, I-l-10-C-c, I-l-20-C-c, I-c-10-C-c, I-c-20-C-c, I-d-10-C-c, I-d-20-C-c, I-m-10-C-c, I-m-20-C-c
+ \item baz, I-i-10-A-c, I-i-10-B-c, I-i-10-C-c, I-i-10-D-c, I-i-10-I-c, I-i-10-L-c, I-i-10-M-c, I-i-10-V-c, I-i-10-X-c, I-i-20-A-c, I-i-20-B-c, I-i-20-C-c, I-i-20-D-c, I-i-20-I-c, I-i-20-L-c, I-i-20-M-c, I-i-20-V-c, I-i-20-X-c
+
+ \indexspace
+
+ \item foo, I-i-10-C-c, I-i-20-C-c, II-i-10-C-c, II-i-20-C-c, III-i-10-C-c, III-i-20-C-c, V-i-10-C-c, V-i-20-C-c, X-i-10-C-c, X-i-20-C-c, L-i-10-C-c, L-i-20-C-c, C-i-10-C-c, C-i-20-C-c, D-i-10-C-c, D-i-20-C-c, M-i-10-C-c, M-i-20-C-c
+
+ \indexspace
+
+ \item qux, I-i-10-C-a--I-i-10-C-d, I-i-10-C-i, I-i-10-C-l, I-i-10-C-m, I-i-10-C-v, I-i-10-C-x, I-i-20-C-a--I-i-20-C-d, I-i-20-C-i, I-i-20-C-l, I-i-20-C-m, I-i-20-C-v, I-i-20-C-x
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpC.idx b/Build/source/texk/makeindexk/tests/romalpC.idx
new file mode 100644
index 00000000000..208686338a6
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpC.idx
@@ -0,0 +1,76 @@
+\indexentry{foo}{I-i-10-C-c}
+\indexentry{foo}{I-i-20-C-c}
+\indexentry{foo}{II-i-10-C-c}
+\indexentry{foo}{II-i-20-C-c}
+\indexentry{foo}{III-i-10-C-c}
+\indexentry{foo}{III-i-20-C-c}
+\indexentry{foo}{V-i-10-C-c}
+\indexentry{foo}{V-i-20-C-c}
+\indexentry{foo}{X-i-10-C-c}
+\indexentry{foo}{X-i-20-C-c}
+\indexentry{foo}{L-i-10-C-c}
+\indexentry{foo}{L-i-20-C-c}
+\indexentry{foo}{C-i-10-C-c}
+\indexentry{foo}{C-i-20-C-c}
+\indexentry{foo}{D-i-10-C-c}
+\indexentry{foo}{D-i-20-C-c}
+\indexentry{foo}{M-i-10-C-c}
+\indexentry{foo}{M-i-20-C-c}
+
+\indexentry{bar}{I-i-10-C-c}
+\indexentry{bar}{I-i-20-C-c}
+\indexentry{bar}{I-ii-10-C-c}
+\indexentry{bar}{I-ii-20-C-c}
+\indexentry{bar}{I-iii-10-C-c}
+\indexentry{bar}{I-iii-20-C-c}
+\indexentry{bar}{I-v-10-C-c}
+\indexentry{bar}{I-v-20-C-c}
+\indexentry{bar}{I-x-10-C-c}
+\indexentry{bar}{I-x-20-C-c}
+\indexentry{bar}{I-l-10-C-c}
+\indexentry{bar}{I-l-20-C-c}
+\indexentry{bar}{I-c-10-C-c}
+\indexentry{bar}{I-c-20-C-c}
+\indexentry{bar}{I-d-10-C-c}
+\indexentry{bar}{I-d-20-C-c}
+\indexentry{bar}{I-m-10-C-c}
+\indexentry{bar}{I-m-20-C-c}
+
+\indexentry{baz}{I-i-10-A-c}
+\indexentry{baz}{I-i-20-A-c}
+\indexentry{baz}{I-i-10-B-c}
+\indexentry{baz}{I-i-20-B-c}
+\indexentry{baz}{I-i-10-C-c}
+\indexentry{baz}{I-i-20-C-c}
+\indexentry{baz}{I-i-10-D-c}
+\indexentry{baz}{I-i-20-D-c}
+\indexentry{baz}{I-i-10-I-c}
+\indexentry{baz}{I-i-20-I-c}
+\indexentry{baz}{I-i-10-L-c}
+\indexentry{baz}{I-i-20-L-c}
+\indexentry{baz}{I-i-10-M-c}
+\indexentry{baz}{I-i-20-M-c}
+\indexentry{baz}{I-i-10-V-c}
+\indexentry{baz}{I-i-20-V-c}
+\indexentry{baz}{I-i-10-X-c}
+\indexentry{baz}{I-i-20-X-c}
+
+\indexentry{qux}{I-i-10-C-a}
+\indexentry{qux}{I-i-20-C-a}
+\indexentry{qux}{I-i-10-C-b}
+\indexentry{qux}{I-i-20-C-b}
+\indexentry{qux}{I-i-10-C-c}
+\indexentry{qux}{I-i-20-C-c}
+\indexentry{qux}{I-i-10-C-d}
+\indexentry{qux}{I-i-20-C-d}
+\indexentry{qux}{I-i-10-C-i}
+\indexentry{qux}{I-i-20-C-i}
+\indexentry{qux}{I-i-10-C-l}
+\indexentry{qux}{I-i-20-C-l}
+\indexentry{qux}{I-i-10-C-m}
+\indexentry{qux}{I-i-20-C-m}
+\indexentry{qux}{I-i-10-C-v}
+\indexentry{qux}{I-i-20-C-v}
+\indexentry{qux}{I-i-10-C-x}
+\indexentry{qux}{I-i-20-C-x}
+
diff --git a/Build/source/texk/makeindexk/tests/romalpD-5.ind b/Build/source/texk/makeindexk/tests/romalpD-5.ind
new file mode 100644
index 00000000000..f85a08325dd
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpD-5.ind
@@ -0,0 +1,9 @@
+\begin{theindex}
+
+ \item bar, 1--3, c, d, i, l, m, v, x, I, V, X, L, C, D, M
+
+ \indexspace
+
+ \item foo, i, v, x, l, c, d, m, 1--3, C, D, I, L, M, V, X
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpD-6.ind b/Build/source/texk/makeindexk/tests/romalpD-6.ind
new file mode 100644
index 00000000000..7514b219478
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpD-6.ind
@@ -0,0 +1,9 @@
+\begin{theindex}
+
+ \item bar, i, v, x, l, c, d, m, 1--3, I, V, X, L, C, D, M
+
+ \indexspace
+
+ \item foo, i, v, x, l, c, d, m, 1--3, I, V, X, L, C, D, M
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpD-7.ind b/Build/source/texk/makeindexk/tests/romalpD-7.ind
new file mode 100644
index 00000000000..779a39c4ffb
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpD-7.ind
@@ -0,0 +1,9 @@
+\begin{theindex}
+
+ \item bar, 1--3, c, d, i, l, m, v, x, C, D, I, L, M, V, X
+
+ \indexspace
+
+ \item foo, 1--3, c, d, i, l, m, v, x, C, D, I, L, M, V, X
+
+\end{theindex}
diff --git a/Build/source/texk/makeindexk/tests/romalpD.idx b/Build/source/texk/makeindexk/tests/romalpD.idx
new file mode 100644
index 00000000000..3247aefbf79
--- /dev/null
+++ b/Build/source/texk/makeindexk/tests/romalpD.idx
@@ -0,0 +1,35 @@
+\indexentry{foo}{1}
+\indexentry{foo}{2}
+\indexentry{foo}{3}
+\indexentry{foo}{C}
+\indexentry{foo}{D}
+\indexentry{foo}{I}
+\indexentry{foo}{L}
+\indexentry{foo}{M}
+\indexentry{foo}{V}
+\indexentry{foo}{X}
+\indexentry{foo}{i}
+\indexentry{foo}{v}
+\indexentry{foo}{x}
+\indexentry{foo}{l}
+\indexentry{foo}{c}
+\indexentry{foo}{d}
+\indexentry{foo}{m}
+
+\indexentry{bar}{1}
+\indexentry{bar}{2}
+\indexentry{bar}{3}
+\indexentry{bar}{I}
+\indexentry{bar}{V}
+\indexentry{bar}{X}
+\indexentry{bar}{L}
+\indexentry{bar}{C}
+\indexentry{bar}{D}
+\indexentry{bar}{M}
+\indexentry{bar}{c}
+\indexentry{bar}{d}
+\indexentry{bar}{i}
+\indexentry{bar}{l}
+\indexentry{bar}{m}
+\indexentry{bar}{v}
+\indexentry{bar}{x}