diff options
22 files changed, 273 insertions, 74 deletions
diff --git a/doc/context/scripts/mkiv/mtx-timing.html b/doc/context/scripts/mkiv/mtx-timing.html new file mode 100644 index 000000000..ebad34be5 --- /dev/null +++ b/doc/context/scripts/mkiv/mtx-timing.html @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + + + + + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> + <head> + <title>ConTeXt Timing Tools 0.10</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <style type="text/css"> + body { color: #FFFFFF; background-color: #808080; font-family: optima, verdana, futura, "lucida sans", arial, geneva, helvetica, sans; font-size: 12px; line-height: 18px; } a:link, a:active, a:visited { color: #FFFFFF; } a.dir-view:link, a.dir-view:active, a.dir-view:visited { color: #FFFFFF; text-decoration: underline; } .valid { color: #00FF00; } .invalid { color: #FF0000; } button, .commonlink, .smallbutton { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; border-color: #7F7F7F; border-style: solid; border-width: .125ex; background-color: #FFFFFF; padding: .5ex; } .smallbutton { width: 1em; } a.commonlink:link, a.commonlink:active, a.commonlink:visited, a.smalllink:link, a.smalllink:active, a.smalllink:visited { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; } h1, .title { font-style: normal; font-weight: normal; font-size: 18px; line-height: 18px; margin-bottom: 20px; } h2, .subtitle { font-style: normal; font-weight: normal; font-size: 12px; margin-top: 18px; margin-bottom: 18px; } table { line-height: 18px; font-size: 12px; margin: 0; } th { font-weight: bold; text-align: left; padding-bottom: 6px; } .tc { font-weight: bold; text-align: left; } p, li { max-width: 60em; } .empty-line { margin-top: 4px; } .more-room { margin-right: 1.5em; } .much-more-room { margin-right: 3em; } #main { position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; z-index: 2; width: 80%; height: 80%; padding: 0%; margin: 0%; overflow: auto; border-style: none; border-width: 0; background-color: #3F3F3F; } #main-settings { margin: 12px; x_max-width: 60em; line-height: 18px; font-size: 12px; } #left { position: absolute; top : 10%; left: 0%; bottom: 0%; right: 90%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; } #right { position: absolute; top : 0%; left: 90%; bottom: 10%; right: 0%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; _margin-left: -15px; } #bottom { position: absolute; left: 10%; right: 0%; top: 90%; bottom: 0%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top { position: absolute; left: 0%; right: 10%; top: 0%; bottom: 90%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #top-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: right; vertical-align: middle; } #bottom-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #bottom-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: left; vertical-align: middle; } #left-one { position: absolute; width: 100%; buggedheight: 100%; } #left-two { position: relative; margin-top: 12px; line-height: 18px; text-align: center; vertical-align: top; } #right-one { display: table; height: 100%; width: 100%; } #right-two { display: table-row; height: 100%; width: 100%; } #right-three { display: table-cell; width: 100%; vertical-align: bottom; _position: absolute; _top: 100%; } #right-four { text-align: center; margin-bottom: 2ex; _position: relative; _top: -100%; } #more-top { position: absolute; top: 0%; left: 90%; bottom: 90%; right: 0%; z-index: 3; width: 10%; height: 10%; padding: 0%; margin: 0%; border-style: none; border-width: 0; } #more-top-settings { text-align: center; } #more-right-settings { margin-right: 12px; margin-left: 12px; line-height: 18px; font-size: 10px; text-align: center; } #right-safari { _display: table; width: 100%; height: 100%; } + </style> + <style type="text/css"> + </style> + </head> + <body> + <div id="top"> <div id="top-one"> + <div id="top-two">ConTeXt Timing Tools 0.10 </div> + </div> + </div> + <div id="bottom"> <div id="bottom-one"> + <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl</div> + </div> + </div> + <div id="left"></div> + <div id="right"></div> + <div id="main"> + <div id='main-settings'> + <h1>Command line options</h1> +<table> + <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr> + <tr><th/><td/><td/></tr> + <tr><th>--xhtml</th><td></td><td>make xhtml file</td></tr> + <tr><th>--launch</th><td></td><td>launch after conversion</td></tr> + <tr><th>--remove</th><td></td><td>remove after launching</td></tr> + </table> +<br/> + </div> + </div> + </body> + </html> diff --git a/doc/context/scripts/mkiv/mtx-timing.man b/doc/context/scripts/mkiv/mtx-timing.man new file mode 100644 index 000000000..cb332c5b0 --- /dev/null +++ b/doc/context/scripts/mkiv/mtx-timing.man @@ -0,0 +1,23 @@ +.TH "mtx-timing" "1" "01-01-2013" "version 0.10" "ConTeXt Timing Tools" +.SH "NAME" +.PP +.SH "SYNOPSIS" +.PP +.SH \fBmtxrun --script timing\fP [ \fIOPTIONS\fP ... ] [ \fIFILENAMES\fP ] +.SH "DESCRIPTION"\nConTeXt Timing Tools\n +.SH "OPTIONS" +.TP +.B --xhtml +make xhtml file +.TP +.B --launch +launch after conversion +.TP +.B --remove +remove after launching +.SH "AUTHOR" +More information about ConTeXt and the tools that come with it can be found at: + +maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context +webpage : http://www.pragma-ade.nl / http://tex.aanhet.net +wiki : http://contextgarden.net diff --git a/doc/context/scripts/mkiv/mtx-timing.xml b/doc/context/scripts/mkiv/mtx-timing.xml new file mode 100644 index 000000000..d41322799 --- /dev/null +++ b/doc/context/scripts/mkiv/mtx-timing.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<application> + <metadata> + <entry name="name">mtx-timing</entry> + <entry name="detail">ConTeXt Timing Tools</entry> + <entry name="version">0.10</entry> + </metadata> + <flags> + <category name="basic"> + <subcategory> + <flag name="xhtml"><short>make xhtml file</short></flag> + <flag name="launch"><short>launch after conversion</short></flag> + <flag name="remove"><short>remove after launching</short></flag> + </subcategory> + </category> + </flags> +</application> diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index 43180ddae..1035267e0 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -744,6 +744,13 @@ function scripts.context.run(ctxdata,filename) pdf_close(resultname,pdfview) end end + -- + -- we could do this when locating the format and exit from luatex when + -- there is a version mismatch .. that way we can use stock luatex + -- plus mtxrun to run luajittex instead .. this saves a restart but is + -- also cleaner as then mtxrun only has to check for a special return + -- code (signaling a make + rerun) .. maybe some day + -- local okay = statistics.checkfmtstatus(formatfile,a_engine) if okay ~= true then report("warning: %s, forcing remake",tostring(okay)) diff --git a/scripts/context/lua/mtx-timing.lua b/scripts/context/lua/mtx-timing.lua index 7d1a220e4..5ba361e5f 100644 --- a/scripts/context/lua/mtx-timing.lua +++ b/scripts/context/lua/mtx-timing.lua @@ -36,6 +36,7 @@ local application = logs.application { local report = application.report +dofile(resolvers.findfile("node-snp.lua","tex")) dofile(resolvers.findfile("trac-tim.lua","tex")) dofile(resolvers.findfile("trac-lmx.lua","tex")) @@ -85,7 +86,7 @@ local directrun = true local what = { "parameters", "nodes" } -plugins = plugins or { } -- brrr, will become moduledata as well +plugins = plugins or { progress = { } } -- brrr, will become moduledata as well function plugins.progress.make_svg(filename,other) local metadata, menudata, c = { }, { }, 0 diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 898380b81..8143f7ad7 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.21 23:27} +\newcontextversion{2013.03.22 12:06} %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 0c8a13691..4d7010018 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.21 23:27} +\newcontextversion{2013.03.22 12:06} %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 6b3085d46..5f5d276e4 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 5338fd32c..ecec9716f 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 a0e0d3324..0cfa4d7c1 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.21 23:27} +\edef\contextversion{2013.03.22 12:06} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 2bd5c1d1b..0734bb7c2 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.21 23:27} +\edef\contextversion{2013.03.22 12:06} %D For those who want to use this: diff --git a/tex/context/base/font-enh.lua b/tex/context/base/font-enh.lua index 65bbe7bd9..9338fc20b 100644 --- a/tex/context/base/font-enh.lua +++ b/tex/context/base/font-enh.lua @@ -8,8 +8,12 @@ if not modules then modules = { } end modules ['font-enh'] = { local next = next -local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_defining = logs.reporter("fonts","defining") +local trace_unicoding = false + +trackers.register("fonts.defining", function(v) trace_unicoding = v end) +trackers.register("fonts.unicoding", function(v) trace_unicoding = v end) + +local report_unicoding = logs.reporter("fonts","unicoding") local fonts = fonts local constructors = fonts.constructors @@ -43,8 +47,8 @@ local registerotffeature = otffeatures.register -- end -- for newcode, oldcode in next, data.unicodes do -- if newcode ~= oldcode then --- if trace_defining then --- report_defining("reencoding %U to %U",oldcode,newcode) +-- if trace_unicoding then +-- report_unicoding("reencoding %U to %U",oldcode,newcode) -- end -- characters[newcode] = original[oldcode] -- end @@ -71,8 +75,8 @@ local registerotffeature = otffeatures.register -- end -- for k,v in next, vector do -- if k ~= v then --- if trace_defining then --- report_defining("remapping %U to %U",k,v) +-- if trace_unicoding then +-- report_unicoding("remapping %U to %U",k,v) -- end -- local c = original[k] -- characters[v] = c @@ -137,13 +141,17 @@ local function initializeunicoding(tfmdata) description = descriptions[newcode], } end - local original = originals[oldcode] - if original then - characters [newcode] = original.character - descriptions[newcode] = original.description + if oldcode then + local original = originals[oldcode] + if original then + characters [newcode] = original.character + descriptions[newcode] = original.description + else + characters [newcode] = characters [oldcode] + descriptions[newcode] = descriptions[oldcode] + end else - characters [newcode] = characters [oldcode] - descriptions[newcode] = descriptions[oldcode] + oldcoding[name] = newcode end if tounicode then local index = descriptions[newcode].index @@ -151,8 +159,12 @@ local function initializeunicoding(tfmdata) tounicodes[index] = tosixteen(newcode) -- shared (we could have a metatable) end end - if trace_defining then - report_defining("aliasing glyph %a from %U to %U",name,oldcode,newcode) + if trace_unicoding then + if oldcode then + report_unicoding("aliasing glyph %a from %U to %U",name,oldcode,newcode) + else + report_unicoding("aliasing glyph %a to %U",name,newcode) + end end end end diff --git a/tex/context/base/node-ini.mkiv b/tex/context/base/node-ini.mkiv index 12798e161..39d48a00a 100644 --- a/tex/context/base/node-ini.mkiv +++ b/tex/context/base/node-ini.mkiv @@ -23,6 +23,7 @@ \registerctxluafile{node-aux}{1.001} \registerctxluafile{node-tst}{1.001} \registerctxluafile{node-tra}{1.001} % we might split it off (module) +\registerctxluafile{node-snp}{1.001} \registerctxluafile{node-tsk}{1.001} \registerctxluafile{node-tex}{1.001} \registerctxluafile{node-pro}{1.001} diff --git a/tex/context/base/node-snp.lua b/tex/context/base/node-snp.lua new file mode 100644 index 000000000..31c7771ac --- /dev/null +++ b/tex/context/base/node-snp.lua @@ -0,0 +1,66 @@ +if not modules then modules = { } end modules ['node-snp'] = { + version = 1.001, + comment = "companion to node-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +if not nodes then + nodes = { } -- also loaded in mtx-timing +end + +local snapshots = { } +nodes.snapshots = snapshots + +local nodeusage = nodes.pool and nodes.pool.usage +local clock = os.gettimeofday or os.clock -- should go in environment +local lasttime = clock() +local samples = { } + +local parameters = { + "cs_count", + "dyn_used", + "elapsed_time", + "luabytecode_bytes", + "luastate_bytes", + "max_buf_stack", + "obj_ptr", + "pdf_mem_ptr", + "pdf_mem_size", + "pdf_os_cntr", +-- "pool_ptr", -- obsolete + "str_ptr", +} + +function snapshots.takesample(comment) + if nodeusage then + local c = clock() + local t = { + elapsed_time = c - lasttime, + node_memory = nodeusage(), + comment = comment, + } + for i=1,#parameters do + local parameter = parameters[i] + local ps = status[parameter] + if ps then + t[parameter] = ps + end + end + samples[#samples+1] = t + lasttime = c + end +end + +function snapshots.getsamples() + return samples -- one return value ! +end + +function snapshots.resetsamples() + samples = { } +end + +function snapshots.getparameters() + return parameters +end diff --git a/tex/context/base/node-tra.lua b/tex/context/base/node-tra.lua index 10d44a4cc..916b2143d 100644 --- a/tex/context/base/node-tra.lua +++ b/tex/context/base/node-tra.lua @@ -527,57 +527,3 @@ nodes.visualizers = { } function nodes.visualizers.handler(head) return head, false end - --- also moved here - -local snapshots = { } -nodes.snapshots = snapshots - -local nodeusage = nodepool.usage - -local lasttime = clock() -local samples = { } -local parameters = { - "cs_count", - "dyn_used", - "elapsed_time", - "luabytecode_bytes", - "luastate_bytes", - "max_buf_stack", - "obj_ptr", - "pdf_mem_ptr", - "pdf_mem_size", - "pdf_os_cntr", --- "pool_ptr", -- obsolete - "str_ptr", -} - -function snapshots.takesample(comment) - local c = clock() - local t = { - elapsed_time = c - lasttime, - node_memory = nodeusage(), - comment = comment, - } - for i=1,#parameters do - local parameter = parameters[i] - local ps = status[parameter] - if ps then - t[parameter] = ps - end - end - samples[#samples+1] = t - lasttime = c -end - -function snapshots.getsamples() - return samples -- one return value ! -end - -function snapshots.resetsamples() - samples = { } -end - -function snapshots.getparameters() - return parameters -end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 22f54435d..f2d760198 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 4bc2c0fc3..c05736dfb 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua index cf41da58c..b09e498e8 100644 --- a/tex/context/base/status-mkiv.lua +++ b/tex/context/base/status-mkiv.lua @@ -4017,6 +4017,11 @@ return { }, { category = "lua", + filename = "node-snp", + status = "todo", + }, + { + category = "lua", filename = "node-tsk", status = "todo", }, diff --git a/tex/context/base/symb-imp-cc.mkiv b/tex/context/base/symb-imp-cc.mkiv new file mode 100644 index 000000000..6d544289b --- /dev/null +++ b/tex/context/base/symb-imp-cc.mkiv @@ -0,0 +1,52 @@ +%D \module +%D [ file=symb-imp-cc, +%D version=2013.03.22, +%D title=\CONTEXT\ Symbol Libraries, +%D subtitle=Creative Commons, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\definefontfeature + [cc-icons] + [mode=base, + goodies=cc-icons, + unicoding=yes] + +\definefontsynonym + [creativecommons] + [cc-icons*cc-icons] + +\startsymbolset[cc] + \definesymbol [sa] [\getnamedglyphdirect{creativecommons}{sa}] + \definesymbol [by] [\getnamedglyphdirect{creativecommons}{by}] + \definesymbol [cc] [\getnamedglyphdirect{creativecommons}{cc}] + \definesymbol [nd] [\getnamedglyphdirect{creativecommons}{nd}] + \definesymbol [nc] [\getnamedglyphdirect{creativecommons}{nc}] + \definesymbol [sampling] [\getnamedglyphdirect{creativecommons}{sampling}] + \definesymbol [share] [\getnamedglyphdirect{creativecommons}{share}] + \definesymbol [remix] [\getnamedglyphdirect{creativecommons}{remix}] + \definesymbol [logo] [\getnamedglyphdirect{creativecommons}{logo}] + + \definesymbol [cc-by-sa-nc] [\dontleavehmode\lower.25ex\hbox\bgroup + \getnamedglyphdirect{creativecommons}{cc}\enspace + \getnamedglyphdirect{creativecommons}{by}\enspace + \getnamedglyphdirect{creativecommons}{sa}\enspace + \getnamedglyphdirect{creativecommons}{nc}% + \egroup] + +\stopsymbolset + +\continueifinputfile{symb-imp-cc.mkiv} + +\starttext + + \showsymbolset[cc] + + \symbol[cc][cc-by-sa-nc] + +\stoptext diff --git a/tex/context/base/trac-tim.lua b/tex/context/base/trac-tim.lua index 527efa088..15ac9bf1b 100644 --- a/tex/context/base/trac-tim.lua +++ b/tex/context/base/trac-tim.lua @@ -16,6 +16,8 @@ moduledata.progress = progress local report_timing = logs.reporter("timing") +if not nodes then nodes = { } end -- when loaded in mtxrun + progress.parameters = nodes and nodes.snapshots.getparameters progress.defaultfilename = ((tex and tex.jobname) or "whatever") .. "-luatex-progress" diff --git a/tex/context/fonts/cc-icons.lfg b/tex/context/fonts/cc-icons.lfg new file mode 100644 index 000000000..2739918af --- /dev/null +++ b/tex/context/fonts/cc-icons.lfg @@ -0,0 +1,23 @@ +local utfbyte = utf.byte + +return { + name = "cc-icons", + version = "1.00", + comment = "Goodies that complement creative commons icons.", + author = "Hans Hagen", + copyright = "ConTeXt development team", + remapping = { + tounicode = true, + unicodes = { + sa = utfbyte("a"), + by = utfbyte("b"), + cc = utfbyte("c"), + nd = utfbyte("d"), + nc = utfbyte("n"), + sampling = utfbyte("m"), + share = utfbyte("s"), + remix = utfbyte("r"), + logo = utfbyte("C"), + }, + }, +} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 99c1a22f0..5786e460b 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/21/13 23:27:35 +-- merge date : 03/22/13 12:06:35 do -- begin closure to overcome local limits and interference |