summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/scrp-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-05-16 11:46:45 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-05-16 11:46:45 +0200
commit330909ad62342ff873dc758b909968c66d0252a4 (patch)
tree72b7552cdc6925b962badb33aa9b307d949144b0 /tex/context/base/mkiv/scrp-ini.lua
parent4396699cb99f42f6378ed7229788bbceb898851a (diff)
downloadcontext-330909ad62342ff873dc758b909968c66d0252a4.tar.gz
2021-05-15 22:44:00
Diffstat (limited to 'tex/context/base/mkiv/scrp-ini.lua')
-rw-r--r--tex/context/base/mkiv/scrp-ini.lua112
1 files changed, 56 insertions, 56 deletions
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua
index ab6fca4db..0fafd9854 100644
--- a/tex/context/base/mkiv/scrp-ini.lua
+++ b/tex/context/base/mkiv/scrp-ini.lua
@@ -23,68 +23,68 @@ local report_preprocessing = logs.reporter("scripts","preprocessing")
local report_splitting = logs.reporter("scripts","splitting")
-local attributes = attributes
-local nodes = nodes
-local context = context
+local attributes = attributes
+local nodes = nodes
+local context = context
-local nodecodes = nodes.nodecodes
+local nodecodes = nodes.nodecodes
-local implement = interfaces.implement
+local implement = interfaces.implement
-local glyph_code = nodecodes.glyph
-local glue_code = nodecodes.glue
+local glyph_code = nodecodes.glyph
+local glue_code = nodecodes.glue
-local emwidths = fonts.hashes.emwidths
-local exheights = fonts.hashes.exheights
+local emwidths = fonts.hashes.emwidths
+local exheights = fonts.hashes.exheights
-local a_script = attributes.private('script')
+local a_script = attributes.private('script')
-local fontdata = fonts.hashes.identifiers
-local allocate = utilities.storage.allocate
-local setnodecolor = nodes.tracers.colors.set
+local fontdata = fonts.hashes.identifiers
+local allocate = utilities.storage.allocate
+local setnodecolor = nodes.tracers.colors.set
-local enableaction = nodes.tasks.enableaction
-local disableaction = nodes.tasks.disableaction
+local enableaction = nodes.tasks.enableaction
+local disableaction = nodes.tasks.disableaction
-local nuts = nodes.nuts
+local nuts = nodes.nuts
-local getnext = nuts.getnext
-local getchar = nuts.getchar
-local getfont = nuts.getfont
-local getid = nuts.getid
-local getglyphdata = nuts.getglyphdata
-local setglyphdata = nuts.setglyphdata
+local getnext = nuts.getnext
+local getchar = nuts.getchar
+local getfont = nuts.getfont
+local getid = nuts.getid
+local getglyphdata = nuts.getglyphdata
+local setglyphdata = nuts.setglyphdata
-local isglyph = nuts.isglyph
+local isglyph = nuts.isglyph
-local insert_node_after = nuts.insert_after
-local insert_node_before = nuts.insert_before
+local insertnodeafter = nuts.insertafter
+local insertnodebefore = nuts.insertbefore
-local first_glyph = nuts.first_glyph
+local firstglyph = nuts.firstglyph
-local nextglyph = nuts.traversers.glyph
-local nextchar = nuts.traversers.char
+local nextglyph = nuts.traversers.glyph
+local nextchar = nuts.traversers.char
-local nodepool = nuts.pool
+local nodepool = nuts.pool
-local new_glue = nodepool.glue
-local new_rule = nodepool.rule
-local new_penalty = nodepool.penalty
+local new_glue = nodepool.glue
+local new_rule = nodepool.rule
+local new_penalty = nodepool.penalty
-scripts = scripts or { }
-local scripts = scripts
+scripts = scripts or { }
+local scripts = scripts
-scripts.hash = scripts.hash or { }
-local hash = scripts.hash
+scripts.hash = scripts.hash or { }
+local hash = scripts.hash
-local handlers = allocate()
-scripts.handlers = handlers
+local handlers = allocate()
+scripts.handlers = handlers
-local injectors = allocate()
-scripts.injectors = handlers
+local injectors = allocate()
+scripts.injectors = handlers
-local splitters = allocate()
-scripts.splitters = splitters
+local splitters = allocate()
+scripts.splitters = splitters
-- we need to fake it in luatex
@@ -511,7 +511,7 @@ local function traced_process(head,first,last,process,a)
end
function scripts.injectors.handler(head)
- local start = first_glyph(head) -- we already have glyphs here (subtype 1)
+ local start = firstglyph(head) -- we already have glyphs here (subtype 1)
if not start then
return head
else
@@ -791,7 +791,7 @@ end
local tree, attr, proc
-function splitters.handler(head) -- todo: also first_glyph test
+function splitters.handler(head) -- todo: also firstglyph test
local current = head
while current do
if getid(current) == glyph_code then
@@ -848,9 +848,9 @@ end
local function marker(head,current,font,color) -- could become: nodes.tracers.marker
local ex = exheights[font]
local em = emwidths [font]
- head, current = insert_node_after(head,current,new_penalty(10000))
- head, current = insert_node_after(head,current,new_glue(-0.05*em))
- head, current = insert_node_after(head,current,new_rule(0.05*em,1.5*ex,0.5*ex))
+ head, current = insertnodeafter(head,current,new_penalty(10000))
+ head, current = insertnodeafter(head,current,new_glue(-0.05*em))
+ head, current = insertnodeafter(head,current,new_rule(0.05*em,1.5*ex,0.5*ex))
setnodecolor(current,color)
return head, current
end
@@ -871,7 +871,7 @@ function splitters.insertafter(handler,head,first,last,detail)
if ignore then
return head, last
else
- return insert_node_after(head,last,new_glue(0,last_s))
+ return insertnodeafter(head,last,new_glue(0,last_s))
end
end
@@ -1046,30 +1046,30 @@ do
scripts.inserters = {
space_before = function(head,current)
- return insert_node_before(head,current,space_glue(current))
+ return insertnodebefore(head,current,space_glue(current))
end,
space_after = function(head,current)
- return insert_node_after(head,current,space_glue(current))
+ return insertnodeafter(head,current,space_glue(current))
end,
zerowidthspace_before = function(head,current)
- return insert_node_before(head,current,new_glue(0))
+ return insertnodebefore(head,current,new_glue(0))
end,
zerowidthspace_after = function(head,current)
- return insert_node_after(head,current,new_glue(0))
+ return insertnodeafter(head,current,new_glue(0))
end,
nobreakspace_before = function(head,current)
local g = space_glue(current)
local p = new_penalty(10000)
- head, current = insert_node_before(head,current,p)
- return insert_node_before(head,current,g)
+ head, current = insertnodebefore(head,current,p)
+ return insertnodebefore(head,current,g)
end,
nobreakspace_after = function(head,current)
local g = space_glue(current)
local p = new_penalty(10000)
- head, current = insert_node_after(head,current,g)
- return insert_node_after(head,current,p)
+ head, current = insertnodeafter(head,current,g)
+ return insertnodeafter(head,current,p)
end,
}