summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <eroux@dedibox.ebzao.info>2010-01-19 13:56:20 +0100
committerElie Roux <eroux@dedibox.ebzao.info>2010-01-19 13:56:20 +0100
commit4e0ad8a9c1a87477a1a4c2dad218c29c51123bab (patch)
tree341fbf678deb14e39d1450a04cc52f7fd1a30f63
parente8b40b36cbd48dc0f262e565eab1753319649fa8 (diff)
downloadlualibs-4e0ad8a9c1a87477a1a4c2dad218c29c51123bab.tar.gz
Using require() in texlua toO
-rw-r--r--luaextra.dtx5
1 files changed, 2 insertions, 3 deletions
diff --git a/luaextra.dtx b/luaextra.dtx
index b74bb26..61fc1f5 100644
--- a/luaextra.dtx
+++ b/luaextra.dtx
@@ -198,9 +198,8 @@ kpse.set_program_name("luatex")
local function load_luaextra_module(filename)
local path = kpse.find_file(filename)
texio.write_nl('log', string.format("luaextra: loading file %s", path))
- if tex and tex.luatexversion and tex.luatexversion > 44 then
- -- this means that by default we use old-style loading for texlua,
- -- as the tex table is not available.
+ if (tex and tex.luatexversion and tex.luatexversion > 44)
+ or (status and status.luatex_version and status.luatex_version > 44) then
require(filename)
else
dofile(kpse.find_file(filename))