summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/third/rst/rst_setups.lua
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2014-03-04 05:07:53 +0000
committerNorbert Preining <preining@logic.at>2014-03-04 05:07:53 +0000
commitcb8181cfaed30c726bfe478ac3c07938ab69df1f (patch)
tree60bc39ea31c0fca0d1742cbcc7ad47178b7cf20b /Master/texmf-dist/tex/context/third/rst/rst_setups.lua
parentfbe57f4bc9921279854b16480b26387401cc994b (diff)
context-rst (4Mar)
git-svn-id: svn://tug.org/texlive/trunk@33092 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/third/rst/rst_setups.lua')
-rw-r--r--Master/texmf-dist/tex/context/third/rst/rst_setups.lua32
1 files changed, 22 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/third/rst/rst_setups.lua b/Master/texmf-dist/tex/context/third/rst/rst_setups.lua
index de70d4bc270..31f314e2d9a 100644
--- a/Master/texmf-dist/tex/context/third/rst/rst_setups.lua
+++ b/Master/texmf-dist/tex/context/third/rst/rst_setups.lua
@@ -4,18 +4,18 @@
-- USAGE: called by rst_parser.lua
-- DESCRIPTION: Complement to the reStructuredText parser
-- AUTHOR: Philipp Gesang (Phg), <phg42.2a@gmail.com>
--- CHANGED: 2013-03-26 23:55:20+0100
+-- CHANGED: 2013-06-03 18:52:29+0200
--------------------------------------------------------------------------------
--
-local optional_setups = { }
-thirddata.rst_setups = optional_setups
-local rst_directives = thirddata.rst_directives
-local rst_context = thirddata.rst
-local state = rst_context.state
+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 = [[
@@ -29,7 +29,7 @@ function optional_setups.footnote_symbol ()
end
function optional_setups.footnotes ()
- local tf = state.footnotes
+ local tf = rst_context.state.footnotes
local fn = [[
%---------------------------------------------------------------%
@@ -127,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,5 +360,18 @@ function optional_setups.citator ()
return cit
end
+function optional_setups.image ()
+ local image = [[
+
+%---------------------------------------------------------------%
+% images %
+%---------------------------------------------------------------%
+\setupexternalfigure[location={local,global,default}]
+
+]]
+ return image
+end
+
return optional_setups
+-- vim:ft=lua:sw=4:ts=4:expandtab:tw=80