summaryrefslogtreecommitdiff
path: root/indexing/xindex/scripts
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-19 03:01:20 +0000
committerNorbert Preining <norbert@preining.info>2023-01-19 03:01:20 +0000
commitc11207d3e9027d6aa4153a2103df58382d41e56e (patch)
treebde001e74895007216ab81847975bd9143182d60 /indexing/xindex/scripts
parent8491e6b8fb521fb1c79d3ce9376836c67050c381 (diff)
CTAN sync 202301190301
Diffstat (limited to 'indexing/xindex/scripts')
-rwxr-xr-xindexing/xindex/scripts/xindex.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/indexing/xindex/scripts/xindex.lua b/indexing/xindex/scripts/xindex.lua
index e335dfcc02..2b6123cdb2 100755
--- a/indexing/xindex/scripts/xindex.lua
+++ b/indexing/xindex/scripts/xindex.lua
@@ -6,11 +6,11 @@
-- AUTHOR: Herbert Voß
-- LICENSE: LPPL 1.3
--
--- $Id: xindex.lua 22 2022-02-11 12:18:15Z hvoss $
+-- $Id: xindex.lua 22 2023-01-18 12:18:15Z hvoss $
-----------------------------------------------------------------------
xindex = xindex or { }
- local version = 0.45
+ local version = 0.46
xindex.version = version
--xindex.self = "xindex"
@@ -51,8 +51,8 @@ local args = require ('xindex-lapp') [[
-b,--no_labels
-i,--ignoreSpace
-o,--output (default "")
- -k --checklang same as * star for checking aux file
- -l,--language (default en) or * for detecting the language from the aux file
+ -k,--checklang
+ -l,--language (default en)
-p,--prefix (default L)
-u,--use_UCA
-s,--use_stdin
@@ -239,10 +239,13 @@ escape_chars = { -- by default " is the escape char
outFile = io.open(outfilename,"w+")
+check_language = args["checklang"]
local aux_language = ""
-if args["checklang"] or (args["language"] == "*") then
- writeLog(2,'Check language in aux file\n',0)
+
+if check_language then
+ print("check aux file for unknown language")
+-- writeLog(2,'Check language in aux file\n',0)
-- \babel@aux{german}{} package babel
-- \selectlanguage *[variant=german,spelling=new,]{german} package polyglossia
local auxfile = inFiles[1]:split(".")[1]..".aux"
@@ -256,9 +259,9 @@ if args["checklang"] or (args["language"] == "*") then
break
else
if string.find(str, "babel@aux{") then
- -- print("Babel defunden: "..str)
+-- print("Babel gefunden: "..str)
str = str:match("{..+}$") -- get last word {language}
- -- print("Babel: "..str)
+ print("Babel: "..str)
aux_language = str:sub(2,(#str-3))
break
end
@@ -293,6 +296,7 @@ if (indexheader[language] == nil) then
writeLog(2,'Corrected the unknown language "'..language..'" to "en"'.."\n",0)
language = "en"
end
+
index_header = indexheader[language]
if vlevel > 0 then for i=1,#index_header do writeLog(2,index_header[i].."\n",1) end end
if (folium[language] == nil) then