diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-20 22:10:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-20 22:10:59 +0000 |
commit | 65d009a0596b194597f47531523addd3e64ed005 (patch) | |
tree | e13bd9beecf63e26491a66aa7a8fa702482f0067 /Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua | |
parent | d1a186333ced7b341e26877907343f08211199f7 (diff) |
context [current] (20mar18)
git-svn-id: svn://tug.org/texlive/trunk@47050 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua index 312832d5b44..328bf14067e 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-itc.lua @@ -6,6 +6,7 @@ if not modules then modules = { } end modules ['typo-itc'] = { license = "see context related readme files" } +local tonumber = tonumber local trace_italics = false trackers.register("typesetters.italics", function(v) trace_italics = v end) @@ -31,7 +32,6 @@ local nodepool = nuts.pool local tonode = nuts.tonode local tonut = nuts.tonut -local getfield = nuts.getfield local getprev = nuts.getprev local getnext = nuts.getnext local getid = nuts.getid @@ -42,7 +42,6 @@ local getattr = nuts.getattr local setattr = nuts.setattr local getattrlist = nuts.getattrlist local setattrlist = nuts.setattrlist -local setfield = nuts.setfield local setdisc = nuts.setdisc local isglyph = nuts.isglyph local setkern = nuts.setkern @@ -249,9 +248,9 @@ local function domath(head,current, done) a = a + 100 end if trace_italics then - report_italics("adding italic between math %C and non punctuation %C",getchar(glyph),char) + report_italics("%s italic %p between math %C and non punctuation %C","adding",a,getchar(glyph),char) end - insert_node_after(head,glyph,new_correction_kern(a)) + insert_node_after(head,glyph,correction_kern(a,glyph)) done = true end end @@ -263,11 +262,12 @@ local function domath(head,current, done) end local function mathhandler(head) - local current = tonut(head) + local nuthead = tonut(head) + local current = nuthead local done = false while current do if getid(current) == math_code then - current, done = domath(head,current,done) + current, done = domath(nuthead,current,done) end current = getnext(current) end @@ -415,7 +415,6 @@ local function texthandler(head) lastattr = attr replacechar = char replacehead = replace - replace = current updated = true end end @@ -439,7 +438,7 @@ local function texthandler(head) if attr and attr > 0 then local cd = data[char] if not cd then - -- this really can happen + -- this really can happen -- postitalic = 0 else postitalic = cd.italic @@ -452,8 +451,7 @@ local function texthandler(head) lastattr = attr postchar = char posthead = post - post = current - updated = true + updated = true end end end |