diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-04-01 10:50:35 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-04-01 10:50:35 +0200 |
commit | 059fc69b2c7853b937ddb4cfc9d36304dee07893 (patch) | |
tree | a58b878377348a05b55bf9b2c6ee44dcd8508c2c /tex/context/base/mkxl/luat-cbk.lmt | |
parent | 97f560d2993c367fb84ef62eefbe90ca03c19ebc (diff) | |
download | context-059fc69b2c7853b937ddb4cfc9d36304dee07893.tar.gz |
2023-04-01 09:31:00
Diffstat (limited to 'tex/context/base/mkxl/luat-cbk.lmt')
-rw-r--r-- | tex/context/base/mkxl/luat-cbk.lmt | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/tex/context/base/mkxl/luat-cbk.lmt b/tex/context/base/mkxl/luat-cbk.lmt index 744d12e27..2a3a58b04 100644 --- a/tex/context/base/mkxl/luat-cbk.lmt +++ b/tex/context/base/mkxl/luat-cbk.lmt @@ -12,20 +12,16 @@ local collectgarbage, type, next = collectgarbage, type, next local round = math.round local sortedhash, sortedkeys, tohash = table.sortedhash, table.sortedkeys, table.tohash ---[[ldx-- -<p>Callbacks are the real asset of <l n='luatex'/>. They permit you to hook -your own code into the <l n='tex'/> engine. Here we implement a few handy -auxiliary functions.</p> ---ldx]]-- +-- Callbacks are the real asset of LuaTeX. They permit you to hook your own code +-- into the TeX engine. Here we implement a few handy auxiliary functions. Watch +-- out, there are diferences between LuateX and LuaMetaTeX. callbacks = callbacks or { } local callbacks = callbacks ---[[ldx-- -<p>When you (temporarily) want to install a callback function, and after a -while wants to revert to the original one, you can use the following two -functions. This only works for non-frozen ones.</p> ---ldx]]-- +-- When you (temporarily) want to install a callback function, and after a while +-- wants to revert to the original one, you can use the following two functions. +-- This only works for non-frozen ones. local trace_callbacks = false trackers.register("system.callbacks", function(v) trace_callbacks = v end) local trace_calls = false -- only used when analyzing performance and initializations @@ -47,13 +43,12 @@ local list = callbacks.list local permit_overloads = false local block_overloads = false ---[[ldx-- -<p>By now most callbacks are frozen and most provide a way to plug in your own code. For instance -all node list handlers provide before/after namespaces and the file handling code can be extended -by adding schemes and if needed I can add more hooks. So there is no real need to overload a core -callback function. It might be ok for quick and dirty testing but anyway you're on your own if -you permanently overload callback functions.</p> ---ldx]]-- +-- By now most callbacks are frozen and most provide a way to plug in your own code. +-- For instance all node list handlers provide before/after namespaces and the file +-- handling code can be extended by adding schemes and if needed I can add more +-- hooks. So there is no real need to overload a core callback function. It might be +-- ok for quick and dirty testing but anyway you're on your own if you permanently +-- overload callback functions. -- This might become a configuration file only option when it gets abused too much. |