[NTG-context] issue with custom hyphenator
Pablo Rodriguez
oinos at gmx.es
Fri Feb 10 20:02:00 CET 2023
Dear list,
I have just copied this from
https://www.pragma-ade.com/general/manuals/languages-mkiv.pdf#page=23:
\startluacode
local subset = {
a = true,
e = true,
i = true,
o = true,
u = true,
y = true,
}
languages.hyphenators.traditional.installmethod("test",
function(dictionary,word,n)
local t = { }
for i=1,#word do
local w = word[i]
if subset[w] then
t[i] = {
before = "<" .. w,
after = w .. ">",
left = false,
right = false,
}
else
t[i] = false
end
end
return t
end
)
\stopluacode
\definehyphenationfeatures
[demo]
[alternative=test]
\setuphyphenation[method=traditional]
\starttext
%\righthyphenmin=-1
\sethyphenationfeatures[demo]
\hsize\zeropoint
coming anaback
\stoptext
Using current latest (from 2023.02.07 19:06), I get:
c<o
o>ing
an<a
a>ack
Iâm missing m and b in the hyphenated words.
Iâm afraid that the hyphenator is all Greek to me.
Is there any reason why letters are lost in hyphenation?
Iâm afraid (I think) I might have hit a bug.
Many thanks for your help,
Pablo
More information about the ntg-context
mailing list