From a3c01af8bbd581000e276cca076023c308bd688c Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 4 Jun 2013 15:44:44 +0200 Subject: add inline images (non-float) via substitutions --- mod/tex/context/third/rst/rst_setups.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 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 21f0fe9..31f314e 100644 --- a/mod/tex/context/third/rst/rst_setups.lua +++ b/mod/tex/context/third/rst/rst_setups.lua @@ -8,13 +8,14 @@ -------------------------------------------------------------------------------- -- -local optional_setups = { } -thirddata.rst_setups = optional_setups -local rst_directives = thirddata.rst_directives -local rst_context = thirddata.rst +local optional_setups = { } +thirddata.rst_setups = optional_setups +local rst_directives = thirddata.rst_directives +local rst_context = thirddata.rst -local stringformat = string.format -local stringstrip = string.strip +local stringformat = string.format +local stringstrip = string.strip +local stringgsub = string.gsub function optional_setups.footnote_symbol () local setup = [[ @@ -126,7 +127,6 @@ function optional_setups.substitutions () local rs = rst_context.substitutions for name, content in next, rs do local id, data = content.directive, content.data - name, data = name:gsub("%s", ""), stringstrip(data) local directive = directives[id] if directive then substitutions = substitutions .. directive(name, data) @@ -361,7 +361,7 @@ function optional_setups.citator () end function optional_setups.image () - local image = [[ + local image = [[ %---------------------------------------------------------------% % images % @@ -369,8 +369,9 @@ function optional_setups.image () \setupexternalfigure[location={local,global,default}] ]] - return image + return image end return optional_setups +-- vim:ft=lua:sw=4:ts=4:expandtab:tw=80 -- cgit v1.2.3