[Dev-luatex] A few idle questions...

Jonathan Sauer Jonathan.Sauer at silverstroke.com
Wed May 7 15:00:16 CEST 2008


Hello,

> Another is output routine programming: a function
> get_more_main_vertical_list_material_from_TeX would be quite handy in
> some applications, and yielding to TeX until the next pass would seem
to
> make for some very straightforward and understandable programming.

The "buildpage_filter" seems to be able to do this. Untested:

local function cocoroutine(head, extrainfo)
	while not_done do
		-- Do something with the new material
		...
		-- Add the modified material to the main vertical list,
then
		-- get more material (this is effectively the function 
		-- "get_more_main_vertical_list_material_from_TeX")
		-- false: Discard the material
		-- true: Use the original material
		-- new head: Use this instead of the original material
		head, extrainfo = coroutine.yield(true | false | new
head)
	end
end

callback.register("buildpage_filter", coroutine.wrap(cocoroutine))


> > I was also thinking of implementing a LaTeX environment using a
> > coroutine,
> 
> Oh, is anybody actually using LuaTeX with LaTeX?  Any guidelines about
> "what-to-do-to-make-it-run"?

I'm sorry, I wasn't very precise in my last mail. I was talking about
LaTeX-*like* environments, not actually LaTeX itself. I never tried
using LaTeX with LuaTeX.


Jonathan



More information about the dev-luatex mailing list