From 9b1389520701dbce2bebf451f0e5d719264928ea Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 5 Jun 2012 22:13:43 +0200 Subject: coding style --- mod/tex/context/third/rst/rst_directives.lua | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'mod/tex/context/third/rst/rst_directives.lua') diff --git a/mod/tex/context/third/rst/rst_directives.lua b/mod/tex/context/third/rst/rst_directives.lua index 8ee0582..4491ebb 100644 --- a/mod/tex/context/third/rst/rst_directives.lua +++ b/mod/tex/context/third/rst/rst_directives.lua @@ -18,8 +18,8 @@ local rst_directives = { } thirddata.rst_directives = rst_directives local rst_context = thirddata.rst -local stringstrip = string.strip -local fmt = string.format +local stringstrip = string.strip +local stringformat = string.format rst_directives.anonymous = 0 rst_directives.images = {} @@ -108,19 +108,19 @@ rst_directives.image = function(name, data) local images_done = rd.images.done if not anon then if not images_done[name] then - img = img .. fmt([[ + img = img .. stringformat([[ \useexternalfigure[%s][%s][] ]], name, data) images_done[name] = true end - img = img .. fmt([[ + img = img .. stringformat([[ \def\RSTsubstitution%s{%% \placefigure[here]{%s}{\externalfigure[%s]%s} } ]], name, rst_context.escape(inline_parser:match(properties.caption)), name, properties.setup) else -- image won't be referenced but used instantly - img = img .. fmt([[ + img = img .. stringformat([[ \placefigure[here]{%s}{\externalfigure[%s]%s} ]], rst_context.escape(inline_parser:match(properties.caption)), data, properties.setup) @@ -145,7 +145,7 @@ rst_directives.caution = function(raw) end end text = rst_context.escape(helpers.string.wrapat(inline_parser:match(text))) - return fmt([[ + return stringformat([[ \startRSTcaution %s \stopRSTcaution @@ -169,7 +169,7 @@ rst_directives.danger = function(raw) end end text = rst_context.escape(helpers.string.wrapat(inline_parser:match(text))) - return fmt([[ + return stringformat([[ \startRSTdanger %s \stopRSTdanger @@ -182,7 +182,7 @@ rst_directives.DANGER = function(addendum) for _,str in ipairs(addendum) do result = result .. (stringstrip(str)) end - return fmt([[ + return stringformat([[ %% The Rabbit of Caerbannog \startlinecorrection @@ -213,12 +213,12 @@ rst_directives.DANGER = function(addendum) end rst_directives.mp = function(name, data) - local mpcode = fmt([[ + local mpcode = stringformat([[ \startreusableMPgraphic{%s} %s \stopreusableMPgraphic ]], name, data) - mpcode = mpcode .. fmt([[ + mpcode = mpcode .. stringformat([[ \def\RSTsubstitution%s{%% \reuseMPgraphic{%s}%% } @@ -230,7 +230,7 @@ end --- implementation. --- http://archive.contextgarden.net/message/20111108.175913.1d994624.en.html rst_directives.ctx = function(name, data) - local ctx = fmt([[ + local ctx = stringformat([[ \startbuffer[%s]%% %s\stopbuffer @@ -242,7 +242,7 @@ rst_directives.ctx = function(name, data) end rst_directives.lua = function(name, data) - local luacode = fmt([[ + local luacode = stringformat([[ \startbuffer[%s]%% \startluacode @@ -273,7 +273,7 @@ rst_directives.math = function (name, data) i = i + 1 end end - return fmt([[ + return stringformat([[ \startformula %s \stopformula @@ -285,7 +285,7 @@ end -------------------------------------------------------------------------------- rst_directives.replace = function(name, data) - return fmt([[ + return stringformat([[ \def\RSTsubstitution%s{%s} ]], name, data) -- cgit v1.2.3