summaryrefslogtreecommitdiff
path: root/tex/context/base/typo-tal.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-11-08 11:50:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-11-08 11:50:00 +0100
commit952996cd380902fbb5a4266df7b7257d24d73652 (patch)
treeb2e742675ccd7a83848becdf55f98dc2dd3a60bd /tex/context/base/typo-tal.lua
parent1612bb5b0ee8c774cd13ba982707834e4e6d8f42 (diff)
downloadcontext-952996cd380902fbb5a4266df7b7257d24d73652.tar.gz
beta 2013.11.08 11:50
Diffstat (limited to 'tex/context/base/typo-tal.lua')
-rw-r--r--tex/context/base/typo-tal.lua23
1 files changed, 16 insertions, 7 deletions
diff --git a/tex/context/base/typo-tal.lua b/tex/context/base/typo-tal.lua
index 4cfd27d91..becf2d401 100644
--- a/tex/context/base/typo-tal.lua
+++ b/tex/context/base/typo-tal.lua
@@ -75,7 +75,7 @@ function characteralign.handler(head,where)
end
-- local first = first_glyph(head) -- we could do that once
local first
- for n in traverse_list_by_id(glyhp_code,head) do
+ for n in traverse_list_by_id(glyph_code,head) do
first = n
break
end
@@ -120,7 +120,7 @@ function characteralign.handler(head,where)
end
a_stop = current
if trace_split then
- setcolor(current,"darkgreen")
+ setcolor(current,validseparators[unicode] and "darkcyan" or "darkblue")
end
else
if not b_start then
@@ -138,13 +138,17 @@ function characteralign.handler(head,where)
end
end
sign = nil
+ b_stop = current
else
b_start = current
+ b_stop = current
+ setcolor(current,validseparators[unicode] and "darkcyan" or "darkblue")
+ end
+ else
+ b_stop = current
+ if trace_split then
+ setcolor(current,validseparators[unicode] and "darkcyan" or "darkblue")
end
- end
- b_stop = current
- if trace_split then
- setcolor(current,"darkblue")
end
end
elseif not b_start then
@@ -155,11 +159,16 @@ function characteralign.handler(head,where)
local next = current.next
local prev = current.prev
if next and prev and next.id == glyph_code and prev.id == glyph_code then -- too much checking
- local width = fontcharacters[b_start.font][period].width
+ local width = fontcharacters[b_start.font][separator or period].width
-- local spec = current.spec
-- nodes.free(spec) -- hm, we leak but not that many specs
current.spec = new_gluespec(width)
current[a_character] = punctuationspace
+ if a_start then
+ a_stop = current
+ elseif b_start then
+ b_stop = current
+ end
end
end
current = current.next