diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua index 4748026af05..6df683605f2 100644 --- a/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua +++ b/Master/texmf-dist/tex/lualatex/xindex/xindex-base.lua @@ -5,10 +5,10 @@ -- AUTHOR: Herbert Voß -- LICENSE: LPPL1.3 -- --- $Id: xindex-base.lua 3 2021-07-07 07:21:56Z hvoss $ +-- $Id: xindex-base.lua 9 2021-08-13 19:42:48Z hvoss $ ----------------------------------------------------------------------- -local info = { version = 0.30 } +local info = { version = 0.31 } -- check config if pageNoPrefixDel ~= "" then @@ -16,9 +16,21 @@ if pageNoPrefixDel ~= "" then pageNoPrefixPattern = "^.*"..pageNoPrefixDel end -writeLog(2,"Read Data from file "..inFile.." ... \n",0) -local lines = read_lines_from(inFile) -writeLog(2,#lines.." lines of data read\n",0) +local lines = {} + +if useStdInput then + writeLog(2,"Read Data from stdin ... \n",0) + for line in io.lines() do + lines[#lines+1] = line + end + writeLog(2,#lines.." lines of data read\n",0) +else + for i=1,#inFiles do + writeLog(2,"Read Data from file "..inFiles[i].." ... \n",0) + lines = array_concat(lines, read_lines_from(inFiles[i])) + writeLog(2,#lines.." lines of data read\n",0) + end +end if vlevel > 1 then writeLog(1,"--------------- Input data -----------------\n",2) |