summaryrefslogtreecommitdiff
path: root/module/tex/context
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-08-15 21:53:12 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-08-15 21:53:12 +0200
commit7ad9a559fbd9ac46336d9e0689c0df4cc87e5eb9 (patch)
tree121557ba9a7d740ed3b18168e6371412cc36e2ed /module/tex/context
parent6fa296f715de6149ebf9a45b1d8d1fb11b6dd813 (diff)
downloadautomata-backgrounds-7ad9a559fbd9ac46336d9e0689c0df4cc87e5eb9.tar.gz
adjusted example rcs. added README
Diffstat (limited to 'module/tex/context')
-rw-r--r--module/tex/context/third/simpleslides/automata/automata-eca.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/tex/context/third/simpleslides/automata/automata-eca.lua b/module/tex/context/third/simpleslides/automata/automata-eca.lua
index 95d1f71..27450ba 100644
--- a/module/tex/context/third/simpleslides/automata/automata-eca.lua
+++ b/module/tex/context/third/simpleslides/automata/automata-eca.lua
@@ -10,7 +10,11 @@
--------------------------------------------------------------------------------
--
-environment.loadluafile( "automata-life" )
+if context then
+ environment.loadluafile( "automata-life" )
+else
+ require "automata-life"
+end
local help = gol.helpers
@@ -82,11 +86,11 @@ function eca.gen_frame(from, lines, rule)
local cnt = 1
local c = mplife.setup.current
- local new = { [1] = eca.stripcells(from, c.clip, c.diff ) }
+ local new = { [1] = eca.stripcells(from, c.clip, c.diff or 0 ) }
repeat
from = eca.next_line(from, rule)
- table.insert( new, eca.stripcells(from, c.clip, c.diff) )
+ table.insert( new, eca.stripcells(from, c.clip, c.diff or 0) )
cnt = cnt + 1
until cnt == lines
return eca.next_line(from, rule), new