From dc637761adf54caa9ccb4f18226d5a72670180bc Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 6 Jun 2012 10:17:13 +0200 Subject: [interface] fixed plain/latex setup macro --- doc/context/third/enigma/enigma_manual.tex | 3 +++ tex/context/third/enigma/enigma.lua | 7 ++++++- tex/plain/enigma/enigma.tex | 7 ++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/doc/context/third/enigma/enigma_manual.tex b/doc/context/third/enigma/enigma_manual.tex index 5a34c92..48cb067 100644 --- a/doc/context/third/enigma/enigma_manual.tex +++ b/doc/context/third/enigma/enigma_manual.tex @@ -1,3 +1,6 @@ +%% If you’re looking for instructions concerning how to build this +%% manual, please for now drop me an email: ·phg42.2a at gmail dot com· +%% as you will need a certain mtx-script. \startdocchapter[title=Usage] \startdocsection[title=Loading the Module/Package] diff --git a/tex/context/third/enigma/enigma.lua b/tex/context/third/enigma/enigma.lua index 521c4b7..a34e669 100644 --- a/tex/context/third/enigma/enigma.lua +++ b/tex/context/third/enigma/enigma.lua @@ -93,6 +93,10 @@ local utf8len = unicode.utf8.len local utf8sub = unicode.utf8.sub local utfcharacters = string.utfcharacters +--- debugging tool (careful, this *will* break context!) +--dofile(kpse.find_file("lualibs-table.lua")) -- archaic version :( +--table.print = function (...) print(table.serialize(...)) end + local tablecopy if format_is_context_p then tablecopy = table.copy @@ -1404,7 +1408,8 @@ on. --ichd]]-- local new_machine = function (_, name) local args = configurations[name] - verbose_level = args.verbose or verbose_level + --table.print(configurations) + verbose_level = args and args.verbose or verbose_level local machine = new(name, args) return machine end diff --git a/tex/plain/enigma/enigma.tex b/tex/plain/enigma/enigma.tex index 7c0981e..9f06856 100644 --- a/tex/plain/enigma/enigma.tex +++ b/tex/plain/enigma/enigma.tex @@ -43,9 +43,10 @@ \directlua{ local enigma = packagedata.enigma local current_args = enigma.parse_args([====[\detokenize{#1}]====]) + enigma.save_raw_args(current_args, [====[\current_enigma_id]====]) enigma.new_callback(enigma.new_machine(current_args, - [====[\currentenigmaid]====]), - [====[\currentenigmaid]====]) + [====[\current_enigma_id]====]), + [====[\current_enigma_id]====]) }% \egroup% } @@ -54,7 +55,7 @@ %D All the logic is at the Lua end, not much to see here … \def\setupenigma#1{% \bgroup - \edef\currentenigmaid{#1} + \edef\current_enigma_id{#1} \luatexcatcodetable \enigmasetupcatcodes \do_setup_enigma% } -- cgit v1.2.3