[Dev-luatex] In need of some catcode wizardry...

Graham Douglas graham.douglas at readytext.co.uk
Sun Apr 18 21:48:53 CEST 2010

Hi All

I hope it's OK to ask this here. I've implemented a Windows version of 
the Directory Iterator as described in "Programming in  Lua"


and can call it with code like this

require "luadir"
for fname in luadir.dir("directory") do tex.print(fname) end

(luadir is an add-in DLL)

where "directory" is a path and fname is the returned filename.

fname can contain special characters so naturally, I am having catcode 
problems since I'm not using ConTeXt which provides a lot of tools to 
deal with catcodes etc when running directlua. I'm using a version of 
plain to run this.

So, would anyone have time to suggest the best way to
set this up so that I can run this to resolve the catcode issues --- in 
the directory names and the returned file names?

I know that tex.print can take a catcode table number
but I'm not sure how to best set it up.

An example using \catcodetable 16-bit number
and how to use + save the catcode table would
be very welcome.

Thanks in advance


More information about the dev-luatex mailing list