summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-09-11 16:40:26 +0300
committerMarius <mariausol@gmail.com>2013-09-11 16:40:26 +0300
commit7e8fc3c7ea353c9331f92634ceeeaa724ccdeb01 (patch)
treeefcde28721b46ef2c02a33518f788cd3a5d806e4 /tex
parent415f53ecf56e5353a9f14ae136ac0d4aea5dbf3d (diff)
downloadcontext-7e8fc3c7ea353c9331f92634ceeeaa724ccdeb01.tar.gz
beta 2013.09.11 15:37
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4113 -> 4112 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-pre.mkiv6
-rw-r--r--tex/context/base/lang-rep.lua15
-rw-r--r--tex/context/base/math-dir.lua6
-rw-r--r--tex/context/base/mult-low.lua7
-rw-r--r--tex/context/base/spac-ali.mkiv11
-rw-r--r--tex/context/base/status-files.pdfbin24784 -> 24769 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/context/base/strc-itm.mkvi2
-rw-r--r--tex/context/base/typo-brk.lua9
-rw-r--r--tex/context/base/typo-cap.lua37
-rw-r--r--tex/context/base/typo-cln.lua10
-rw-r--r--tex/context/base/typo-dha.lua4
-rw-r--r--tex/context/base/typo-dig.lua17
-rw-r--r--tex/context/base/typo-dir.lua22
-rw-r--r--tex/context/base/typo-dir.mkiv23
-rw-r--r--tex/context/base/typo-drp.lua10
-rw-r--r--tex/context/base/typo-dua.lua2
-rw-r--r--tex/context/base/typo-dub.lua2
-rw-r--r--tex/context/base/typo-fln.lua8
-rw-r--r--tex/context/base/typo-itc.lua10
-rw-r--r--tex/context/base/typo-krn.lua26
-rw-r--r--tex/context/base/typo-spa.lua12
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
26 files changed, 96 insertions, 151 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 74fc7d4fa..8db1b0581 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.09.11 11:46}
+\newcontextversion{2013.09.11 15:37}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 552000037..d5a5ba2df 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index b1911ab51..d573388e0 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.09.11 11:46}
+\edef\contextversion{2013.09.11 15:37}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-pre.mkiv b/tex/context/base/font-pre.mkiv
index d8ef47e41..659c4840e 100644
--- a/tex/context/base/font-pre.mkiv
+++ b/tex/context/base/font-pre.mkiv
@@ -273,12 +273,6 @@
\definecolor[font:8] [g=.75]
\definecolor[font:9] [b=.75]
-\definecolor[bidi:left:original] [r=.6]
-\definecolor[bidi:left:reversed] [g=.6]
-\definecolor[bidi:right:original][b=.6]
-\definecolor[bidi:right:reversed][r=.6,g=.6]
-\definecolor[bidi:mirrored] [r=.6,b=.6]
-
%D Now we're up to some definitions.
\definebodyfontenvironment
diff --git a/tex/context/base/lang-rep.lua b/tex/context/base/lang-rep.lua
index 16cd93e4a..31ae36e6d 100644
--- a/tex/context/base/lang-rep.lua
+++ b/tex/context/base/lang-rep.lua
@@ -113,15 +113,12 @@ local function hit(a,head)
end
end
-local function process(namespace,attribute,head)
- -- we could avoid this wrapper and use:
- -- local function process(head)
+function replacements.handler(head)
local current = head
- local done = false
+ local done = false
while current do
if current.id == glyph_code then
- -- local a = current[a_replacements]
- local a = current[attribute]
+ local a = getattr(current,a_replacements)
if a then
local last, final = hit(a,current)
if last then
@@ -183,12 +180,6 @@ function replacements.set(n) -- number or 'reset'
texsetattribute(a_replacements,n)
end
-replacements.handler = nodes.installattributehandler {
- name = "replacements",
- namespace = replacements,
- processor = process,
-}
-
-- interface
commands.setreplacements = replacements.set
diff --git a/tex/context/base/math-dir.lua b/tex/context/base/math-dir.lua
index f5719b99d..507a24e41 100644
--- a/tex/context/base/math-dir.lua
+++ b/tex/context/base/math-dir.lua
@@ -143,9 +143,3 @@ function directions.setmath(n)
end
commands.setmathdirection = directions.setmath
-
--- directions.mathhandler = nodes.installattributehandler {
--- name = "directions",
--- namespace = directions,
--- processor = directions.processmath,
--- }
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index 25cb94618..35c43fd83 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -347,5 +347,12 @@ return {
"carryoverpar",
--
"Umathbotaccent",
+ --
+ "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop",
+ "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop",
+ "autodirhbox", "autodirvbox", "autodirvtop",
+ --
+ "lesshyphens", "morehyphens", "nohyphens", "dohyphens",
+ --
}
}
diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv
index 65792e966..a7ce5b971 100644
--- a/tex/context/base/spac-ali.mkiv
+++ b/tex/context/base/spac-ali.mkiv
@@ -149,6 +149,17 @@
inline:\ifconditional \inlinelefttoright l2r\else r2l\fi\space
]\endgroup}
+\unexpanded\def\righttolefthbox#1#{\normalhbox dir TRT #1\bgroup\righttoleft\let\next} \let\rtlhbox\righttolefthbox
+\unexpanded\def\lefttorighthbox#1#{\normalhbox dir TLT #1\bgroup\lefttoright\let\next} \let\ltrhbox\lefttorighthbox
+\unexpanded\def\righttoleftvbox#1#{\normalvbox dir TRT #1\bgroup\righttoleft\let\next} \let\rtlvbox\righttoleftvbox
+\unexpanded\def\lefttorightvbox#1#{\normalvbox dir TLT #1\bgroup\lefttoright\let\next} \let\ltrvbox\lefttorightvbox
+\unexpanded\def\righttoleftvtop#1#{\normalvtop dir TRT #1\bgroup\righttoleft\let\next} \let\rtlvtop\righttoleftvtop
+\unexpanded\def\lefttorightvtop#1#{\normalvtop dir TLT #1\bgroup\lefttoright\let\next} \let\ltrvtop\lefttorightvtop
+
+\unexpanded\def\autodirhbox#1#{\hbox#1\bgroup\synchronizeinlinedirection\let\next}
+\unexpanded\def\autodirvbox#1#{\vbox#1\bgroup\synchronizeinlinedirection\let\next} % maybe also pardir or maybe just a \vbox
+\unexpanded\def\autodirvtop#1#{\vtop#1\bgroup\synchronizeinlinedirection\let\next} % maybe also pardir or maybe just a \vtop
+
% Tolerance and hyphenation
\ifdefined\lesshyphens \else \let\lesshyphens\relax \fi
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index c5f42232e..60b4169dc 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log
index 4e6c06c97..fba6598e2 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.09.11 11:46 MKIV beta fmt: 2013.9.11 int: english/english
+ConTeXt ver: 2013.09.11 15:37 MKIV beta fmt: 2013.9.11 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/context/base/strc-itm.mkvi b/tex/context/base/strc-itm.mkvi
index 85ec4bc45..356c4bb15 100644
--- a/tex/context/base/strc-itm.mkvi
+++ b/tex/context/base/strc-itm.mkvi
@@ -1246,7 +1246,7 @@
\strc_itemgroups_start_head}
\def\strc_itemgroups_make_symbol_box
- {\setbox\b_strc_itemgroups\hbox
+ {\setbox\b_strc_itemgroups\autodirhbox
{\ifconditional\c_strc_itemgroups_head
\ifconditional\c_strc_itemgroups_symbol
\strc_itemgroups_insert_extra_reference
diff --git a/tex/context/base/typo-brk.lua b/tex/context/base/typo-brk.lua
index a05cca25b..3558efa8e 100644
--- a/tex/context/base/typo-brk.lua
+++ b/tex/context/base/typo-brk.lua
@@ -61,7 +61,6 @@ breakpoints.methods = breakpoints.methods or { }
local methods = breakpoints.methods
local a_breakpoints = attributes.private("breakpoint")
-breakpoints.attribute = a_breakpoints
storage.register("typesetters/breakpoints/mapping", breakpoints.mapping, "typesetters.breakpoints.mapping")
@@ -155,7 +154,7 @@ methods[5] = function(head,start,settings) -- x => p q r
return head, start
end
-local function process(namespace,attribute,head)
+function breakpoints.handler(head)
local done, numbers = false, languages.numbers
local start, n = head, 0
while start do
@@ -285,12 +284,6 @@ function breakpoints.set(n)
texsetattribute(a_breakpoints,n)
end
-breakpoints.handler = nodes.installattributehandler {
- name = "breakpoint",
- namespace = breakpoints,
- processor = process,
-}
-
-- function breakpoints.enable()
-- tasks.enableaction("processors","typesetters.breakpoints.handler")
-- end
diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua
index e9c98c846..a2678ed79 100644
--- a/tex/context/base/typo-cap.lua
+++ b/tex/context/base/typo-cap.lua
@@ -53,7 +53,6 @@ local cases = typesetters.cases
cases.actions = { }
local actions = cases.actions
-cases.attribute = c_cases -- no longer needed
local a_cases = attributes.private("case")
local lastfont = nil
@@ -71,7 +70,7 @@ local lastfont = nil
local uccodes = characters.uccodes
local lccodes = characters.lccodes
-local function helper(start, codes, special, attribute, once)
+local function helper(start, codes, special, once)
local char = start.char
local dc = codes[char]
if dc then
@@ -150,17 +149,17 @@ end
cases.register = register
-local function WORD(start,attribute)
+local function WORD(start)
lastfont = nil
return helper(start,uccodes)
end
-local function word(start,attribute)
+local function word(start)
lastfont = nil
return helper(start,lccodes)
end
-local function Word(start,attribute,attr)
+local function Word(start,attr)
lastfont = nil
local prev = start.prev
if prev and prev.id == kern_code and prev.subtype == kerning_code then
@@ -169,8 +168,8 @@ local function Word(start,attribute,attr)
if not prev or prev.id ~= glyph_code then
-- only the first character is treated
for n in traverse_id(glyph_code,start.next) do
- if n[attribute] == attr then
- n[attribute] = unsetvalue
+ if n[a_cases] == attr then
+ n[a_cases] = unsetvalue
else
-- break -- we can have nested mess
end
@@ -183,7 +182,7 @@ local function Word(start,attribute,attr)
end
end
-local function Words(start,attribute)
+local function Words(start)
lastfont = nil
local prev = start.prev
if prev and prev.id == kern_code and prev.subtype == kerning_code then
@@ -196,12 +195,12 @@ local function Words(start,attribute)
end
end
-local function capital(start,attribute) -- 3
- return helper(start,uccodes,true,attribute,true)
+local function capital(start) -- 3
+ return helper(start,uccodes,true,true)
end
-local function Capital(start,attribute) -- 4
- return helper(start,uccodes,true,attribute,false)
+local function Capital(start) -- 4
+ return helper(start,uccodes,true,false)
end
local function none(start)
@@ -254,7 +253,7 @@ register(variables.Cap, variables.Capital) -- clone
-- node.traverse_id_attr
-local function process(namespace,attribute,head) -- not real fast but also not used on much data
+function cases.handler(head) -- not real fast but also not used on much data
lastfont = nil
local lastattr = nil
local done = false
@@ -262,16 +261,16 @@ local function process(namespace,attribute,head) -- not real fast but also not u
while start do -- while because start can jump ahead
local id = start.id
if id == glyph_code then
- local attr = start[attribute]
+ local attr = start[a_cases]
if attr and attr > 0 then
if attr ~= lastattr then
lastfont = nil
lastattr = attr
end
- start[attribute] = unsetvalue
+ start[a_cases] = unsetvalue
local action = actions[attr%100] -- map back to low number
if action then
- start, ok = action(start,attribute,attr)
+ start, ok = action(start,attr)
done = done and ok
if trace_casing then
report_casing("case trigger %a, instance %a, result %a",attr%100,div(attr,100),ok)
@@ -320,12 +319,6 @@ function cases.set(n)
-- return n -- bonus
end
-cases.handler = nodes.installattributehandler {
- name = "case",
- namespace = cases,
- processor = process,
-}
-
-- interface
commands.setcharactercasing = cases.set
diff --git a/tex/context/base/typo-cln.lua b/tex/context/base/typo-cln.lua
index b4b682bff..2aa05b6d1 100644
--- a/tex/context/base/typo-cln.lua
+++ b/tex/context/base/typo-cln.lua
@@ -46,14 +46,14 @@ local resetter = { -- this will become an entry in char-def
-- the other hand we might want to apply casing afterwards. So,
-- cleaning comes first.
-local function process(namespace,attribute,head)
+function cleaners.handler(head)
local inline, done = false, false
for n in traverse_id(glyph_code,head) do
local char = n.char
if resetter[char] then
inline = false
elseif not inline then
- local a = n[attribute]
+ local a = n[a_cleaner]
if a == 1 then -- currently only one cleaner so no need to be fancy
local upper = uccodes[char]
if type(upper) == "table" then
@@ -91,12 +91,6 @@ function cleaners.set(n)
end
end
-cleaners.handler = nodes.installattributehandler {
- name = "cleaner",
- namespace = cleaners,
- processor = process,
-}
-
-- interface
commands.setcharactercleaning = cleaners.set
diff --git a/tex/context/base/typo-dha.lua b/tex/context/base/typo-dha.lua
index 06a1cb957..ed54276c6 100644
--- a/tex/context/base/typo-dha.lua
+++ b/tex/context/base/typo-dha.lua
@@ -106,7 +106,7 @@ local function startdir(finish)
return new_textdir(finish == "TRT" and "+TRT" or "+TLT")
end
-local function process(namespace,attribute,start)
+local function process(start)
local head = start
@@ -204,7 +204,7 @@ local function process(namespace,attribute,start)
if id == math_code then
current = end_of_math(current.next).next
else
- local attr = current[attribute]
+ local attr = current[a_directions]
if attr and attr > 0 and attr ~= prevattr then
if not getglobal(a) then
lro, rlo = false, false
diff --git a/tex/context/base/typo-dig.lua b/tex/context/base/typo-dig.lua
index 829e4cc7a..ef05e62da 100644
--- a/tex/context/base/typo-dig.lua
+++ b/tex/context/base/typo-dig.lua
@@ -55,7 +55,6 @@ digits.actions = { }
local actions = digits.actions
local a_digits = attributes.private("digits")
-digits.attribute = a_digits
-- at some point we can manipulate the glyph node so then i need
-- to rewrite this then
@@ -83,7 +82,7 @@ function nodes.aligned(head,start,stop,width,how)
end
end
-actions[1] = function(head,start,attribute,attr)
+actions[1] = function(head,start,attr)
local font = start.font
local char = start.char
local unic = chardata[font][char].tounicode
@@ -102,16 +101,16 @@ actions[1] = function(head,start,attribute,attr)
return head, start, false
end
-local function process(namespace,attribute,head)
+function digits.handler(head)
local done, current, ok = false, head, false
while current do
if current.id == glyph_code then
- local attr = current[attribute]
+ local attr = current[a_digits]
if attr and attr > 0 then
- current[attribute] = unsetvalue
+ current[a_digits] = unsetvalue
local action = actions[attr%100] -- map back to low number
if action then
- head, current, ok = action(head,current,attribute,attr)
+ head, current, ok = action(head,current,attr)
done = done and ok
elseif trace_digits then
report_digits("unknown digit trigger %a",attr)
@@ -151,12 +150,6 @@ function digits.set(n) -- number or 'reset'
texsetattribute(a_digits,n)
end
-digits.handler = nodes.installattributehandler { -- we could avoid this wrapper
- name = "digits",
- namespace = digits,
- processor = process,
-}
-
-- interface
commands.setdigitsmanipulation = digits.set
diff --git a/tex/context/base/typo-dir.lua b/tex/context/base/typo-dir.lua
index 312342348..a04028452 100644
--- a/tex/context/base/typo-dir.lua
+++ b/tex/context/base/typo-dir.lua
@@ -173,17 +173,9 @@ function directions.setcolor(current,direction,reversed,mirror)
if mirror then
setcolor(current,"bidi:mirrored")
elseif direction == "l" then
- if reversed then
- setcolor(current,"bidi:left:reversed")
- else
- setcolor(current,"bidi:left:original")
- end
+ setcolor(current,reversed and "bidi:left:reversed" or "bidi:left:original")
elseif direction == "r" then
- if reversed then
- setcolor(current,"bidi:right:reversed")
- else
- setcolor(current,"bidi:right:original")
- end
+ setcolor(current,reversed and "bidi:right:reversed" or "bidi:right:original")
else
resetcolor(current)
end
@@ -198,7 +190,7 @@ local enabled = false
local starttiming = statistics.starttiming
local stoptiming = statistics.stoptiming
-function directions.process(namespace,attribute,head) -- for the moment nodes and not nuts
+function directions.handler(head) -- ,_,_,_,direction) -- nodes not nuts | 5th arg is direction
if not head.next then
return head, false
end
@@ -212,7 +204,7 @@ function directions.process(namespace,attribute,head) -- for the moment nodes an
return head, false
end
starttiming(directions)
- local head, done = handler(namespace,attribute,head)
+ local head, done = handler(head)
stoptiming(directions)
return head, done
end
@@ -243,9 +235,3 @@ function directions.set(n) -- todo: names and numbers
end
commands.setdirection = directions.set
-
-directions.handler = nodes.installattributehandler {
- name = "directions",
- namespace = directions,
- processor = directions.process,
-}
diff --git a/tex/context/base/typo-dir.mkiv b/tex/context/base/typo-dir.mkiv
index 2229ed37c..0362af56c 100644
--- a/tex/context/base/typo-dir.mkiv
+++ b/tex/context/base/typo-dir.mkiv
@@ -91,6 +91,12 @@
% for the moment: \setdirection[\plusone]
+\definecolor[bidi:left:original] [r=.6]
+\definecolor[bidi:left:reversed] [g=.6]
+\definecolor[bidi:right:original][b=.6]
+\definecolor[bidi:right:reversed][r=.6,g=.6]
+\definecolor[bidi:mirrored] [r=.6,b=.6]
+
\protect \endinput
% bidi test
@@ -159,4 +165,21 @@
{\typebuffer[bidi-setup] \getbuffer[bidi-setup] \getbuffer[bidi-sample]}
+\startbuffer[bidi-sample]
+\setupdirections[bidi=global]
+
+ \hbox{\righttoleft\arabicfont (0001)}\par
+ \dontleavehmode\hbox{\righttoleft\arabicfont (0002)}\par
+ {\righttoleft\arabicfont (0003)\par}
+ {\righttoleft\arabicfont (0004)}\par
+ \dontleavehmode{\righttoleft\arabicfont (0005)\par}
+ \dontleavehmode{\righttoleft\arabicfont (0006)}\par
+ \rtlhbox{\arabicfont (0007)}\par
+ \ltrhbox{\arabicfont (0008)}\par
+\dontleavehmode\rtlhbox{\arabicfont (0009)}\par
+\dontleavehmode\ltrhbox{\arabicfont (0010)}\par
+\stopsetups
+
+{\typebuffer[bidi-sample] \getbuffer[bidi-sample]}
+
\stoptext
diff --git a/tex/context/base/typo-drp.lua b/tex/context/base/typo-drp.lua
index 1f935802d..415712d46 100644
--- a/tex/context/base/typo-drp.lua
+++ b/tex/context/base/typo-drp.lua
@@ -177,7 +177,7 @@ actions[v_default] = function(head,setting)
return head, done
end
-local function process(namespace,attribute,head)
+function initials.handler(head)
local start = head
local attr = nil
while start do
@@ -206,11 +206,3 @@ local function process(namespace,attribute,head)
end
return head, false
end
-
-initials.attribute = a_initial
-
-initials.handler = nodes.installattributehandler {
- name = "initials",
- namespace = initials,
- processor = process,
-}
diff --git a/tex/context/base/typo-dua.lua b/tex/context/base/typo-dua.lua
index 73ed9f886..ec85a3d9f 100644
--- a/tex/context/base/typo-dua.lua
+++ b/tex/context/base/typo-dua.lua
@@ -735,7 +735,7 @@ local function apply_to_list(list,size,head,pardir)
return head, done
end
-local function process(namespace,attribute,head)
+local function process(head)
local list, size = build_list(head)
local baselevel, pardir, dirfound = get_baselevel(head,list,size) -- we always have an inline dir node in context
if not dirfound and trace_details then
diff --git a/tex/context/base/typo-dub.lua b/tex/context/base/typo-dub.lua
index b78694173..3ecfce364 100644
--- a/tex/context/base/typo-dub.lua
+++ b/tex/context/base/typo-dub.lua
@@ -843,7 +843,7 @@ local function apply_to_list(list,size,head,pardir)
return head, done
end
-local function process(namespace,attribute,head)
+local function process(head)
-- for the moment a whole paragraph property
local attr = head[a_directions]
local analyze_fences = getfences(attr)
diff --git a/tex/context/base/typo-fln.lua b/tex/context/base/typo-fln.lua
index b1a486779..38aba2d22 100644
--- a/tex/context/base/typo-fln.lua
+++ b/tex/context/base/typo-fln.lua
@@ -245,11 +245,3 @@ local function process(namespace,attribute,head)
end
return head, false
end
-
-firstlines.attribute = a_firstline
-
-firstlines.handler = nodes.installattributehandler {
- name = "firstlines",
- namespace = firstlines,
- processor = process,
-}
diff --git a/tex/context/base/typo-itc.lua b/tex/context/base/typo-itc.lua
index 9ef0aaed3..452b623c8 100644
--- a/tex/context/base/typo-itc.lua
+++ b/tex/context/base/typo-itc.lua
@@ -82,7 +82,7 @@ end
-- todo: clear attribute
-local function process(namespace,attribute,head)
+function italics.handler(head)
local done = false
local italic = 0
local lastfont = nil
@@ -121,7 +121,7 @@ local function process(namespace,attribute,head)
lastfont = font
end
if data then
- local attr = forcedvariant or current[attribute]
+ local attr = forcedvariant or current[a_italics]
if attr and attr > 0 then
local cd = data[char]
if not cd then
@@ -210,12 +210,6 @@ function italics.reset()
texsetattribute(a_italics,unsetvalue)
end
-italics.handler = nodes.installattributehandler {
- name = "italics",
- namespace = italics,
- processor = process,
-}
-
local variables = interfaces.variables
local settings_to_hash = utilities.parsers.settings_to_hash
diff --git a/tex/context/base/typo-krn.lua b/tex/context/base/typo-krn.lua
index fb394044f..48c09f5ff 100644
--- a/tex/context/base/typo-krn.lua
+++ b/tex/context/base/typo-krn.lua
@@ -66,7 +66,6 @@ kerns.mapping = kerns.mapping or { }
kerns.factors = kerns.factors or { }
local a_kerns = attributes.private("kern")
local a_fontkern = attributes.private('fontkern')
-kerns.attribute = kerns.attribute
storage.register("typesetters/kerns/mapping", kerns.mapping, "typesetters.kerns.mapping")
storage.register("typesetters/kerns/factors", kerns.factors, "typesetters.kerns.factors")
@@ -79,6 +78,7 @@ local factors = kerns.factors
-- make sure it runs after all others
-- there will be a width adaptor field in nodes so this will change
-- todo: interchar kerns / disc nodes / can be made faster
+-- todo: use insert_before etc
local gluefactor = 4 -- assumes quad = .5 enspace
@@ -111,16 +111,16 @@ end
-- needs checking ... base mode / node mode
-local function do_process(namespace,attribute,head,force) -- todo: glue so that we can fully stretch
+local function do_process(head,force) -- todo: glue so that we can fully stretch
local start, done, lastfont = head, false, nil
local keepligature = kerns.keepligature
local keeptogether = kerns.keeptogether
local fillup = false
while start do
-- faster to test for attr first
- local attr = force or start[attribute]
+ local attr = force or start[a_kerns]
if attr and attr > 0 then
- start[attribute] = unsetvalue
+ start[a_kerns] = unsetvalue
local krn = mapping[attr]
if krn == v_max then
krn = .25
@@ -137,7 +137,7 @@ local function do_process(namespace,attribute,head,force) -- todo: glue so that
if keepligature and keepligature(start) then
-- keep 'm
else
- c = do_process(namespace,attribute,c,attr)
+ c = do_process(c,attr)
local s = start
local p, n = s.prev, s.next
local tail = find_node_tail(c)
@@ -207,7 +207,7 @@ local function do_process(namespace,attribute,head,force) -- todo: glue so that
pre.prev = before
before.next = pre
before.prev = nil
- pre = do_process(namespace,attribute,before,attr)
+ pre = do_process(before,attr)
pre = pre.next
pre.prev = nil
disc.pre = pre
@@ -219,7 +219,7 @@ local function do_process(namespace,attribute,head,force) -- todo: glue so that
tail.next = after
after.prev = tail
after.next = nil
- post = do_process(namespace,attribute,post,attr)
+ post = do_process(post,attr)
tail.next = nil
disc.post = post
free_node(after)
@@ -234,7 +234,7 @@ local function do_process(namespace,attribute,head,force) -- todo: glue so that
tail.next = after
after.prev = tail
after.next = nil
- replace = do_process(namespace,attribute,before,attr)
+ replace = do_process(before,attr)
replace = replace.next
replace.prev = nil
after.prev.next = nil
@@ -320,16 +320,10 @@ function kerns.set(factor)
return factor
end
-local function process(namespace,attribute,head)
- return do_process(namespace,attribute,head) -- no direct map, because else fourth argument is tail == true
+local kerns.handler(head)
+ return do_process(head) -- no direct map, because else fourth argument is tail == true
end
-kerns.handler = nodes.installattributehandler {
- name = "kern",
- namespace = kerns,
- processor = process,
-}
-
-- interface
commands.setcharacterkerning = kerns.set
diff --git a/tex/context/base/typo-spa.lua b/tex/context/base/typo-spa.lua
index a8df6e1f8..c3f50fe98 100644
--- a/tex/context/base/typo-spa.lua
+++ b/tex/context/base/typo-spa.lua
@@ -66,7 +66,7 @@ end
-- todo cache lastattr
-local function process(namespace,attribute,head)
+function spacings.handler(head)
local done = false
local start = head
-- head is always begin of par (whatsit), so we have at least two prev nodes
@@ -74,13 +74,13 @@ local function process(namespace,attribute,head)
while start do
local id = start.id
if id == glyph_code then
- local attr = start[attribute]
+ local attr = start[a_spacings]
if attr and attr > 0 then
local data = mapping[attr]
if data then
local char = start.char
local map = data.characters[char]
- start[attribute] = unsetvalue -- needed?
+ start[a_spacings] = unsetvalue -- needed?
if map then
local left = map.left
local right = map.right
@@ -216,12 +216,6 @@ function spacings.reset()
texsetattribute(a_spacings,unsetvalue)
end
-spacings.handler = nodes.installattributehandler {
- name = "spacing",
- namespace = spacings,
- processor = process,
-}
-
-- interface
commands.definecharacterspacing = spacings.define
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 90c5725b0..a3496b3f3 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 09/11/13 11:46:31
+-- merge date : 09/11/13 15:37:51
do -- begin closure to overcome local limits and interference