summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/luat-lua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/luat-lua.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/luat-lua.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/luat-lua.lua b/Master/texmf-dist/tex/context/base/luat-lua.lua
index 50492540d25..d319508f004 100644
--- a/Master/texmf-dist/tex/context/base/luat-lua.lua
+++ b/Master/texmf-dist/tex/context/base/luat-lua.lua
@@ -6,11 +6,13 @@ if not modules then modules = { } end modules ['luat-lua'] = {
license = "see context related readme files"
}
+local concat = table.concat
+
if lua then do
local delayed = { }
- local function flushdelayed(...)
+ function lua.flushdelayed(...)
local t = delayed
delayed = { }
for i=1, #t do
@@ -23,7 +25,7 @@ if lua then do
end
function lua.flush(...)
- tex.sprint("\\directlua{flushdelayed(",table.concat({...},','),")}")
+ context.directlua("lua.flushdelayed(%s)",concat({...},','))
end
end end
@@ -32,12 +34,14 @@ end end
--~
--~ function test(n)
--~ lua.delay(function(...)
---~ tex.sprint(string.format("pi: %s %s %s\\par",...))
+--~ context("pi: %s %s %s",...)
+--~ context.par()
--~ end)
--~ lua.delay(function(...)
---~ tex.sprint(string.format("more pi: %s %s %s\\par",...))
+--~ context("more pi: %s %s %s",...)
+--~ context.par()
--~ end)
---~ tex.sprint(string.format("\\setbox0=\\hbox{%s}",math.pi*n))
+--~ context("\\setbox0=\\hbox{%s}",math.pi*n)
--~ local box = tex.box[0]
--~ lua.flush(box.width,box.height,box.depth)
--~ end