| 1 |
#!/usr/bin/env texlua |
| 2 |
|
| 3 |
lualibs = lualibs or { } |
| 4 |
|
| 5 |
local stringgsub = string.gsub |
| 6 |
local stringlower = string.lower |
| 7 |
local next = next |
| 8 |
local Ct, splitat = lpeg.Ct, lpeg.splitat |
| 9 |
|
| 10 |
--[[doc |
| 11 |
Needed by legacy luat-dum.lua. |
| 12 |
--doc]]-- |
| 13 |
table.reverse_hash = function (h) |
| 14 |
local r = { } |
| 15 |
for k,v in next, h do |
| 16 |
r[v] = stringlower(stringgsub(k," ","")) |
| 17 |
end |
| 18 |
return r |
| 19 |
end |
| 20 |
|
| 21 |
--[[doc |
| 22 |
Needed by legacy font-otn.lua. |
| 23 |
--doc]]-- |
| 24 |
lpeg.splitters = { [" "] = Ct(splitat" ") } |
| 25 |
|
| 26 |
--[[doc |
| 27 |
Needed by legacy font-nms.lua. |
| 28 |
--doc]]-- |
| 29 |
|
| 30 |
file.split_path = file.splitpath |
| 31 |
file.collapse_path = file.collapsepath |