summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua
blob: 49d26283b93215504e3e8d8522401b3b5f2cb902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- 
--  This is file `oberdiek.luatex.lua',
--  generated with the docstrip utility.
-- 
--  The original source files were:
-- 
--  luatex.dtx  (with options: `lua')
--  
--  This is a generated file.
--  
--  Project: luatex
--  Version: 2016/05/16 v0.6
--  
--  Copyright (C) 2007, 2009, 2010 by
--     Heiko Oberdiek <heiko.oberdiek at googlemail.com>
--  
--  This work may be distributed and/or modified under the
--  conditions of the LaTeX Project Public License, either
--  version 1.3c of this license or (at your option) any later
--  version. This version of this license is in
--     http://www.latex-project.org/lppl/lppl-1-3c.txt
--  and the latest version of this license is in
--     http://www.latex-project.org/lppl.txt
--  and version 1.3 or later is part of all distributions of
--  LaTeX version 2005/12/01 or later.
--  
--  This work has the LPPL maintenance status "maintained".
--  
--  This Current Maintainer of this work is Heiko Oberdiek.
--  
--  The Base Interpreter refers to any `TeX-Format',
--  because some files are installed in TDS:tex/generic//.
--  
--  This work consists of the main source file luatex.dtx
--  and the derived files
--     luatex.sty, luatex.pdf, luatex.ins, luatex.drv, luatex-loader.sty,
--     luatex-test1.tex, luatex-test2.tex, luatex-test3.tex,
--     luatex-test4.tex, luatex-test5.tex, oberdiek.luatex.lua.
--  
module("oberdiek.luatex", package.seeall)
function kpse_module_loader(module)
  local script = module .. ".lua"
  local file = kpse.find_file(script, "texmfscripts")
  if file then
    local loader, error = loadfile(file)
    if loader then
      texio.write_nl("(" .. file .. ")")
      return loader
    end
    return "\n\t[oberdiek.luatex.kpse_module_loader] Loading error:\n\t"
           .. error
  end
  return "\n\t[oberdiek.luatex.kpse_module_loader] Search failed"
end
table.insert(package.searchers or package.loaders, kpse_module_loader)
-- 
--  End of File `oberdiek.luatex.lua'.