summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-09-08 21:06:15 +0000
committerKarl Berry <karl@freefriends.org>2020-09-08 21:06:15 +0000
commit8e729e92f045234de5911140817f9815cecc614f (patch)
treefc05f7463c7bbd6d2bc9d9f2c23fce1bab5497fe
parentb28b17e09508d5a9d60e6dd26b552c4afac2fdae (diff)
xindex (8sep20)
git-svn-id: svn://tug.org/texlive/trunk@56295 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/xindex/xindex.lua2
-rw-r--r--Master/texmf-dist/doc/lualatex/xindex/CHANGELOG3
-rw-r--r--Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdfbin389276 -> 408617 bytes
-rw-r--r--Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex108
-rwxr-xr-xMaster/texmf-dist/scripts/xindex/xindex.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua14
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua2
16 files changed, 116 insertions, 33 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua b/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
index 448c670b169..a29fdb0d65a 100755
--- a/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
+++ b/Build/source/texk/texlive/linked_scripts/xindex/xindex.lua
@@ -8,7 +8,7 @@
-----------------------------------------------------------------------
xindex = xindex or { }
- local version = 0.27
+ local version = 0.28
xindex.version = version
--xindex.self = "xindex"
diff --git a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
index 556cbc7ee3d..646ca927eb5 100644
--- a/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
+++ b/Master/texmf-dist/doc/lualatex/xindex/CHANGELOG
@@ -1,5 +1,6 @@
-0.26 2020-07-14 - fix for quote as escape char
+0.28 2020-09-08 - fix for new introduced bug
0.27 2020-09-01 - fix for identical subentries
+0.26 2020-07-14 - fix for quote as escape char
0.25 2020-06-11 - fix for correct hyperpage setting for |see{foo}
0.24 2020-06-07 - fix for correct hyperpage setting with folium pages
0.23 2020-06-02 - added support for the package LUA-UCA (Unicode Collation Algorithm)
diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
index db0c8f01253..e20204c2809 100644
--- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
+++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
index 42517580502..c890f1b7d98 100644
--- a/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
+++ b/Master/texmf-dist/doc/lualatex/xindex/xindex-doc.tex
@@ -80,7 +80,7 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\xIndexVersion{#2}}
-\setVersion{version = 0.27}% can be automatically changed by perl
+\setVersion{version = 0.28}% can be automatically changed by perl
\setkeys{dtk}{cleanup=true,force=false}
@@ -90,6 +90,8 @@
\date{}
\begin{document}
\maketitle
+\thispagestyle{empty}
+\enlargethispage{1cm}
\tableofcontents
\vfill
@@ -768,7 +770,7 @@ Using the package \Lpack{hyperref} is no problem:
crop,
xindex,
xindexOptions=-l de,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -828,7 +830,7 @@ of the same type, so we get \texttt{1f} in the output.
crop,
xindex,
xindexOptions=-l de,
- force=false,
+ force=false,,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -944,7 +946,7 @@ Internally exists a function \verb|compressPageList| which is used if no
crop,
xindex,
xindexOptions=-c HAdW-eKO,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1065,7 +1067,7 @@ The following example runs \verb|xindex -c dtk -l de -n <input>|
crop,
xindex,
xindexOptions=-c dtk -n -l de,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1125,7 +1127,7 @@ The following example runs \verb|xindex -c dtk -l de -n <input>|
\end{externalDocument}
-\subsection{Sublabels}
+%\subsection{Sublabels}
There are three predefined sublabels for \Lcs{subitems}. The program itself can handle more, there is
no limit for \Lprog{xindex}.
@@ -1213,7 +1215,7 @@ such commands are ignored. In the following example we put an horizontal line af
crop,
xindex,
xindexOptions=-l de,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1260,7 +1262,7 @@ the vertical space between different first letters:
crop,
xindex,
xindexOptions=-n,
- force,
+ force=false,,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1311,7 +1313,7 @@ In the documents preamble there is the definition:
crop,
xindex,
xindexOptions=-c header,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1454,7 +1456,7 @@ the \verb|xindex-???| series because uppercase letters are sorted before lowerca
crop,
xindex,
% xindexOptions=,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1508,7 +1510,7 @@ The same example sorted with the \verb|-a| or \verb|--nocasesensitive| has anoth
crop,
xindex,
xindexOptions=-a,
- force,
+ force=false,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1565,7 +1567,7 @@ and adds the program \Lprog{xindex} as the default program to \Lpack{imakeidx}.
crop,
xindex,
xindexOptions=-l de,
- force,
+ force=true,
runs=2,code,docType=latex,
showFilename,
align=\centering,
@@ -1627,12 +1629,90 @@ in the argument of \Lcs{indexentry}.
\end{itemize}
+\appendix
+\section{Examples}
+\begin{externalDocument}[
+% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ mpwidth=0.55\linewidth,
+ pages={2},
+ frame=false,
+ compiler=lualatex --shell-escape,
+ crop,
+ xindex,
+ xindexOptions=-l de,
+ force,
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+ grfOptions={width=\linewidth},
+ lstOptions={columns=fixed}]{xindex}
+\documentclass[paper=a5]{scrartcl}
+\usepackage{libertinus-otf}
+\let\NewPage\newpage% only for demo
+\makeatletter
+\renewcommand\newpage{\NewPage\let\ps@plain\ps@empty}
+\makeatother
+%StartVisiblePreamble
+\usepackage[imakeidx]{xindex}
+\makeindex
+% Brian Dunn
+%StopVisiblePreamble
+\begin{document}
+First level.\index{first level}
+
+First level second level.\index{first level!second level}
+
+Duplicate.\index{first level!second level}
+
+Alpha.\index{alpha}
+
+Alpha beta.\index{alpha!beta}
+Alpha beta gamma.\index{alpha!beta!gamma}
+
+Duplicate alpha beta.\index{alpha!beta}
+
+Duplicate alpha beta gamma.\index{alpha!beta!gamma}
+
+\newpage
+\printindex
+\end{document}
+\end{externalDocument}
-%\nocite{*}
-%\printbibliography
+\begin{externalDocument}[
+% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+ mpwidth=0.55\linewidth,
+ pages={2},
+ frame=false,
+ compiler=lualatex --shell-escape,
+ crop,
+ xindex,
+ xindexOptions=-l de,
+ force,
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+ grfOptions={width=\linewidth},
+ lstOptions={columns=fixed}]{xindex}
+\documentclass[paper=a5]{scrartcl}
+\usepackage{libertinus-otf}
+\let\NewPage\newpage% only for demo
+\makeatletter
+\renewcommand\newpage{\NewPage\let\ps@plain\ps@empty}
+\makeatother
+%StartVisiblePreamble
+\usepackage[imakeidx]{xindex}
+\makeindex
+% Martin Sievers
+%StopVisiblePreamble
+\begin{document}
+Test \index{A!Test} oder auch \index{B!Test}
+\newpage
+\printindex
+\end{document}
+\end{externalDocument}
\printindex
diff --git a/Master/texmf-dist/scripts/xindex/xindex.lua b/Master/texmf-dist/scripts/xindex/xindex.lua
index 448c670b169..a29fdb0d65a 100755
--- a/Master/texmf-dist/scripts/xindex/xindex.lua
+++ b/Master/texmf-dist/scripts/xindex/xindex.lua
@@ -8,7 +8,7 @@
-----------------------------------------------------------------------
xindex = xindex or { }
- local version = 0.27
+ local version = 0.28
xindex.version = version
--xindex.self = "xindex"
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
index feab1a60a8b..91422306ce9 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-DIN2.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.27,
+ version = 0.28,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
index c439b2b27cd..9091ac6b371 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-HAdW-eKO.lua
@@ -9,7 +9,7 @@
-- configuration for index files of the Heidelberger Akademie der Wissenschaften
if not modules then modules = { } end modules ['xindex-HAdW-eKO'] = {
- version = 0.27,
+ version = 0.28,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
index 215485e42a7..fb11f3539e2 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua
@@ -6,7 +6,7 @@
-- LICENSE: LPPL1.3
-----------------------------------------------------------------------
-local info = { version = 0.27 }
+local info = { version = 0.28 }
-- check config
if pageNoPrefixDel ~= "" then
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
index e24b6390b17..e3d462ef220 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-common.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-common'] = {
- version = 0.27,
+ version = 0.28,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
index 6cead7bfc9f..50fdeb8463d 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg-uca.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-lua'] = {
- version = 0.27,
+ version = 0.28,
comment = "configuration to xindex-cfg-uca.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
index 29be9c9e92e..c82544f4027 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-cfg.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.27,
+ version = 0.28,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
index 3a6fe3daa3f..9ac0b9a26aa 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-dtk.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.27,
+ version = 0.28,
comment = "DTK configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
index fddae1d1295..4eed37024a3 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-lapp.lua
@@ -28,7 +28,7 @@
--~ n 2
--------------------------------
if not modules then modules = { } end modules ['xindex-lapp'] = {
- version = 0.27,
+ version = 0.28,
comment = "read parameter for xindex.lua",
author = "Steve Donovan",
copyright = "Steve Donovan",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
index 004c697fdd4..31e4d234260 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-lib.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-lib'] = {
- version = 0.27,
+ version = 0.28,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -846,8 +846,11 @@ end
function itemOutput(last, v, hyperpage)
local lastItems = last
+-- print (tostring("test: "),v["Entry"],lastItems[1],lastItems[2],lastItems[3],type(lastItems[1]),#lastItems)
local currentItems = {}
local Entry = v["Entry"]
+ local mainEntry = getItem(Entry,0) -- save current main letter
+ local lastmainEntry = last[1] -- save last main letter
-- require 'xindex-pretty'.dump(v) -- only for internal dump
local str
local excl = select(2,string.gsub(Entry,"!","!")) -- Number of !
@@ -863,10 +866,11 @@ function itemOutput(last, v, hyperpage)
lastItems[1] = Entry
else
for i = 1,excl+1 do
- currentItems[i] = getItem(Entry,i-1) -- 0 ! 1 ! 2 ! ...
+ currentItems[i] = getItem(Entry,i-1) -- 0 ! 1 ! 2 ! ... mainEntry
local item = "item"
writeLog(1,"itemOutput: currentItems[i]: "..tostring(currentItems[i]).."~= lastItems[i]: "..tostring(lastItems[i]).."\n",2)
- if (currentItems[i] ~= lastItems[i]) then
+ if (currentItems[i] ~= lastItems[i]) or (mainEntry ~= lastmainEntry) -- test if there is a new main entry
+ then
local space = " "
for j = 2,i do
item = "sub"..item -- get the sub...subitem
@@ -878,8 +882,6 @@ function itemOutput(last, v, hyperpage)
str = space.."\\"..item.." "..sublabels[i]..currentItems[i].."\n"
else
str = space.."\\"..item.." "..sublabels[i]..currentItems[i]..itemPageDelimiter.." "..getPageList(v,hyperpage).."\n"
--- set current (sub...)item to empty
- currentItems[i] = ""
end
for i, str0 in ipairs(escape_chars) do -- undo the escape char setting
str = string.gsub(str,str0[2],str0[3])
@@ -887,8 +889,8 @@ function itemOutput(last, v, hyperpage)
outFile:write(str); indLines=indLines+1
else
writeLog(1,"itemOutput: currentItems[i]: "..currentItems[i].."= lastItems[i]: "..lastItems[i].."\n",2)
- lastItems[i] = currentItems[i]
end
+ lastItems[i] = currentItems[i]
end
end
return lastItems
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
index adbc69ca9a3..769f91a7a1c 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-norsk.lua
@@ -8,7 +8,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-no'] = {
- version = 0.27,
+ version = 0.28,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
index 0a826997cad..793a434a79e 100644
--- a/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
+++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-pretty.lua
@@ -5,7 +5,7 @@
--
if not modules then modules = { } end modules ['xindex-pretty'] = {
- version = 0.27,
+ version = 0.28,
comment = "dump a Lua table for debugging",
author = "Steve Donovan",
copyright = "Steve Donovan",