diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2012-05-14 17:38:55 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2012-05-14 17:38:55 +0000 |
commit | 15995e10bfc68edf79970c4ea4fbb6678566c46e (patch) | |
tree | 2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/typo-cln.lua | |
parent | c9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff) |
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/typo-cln.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/typo-cln.lua | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/context/base/typo-cln.lua b/Master/texmf-dist/tex/context/base/typo-cln.lua index a8542c1a130..c6a2707910d 100644 --- a/Master/texmf-dist/tex/context/base/typo-cln.lua +++ b/Master/texmf-dist/tex/context/base/typo-cln.lua @@ -1,6 +1,6 @@ -if not modules then modules = { } end modules ['typo-cap'] = { +if not modules then modules = { } end modules ['typo-cln'] = { version = 1.001, - comment = "companion to typo-cap.mkiv", + comment = "companion to typo-cln.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" @@ -15,12 +15,14 @@ local utfbyte = utf.byte local trace_cleaners = false trackers.register("typesetters.cleaners", function(v) trace_cleaners = v end) local trace_autocase = false trackers.register("typesetters.cleaners.autocase",function(v) trace_autocase = v end) -local report_cleaners = logs.reporters("nodes","cleaners") -local report_autocase = logs.reporters("nodes","autocase") +local report_cleaners = logs.reporter("nodes","cleaners") +local report_autocase = logs.reporter("nodes","autocase") typesetters.cleaners = typesetters.cleaners or { } local cleaners = typesetters.cleaners +local variables = interfaces.variables + local nodecodes = nodes.nodecodes local tasks = nodes.tasks @@ -69,19 +71,23 @@ local function process(namespace,attribute,head) return head, done end --- see typo-cap for a more advanced settings handler .. now needed now +-- see typo-cap for a more advanced settings handler .. not needed now local enabled = false function cleaners.set(n) - if not enabled then - tasks.enableaction("processors","typesetters.cleaners.handler") - if trace_cleaners then - report_cleaners("enabling cleaners") + if n == variables.reset or not tonumber(n) or n == 0 then + texattribute[a_cleaner] = unsetvalue + else + if not enabled then + tasks.enableaction("processors","typesetters.cleaners.handler") + if trace_cleaners then + report_cleaners("enabling cleaners") + end + enabled = true end - enabled = true + texattribute[a_cleaner] = n end - texattribute[a_cleaner] = n end cleaners.handler = nodes.installattributehandler { @@ -89,3 +95,7 @@ cleaners.handler = nodes.installattributehandler { namespace = cleaners, processor = process, } + +-- interface + +commands.setcharactercleaning = cleaners.set |