[luatex] insert a string into node list?

luigi scarso luigi.scarso at gmail.com
Fri Jul 15 09:31:41 CEST 2011

On Fri, Jul 15, 2011 at 8:15 AM, Taco Hoekwater <taco at elvenkind.com> wrote:
> On 07/15/2011 01:58 AM, luigi scarso wrote:
>> On Thu, Jul 14, 2011 at 11:42 PM, Hans Hagen<pragma at wxs.nl>  wrote:
>>> On 14-7-2011 3:23, Arno Trautmann wrote:
>>>> • Second, I'd like to print out the name of every defined
>>>> macro/primitive, i.e. I imagine a list with every character combination
>>>> after a \ that does not throw a undefd control sequence-error.
>>>> Why? Just because I wanted to know if it's possible … and if it is
>>>> possible at all, the odds are best with LuaTeX. Also, I'd like to
>>>> understand how macros are stored internally – but for that I have to
>>>> read some source code, I guess …
>>> for name in pairs(tex.hashtokens()) do
>>>    print(name)
>>> end
>> But it seems still format dependant: with plain luatex form  minimals
> Yes, it is. The list of actual control sequences and
> primitives is format dependent, thanks to tex.enableprimitives /
> tex.extraprimitives.
Hm, I'm not convinced.
I must check what follow:

1)hfill should be not influenced by tex.enableprimitives /tex.extraprimitives .
and it's not listed with plain luatex from minimals

2) It's a TEX82 primitive and the ref. says
Calling some form of tex.enableprimitives() is highly important
though, because if you do not,
you will end up with a TEX82-lookalike that can run lua code but not
do much else. The defined csnames
are (of course) saved in the format and will be available at runtime.
so it should be in every set of primitives

3) it's not listed with --debug-format.

So I believe that all of these methods (but not grepping the code)
list all the control sequences that appear inside the format --- and
as you said some primitives can be excluded (it's the case of  hfill:
it's not used by luatex plain). Of course mkiv is so big that it's
practically impossible that hfill is  not used in the body of some
macros, but it's reasonable to suppose that the Aleph and Omega macros
are not necessary :
it seems then that only the charit, nolocaldir nolocalwhatsits
primitives are not used by mkiv.


More information about the luatex mailing list