summaryrefslogtreecommitdiff
path: root/indexing
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-13 03:01:48 +0000
committerNorbert Preining <norbert@preining.info>2023-07-13 03:01:48 +0000
commit09fc70b0ee7cb93f02510dd10df6b769b62c9d76 (patch)
tree2b31427a79c780325ede59c5a45c5e97bad0342a /indexing
parent0a2934080da36226eca1cdccfd08d76f67dca95a (diff)
CTAN sync 202307130301
Diffstat (limited to 'indexing')
-rw-r--r--indexing/xindex/CHANGELOG4
-rw-r--r--indexing/xindex/doc/xindex-doc.pdfbin565339 -> 580513 bytes
-rw-r--r--indexing/xindex/doc/xindex-doc.tex79
-rw-r--r--indexing/xindex/latex/xindex.sty6
-rw-r--r--indexing/xindex/lualatex/xindex-AU.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-HAdW-eKO.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-RU.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-base.lua24
-rw-r--r--indexing/xindex/lualatex/xindex-baselib.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-cfg-common.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-cfg-uca.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-cfg.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-danteedition.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-dtk.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-lib.lua29
-rw-r--r--indexing/xindex/lualatex/xindex-norsk.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-pretty.lua2
-rw-r--r--indexing/xindex/lualatex/xindex-yannis.lua2
-rwxr-xr-xindexing/xindex/scripts/xindex.lua15
19 files changed, 128 insertions, 53 deletions
diff --git a/indexing/xindex/CHANGELOG b/indexing/xindex/CHANGELOG
index 6cfaa2610f..e7718d89ab 100644
--- a/indexing/xindex/CHANGELOG
+++ b/indexing/xindex/CHANGELOG
@@ -1,3 +1,7 @@
+0.51 2023-07-10 - change \parenLeft|Right to \braceLeft|Right
+ - added option for a fix for hyperref if using "|
+0.50 2023-07-08 - fix for introduced bug
+0.49 2023-07-06 - fix for sorting symbols in unicode and ASCII
0.48 2023-06-21 - added option -g|--no_pagenumber
0.47 2023-01-20 - added support for russian language
0.46 2023-01-18 - fix for Czech character ch
diff --git a/indexing/xindex/doc/xindex-doc.pdf b/indexing/xindex/doc/xindex-doc.pdf
index b34251bf04..aae3e08927 100644
--- a/indexing/xindex/doc/xindex-doc.pdf
+++ b/indexing/xindex/doc/xindex-doc.pdf
Binary files differ
diff --git a/indexing/xindex/doc/xindex-doc.tex b/indexing/xindex/doc/xindex-doc.tex
index bf2dd746da..0c5974e046 100644
--- a/indexing/xindex/doc/xindex-doc.tex
+++ b/indexing/xindex/doc/xindex-doc.tex
@@ -81,7 +81,7 @@
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\xIndexVersion{#2}}
-\setVersion{version = 0.49}% can be automatically changed by perl
+\setVersion{version = 0.51}% can be automatically changed by perl
@@ -274,7 +274,7 @@ are alphabetized.
\makeatother
%StartVisiblePreamble
\usepackage{makeidx}\makeindex
-\usepackage{xindex}% for \left|\rightParen
+\usepackage{xindex}% for \barceLeft|Right
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
@@ -285,8 +285,8 @@ are alphabetized.
\item Doublequote \verb|"| \index{""}
\item Double doublequote \verb|""| \index{""""}
\item At character @ \index{At ("@)}\index{"@}
-\item Left paranthesis \{ \index{\parenLeft}
-\item Right paranthesis \} \index{\parenRight}
+\item Left paranthesis \{ \index{\braceLeft}
+\item Right paranthesis \} \index{\braceRight}
\end{itemize}
run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
\index{Etage} \index{Ètagé}
@@ -295,8 +295,8 @@ run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\ind
\end{document}
\end{externalDocument}
-It is by design that the parentheses \{ and \} cannot be used as index entry. The \emph{package}
-xindex defines the two commands \Lcs{parenLeft} and \Lcs{parenRight} which can be used instead
+It is by design that the braces \{ and \} cannot be used as index entry. The \emph{package}
+xindex defines the two commands \Lcs{braceLeft} and \Lcs{braceRight} which can be used instead
(see examples above and and below).
The same example without using unicode sorting (no option \Loption{-u}):
@@ -325,7 +325,7 @@ The same example without using unicode sorting (no option \Loption{-u}):
\makeatother
%StartVisiblePreamble
\usepackage{makeidx}\makeindex
-\usepackage{xindex}% for \left|\rightParen
+\usepackage{xindex}% for \braceLeft|\braceRight
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
@@ -336,8 +336,8 @@ The same example without using unicode sorting (no option \Loption{-u}):
\item Doublequote \verb|"| \index{""}
\item Double doublequote \verb|""| \index{""""}
\item At character @ \index{At ("@)}\index{"@}
-\item Left paranthesis \{ \index{\parenLeft}
-\item Right paranthesis \} \index{\parenRight}
+\item Left paranthesis \{ \index{\braceLeft}
+\item Right paranthesis \} \index{\braceRight}
\end{itemize}
run \texttt{xindex -u <file.idx>}\index{file.idx@\texttt{<file.idx>}|textit}\index{123}
\index{Etage} \index{Ètagé}
@@ -371,8 +371,8 @@ The two characters \verb|{}| cannot be used as \verb|\{\}| inside the argument o
The package \Lpack{xindex} defines the two helper macros
\begin{verbatim}
-\providecommand\parenLeft{\{}
-\providecommand\parenRight{\}}
+\providecommand\braceLeft{\{}
+\providecommand\braceRight{\}}
\end{verbatim}
The following example shows how to use it:
@@ -410,8 +410,8 @@ The following example shows how to use it:
\item Doublequote \verb|"| \index{>"}
\item Double doublequote \verb|""| \index{>">"}
\item At character @ \index{At (>@)}
-\item Group start \{ \index{\parenLeft}
-\item Group end \{ \index{\parenRight}
+\item Group start \{ \index{\braceLeft}
+\item Group end \{ \index{\braceRight}
\end{itemize}
Run \texttt{xindex} with \texttt{xindex -e ">"}\index{<file.idx>}\index{123}
\newpage
@@ -2231,6 +2231,59 @@ Foo\index{foo!bar2!baz2}
\end{document}
\end{externalDocument}
+The following example fixes a problem with \Lpack{hyperref} and escaping the | character
+
+
+\begin{externalDocument}[
+% grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
+% mpwidth=0.55\linewidth,
+ pages={3},
+ frame=false,
+ compiler=lualatex,
+ crop,
+ force=true,
+ shellesc,
+% xindex,
+% xindexOptions=-,
+ runs=2,code,docType=latex,
+ showFilename,
+ align=\centering,
+% grfOptions={width=\linewidth},
+ lstOptions={columns=fixed}]{xindex}
+%! lualatex --shell-escape
+\documentclass{article}
+\usepackage{libertinus}
+\let\NewPage\newpage% only for demo
+\makeatletter
+\renewcommand\newpage{\NewPage\let\ps@plain\ps@empty}
+\makeatother
+%StartVisiblePreamble
+\usepackage[imakeidx]{xindex}
+\usepackage{hvindex}
+\makeindex[columns=4, columnsep=6pt, options=--fix_hyperref]
+\usepackage[unicode]{hyperref}
+%StopVisiblePreamble
+\pagestyle{empty}
+\begin{document}
+ Symbols:\\
+ ! \index{"!} " \index{""} \# \index{#@\#} \$ \index{$@\$}
+ \% \index{%@\%} \& \index{&@\&} ' \index{'} ) \index{)}
+ ( \index{(} * \index{*} + \index{+} , \index{,@,\,}
+ - \index{-} . \index{.} / \index{/} : \index{:}
+ ; \index{;} < \index{<} = \index{=} > \index{>}
+ ? \index{?} @ \index{"@} [ \index{[} ] \index{]}
+ \_ \index{_@\_} ` \index{`} | \index{\textbar}
+ \newpage\index{"|}\index{123}\Index{Post}
+ \{ \index{\braceLeft} \} \index{\braceRight}
+ \textbackslash \index{\@\textbackslash}
+ \textasciicircum \index{^@\textasciicircum}
+ \textasciitilde \index{~@\textasciitilde}
+ Alphabet: \Index{Z},\Index{Zeppelin}\Index{Foo}\dots
+ \Index{...@\ldots}
+ \printindex
+\end{document}
+\end{externalDocument}
+
\printindex
\end{document}
diff --git a/indexing/xindex/latex/xindex.sty b/indexing/xindex/latex/xindex.sty
index 4832bdf75d..08f6c3e9a5 100644
--- a/indexing/xindex/latex/xindex.sty
+++ b/indexing/xindex/latex/xindex.sty
@@ -13,7 +13,7 @@
%
%
% -------------------------------------
-\ProvidesPackage{xindex}[2023/07/01 v. 0.03 write into an idx file (hv)]
+\ProvidesPackage{xindex}[2023/07/010 v. 0.04 write into an idx file (hv)]
%
\RequirePackage{xkeyval}
@@ -71,8 +71,8 @@
\def\writeidx#1{\write\@indexfile{\noexpand#1}}
\fi
-\providecommand\parenLeft{\{}
-\providecommand\parenRight{\}}
+\providecommand\braceLeft{\{}
+\providecommand\braceRight{\}}
\endinput
diff --git a/indexing/xindex/lualatex/xindex-AU.lua b/indexing/xindex/lualatex/xindex-AU.lua
index 5fa7dbfd3d..19044b88c3 100644
--- a/indexing/xindex/lualatex/xindex-AU.lua
+++ b/indexing/xindex/lualatex/xindex-AU.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-AU'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-HAdW-eKO.lua b/indexing/xindex/lualatex/xindex-HAdW-eKO.lua
index d08942fb9a..bb1155ac63 100644
--- a/indexing/xindex/lualatex/xindex-HAdW-eKO.lua
+++ b/indexing/xindex/lualatex/xindex-HAdW-eKO.lua
@@ -11,7 +11,7 @@
-- configuration for index files of the Heidelberger Akademie der Wissenschaften
if not modules then modules = { } end modules ['xindex-HAdW-eKO'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-RU.lua b/indexing/xindex/lualatex/xindex-RU.lua
index e9adda1935..8c52732d94 100644
--- a/indexing/xindex/lualatex/xindex-RU.lua
+++ b/indexing/xindex/lualatex/xindex-RU.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-RU'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration to xindex.lua",
author = "Alexey Kuznetzov",
copyright = "Herbert Voß",
diff --git a/indexing/xindex/lualatex/xindex-base.lua b/indexing/xindex/lualatex/xindex-base.lua
index 336142e30c..0999421e4d 100644
--- a/indexing/xindex/lualatex/xindex-base.lua
+++ b/indexing/xindex/lualatex/xindex-base.lua
@@ -8,7 +8,7 @@
-- $Id: xindex-base.lua 22 2022-02-07 12:18:15Z hvoss $
-----------------------------------------------------------------------
-local info = { version = 0.49 }
+local info = { version = 0.51 }
-- check config
if pageNoPrefixDel ~= "" then
@@ -47,19 +47,23 @@ if #lines == 0 then
os.exit()
end
+writeLog(1,"check for hyperpages ... ",0)
+hyperpage, lines = checkHyperpage(lines) -- hyperref used?
+writeLog(1,"done \n",0)
+if hyperpage then writeLog(1,"We have hyperpages.\n",1) end
+
print("Presort of \\indexentry lines")
-for _,l in pairs(lines) do print (l) end
+-- for _,l in pairs(lines) do print (l) end
table.sort(lines)
if vlevel > 1 then
print("Pre-Sorted index list:")
for _,l in pairs(lines) do print (l) end
end
-
if vlevel > 1 then
- writeLog(1,"--------------- Input data -----------------\n",2)
+ writeLog(1,"--------------- Input data (presorted) -----------------\n",2)
for _,l in pairs(lines) do writeLog(1,l.."\n",2) end
- writeLog(1,"--------------- end Input data -----------------\n",2)
+ writeLog(1,"--------------- end Input data -------------------------\n",2)
end
local Index = {} -- Entry = "Seitenzahl(en)"
@@ -67,10 +71,6 @@ local pages = {}
local noEntryfound
local noPagefound
-hyperpage, lines = checkHyperpage(lines) -- hyperref used?
-if hyperpage then writeLog(1,"We have hyperpages ... \n",1) end
-
---for _,l in pairs(lines) do print (l) end
writeLog(1,"Change escape chars with macros ... \n",0)
for k,v in ipairs(lines) do
@@ -178,8 +178,8 @@ if use_UCA then
else
for i=1, #NewIndex do
v = NewIndex[i]
- if findStr(v["SortKey"],"\\parenLeft") < 2 then v["SortKey"] = '{' v["sortChar"] = '{'end
- if findStr(v["SortKey"],"\\parenRight") < 2 then v["SortKey"] = '}' end
+ if findStr(v["SortKey"],"\\braceLeft") < 2 then v["SortKey"] = '{' v["sortChar"] = '{'end
+ if findStr(v["SortKey"],"\\braceRight") < 2 then v["SortKey"] = '}' end
if findStr(v["SortKey"],"//escapedexcl//") < 2 then v["SortKey"] = '!' end
if findStr(v["SortKey"],"//escapedquote//") < 2 then v["SortKey"] = '"' end
if findStr(v["SortKey"],"//escapedat//") < 2 then v["SortKey"] = '@' end
@@ -256,7 +256,7 @@ for k=1,#NewIndex do
else
charType = getCharType(firstChar)
end
--- print(">>"..v["sortChar"].." "..firstChar.." "..tostring(charType))
+ --print(">>"..v["sortChar"].." "..firstChar.." "..tostring(charType))
if charType == 0 then
numbers = false
symbols = true
diff --git a/indexing/xindex/lualatex/xindex-baselib.lua b/indexing/xindex/lualatex/xindex-baselib.lua
index 9d7c9188eb..645e0a9c2e 100644
--- a/indexing/xindex/lualatex/xindex-baselib.lua
+++ b/indexing/xindex/lualatex/xindex-baselib.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-baselib'] = {
- version = 0.49,
+ version = 0.51,
comment = "base library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-cfg-common.lua b/indexing/xindex/lualatex/xindex-cfg-common.lua
index 4793d1758d..76a1cead18 100644
--- a/indexing/xindex/lualatex/xindex-cfg-common.lua
+++ b/indexing/xindex/lualatex/xindex-cfg-common.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-common'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-cfg-uca.lua b/indexing/xindex/lualatex/xindex-cfg-uca.lua
index 014d3719d2..c55ffde269 100644
--- a/indexing/xindex/lualatex/xindex-cfg-uca.lua
+++ b/indexing/xindex/lualatex/xindex-cfg-uca.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg-lua'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration to xindex-cfg-uca.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-cfg.lua b/indexing/xindex/lualatex/xindex-cfg.lua
index 24098c5272..f713d0c246 100644
--- a/indexing/xindex/lualatex/xindex-cfg.lua
+++ b/indexing/xindex/lualatex/xindex-cfg.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.49,
+ version = 0.51,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-danteedition.lua b/indexing/xindex/lualatex/xindex-danteedition.lua
index f7d2d09b5f..61fad4027a 100644
--- a/indexing/xindex/lualatex/xindex-danteedition.lua
+++ b/indexing/xindex/lualatex/xindex-danteedition.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration file for the DANTE Edition",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-dtk.lua b/indexing/xindex/lualatex/xindex-dtk.lua
index 74de071b0a..b50cc1f10a 100644
--- a/indexing/xindex/lualatex/xindex-dtk.lua
+++ b/indexing/xindex/lualatex/xindex-dtk.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-cfg'] = {
- version = 0.49,
+ version = 0.51,
comment = "DTK configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-lib.lua b/indexing/xindex/lualatex/xindex-lib.lua
index f321765c64..86b103823b 100644
--- a/indexing/xindex/lualatex/xindex-lib.lua
+++ b/indexing/xindex/lualatex/xindex-lib.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-lib'] = {
- version = 0.49,
+ version = 0.51,
comment = "main library to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
@@ -558,20 +558,22 @@ function GenerateSortKey(a)
end
end
-- s:gsub("%s+", "") strip spaces
- if findStr(a["SortKey"],"\\parenLeft") < 2 then a["SortKey"] = '{ '..Apage end
- if findStr(a["SortKey"],"\\parenRight") < 2 then a["SortKey"] = '} '..Apage end
+ if findStr(a["SortKey"],"\\braceLeft") < 2 then a["SortKey"] = '{ '..Apage end
+ if findStr(a["SortKey"],"\\braceRight") < 2 then a["SortKey"] = '} '..Apage end
if findStr(a["SortKey"],"//escapedexcl//") < 2 then a["SortKey"] = '! '..Apage end
if findStr(a["SortKey"],"//escapedquote//") < 2 then a["SortKey"] = '" '..Apage end
if findStr(a["SortKey"],"//escapedat//") < 2 then a["SortKey"] = '@ '..Apage end
if findStr(a["SortKey"],"//escapedvert//") < 2 then a["SortKey"] = '| '..Apage end
+-- if findStr(a["SortKey"],"\\textbar") < 2 then a["SortKey"] = '| '..Apage end
-- a["SortKey"] = a["SortKey"]:gsub("%s+", "")
- -- print("Sortkey: " .. a["SortKey"])
if not use_UCA then -- test if it is a symbol after 9 and before A or after Z
if (a["SortKey"]:byte() > 57 and a["SortKey"]:byte() < 65) or
+ (a["SortKey"]:byte() > 90 and a["SortKey"]:byte() < 97) or
(a["SortKey"]:byte() > 122 and a["SortKey"]:byte() < 128) then -- symbol above digits
a["SortKey"] = "/"..a["SortKey"] -- sort it after /
end
end
+ -- print("Sortkey: " .. a["SortKey"])
end
function GenerateSortKeys(Index)
@@ -781,14 +783,27 @@ function checkHyperpage(lines)
end
end
if hyperpage then
+ if fix_hyperref then
+ writeLog(1,"fix vertical bar with hyperref ... ",0)
+ -- hyperref ignores the vertical bar in "| and also other escape chars
+ end
+ local sub_str = esc_char..'|hyperpage'
for i=1,#lines do
+ if fix_hyperref then
+ s = lines[i]:find(sub_str)
+ print(i,lines[i],s)
+ if s == nil then s = 0 end
+ if s == 2 then
+ lines[i] = lines[i]:gsub(sub_str, '\\textbar|hyperpage') -- "| -> \textbar
+ end
+ end
lines[i] = string.gsub(lines[i],'|?hyperpage}{','}{')
- end
+ end -- for
+ writeLog(1,"done\n",0)
return true, lines
- else
+ else -- no hyperpage
return false, lines
end
- return
end
function itemOutput(last, v, hyperpage)
diff --git a/indexing/xindex/lualatex/xindex-norsk.lua b/indexing/xindex/lualatex/xindex-norsk.lua
index 19289ee086..a1ba73c436 100644
--- a/indexing/xindex/lualatex/xindex-norsk.lua
+++ b/indexing/xindex/lualatex/xindex-norsk.lua
@@ -10,7 +10,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-no'] = {
- version = 0.49,
+ version = 0.51,
comment = "configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/lualatex/xindex-pretty.lua b/indexing/xindex/lualatex/xindex-pretty.lua
index ec6139e324..087e2eb16b 100644
--- a/indexing/xindex/lualatex/xindex-pretty.lua
+++ b/indexing/xindex/lualatex/xindex-pretty.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-pretty'] = {
- version = 0.49,
+ version = 0.51,
comment = "dump a Lua table for debugging",
author = "Steve Donovan",
copyright = "Steve Donovan",
diff --git a/indexing/xindex/lualatex/xindex-yannis.lua b/indexing/xindex/lualatex/xindex-yannis.lua
index dbf6c60e77..6ea612d779 100644
--- a/indexing/xindex/lualatex/xindex-yannis.lua
+++ b/indexing/xindex/lualatex/xindex-yannis.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
if not modules then modules = { } end modules ['xindex-yannis'] = {
- version = 0.49,
+ version = 0.51,
comment = "main configuration to xindex.lua",
author = "Herbert Voss",
copyright = "Herbert Voss",
diff --git a/indexing/xindex/scripts/xindex.lua b/indexing/xindex/scripts/xindex.lua
index ba35187763..dc539e193c 100755
--- a/indexing/xindex/scripts/xindex.lua
+++ b/indexing/xindex/scripts/xindex.lua
@@ -9,7 +9,7 @@
-----------------------------------------------------------------------
xindex = xindex or { }
- local version = 0.49
+ local version = 0.51
xindex.version = version
--xindex.self = "xindex"
@@ -45,6 +45,7 @@ local args = require ('xindex-lapp') [[
-v... Verbosity level; can be -v, -vv, -vvv
-c,--config (default cfg)
-e,--escapechar (default ")
+ -f,--fix_hyperref
-n,--noheadings
-a,--no_casesensitive
-b,--no_labels
@@ -112,7 +113,6 @@ if not useStdInput and not args.files_name then
os.exit()
end
-
if not useStdInput then
if vlevel == 3 then
print(tostring(nInFiles).." input file(s): ")
@@ -168,8 +168,6 @@ else
end
end
-
-
logFile = io.open(logfilename,"w+")
require('xindex-lib')
@@ -224,13 +222,13 @@ writeLog(2," ... done\n",0)
alphabet_lower_map = CreateCharListMap(alphabet_lower)
alphabet_upper_map = CreateCharListMap(alphabet_upper)
-local esc_char = args.escapechar
+esc_char = args.escapechar
writeLog(2,"Escapechar = "..esc_char.."\n",1)
escape_chars = { -- by default " is the escape char
{esc_char..'"', '//escapedquote//', '"' },
{esc_char..'@', '//escapedat//', '@' },
{esc_char..'|', '//escapedvert//', '|' },
- {esc_char..'!', '//escapedexcl//', '!' }
+ {esc_char..'!', '//escapedexcl//', '!' }
-- {esc_char..'%(', '//escapedparenleft//', '(' }, -- ( must beescaped
-- {esc_char..'%)', '//escapedparenright//',')' } -- ) " "
}
@@ -365,6 +363,11 @@ if not show_pagenumber then
writeLog(1,"Output with NO pagenumbers!\n",1)
end
+fix_hyperref = args["fix_hyperref"]
+if fix_hyperref then
+ writeLog(1,'fix hyperref with "|hyperpage -> \\textbar|hyperpage!\n',1)
+end
+
writeLog(2,"Open outputfile "..outfilename,0)
outFile = io.open(outfilename,"w+")
writeLog(2,"... done\n",0)