diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-11-14 23:18:10 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-11-14 23:18:10 +0100 |
commit | 08473f11287cb263079c0435068312cbc6d736e8 (patch) | |
tree | 2548fb8b58e18a507e54fa8426a79c6956c3ef2e /tex/context/base/mkiv/char-ini.lua | |
parent | dd0a80e5ec42f60832e7d5dc47210e6f3545c400 (diff) | |
download | context-08473f11287cb263079c0435068312cbc6d736e8.tar.gz |
2022-11-14 22:56:00
Diffstat (limited to 'tex/context/base/mkiv/char-ini.lua')
-rw-r--r-- | tex/context/base/mkiv/char-ini.lua | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/char-ini.lua b/tex/context/base/mkiv/char-ini.lua index 6fe56a062..8f1bc4fb0 100644 --- a/tex/context/base/mkiv/char-ini.lua +++ b/tex/context/base/mkiv/char-ini.lua @@ -817,6 +817,19 @@ local is_symbol = allocate ( tohash { "sm", "sc", "sk", "so", } ) +local can_have_space = allocate ( tohash { + "lu", "ll", "lt", "lm", "lo", -- letters + -- "mn", "mc", "me", -- marks + "nd", "nl", "no", -- numbers + "ps", "pi", -- initial + -- "pe", "pf", -- final + -- "pc", "pd", "po", -- punctuation + "sm", "sc", "sk", "so", -- symbols + -- "zs", "zl", "zp", -- separators + -- "cc", "cf", "cs", "co", "cn", -- others +} ) + + -- to be redone: store checked characters characters.is_character = is_character @@ -827,6 +840,7 @@ characters.is_mark = is_mark characters.is_punctuation = is_punctuation characters.is_hyphenator = is_hyphenator characters.is_symbol = is_symbol +characters.can_have_space = can_have_space local mti = function(t,k) if type(k) == "number" then @@ -837,13 +851,14 @@ local mti = function(t,k) end end -setmetatableindex(characters.is_character, mti) -setmetatableindex(characters.is_letter, mti) -setmetatableindex(characters.is_command, mti) -setmetatableindex(characters.is_spacing, mti) -setmetatableindex(characters.is_punctuation,mti) -setmetatableindex(characters.is_hyphenator, mti) -setmetatableindex(characters.is_symbol, mti) +setmetatableindex(characters.is_character, mti) +setmetatableindex(characters.is_letter, mti) +setmetatableindex(characters.is_command, mti) +setmetatableindex(characters.is_spacing, mti) +setmetatableindex(characters.is_punctuation, mti) +setmetatableindex(characters.is_hyphenator, mti) +setmetatableindex(characters.is_symbol, mti) +setmetatableindex(characters.can_have_space, mti) -- todo: also define callers for the above |