From 78d44502d0e4dc5179b703189da54bc3dfe0d306 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 4 May 2011 17:44:12 +0200 Subject: confirming to Lua module namespace; alternate code from Wolfgang (resting for now) --- mod/tex/context/third/rst/rst_setups.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'mod/tex/context/third/rst/rst_setups.lua') diff --git a/mod/tex/context/third/rst/rst_setups.lua b/mod/tex/context/third/rst/rst_setups.lua index 74a9650..c10a914 100644 --- a/mod/tex/context/third/rst/rst_setups.lua +++ b/mod/tex/context/third/rst/rst_setups.lua @@ -1,24 +1,23 @@ #!/usr/bin/env texlua -------------------------------------------------------------------------------- -- FILE: rst_setups.lua --- USAGE: ./rst_setups.lua +-- USAGE: called by rst_parser.lua -- DESCRIPTION: Setups for rstcontext --- OPTIONS: --- --- REQUIREMENTS: --- -- AUTHOR: Philipp Gesang (Phg), --- VERSION: 1.0 --- CREATED: 22/09/10 20:21:01 CEST +-- CREATED: 2011-05-04 17:42:55+0200 -------------------------------------------------------------------------------- -- +--local rst_directives = context and thirddata.rst_directives or require "rst_directives" +local optional_setups = { } +local rst_directives if context then - environment.loadluafile("rst_directives") + thirddata.rst_setups = optional_setups + rst_directives = thirddata.rst_directives else rst_directives = require "rst_directives" end -optional_setups = {} - function optional_setups.footnote_symbol () local setup = [[ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3