summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4131 -> 4129 bytes
-rw-r--r--tex/context/base/context-version.pngbin40141 -> 40393 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/status-files.pdfbin24813 -> 24805 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin211541 -> 211450 bytes
-rw-r--r--tex/context/base/trac-xml.lua66
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 68 insertions, 8 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 9a1a8ca06..2ad5a63e6 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.03.22 18:43}
+\newcontextversion{2013.03.22 22:21}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 2323fa589..818845c7d 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.03.22 18:43}
+\newcontextversion{2013.03.22 22:21}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index bdec51852..cfa0f7218 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index a574743b8..3e28b44b8 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 273522022..c41e6374e 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.03.22 18:43}
+\edef\contextversion{2013.03.22 22:21}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 3aa3c73c5..5386f68b2 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.03.22 18:43}
+\edef\contextversion{2013.03.22 22:21}
%D For those who want to use this:
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 31f682298..28d37dd34 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 557386802..109161ab4 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/trac-xml.lua b/tex/context/base/trac-xml.lua
index 39cfcfb22..df213ba2d 100644
--- a/tex/context/base/trac-xml.lua
+++ b/tex/context/base/trac-xml.lua
@@ -6,6 +6,19 @@ if not modules then modules = { } end modules ['trac-xml'] = {
license = "see context related readme files"
}
+-- Application helpinfo can be defined in several ways:
+--
+-- helpinfo = "big blob of help"
+--
+-- helpinfo = { basic = "blob of basic help", extra = "blob of extra help" }
+--
+-- helpinfo = "<?xml version=1.0?><application>...</application/>"
+--
+-- helpinfo = "somefile.xml"
+--
+-- In the case of an xml file, the file should be either present on the same path
+-- as the script, or we should be be able to locate it using the resolver.
+
local formatters = string.formatters
local reporters = logs.reporters
local xmlserialize = xml.serialize
@@ -77,9 +90,42 @@ end
local reporthelp = reporters.help
local exporthelp = reporters.export
-function reporters.help(t,...)
+local function xmlfound(t)
local helpinfo = t.helpinfo
- if type(helpinfo) == "string" and string.find(helpinfo,"^<%?xml") then
+ if type(helpinfo) == "table" then
+ return false
+ end
+ if type(helpinfo) ~= "string" then
+ helpinfo = "Warning: no helpinfo found."
+ t.helpinfo = helpinfo
+ return false
+ end
+ if string.find(helpinfo,".xml$") then
+ local ownscript = environment.ownscript
+ local helpdata = false
+ if ownscript then
+ local helpfile = file.join(file.pathpart(ownscript),helpinfo)
+ helpdata = io.loaddata(helpfile)
+ if helpdata == "" then
+ helpdata = false
+ end
+ end
+ if not helpdata then
+ local helpfile = resolvers.findfile(helpinfo,"tex")
+ helpdata = helpfile and io.loaddata(helpfile)
+ end
+ if helpdata and helpdata ~= "" then
+ helpinfo = helpdata
+ else
+ helpinfo = formatters["Warning: help file %a is not found."](helpinfo)
+ end
+ end
+ t.helpinfo = helpinfo
+ return string.find(t.helpinfo,"^<%?xml") and true or false
+end
+
+function reporters.help(t,...)
+ if xmlfound(t) then
showhelp(t,...)
else
reporthelp(t,...)
@@ -89,16 +135,30 @@ end
local exporters = logs.exporters
function reporters.export(t,method,filename)
+ if not xmlfound(t) then
+ return exporthelp(t)
+ end
dofile(resolvers.findfile("trac-exp.lua","tex"))
if not exporters or not method then
return exporthelp(t)
end
+ if not method or method == "" then
+ method = environment.argument["exporthelp"]
+ end
+ if not filename or filename == "" then
+ filename = environment.files[1]
+ end
if method == "all" then
method = table.keys(exporters)
else
method = { method }
end
- filename = type(filename) == "string" and filename ~= "" and filename or false
+ if type(filename) ~= "string" or filename == "" then
+ filename = false
+ elseif file.pathpart(filename) == "" then
+ t.report("export file %a will not be saved on the current path (safeguard)")
+ filename = false
+ end
for i=1,#method do
local m = method[i]
local result = exporters[m](t,m)
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index a7ecaccf9..f5ef2222d 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 03/22/13 18:43:39
+-- merge date : 03/22/13 22:21:59
do -- begin closure to overcome local limits and interference