From 7cc7e9b40ea094da39ca7a7be92a02fac4071f35 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 16 Oct 2012 22:12:00 +0200 Subject: beta 2012.10.16 22:12 --- metapost/context/base/mp-abck.mpiv | 2 +- metapost/context/base/mp-apos.mpiv | 2 +- metapost/context/base/mp-asnc.mpiv | 2 +- metapost/context/base/mp-butt.mpiv | 2 +- metapost/context/base/mp-char.mpiv | 2 +- metapost/context/base/mp-chem.mpiv | 4 +- metapost/context/base/mp-core.mpiv | 2 +- metapost/context/base/mp-crop.mpiv | 2 +- metapost/context/base/mp-figs.mpiv | 2 +- metapost/context/base/mp-form.mpiv | 2 +- metapost/context/base/mp-func.mpiv | 2 +- metapost/context/base/mp-grap.mpiv | 202 +++++++++++++++++++++ metapost/context/base/mp-grid.mpiv | 2 +- metapost/context/base/mp-grph.mpiv | 2 +- metapost/context/base/mp-mlib.mpiv | 2 +- metapost/context/base/mp-page.mpiv | 2 +- metapost/context/base/mp-shap.mpiv | 2 +- metapost/context/base/mp-step.mpiv | 2 +- metapost/context/base/mp-text.mpiv | 2 +- metapost/context/base/mp-tool.mpiv | 2 +- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4147 -> 4140 bytes tex/context/base/context-version.png | Bin 106541 -> 106190 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/m-chart.mkvi | 44 +++-- tex/context/base/m-graph.mkiv | 122 ++----------- tex/context/base/status-files.pdf | Bin 24568 -> 24584 bytes tex/context/base/status-lua.pdf | Bin 195391 -> 195390 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 31 files changed, 272 insertions(+), 146 deletions(-) create mode 100644 metapost/context/base/mp-grap.mpiv diff --git a/metapost/context/base/mp-abck.mpiv b/metapost/context/base/mp-abck.mpiv index 02fab0337..abd7d8848 100644 --- a/metapost/context/base/mp-abck.mpiv +++ b/metapost/context/base/mp-abck.mpiv @@ -5,7 +5,7 @@ %D subtitle=anchored background macros, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/metapost/context/base/mp-apos.mpiv b/metapost/context/base/mp-apos.mpiv index f92efc5fd..7b7737754 100644 --- a/metapost/context/base/mp-apos.mpiv +++ b/metapost/context/base/mp-apos.mpiv @@ -5,7 +5,7 @@ %D subtitle=anchored background macros, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/metapost/context/base/mp-asnc.mpiv b/metapost/context/base/mp-asnc.mpiv index dfd88317c..2626e4d58 100644 --- a/metapost/context/base/mp-asnc.mpiv +++ b/metapost/context/base/mp-asnc.mpiv @@ -5,7 +5,7 @@ %D subtitle=anchored background macros, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/metapost/context/base/mp-butt.mpiv b/metapost/context/base/mp-butt.mpiv index df7e9e4fd..6f5b90a7e 100644 --- a/metapost/context/base/mp-butt.mpiv +++ b/metapost/context/base/mp-butt.mpiv @@ -5,7 +5,7 @@ %D subtitle=buttons, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-char.mpiv b/metapost/context/base/mp-char.mpiv index c293b7284..f604accd8 100644 --- a/metapost/context/base/mp-char.mpiv +++ b/metapost/context/base/mp-char.mpiv @@ -5,7 +5,7 @@ %D subtitle=charts, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-chem.mpiv b/metapost/context/base/mp-chem.mpiv index 59179ed85..2b2d8e5bf 100644 --- a/metapost/context/base/mp-chem.mpiv +++ b/metapost/context/base/mp-chem.mpiv @@ -5,7 +5,7 @@ %D subtitle=chemicals, %D author=Hans Hagen \& Alan Braslau", %D date=\currentdate, -%D copyright=\PRAGMA] +%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 licen-en.pdf for @@ -568,7 +568,7 @@ vardef chem_c_text(expr txt, z) = % adapted copy of thelabel@ % draw a withcolor red ; enddef ; -vardef chem_ang (expr n, d) = +vardef chem_ang (expr n, d) = ((1 - d)*chem_angle[n] + if (n<0): -90 else: chem_rotation fi) % no ; enddef ; diff --git a/metapost/context/base/mp-core.mpiv b/metapost/context/base/mp-core.mpiv index 1934e3040..3dba4a004 100644 --- a/metapost/context/base/mp-core.mpiv +++ b/metapost/context/base/mp-core.mpiv @@ -5,7 +5,7 @@ %D subtitle=background macros, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/metapost/context/base/mp-crop.mpiv b/metapost/context/base/mp-crop.mpiv index 3ba384a1f..00bcdcb44 100644 --- a/metapost/context/base/mp-crop.mpiv +++ b/metapost/context/base/mp-crop.mpiv @@ -5,7 +5,7 @@ %D subtitle=Cropmarks, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/metapost/context/base/mp-figs.mpiv b/metapost/context/base/mp-figs.mpiv index c65808f6d..aac7c5ad2 100644 --- a/metapost/context/base/mp-figs.mpiv +++ b/metapost/context/base/mp-figs.mpiv @@ -5,7 +5,7 @@ %D subtitle=figures, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-form.mpiv b/metapost/context/base/mp-form.mpiv index d0519b4f2..b58792e1a 100644 --- a/metapost/context/base/mp-form.mpiv +++ b/metapost/context/base/mp-form.mpiv @@ -5,7 +5,7 @@ %D subtitle=form support, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-func.mpiv b/metapost/context/base/mp-func.mpiv index 1d289b606..58df711f2 100644 --- a/metapost/context/base/mp-func.mpiv +++ b/metapost/context/base/mp-func.mpiv @@ -5,7 +5,7 @@ %D subtitle=function hacks, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-grap.mpiv b/metapost/context/base/mp-grap.mpiv new file mode 100644 index 000000000..68d95c9eb --- /dev/null +++ b/metapost/context/base/mp-grap.mpiv @@ -0,0 +1,202 @@ +%D \module +%D [ file=mp-grap.mpiv, +%D version=2012.10.16, % 2008.09.08 and earlier, +%D title=\CONTEXT\ \METAPOST\ graphics, +%D subtitle=graph packagesupport, +%D author=Hans Hagen \& Alan Braslau, +%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 licen-en.pdf for +%C details. + +if known context_grap : endinput ; fi ; + +boolean context_grap ; context_grap := true ; + +input graph.mp ; + +vardef roundd(expr x, d) = + if abs d > 4 : + if d > 0 : + x + else : + 0 + fi + elseif d > 0 : + save i ; i = floor x ; + i + round(Ten_to[d]*(x-i))/Ten_to[d] + else : + round(x/Ten_to[-d])*Ten_to[-d] + fi +enddef ; + +Ten_to0 = 1 ; +Ten_to1 = 10 ; +Ten_to2 = 100 ; +Ten_to3 = 1000 ; +Ten_to4 = 10000 ; + +def sFe_base = enddef ; + +if unknown Fe_plus : + picture Fe_plus ; Fe_plus := textext("+") ; % btex + etex ; +fi ; + +vardef format (expr f,x) = dofmt_.Feform_(f,x) enddef ; +vardef Mformat (expr f,x) = dofmt_.Meform (f,x) enddef ; +vardef formatstr (expr f,x) = dofmt_.Feform_(f,x) enddef ; +vardef Mformatstr(expr f,x) = dofmt_.Meform(f,x) enddef ; + +vardef escaped_format(expr s) = + "" for n=1 upto length(s) : & + if ASCII substring (n,n+1) of s = 37 : + "@" + else : + substring (n,n+1) of s + fi + endfor +enddef ; + +vardef dofmt_@#(expr f, x) = + % textext("\MPgraphformat{" & escaped_format(f) & "}{" & (if string x : x else: decimal x fi) & "}") + textext(mfun_format_number(escaped_format(f),x)) +enddef ; + +% We redefine autogrid from graph.mp adding the possibility of differing X and Y +% formats. Autoform is defined in graph.mp (by default "%g"). +% +% string Autoform_X ; Autoform_X := "@.0e" ; +% string Autoform_Y ; Autoform_Y := "@.0e" ; + +vardef autogrid(suffix tx, ty) text w = + Gneedgr_ := false ; + if str tx <> "" : + for x=auto.x : + tx ( + if string Autoform_X : + if Autoform_X <> "" : + Autoform_X + else : + Autoform + fi + else : + Autoform + fi, + x) w ; + endfor + fi ; + if str ty <> "" : + for y=auto.y : + ty ( + if string Autoform_Y : + if Autoform_Y <> "" : + Autoform_Y + else : + Autoform + fi + else : + Autoform + fi, + y) w ; + endfor + fi ; +enddef ; + +% A couple of extensions: + +% Define a vector function sym returning a picture: 10 different shapes, +% unfilled outline, interior filled with different shades of the background. +% Thus, overlapping points on a plot are more clearly distinguishable. + +% grap_symsize := fontsize defaultfont ; % can be redefined +% +% dynamic version: + +vardef grap_symsize = + fontsize defaultfont +enddef ; + +path grap_sym[] ; % (internal) symbol path + +grap_sym[0] := (0,0) ; % point +grap_sym[1] := fullcircle ; % circle +grap_sym[2] := (up -- down) scaled .5 ; % vertical bar + +for i = 3 upto 9 : % polygons + grap_sym[i] := for j = 0 upto i-1 : + (up scaled .5) rotated (j*360/i) -- + endfor cycle ; +endfor + +grap_sym[12] := grap_sym[2] rotated +90 ; % horizontal line +grap_sym[22] := grap_sym[2] rotated +45 ; % backslash +grap_sym[32] := grap_sym[2] rotated -45 ; % slash +grap_sym[13] := grap_sym[3] rotated 180 ; % down triangle +grap_sym[23] := grap_sym[3] rotated -90 ; % right triangle +grap_sym[33] := grap_sym[3] rotated +90 ; % left triangle +grap_sym[14] := grap_sym[4] rotated +45 ; % square +grap_sym[15] := grap_sym[5] rotated 180 ; % down pentagon +grap_sym[16] := grap_sym[6] rotated +90 ; % turned hexagon +grap_sym[17] := grap_sym[7] rotated 180 ; +grap_sym[18] := grap_sym[8] rotated +22.5 ; + +numeric l ; + +for j = 5 upto 9 : + l := length(grap_sym[j]) ; + pair p[] ; + for i = 0 upto l : + p[i] = whatever [point i of grap_sym[j], + point (i+2 mod l) of grap_sym[j]] ; + p[i] = whatever [point (i+1 mod l) of grap_sym[j], + point (i+l-1 mod l) of grap_sym[j]] ; + endfor + grap_sym[20+j] := for i = 0 upto l : point i of grap_sym[j]--p[i]--endfor cycle ; +endfor + +path s ; s := grap_sym[4] ; +path q ; q := s scaled .25 ; +numeric l ; l := length(s) ; + +pair p[] ; + +grap_sym[24] := for i = 0 upto l-1 : + hide( + p[i] = whatever [point i of s, point (i+1 mod l) of s] ; + p[i] = whatever [point i of q, point (i-1+l mod l) of q] ; + p[i+l] = whatever [point i of s, point (i+1 mod l) of s] ; + p[i+l] = whatever [point i+1 of q, point (i+2 mod l) of q] ; + ) + point i of q -- p[i] -- p[i+l] -- +endfor cycle ; + +grap_sym[34] := grap_sym[24] rotated 45 ; + + % usage: gdraw p plot plotsymbol(1,red,1) ; % a filled red circle + % usage: gdraw p plot plotsymbol(4,blue,0) ; % a blue square + % usage: gdraw p plot plotsymbol(14,green,0.5) ; % a 50% filled green diamond + +def plotsymbol(expr n,c,f) = % (number,color,color|number) + if known grap_sym[n] : + image( + path p ; p := grap_sym[n] scaled grap_symsize ; + undraw p withpen currentpen scaled 2 ; + if cycle p : fill p withcolor + if color f and known f : + f + elseif numeric f and known f and color c and known c : + f[background,c] + elseif numeric f and known f : + f[background,black] + else : + background + fi ; + fi + draw p if color c and known c : withcolor c fi ; + ) + else : + nullpicture + fi +enddef ; diff --git a/metapost/context/base/mp-grid.mpiv b/metapost/context/base/mp-grid.mpiv index cc5c2b76e..b9243b1b9 100644 --- a/metapost/context/base/mp-grid.mpiv +++ b/metapost/context/base/mp-grid.mpiv @@ -5,7 +5,7 @@ %D subtitle=grid support, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-grph.mpiv b/metapost/context/base/mp-grph.mpiv index a8868033b..30c49e6e0 100644 --- a/metapost/context/base/mp-grph.mpiv +++ b/metapost/context/base/mp-grph.mpiv @@ -5,7 +5,7 @@ %D subtitle=graphic text support, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index 1b59f2f78..b8fabbfb9 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -5,7 +5,7 @@ %D subtitle=plugins, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-page.mpiv b/metapost/context/base/mp-page.mpiv index 96f617257..c8e3c6237 100644 --- a/metapost/context/base/mp-page.mpiv +++ b/metapost/context/base/mp-page.mpiv @@ -5,7 +5,7 @@ %D subtitle=page enhancements, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/metapost/context/base/mp-shap.mpiv b/metapost/context/base/mp-shap.mpiv index b62e636d5..713656510 100644 --- a/metapost/context/base/mp-shap.mpiv +++ b/metapost/context/base/mp-shap.mpiv @@ -5,7 +5,7 @@ %D subtitle=shapes, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-step.mpiv b/metapost/context/base/mp-step.mpiv index 654ef443d..f7a7ba5de 100644 --- a/metapost/context/base/mp-step.mpiv +++ b/metapost/context/base/mp-step.mpiv @@ -5,7 +5,7 @@ %D subtitle=steps, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-text.mpiv b/metapost/context/base/mp-text.mpiv index d5630f68e..b68e8412a 100644 --- a/metapost/context/base/mp-text.mpiv +++ b/metapost/context/base/mp-text.mpiv @@ -5,7 +5,7 @@ %D subtitle=text support, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 licen-en.pdf for diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index fbd533ff3..cdf0e02a9 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -5,7 +5,7 @@ %D subtitle=auxiliary macros, %D author=Hans Hagen, %D date=\currentdate, -%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%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 diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 2d4158df1..017508a6f 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{2012.10.16 18:23} +\newcontextversion{2012.10.16 22:12} %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 6b172c1b3..b0c938c35 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{2012.10.16 18:23} +\newcontextversion{2012.10.16 22:12} %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 4aab958f5..1fb36e726 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png index 6a484eaa7..34013308e 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index b609ea75f..04ca4b0b4 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{2012.10.16 18:23} +\edef\contextversion{2012.10.16 22:12} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 20c77c44d..36c86b936 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{2012.10.16 18:23} +\edef\contextversion{2012.10.16 22:12} %D For those who want to use this: diff --git a/tex/context/base/m-chart.mkvi b/tex/context/base/m-chart.mkvi index 4fb57af97..cb6a1e8c8 100644 --- a/tex/context/base/m-chart.mkvi +++ b/tex/context/base/m-chart.mkvi @@ -449,21 +449,35 @@ % {\tx\FLOWx.\FLOWy} % \stopsetups -%D \starttyping -%D \setupFLOWsplit -%D [nx=5,ny=10, -%D dx=0,dy=0, -%D before=, -%D after=\page] -%D -%D \FLOWcharts[mybigflow] -%D \stoptyping -%D -%D \starttyping -%D \splitfloat -%D {\placefigure{What a big flowchart this is!}} -%D {\FLOWcharts[mybigflow]} -%D \stoptyping +% %D \starttyping +% %D \setupFLOWsplit +% %D [nx=5,ny=10, +% %D dx=0,dy=0, +% %D before=, +% %D after=\page] +% %D +% %D \FLOWcharts[mybigflow] +% %D \stoptyping +% %D +% %D \starttyping +% %D \splitfloat +% %D {\placefigure{What a big flowchart this is!}} +% %D {\FLOWcharts[mybigflow]} +% %D \stoptyping + +% \setupFLOWsplit +% [nx=5, +% ny=8, +% dx=1, +% dy=1, +% command=\framed, +% before=\page, +% after=\page] +% +% \FLOWchart[demo] \page +% \FLOWchart[demo][split=yes] \page +% \FLOWchart[demo][x=1,y=1,nx=5,ny=8] \page +% \FLOWchart[demo][x=1,y=9,nx=5,ny=10] \page \protect diff --git a/tex/context/base/m-graph.mkiv b/tex/context/base/m-graph.mkiv index 34e53cebe..8acbe1f8d 100644 --- a/tex/context/base/m-graph.mkiv +++ b/tex/context/base/m-graph.mkiv @@ -22,7 +22,6 @@ local function strip(n,e) -- get rid of e(0) - e = gsub(e,"^[+-]*0+$","") -- get rid of e(+*) e = gsub(e,"^+","") -- remove leading zeros @@ -55,117 +54,28 @@ % We could also delegate parsing using lower level plugins. -\startMPinclusions - % input string ; - % input marith ; - input graph.mp ; - - vardef roundd(expr x, d) = - if abs d > 4 : - if d > 0 : - x - else : - 0 - fi - elseif d > 0 : - save i ; i = floor x ; - i + round(Ten_to[d]*(x-i))/Ten_to[d] - else : - round(x/Ten_to[-d])*Ten_to[-d] - fi - enddef ; - - Ten_to0 = 1 ; - Ten_to1 = 10 ; - Ten_to2 = 100 ; - Ten_to3 = 1000 ; - Ten_to4 = 10000 ; - - def sFe_base = - enddef ; - - picture Fe_plus ; Fe_plus := btex + etex ; - - vardef format (expr f,x) = dofmt_.Feform_(f,x) enddef ; - vardef Mformat (expr f,x) = dofmt_.Meform (f,x) enddef ; - vardef formatstr (expr f,x) = dofmt_.Feform_(f,x) enddef ; - vardef Mformatstr(expr f,x) = dofmt_.Meform(f,x) enddef ; - - vardef escaped_format(expr s) = - "" for n=1 upto length(s) : & - if ASCII substring (n,n+1) of s = 37 : - "@" - else : - substring (n,n+1) of s - fi - endfor - enddef ; - - vardef dofmt_@\#(expr f, x) = - textext("\MPgraphformat{" & escaped_format(f) & "}{" & (if string x : x else: decimal x fi) & "}") - enddef ; - - % vardef format(expr f, x) = - % textext("\MPgraphformatN{"&escaped_format(f)&"}{"&(if string x : x else: decimal x fi)&"}") - % enddef; - % vardef Mformat(expr f, x) = - % format(f,x) - % enddef; - - % string Autoform_x ; Autoform_x := "@.0e" ; - % string Autoform_y ; Autoform_y := "@.0e" ; - - vardef autogrid(suffix tx, ty) text w = - Gneedgr_ := false ; - if str tx <> "" : - for x=auto.x : - tx ( - if string Autoform_x : - if Autoform_x <> "" : - Autoform_x - else : - Autoform - fi - else : - Autoform - fi, - x) w ; - endfor - fi ; - if str ty <> "" : - for y=auto.y : - ty ( - if string Autoform_y : - if Autoform_y <> "" : - Autoform_y - else : - Autoform - fi - else : - Autoform - fi, - y) w ; - endfor - fi ; - enddef ; - -\stopMPinclusions +\startMPextensions + if unknown Fe_plus : picture Fe_plus ; Fe_plus := textext("+") ; fi ; + if unknown context_grap: input "mp-grap.mpiv" ; fi ; +\stopMPextensions \continueifinputfile{m-graph.mkiv} \starttext \startMPpage - label(format("@g","1e-10"), (0, 0)) ; - label(format("@g","1e+10"), (2cm, 0)) ; - label(format("@g","1e-12"), (0, -0.5cm)) ; - label(format("@g","1e+12"), (2cm,-0.5cm)) ; - label(format("@g","1e-0"), (0, -1.0cm)) ; - label(format("@g","1e+0"), (2cm,-1.0cm)) ; - label(format("@g","1"), (0, -1.5cm)) ; - label(format("@g","1"), (2cm,-1.5cm)) ; - label(format("@g","1e-102"),(0, -2.0cm)) ; - label(format("@g","1e+102"),(2cm,-2.0cm)) ; + label(format("@g","1e-8"), (0, 0)) ; + label(format("@g","1e+8"), (2cm, 0)) ; + label(format("@g","1e-10"), (0, -0.5cm)) ; + label(format("@g","1e+10"), (2cm,-0.5cm)) ; + label(format("@g","1e-12"), (0, -1.0cm)) ; + label(format("@g","1e+12"), (2cm,-1.0cm)) ; + label(format("@g","1e-0"), (0, -1.5cm)) ; + label(format("@g","1e+0"), (2cm,-1.5cm)) ; + label(format("@g","1"), (0, -2.0cm)) ; + label(format("@g","1"), (2cm,-2.0cm)) ; + label(format("@g","1e-102"),(0, -2.5cm)) ; + label(format("@g","1e+102"),(2cm,-2.5cm)) ; \stopMPpage % \startMPpage diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 24398b8a5..85d08b2dc 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index e7f6dfacc..3486f2ff0 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index e515cb588..04af40c84 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 : 10/16/12 18:23:55 +-- merge date : 10/16/12 22:12:54 do -- begin closure to overcome local limits and interference -- cgit v1.2.3