diff options
Diffstat (limited to 'tex/context/base')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4104 -> 4111 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/pack-rul.lua | 64 | ||||
-rw-r--r-- | tex/context/base/pack-rul.mkiv | 13 | ||||
-rw-r--r-- | tex/context/base/s-youless.mkiv | 24 | ||||
-rw-r--r-- | tex/context/base/scrp-cjk.lua | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24544 -> 24718 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 222329 -> 225239 bytes | |||
-rw-r--r-- | tex/context/base/util-you.lua | 5 |
10 files changed, 78 insertions, 34 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 08799aadf..bf224192e 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.11.14 23:22} +\newcontextversion{2013.11.15 15:04} %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 e6c66d35e..693b8f2e0 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index cd2fc15c8..59943c034 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.11.14 23:22} +\edef\contextversion{2013.11.15 15:04} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/pack-rul.lua b/tex/context/base/pack-rul.lua index fb18eaf7c..fc6295018 100644 --- a/tex/context/base/pack-rul.lua +++ b/tex/context/base/pack-rul.lua @@ -38,16 +38,16 @@ function commands.doreshapeframedbox(n) if boxwidth ~= 0 then -- and h.subtype == vlist_code local list = box.list if list then - for h in traverse_id(hlist_code,list) do -- no dir etc needed + local function check(n,usewidth) if not firstheight then - firstheight = h.height + firstheight = n.height end - lastdepth = h.depth + lastdepth = n.depth noflines = noflines + 1 - local l = h.list + local l = n.list if l then - if h.subtype == box_code then -- maybe more - lastlinelength = h.width + if usewidth or n.subtype == box_code then -- maybe more + lastlinelength = n.width else lastlinelength = node_dimensions(l) -- used to be: hpack(copy(l)).width end @@ -60,22 +60,34 @@ function commands.doreshapeframedbox(n) totalwidth = totalwidth + lastlinelength end end + local hdone = false + -- local vdone = false + for h in traverse_id(hlist_code,list) do -- no dir etc needed + check(h) + hdone = true + end + for v in traverse_id(vlist_code,list) do -- no dir etc needed + check(v) + -- vdone = true + end if firstheight then if maxwidth ~= 0 then - for h in traverse_id(hlist_code,list) do - local l = h.list - if l then - if h.subtype == box_code then - -- explicit box, no 'line' - else - -- if h.width ~= maxwidth then -- else no display math handling (uses shift) - -- challenge: adapt glue_set - -- h.glue_set = h.glue_set * h.width/maxwidth -- interesting ... doesn't matter much - -- h.width = maxwidth - h.list = hpack(l,maxwidth,'exactly',h.dir) - h.shift = 0 -- needed for display math - h.width = maxwidth - -- end + if hdone then + for h in traverse_id(hlist_code,list) do + local l = h.list + if l then + if h.subtype == box_code then + -- explicit box, no 'line' + else + -- if h.width ~= maxwidth then -- else no display math handling (uses shift) + -- challenge: adapt glue_set + -- h.glue_set = h.glue_set * h.width/maxwidth -- interesting ... doesn't matter much + -- h.width = maxwidth + h.list = hpack(l,maxwidth,'exactly',h.dir) + h.shift = 0 -- needed for display math + h.width = maxwidth + -- end + end end end end @@ -101,13 +113,19 @@ function commands.doanalyzeframedbox(n) if box.width ~= 0 then local list = box.list if list then - for h in traverse_id(hlist_code,list) do + local function check(n) if not firstheight then - firstheight = h.height + firstheight = n.height end - lastdepth = h.depth + lastdepth = n.depth noflines = noflines + 1 end + for h in traverse_id(hlist_code,list) do + check(h) + end + for v in traverse_id(vlist_code,list) do + check(v) + end end end texsetcount("global","framednoflines",noflines) diff --git a/tex/context/base/pack-rul.mkiv b/tex/context/base/pack-rul.mkiv index bff8b4a0f..377d39499 100644 --- a/tex/context/base/pack-rul.mkiv +++ b/tex/context/base/pack-rul.mkiv @@ -1980,6 +1980,19 @@ %D The handlers: +% Beware, we have a \noindent so an empty line is indeed an empty line and +% the \synchronizeinlinedirection triggers a vbox instead of a line. +% +% \startTEXpage[offset=0.5ex,align={lohi,middle}] +% +% \vbox{\hbox{x}} +% \stopTEXpage +% +% \startTEXpage[offset=0.5ex,align={lohi,middle}] +% \vbox{\hbox{x}} +% \stopTEXpage + + % \def\pack_framed_forgetall{\forgetall} \def\pack_framed_set_foregroundcolor diff --git a/tex/context/base/s-youless.mkiv b/tex/context/base/s-youless.mkiv index 4f63a681f..ff0aee1f3 100644 --- a/tex/context/base/s-youless.mkiv +++ b/tex/context/base/s-youless.mkiv @@ -47,10 +47,13 @@ utilities.youless.analyze(data) + -- for the moment no specific font scaling + for y=year,year do - local year = data.years[y] + local year = data.years[y] local scale = 20 + local mark = 3 for m=1,12 do local month = year.months[m] @@ -73,9 +76,16 @@ local xoffset = (d-1) * 24 local wd = os.weekday(d,m,y) local weekend = wd == 1 or wd == 7 - if weekend then - context("draw (%s,%s) -- (%s,%s); ",xoffset,-17,xoffset,weekend and -35) - context("draw (%s,%s) -- (%s,%s); ",xoffset+24,-17,xoffset+24,weekend and -35) + if not weekend then + -- okay + elseif mark == 1 then + context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -17.5,xoffset, -32.5) + context("draw (%s,%s) -- (%s,%s) ; ",xoffset+24,-17.5,xoffset+24,-32.5) + elseif mark == 2 then + context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -17.5,xoffset+24,-17.5) + context("draw (%s,%s) -- (%s,%s) ; ",xoffset, -32.5,xoffset+24,-32.5) + elseif mark == 3 then + context("draw unitsquare xysized (%s,%s) shifted (%s,%s) ; ",24,15,xoffset,-32.5) end context([[draw textext("%s") shifted (%s,%s) ; ]],d,xoffset + 12,-25) if day then @@ -87,8 +97,8 @@ local dx = xoffset + h local dy = hour.watt/scale local dm = hour.maxwatt/scale - context("draw (%s,%s) -- (%s,%s) withcolor darkblue ; ",dx,0,dx,dy) - context("draw (%s,%s) -- (%s,%s) withcolor darkgray ; ",dx,dy,dx,dm) + context("draw (%s,%s) -- (%s,%s) withcolor %s ; ",dx, 0,dx,dy,weekend and "darkyellow" or "darkblue") + context("draw (%s,%s) -- (%s,%s) withcolor %s ; ",dx,dy,dx,dm,"darkgray") end end end @@ -129,7 +139,7 @@ \continueifinputfile{s-youless.mkiv} -\setupbodyfont[dejavu] +\setupbodyfont[dejavu] % smaller sizes also look ok % printer (oce) : > 3000 W startup (900 W idle, 2000 W printing) % coffeemaker : 1500 W when heating diff --git a/tex/context/base/scrp-cjk.lua b/tex/context/base/scrp-cjk.lua index 4f10ceddb..681fc4c43 100644 --- a/tex/context/base/scrp-cjk.lua +++ b/tex/context/base/scrp-cjk.lua @@ -505,7 +505,7 @@ function scripts.decomposehangul(head) head, current = insert_node_after(head,current,m) if tail_consonant then local t = copy_node(current) - t.char" = tail_consonant + t.char = tail_consonant head, current = insert_node_after(head,current,t) end done = true diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 7751c83fb..ed2645e2f 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 dc36dfc56..95a20017d 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/util-you.lua b/tex/context/base/util-you.lua index 0eb87732f..e56db7f76 100644 --- a/tex/context/base/util-you.lua +++ b/tex/context/base/util-you.lua @@ -8,6 +8,9 @@ if not modules then modules = { } end modules ['util-you'] = { -- See mtx-youless.lua and s-youless.mkiv for examples of usage. +-- todo: already calculate min, max and average per hour and discard +-- older data, or maybe a condense option + require("util-jsn") -- the library variant: @@ -130,7 +133,7 @@ function youless.collect(specification) get(host,"d",0,data,true) get(host,"w",1,data) if detail then - get(host,"h",1,data) + get(host,"h",1,data) -- todo: get this for calculating the precise max end else return |