diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-02-22 20:29:46 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-02-22 20:29:46 +0100 |
commit | 7b271baae19db1528fbe6621bdf50af89a5a336b (patch) | |
tree | 4fc24a8f2be20aa90e90f6e1bcb62d69f4946235 /tex/context/base/mkiv/node-tex.lua | |
parent | 67b9965fe473d18f13ed4c40f1e4e008eb870322 (diff) | |
download | context-7b271baae19db1528fbe6621bdf50af89a5a336b.tar.gz |
2019-02-22 19:43:00
Diffstat (limited to 'tex/context/base/mkiv/node-tex.lua')
-rw-r--r-- | tex/context/base/mkiv/node-tex.lua | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/tex/context/base/mkiv/node-tex.lua b/tex/context/base/mkiv/node-tex.lua index c9d3091df..5857fd2e6 100644 --- a/tex/context/base/mkiv/node-tex.lua +++ b/tex/context/base/mkiv/node-tex.lua @@ -6,33 +6,40 @@ if not modules then modules = { } end modules ['node-tex'] = { license = "see context related readme files" } -builders = builders or { } -local kernel = builders.kernel or { } -builders.kernel = kernel - -local hyphenate = lang.hyphenate -local ligaturing = node.ligaturing -local kerning = node.kerning - -kernel.originals = { - hyphenate = hyphenate, - ligaturing = ligaturing, - kerning = kerning, -} +builders = builders or { } +local kernel = builders.kernel or { } +builders.kernel = kernel + +local nuts = nodes.nuts + +local hyphenate = lang.hyphenate +local hyphenating = nuts.hyphenating +local ligaturing = nuts.ligaturing +local kerning = nuts.kerning +local cleanup = nuts.flush_components function kernel.hyphenation(head) - local done = hyphenate(head) - return head, done + return (hyphenate(head)) -- nodes ! +end + +function kernel.hyphenating(head) + return (hyphenating(head)) end function kernel.ligaturing(head) - local head, tail, done = ligaturing(head) -- we return 3 values indeed - return head, done + return (ligaturing(head)) end function kernel.kerning(head) - local head, tail, done = kerning(head) -- we return 3 values indeed - return head, done + return (kerning(head)) +end + +if cleanup then + + function kernel.cleanup(head) + return (cleanup(head)) + end + end callbacks.register('hyphenate' , false, "normal hyphenation routine, called elsewhere") |