diff options
author | Marius <mariausol@gmail.com> | 2010-07-15 23:20:05 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-07-15 23:20:05 +0300 |
commit | 83a331fff83ac18314885a39e959ca0c10f316f7 (patch) | |
tree | 12e28253c45a07c819f98513827b0b3383dd5b0a /tex/context/base/typo-dig.lua | |
parent | b0f61c557fa27bddb54ad085c9dc9beefc851a30 (diff) | |
download | context-83a331fff83ac18314885a39e959ca0c10f316f7.tar.gz |
beta 2010-07-15 15:05
Diffstat (limited to 'tex/context/base/typo-dig.lua')
-rw-r--r-- | tex/context/base/typo-dig.lua | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tex/context/base/typo-dig.lua b/tex/context/base/typo-dig.lua index 9ee57a794..9bc738ecf 100644 --- a/tex/context/base/typo-dig.lua +++ b/tex/context/base/typo-dig.lua @@ -25,6 +25,8 @@ local traverse_id = node.traverse_id local insert_before = node.insert_before local insert_after = node.insert_after +local texattribute = tex.attribute + local glyph = node.id("glyph") local kern = node.id("kern") @@ -113,22 +115,22 @@ local function process(namespace,attribute,head) return head, done end -local m = 0 -- a trick to make neighbouring ranges work +local m, enabled = 0, false -- a trick to make neighbouring ranges work function digits.set(n) - if trace_digits then - report_digits("enabling digit handler") - end - tasks.enableaction("processors","typesetting.digits.handler") - function digits.set(n) - if m == 100 then - m = 1 - else - m = m + 1 + if not enabled then + tasks.enableaction("processors","typesetting.digits.handler") + if trace_digits then + report_digits("enabling digit handler") end - tex.attribute[a_digits] = m * 100 + n + enabled = true + end + if m == 100 then + m = 1 + else + m = m + 1 end - digits.set(n) + texattribute[a_digits] = m * 100 + n end digits.handler = nodes.install_attribute_handler { |