summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-05-18 17:33:44 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-05-18 17:33:44 +0200
commitf7049c2619684d6bfe6688d3a669455a6ecb6713 (patch)
treedce9906ecba09f11b73930d696ca9b7973eda887 /doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
parentd7b2b626996a97ebb9911c972b920f8eace34d4f (diff)
downloadcontext-f7049c2619684d6bfe6688d3a669455a6ecb6713.tar.gz
2020-05-18 16:49:00
Diffstat (limited to 'doc/context/sources/general/manuals/luametatex/luametatex-differences.tex')
-rw-r--r--doc/context/sources/general/manuals/luametatex/luametatex-differences.tex54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex b/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
index 35812b13f..793493f4b 100644
--- a/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
+++ b/doc/context/sources/general/manuals/luametatex/luametatex-differences.tex
@@ -212,6 +212,60 @@ functionality. These are described in following chapters but there might be
hidden treasures in the binary. If you locate them, don't automatically assume
them to stay, some might be part of experiments!
+\startluacode
+
+local luametatex = tex.primitives()
+local luatex = table.load("luatex-primitives.lua")
+
+if not luatex then
+ local tex = "\\starttext \\ctxlua {table.save(tex.jobname .. '.lua',tex.primitives())} \\stoptext"
+
+ io.savedata("luatex-primitives.tex", tex)
+
+ os.execute("context --luatex --once luatex-primitives")
+
+ luatex = table.load("luatex-primitives.lua")
+end
+
+
+if luatex and luametatex then
+
+ luatex = table.tohash(luatex)
+ luametatex = table.tohash(luametatex)
+
+ context.page()
+
+ context("The following primitives are available in \\LUATEX\\ but not in \\LUAMETATEX.")
+ context("Some of these are emulated in \\CONTEXT.")
+
+ context.startcolumns { n = 2 }
+ for k, v in table.sortedhash(luatex) do
+ if not luametatex[k] then
+ context.type(k)
+ context.crlf()
+ end
+ end
+ context.stopcolumns()
+
+
+ context.page()
+
+ context("The following primitives are available in \\LUAMETATEX\\ only.")
+ context("At some point in time some might be added to \\LUATEX.")
+
+ context.startcolumns { n = 2 }
+ for k, v in table.sortedhash(luametatex) do
+ if not luatex[k] then
+ context.type(k)
+ context.crlf()
+ end
+ end
+ context.stopcolumns()
+
+end
+
+\stopluacode
+
\stopchapter
\stopcomponent