diff options
author | Marius <mariausol@gmail.com> | 2011-05-16 12:20:14 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-05-16 12:20:14 +0300 |
commit | f68b6626917f73ba448040a8667d0b2b9700ca6c (patch) | |
tree | c7ab66d139b5c5aa0e602fdef321e2dc16409cde | |
parent | 615ba84b2b4a17ee92e4a28762d0086389802d55 (diff) | |
download | context-f68b6626917f73ba448040a8667d0b2b9700ca6c.tar.gz |
beta 2011.05.16 11:00
-rw-r--r-- | scripts/context/lua/mtx-epub.lua | 26 | ||||
-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.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/java-imp-fld.mkiv | 24 | ||||
-rw-r--r-- | tex/context/base/scrn-but.mkvi | 15 | ||||
-rw-r--r-- | tex/context/base/spac-ver.lua | 10 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23585 -> 23548 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 154368 -> 154363 bytes | |||
-rw-r--r-- | tex/context/base/task-ini.lua | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
12 files changed, 72 insertions, 15 deletions
diff --git a/scripts/context/lua/mtx-epub.lua b/scripts/context/lua/mtx-epub.lua index 15282ddab..70ee7828c 100644 --- a/scripts/context/lua/mtx-epub.lua +++ b/scripts/context/lua/mtx-epub.lua @@ -6,6 +6,18 @@ if not modules then modules = { } end modules ['mtx-epub'] = { license = "see context related readme files" } +-- The epub specification is far from beautiful. Especially the id related +-- part is messy and devices/programs react differently on them (so an id is not +-- really an id but has some special property). Then there is this ncx suffix +-- thing. Somehow it give the impression of a reversed engineered application +-- format so it will probably take a few cycles to let it become a real +-- clean standard. Thanks to Adam Reviczky for helping to figure out all these +-- puzzling details. + +-- This is preliminary code. At some point we will deal with images as well but +-- first we need a decent strategy to export them. More information will be +-- available on the wiki. + local format = string.format local concat = table.concat @@ -63,6 +75,14 @@ local package = [[ </package> ]] +-- We need to figure out what is permitted; numbers only seem to give +-- problems is some applications as do names with dashes. + +local function dumbid(filename) + -- return (string.gsub(os.uuid(),"%-%","")) -- to be tested + return file.nameonly(filename) +end + local mimetypes = { xhtml = "application/xhtml+xml", css = "text/css", @@ -70,9 +90,9 @@ local mimetypes = { } local idmakers = { - ncx = function(filename) return "ncx" end, - css = function(filename) return "stylesheet" end, - default = function(filename) return file.nameonly(filename) end, + ncx = function(filename) return "ncx" end, + -- css = function(filename) return "stylesheet" end, + default = function(filename) return dubmid(filename) end, } -- specification = { diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 675bcfd42..d4120f07f 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{2011.05.15 12:57} +\newcontextversion{2011.05.16 11:00} %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 f5906159c..e3376b8e2 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{2011.05.15 12:57} +\newcontextversion{2011.05.16 11:00} %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/context.mkii b/tex/context/base/context.mkii index 7acb889ad..fbd2bb507 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{2011.05.15 12:57} +\edef\contextversion{2011.05.16 11:00} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index a37559c85..d00629815 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.05.15 12:57} +\edef\contextversion{2011.05.16 11:00} %D For those who want to use this: diff --git a/tex/context/base/java-imp-fld.mkiv b/tex/context/base/java-imp-fld.mkiv index 9eb7d7ed5..a0909f594 100644 --- a/tex/context/base/java-imp-fld.mkiv +++ b/tex/context/base/java-imp-fld.mkiv @@ -419,6 +419,30 @@ function Pause_Walk_Field(FieldSet) { } } +function Start_Pause_Walk_Field(FieldSet, Delay) { + var fieldset = Do_Get_Check_Walk_Field(FieldSet) ; + if (fieldset) { + if (fieldset.running) { + if (fieldset.paused) { + Do_Start_Auto_Walk_Field(FieldSet) ; + fieldset.paused = false ; + } else { + Do_Stop_Auto_Walk_Field(FieldSet) ; + fieldset.paused = true ; + } + } else { + fieldset.number = 0 ; + if (Delay) { + fieldset.delay = Delay ; + } + Reset_Fields(FieldSet) ; + Do_Start_Auto_Walk_Field(FieldSet) ; + fieldset.running = true ; + fieldset.paused = false ; + } + } +} + function Stop_Walk_Field(FieldSet) { var fieldset = Do_Get_Check_Walk_Field(FieldSet) ; if (fieldset) { diff --git a/tex/context/base/scrn-but.mkvi b/tex/context/base/scrn-but.mkvi index 338f3090b..e1dedd605 100644 --- a/tex/context/base/scrn-but.mkvi +++ b/tex/context/base/scrn-but.mkvi @@ -416,6 +416,8 @@ \newdimen\scrn_menu_offset_left \newdimen\scrn_menu_offset_right +\newconditional\scrn_menu_zerodimensions + \def\scrn_menu_set_used {\doassigncheckedframeoffset\scrn_menu_offset_left {\interactionmenuparameter\c!leftoffset }% \doassigncheckedframeoffset\scrn_menu_offset_right {\interactionmenuparameter\c!rightoffset }% @@ -435,8 +437,13 @@ \scrn_menu_final_height\namedinteractionmenuparameter\askedinteractionmenulocation\c!maxheight} \def\scrn_menu_apply_final - {\wd\scrn_menu_box\scrn_menu_final_width - \ht\scrn_menu_box\scrn_menu_final_height + {\ifconditional\scrn_menu_zerodimensions + \wd\scrn_menu_box\zeropoint + \ht\scrn_menu_box\zeropoint + \else + \wd\scrn_menu_box\scrn_menu_final_width + \ht\scrn_menu_box\scrn_menu_final_height + \fi \dp\scrn_menu_box\zeropoint} \def\scrn_menu_apply_used @@ -793,6 +800,7 @@ {\hbox to \leftedgewidth \bgroup \hsize\leftedgewidth %\csname\??tk\v!leftedge\c!left\endcsname + \settrue\scrn_menu_zerodimensions \scrn_menu_insert\v!left %\csname\??tk\v!leftedge\c!right\endcsname \egroup @@ -802,6 +810,7 @@ {\hbox to \rightedgewidth \bgroup \hsize\rightedgewidth %\csname\??tk\v!rightedge\c!left\endcsname + \settrue\scrn_menu_zerodimensions \scrn_menu_insert\v!right %\csname\??tk\v!rightedge\c!right\endcsname \egroup @@ -811,6 +820,7 @@ {\vbox to \topheight \bgroup \vsize\topheight %\csname\??tk\v!top\c!before\endcsname + \settrue\scrn_menu_zerodimensions \scrn_menu_insert\v!top %\csname\??tk\v!top\c!after\endcsname \kern\zeropoint @@ -821,6 +831,7 @@ {\vbox to \bottomheight \bgroup \vsize\bottomheight %\csname\??tk\v!bottom\c!before\endcsname + \settrue\scrn_menu_zerodimensions \scrn_menu_insert\v!bottom %\csname\??tk\v!bottom\c!after\endcsname \kern\zeropoint diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua index 842dfe64a..83ee6e492 100644 --- a/tex/context/base/spac-ver.lua +++ b/tex/context/base/spac-ver.lua @@ -80,6 +80,7 @@ local nodepool = nodes.pool local new_penalty = nodepool.penalty local new_kern = nodepool.kern local new_rule = nodepool.rule +local new_gluespec = nodepool.gluespec local nodecodes = nodes.nodecodes local skipcodes = nodes.skipcodes @@ -914,7 +915,7 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also elseif id ~= glue_code then flush("something else") current = current.next - elseif subtype == userskip_code then -- todo, other subtypes, like math + elseif subtype == userskip_code then local sc = has_attribute(current,a_skipcategory) -- has no default, no unset (yet) local so = has_attribute(current,a_skiporder ) or 1 -- has 1 default, no unset (yet) local sp = has_attribute(current,a_skippenalty ) -- has no default, no unset (yet) @@ -931,7 +932,7 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also elseif not sc then -- if not sc then if glue_data then if trace then trace_done("flush",glue_data) end - head, current = nodes.before(head,current,glue_data) + head = insert_node_before(head,current,glue_data) if trace then trace_natural("natural",current) end current = current.next else @@ -944,8 +945,9 @@ local function collapser(head,where,what,trace,snap,a_snapmethod) -- maybe also if cs.writable and ps.stretch_order == 0 and ps.shrink_order == 0 and cs.stretch_order == 0 and cs.shrink_order == 0 then local pw, pp, pm = ps.width, ps.stretch, ps.shrink local cw, cp, cm = cs.width, cs.stretch, cs.shrink - ps = writable_spec(previous) -- no writable needed here - ps.width, ps.stretch, ps.shrink = pw + cw, pp + cp, pm + cm +--~ ps = writable_spec(previous) -- no writable needed here +--~ ps.width, ps.stretch, ps.shrink = pw + cw, pp + cp, pm + cm +previous.spec = new_gluespec(pw + cw, pp + cp, pm + cm) -- else topskip can disappear if trace then trace_natural("removed",current) end head, current = remove_node(head, current, true) -- current = previous diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex f825d0ace..7509af18a 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 06d6da7d0..a4ad5c8da 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/task-ini.lua b/tex/context/base/task-ini.lua index 435c85286..c1c22e8cc 100644 --- a/tex/context/base/task-ini.lua +++ b/tex/context/base/task-ini.lua @@ -73,7 +73,7 @@ appendaction("math", "builders", "builders.kernel.mlist_to_hlist") appendaction("finalizers", "lists", "nodes.handlers.graphicvadjust") -- todo appendaction("finalizers", "fonts", "builders.paragraphs.solutions.splitters.optimize") -- experimental --- rather new +-- still experimental appendaction("mvlbuilders", "normalizers", "nodes.handlers.migrate") -- appendaction("mvlbuilders", "normalizers", "builders.vspacing.pagehandler") -- last ! diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 9c8a7e640..10e36056b 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/15/11 12:57:24 +-- merge date : 05/16/11 11:00:21 do -- begin closure to overcome local limits and interference |