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-cap.lua | |
parent | b0f61c557fa27bddb54ad085c9dc9beefc851a30 (diff) | |
download | context-83a331fff83ac18314885a39e959ca0c10f316f7.tar.gz |
beta 2010-07-15 15:05
Diffstat (limited to 'tex/context/base/typo-cap.lua')
-rw-r--r-- | tex/context/base/typo-cap.lua | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua index a29e45810..0e9068af3 100644 --- a/tex/context/base/typo-cap.lua +++ b/tex/context/base/typo-cap.lua @@ -19,6 +19,8 @@ local unset_attribute = node.unset_attribute local set_attribute = node.set_attribute local traverse_id = node.traverse_id +local texattribute = tex.attribute + local glyph = node.id("glyph") local kern = node.id("kern") @@ -236,22 +238,22 @@ local function process(namespace,attribute,head) -- not real fast but also not u 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 cases.set(n) - if trace_casing then - report_casing("enabling case handler") - end - tasks.enableaction("processors","typesetting.cases.handler") - function cases.set(n) - if m == 100 then - m = 1 - else - m = m + 1 + if not enabled then + tasks.enableaction("processors","typesetting.cases.handler") + if trace_casing then + report_casing("enabling case handler") end - tex.attribute[a_cases] = m * 100 + n + enabled = true + end + if m == 100 then + m = 1 + else + m = m + 1 end - cases.set(n) + texattribute[a_cases] = m * 100 + n end cases.handler = nodes.install_attribute_handler { |