summaryrefslogtreecommitdiff
path: root/tex/context/base/mtx-context-ideas.tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-07-04 15:32:09 +0300
committerMarius <mariausol@gmail.com>2010-07-04 15:32:09 +0300
commit85b7bc695629926641c7cb752fd478adfdf374f3 (patch)
tree80293f5aaa7b95a500a78392c39688d8ee7a32fc /tex/context/base/mtx-context-ideas.tex
downloadcontext-85b7bc695629926641c7cb752fd478adfdf374f3.tar.gz
stable 2010-05-24 13:10
Diffstat (limited to 'tex/context/base/mtx-context-ideas.tex')
-rw-r--r--tex/context/base/mtx-context-ideas.tex52
1 files changed, 52 insertions, 0 deletions
diff --git a/tex/context/base/mtx-context-ideas.tex b/tex/context/base/mtx-context-ideas.tex
new file mode 100644
index 000000000..24d11a5b5
--- /dev/null
+++ b/tex/context/base/mtx-context-ideas.tex
@@ -0,0 +1,52 @@
+%D \module
+%D [ file=mtx-context-ideas,
+%D version=2009.03.21,
+%D title=\CONTEXT\ Extra Trickry,
+%D subtitle=Placeholder File,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% The hard coded goodies in texexec are now external. We also use this
+% opportunity to explore mixed tex/lua user interfacing so you will see
+% some old and new tricks here that might disappear or become extended.
+%
+% if users want to add their own ... go ahead but use a different
+% namespace:
+%
+% mtx-context-third-somename.tex
+% mtx-context-user-somename.tex
+
+% \startluacode
+% -- some day we might move the whole ui to lua
+% context = context or { }
+% function interfaces.tosetups(setups)
+% if not setups then
+% return ""
+% elseif type(setups) == "table" then
+% local t = { }
+% for k,v in next, setups do
+% t[k] = "{" .. v .. "}"
+% end
+% return table.concat(t,",")
+% else
+% return setups
+% end
+% end
+% function context.setuplayout(category,setups)
+% setups = setups or category
+% tex.sprint(string.format("\\setuplayout[%s]",interfaces.tosetups(setups))
+% end
+% local topspace = document.arguments["topspace"] or 0
+% if dimen(topspace) > dimen(0) then
+% context.setuplayout { topspace = dimen(topspace) }
+% end
+% local backspace = document.arguments["backspace"] or 0
+% if dimen(topspace) > dimen(0) then
+% context.setuplayout { backspace = dimen(backspace) }
+% end
+% \stopluacode