From dba12855de1f52f325418d33367efce82131fe4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 10 May 2010 12:31:58 +0200 Subject: Fix typos in dd3b52c8 and improve documentation. --- luatexbase-loader.dtx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'luatexbase-loader.dtx') 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 -- cgit v1.2.3