summaryrefslogtreecommitdiff
path: root/luatexbase-loader.dtx
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-10 12:31:58 +0200
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-05-10 12:36:21 +0200
commitdba12855de1f52f325418d33367efce82131fe4e (patch)
treece2b54f17557ddc97d31eb3f0287ffe1644ef94f /luatexbase-loader.dtx
parent9e9ba75999636306a37b626dda227b100ea41194 (diff)
downloadluatexbase-dba12855de1f52f325418d33367efce82131fe4e.tar.gz
Fix typos in dd3b52c8 and improve documentation.
Diffstat (limited to 'luatexbase-loader.dtx')
-rw-r--r--luatexbase-loader.dtx9
1 files changed, 7 insertions, 2 deletions
diff --git a/luatexbase-loader.dtx b/luatexbase-loader.dtx
index 8ce3deb..0add8d9 100644
--- a/luatexbase-loader.dtx
+++ b/luatexbase-loader.dtx
@@ -303,6 +303,11 @@ module('luatexbase', package.seeall)
% empty string at the beginning (since this is what kpse does: first try
% without adding a suffix).
%
+% There is a problem with using the |tex| search format: kpse will try to
+% add suffixes from the |TEX_SUFFIXES| constant, which leads to problems
+% when a file \meta{name}|.tex| exists. We prevent that by checking the
+% extension of the file found.
+%
% \begin{macrocode}
local lua_search_suffixes = {
"", ".luc", ".luctex", ".texluc", ".lua", ".luatex", ".texlua",
@@ -320,9 +325,9 @@ local function find_file_lua_emul(name)
local name = name..suf
local f = kpse.find_file(name, 'texmfscripts')
or kpse.find_file(name, 'tex')
- if suffix == "" and f then
+ if suf == "" and f then
local ext = string.match(f,"^.+%.([^/\\]-)$")
- if lua_valid_suffixes then
+ if lua_valid_suffixes[suf] then
return f
end
elseif f then