From fb7ec40915d2180561189e4ccb10e145d20f1328 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 14 Aug 2010 18:53:51 +0200 Subject: added simple parser for .rle format --- simpleslides-s-Automaton.tex | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'simpleslides-s-Automaton.tex') diff --git a/simpleslides-s-Automaton.tex b/simpleslides-s-Automaton.tex index 3300844..c1e3181 100644 --- a/simpleslides-s-Automaton.tex +++ b/simpleslides-s-Automaton.tex @@ -15,11 +15,11 @@ %D Initially based on the BigNumber theme by A. Mahajan and Th. Schmitz. (Many, %D many thanks!) -\writestatus{simpleslides}{loading Test} +\writestatus{simpleslides}{loading Theme Automata} \startmodule[simpleslides-s-Automaton] -\setupmodule[file=,rule=] % using defaults from lua config +\setupmodule[file=,rule=,extendxy=] % using defaults from lua config \ctxlua{environment.loadluafile( "mplife" )} \ctxlua{mplife.slides = true} @@ -96,6 +96,16 @@ %D Set the initial Game of Life snapshot (from file) and the rule, if given. +\doifsomething{\moduleparameter{simpleslides}{extendxy}}{\ctxlua + {mplife.setup.current.extendx = tonumber("\luaescapestring{\moduleparameter{simpleslides}{extendxy}}") + mplife.setup.current.extendy = tonumber("\luaescapestring{\moduleparameter{simpleslides}{extendxy}}") }} + +\doifsomething{\moduleparameter{simpleslides}{extendx}}{\ctxlua + {mplife.setup.current.extendx = tonumber("\luaescapestring{\moduleparameter{simpleslides}{extendx}}") }} + +\doifsomething{\moduleparameter{simpleslides}{extendy}}{\ctxlua + {mplife.setup.current.extendy = tonumber("\luaescapestring{\moduleparameter{simpleslides}{extendy}}") }} + \doifsomething{\moduleparameter{simpleslides}{file}}{\ctxlua {mplife.setup.current.file = "\luaescapestring{\moduleparameter{simpleslides}{file}}" mplife.setup.current.init = gol.parse_file(mplife.setup.current.file) -- cgit v1.2.3