diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-03-22 22:21:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-03-22 22:21:00 +0100 |
commit | 05a22240a1730a9e3bf3fc5e5a87befe7b823d85 (patch) | |
tree | 40f054ae884fece6789bedba405b7fb0d6fd13f6 /tex | |
parent | 3e552e98a5d32ac0048dcc7e04daa491d723e105 (diff) | |
download | context-05a22240a1730a9e3bf3fc5e5a87befe7b823d85.tar.gz |
beta 2013.03.22 22:21
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4131 -> 4129 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 40141 -> 40393 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24813 -> 24805 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 211541 -> 211450 bytes | |||
-rw-r--r-- | tex/context/base/trac-xml.lua | 66 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
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 Binary files differindex bdec51852..cfa0f7218 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex a574743b8..3e28b44b8 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png 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 Binary files differindex 31f682298..28d37dd34 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 557386802..109161ab4 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf 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 |