Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lua-uni-normalize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ local char = utf8.char
local codes = utf8.codes
local unpack = table.unpack

if tex.initialize then
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zauguin Out of curiosity, where is tex.initialize defined? I don't see any mention in either luatex.pdf or ltluatex.pdf.

kpse.set_program_name'kpsewhich'
end
local kpse = require'kpse'
kpse.set_program_name'kpsewhich'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks name lookup when used in LaTeX.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How so?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It changes the current progname in kpathsea to kpsewhich from this point on, therefore all engine specific overwrites in texmf.cnf are disabled and expansions of $progname in lookup paths lead to the wrong result.
So if you for example have a tex file with the same name in texmf/tex/luatex and texmf/tex/generic, then the luatex version is preferred before and the generic one afterwards.

This doesn't matter too much with TeX Live's default setup since that always falls back to the other directories if a file isn't found and TeX Live generally doesn't reuse filenames, but it can easily break user settings.


local ccc, composition_mapping, decomposition_mapping, compatibility_mapping, nfc_qc do
local function doubleset(ts, key, v1, kind, v2)
ts[1][key] = v1
Expand Down
3 changes: 3 additions & 0 deletions lua-uni-parse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ local lpeg = lpeg or require'lpeg'
local R = lpeg.R
local tonumber = tonumber

local kpse = require'kpse'
kpse.set_program_name'kpsewhich'

local codepoint = lpeg.R('09', 'AF')^4 / function(c) return tonumber(c, 16) end
local sep = lpeg.P' '^0 * ';' * lpeg.P' '^0
local codepoint_range = codepoint * ('..' * codepoint + lpeg.Cc(false))
Expand Down