summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/s-inf-03.mkiv
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-08 00:43:40 +0000
committerKarl Berry <karl@freefriends.org>2013-04-08 00:43:40 +0000
commit824f7b0903de8ad7f6ee3d7656005e4c59155e06 (patch)
treeabfc8673ef9916f3ab7074e811207384c301492b /Master/texmf-dist/tex/context/base/s-inf-03.mkiv
parent689aefb0727676ed3cddf331337b4be226495e72 (diff)
context import for TL13, from www.pragma-ade.com/context/beta/cont-tmf.zip
git-svn-id: svn://tug.org/texlive/trunk@29731 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/s-inf-03.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/s-inf-03.mkiv144
1 files changed, 75 insertions, 69 deletions
diff --git a/Master/texmf-dist/tex/context/base/s-inf-03.mkiv b/Master/texmf-dist/tex/context/base/s-inf-03.mkiv
index 1ff4cd0d094..822173d0083 100644
--- a/Master/texmf-dist/tex/context/base/s-inf-03.mkiv
+++ b/Master/texmf-dist/tex/context/base/s-inf-03.mkiv
@@ -1,8 +1,14 @@
% \nopdfcompression
-\enablemode[ipad]
+% \starttext
+% There is a loop somewhere ... todo.
+% \stoptext
-\doifmodeelse {ipad} {
+\enablemode[tablet] % whatever that means
+
+\setupbodyfont[dejavu]
+
+\doifmodeelse {tablet} {
\setuppapersize
[S6,landscape]
@@ -10,16 +16,16 @@
\definefont
[TitlePageFont]
- [MonoBold at 18pt]
+ [MonoBold at 16pt]
\setupbodyfont
- [tt,10pt]
+ [tt,8pt]
} {
\definefont
[TitlePageFont]
- [MonoBold at 24pt]
+ [MonoBold at 20pt]
\setupbodyfont
[tt]
@@ -84,21 +90,21 @@ local extralua = libraries.extralua
local obsolete = libraries.obsolete
local find = string.find
-local color, goto = context.color, context.goto
+local color, gotolocation = context.color, context["goto"]
for k, v in table.sortedpairs(_G) do
if obsolete[k] or find(k,"_") or k == "arg" or k == "utf" then
--
elseif basiclua[k] then
- goto(function() color( { "darkred" }, k) end, { k } )
+ gotolocation(function() color( { "darkred" }, k) end, { k } )
elseif extralua[k] then
- goto(function() color( { "darkgreen" }, k) end, { k } )
+ gotolocation(function() color( { "darkgreen" }, k) end, { k } )
elseif basictex[k] then
- goto(function() color( { "darkblue" }, k) end, { k } )
+ gotolocation(function() color( { "darkblue" }, k) end, { k } )
elseif extratex[k] then
- goto(function() color( { "darkyellow" }, k) end, { k } )
+ gotolocation(function() color( { "darkyellow" }, k) end, { k } )
elseif type(v) == "table" then
- goto(function() color( { "white" }, k) end, { k } )
+ gotolocation(function() color( { "white" }, k) end, { k } )
end
context(" ")
end
@@ -150,16 +156,19 @@ local byte = string.byte
local upper = string.upper
local skipglobal = table.tohash {
- "_G", "context", "modules", "global", "arg", "utf", 1,
+ "_G", "_M", "_ENV", "",
+ "context", "modules", "global", "arg", "utf", 1,
"_ptbs_", "_pcol_", "_plib_", "_clib_", "_tlib_",
- "_M", "kpse",
+ "kpse",
}
local skipkeys = table.tohash {
"_pcol_", "_plib_", "_clib_", "_tlib_", "_bpnf_", "_ptbs_",
"_cldf_", "_cldn_",
"_clmb_", "_clme_", "_clmm_", "_clmn_", "_clma_", "_clmh_",
- "_G", "_M", "_VERSION", "_COPYRIGHT", "_DESCRIPTION", "_NAME", "_PACKAGE", "__unload",
+ "_G", "_M", "_ENV", "",
+ "_VERSION", "_COPYRIGHT", "_DESCRIPTION", "_NAME", "_PACKAGE", "__unload",
+
}
local sameglobal = {
@@ -223,15 +232,14 @@ end
local NC, NR = context.NC, context.NR
local overstrike, rlap, bf = context.overstrike, context.rlap, context.bf
-local color, goto = context.color, context.goto
+local color, gotolocation = context.color, context["goto"]
local function cleanup(s)
return "\\char" ..byte(s) .. " "
end
local function handler(k,t,depth)
- k = gsub(k,"([~#$%%^&{}\\\|])",cleanup)
--- NC() rlap("\\quad\\tx " .. upper(sub(t,1,1)) .. " ".. k) NC() NC() NR()
+ k = gsub(k,"([~#$%%^&{}\\|])",cleanup)
NC() rlap("\\quad\\tx\\kern" .. (depth or 0).. "em" .. upper(sub(t,1,1)) .. " ".. k) NC() NC() NR()
end
@@ -260,67 +268,65 @@ local function show(title,subtitle,alias,builtin,t,lib,libcolor,glo,glocolor,mar
for i=1,#keys do
local k = keys[i]
local v = t[k]
- if k ~= "obsolete" and not skipkeys[k] and (not obsolete or not obsolete[k]) then
+ if k and k ~= "obsolete" and not skipkeys[k] and (not obsolete or not obsolete[k]) then
local inlib = lib and lib[k]
local inglo = glo and glo[k]
- if k then
- local t = type(v)
- local kstr, tstr = k, t
- local obs = t_obsolete and t_obsolete[k]
- if obs then
- tstr = function() overstrike(t) end
- kstr = function() overstrike(k) end
- end
- local marked = marked(v)
- if marked then
- tstr = "data table"
- end
- if t == "table" then
- local m = getmetatable(v)
- if m and m.__call then
- tstr = "function"
- end
- end
- if not mark then
- --
- elseif inlib and tostring(inlib) ~= tostring(v) then
- tstr = "overloaded ".. tstr
- elseif inglo and tostring(inglo) ~= tostring(v) then
- tstr = "overloaded ".. tstr
+ local t = type(v)
+ local kstr, tstr = k, t
+ local obs = t_obsolete and t_obsolete[k]
+ if obs then
+ tstr = function() overstrike(t) end
+ kstr = function() overstrike(k) end
+ end
+ local marked = marked(v)
+ if marked then
+ tstr = "data table"
+ end
+ if t == "table" then
+ local m = getmetatable(v)
+ if m and m.__call then
+ tstr = "function"
end
- NC() bf()
- if inlib then
- if not mark and t == "table" then
- goto(function() color( { libcolor }, kstr) end, { k } )
- else
- color( { libcolor }, kstr)
- end
- elseif inglo then
- if not mark and t == "table" then
- goto(function() color( { glocolor }, kstr) end, { k } )
- else
- color( { glocolor }, kstr)
- end
+ end
+ if not mark then
+ --
+ elseif inlib and tostring(inlib) ~= tostring(v) then
+ tstr = "overloaded ".. tstr
+ elseif inglo and tostring(inglo) ~= tostring(v) then
+ tstr = "overloaded ".. tstr
+ end
+ NC() bf()
+ if inlib then
+ if not mark and t == "table" then
+ gotolocation(function() color( { libcolor }, kstr) end, { k } )
else
- if not mark and t == "table" then
- goto(k, { kstr } )
- else
- context(kstr)
- end
+ color( { libcolor }, kstr)
end
- NC()
- if inlib then
- color( { libcolor }, tstr)
- elseif inglo then
- color( { glocolor }, tstr)
+ elseif inglo then
+ if not mark and t == "table" then
+ gotolocation(function() color( { glocolor }, kstr) end, { k } )
else
- context(tstr)
+ color( { glocolor }, kstr)
end
- NC() NR()
- if mark and t == "table" and title ~= "libraries" and title ~= "package" and not marked then
- childtables(false,v,handler) -- (k,v,handler)
+ else
+ if not mark and t == "table" then
+ gotolocation(k, { kstr } )
+ else
+ context(kstr)
end
end
+ NC()
+ if inlib then
+ color( { libcolor }, tstr)
+ elseif inglo then
+ color( { glocolor }, tstr)
+ else
+ context(tstr)
+ end
+ NC() NR()
+ if mark and t == "table" and title ~= "libraries" and title ~= "package" and not marked then
+ childtables(false,v,handler) -- (k,v,handler)
+ end
end
end
context.stoptabulate()