diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/m-chart.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/m-chart.mkvi | 142 |
1 files changed, 95 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/context/base/m-chart.mkvi b/Master/texmf-dist/tex/context/base/m-chart.mkvi index e94adeba2cb..2b1a7447ccd 100644 --- a/Master/texmf-dist/tex/context/base/m-chart.mkvi +++ b/Master/texmf-dist/tex/context/base/m-chart.mkvi @@ -30,19 +30,19 @@ % todo: figure out a nice way to define the lot: share current and % support current as name (nb: we need to set parent then) -\def\??flch{@@flch} % chart -\def\??flln{@@flln} % line -\def\??flsh{@@flsh} % shape -\def\??flfc{@@flfc} % focus -\def\??flst{@@flst} % sets -\def\??flsp{@@flsp} % split - -\installsimplecommandhandler \??flch {FLOWchart} \??flch -\installsimplecommandhandler \??flln {FLOWline} \??flln -\installsimplecommandhandler \??flsh {FLOWshape} \??flsh -\installsimplecommandhandler \??flfc {FLOWfocus} \??flfc -\installsimplecommandhandler \??flst {FLOWsets} \??flst -\installsimplecommandhandler \??flsp {FLOWsplit} \??flsp +\installcorenamespace {flowchart} % \def\??flch{@@flch} % chart +\installcorenamespace {flowline} % \def\??flln{@@flln} % line +\installcorenamespace {flowshape} % \def\??flsh{@@flsh} % shape +\installcorenamespace {flowfocus} % \def\??flfc{@@flfc} % focus +\installcorenamespace {flowsets} % \def\??flst{@@flst} % sets +\installcorenamespace {flowsplit} % \def\??flsp{@@flsp} % split + +\installsimplecommandhandler \??flowchart {FLOWchart} \??flowchart % maybe just a setuphandler +\installsimplecommandhandler \??flowline {FLOWline} \??flowline % maybe just a setuphandler +\installsimplecommandhandler \??flowshape {FLOWshape} \??flowshape % maybe just a setuphandler +\installsimplecommandhandler \??flowfocus {FLOWfocus} \??flowfocus % maybe just a setuphandler +\installsimplecommandhandler \??flowsets {FLOWsets} \??flowsets % maybe just a setuphandler +\installsimplecommandhandler \??flowsplit {FLOWsplit} \??flowsplit % maybe just a setuphandler \let\setupFLOWcharts\setupFLOWchart \let\setupFLOWlines \setupFLOWline @@ -62,6 +62,7 @@ \c!labeloffset=.5\bodyfontsize, \c!commentoffset=.5\bodyfontsize, \c!exitoffset=\zeropoint, + % \c!split=\v!no, % \c!maxwidth=, % \c!maxheight=, % \c!option=, @@ -82,7 +83,7 @@ \c!radius=.375\bodyfontsize, \c!color=FLOWlinecolor, \c!rulethickness=.15\bodyfontsize, - \c!offset=\v!none] + \c!offset=\zeropoint] \setupFLOWshapes [\c!default=action, @@ -101,13 +102,17 @@ \c!offset=\FLOWshapeparameter\c!offset] \setupFLOWsplit - [\c!state=\v!stop, - \c!marking=\v!on, + [\c!dx=0, + \c!dy=0, % \c!command=, % \c!before=, % \c!after=, \c!nx=3, - \c!ny=3] + \c!ny=4] + +\unexpanded\def\beforeFLOWsplit{\FLOWsplitparameter\c!before} +\unexpanded\def\afterFLOWsplit {\FLOWsplitparameter\c!after} +\unexpanded\def\handleFLOWsplit{\FLOWsplitparameter\c!command} \definecolor [FLOWfocuscolor] [s=.2] \definecolor [FLOWlinecolor] [s=.5] @@ -184,7 +189,7 @@ {\dodoubleempty\module_charts_process} \def\module_charts_process[#name][#settings]% - {\vbox\bgroup + {\bgroup % \vbox removed \insidefloattrue \dontcomplain \setupFLOWchart[#settings]% @@ -212,6 +217,7 @@ labeloffset = \number\dimexpr\FLOWchartparameter\c!labeloffset, commentoffset = \number\dimexpr\FLOWchartparameter\c!commentoffset, exitoffset = \number\dimexpr\FLOWchartparameter\c!exitoffset, + split = "\FLOWchartparameter\c!split", }, shape = { rulethickness = \number\dimexpr\FLOWshapeparameter\c!rulethickness, @@ -236,9 +242,10 @@ set = { }, split = { - state = "\FLOWsplitparameter\c!state", nx = \number\FLOWsplitparameter\c!nx, ny = \number\FLOWsplitparameter\c!ny, + dx = \number\FLOWsplitparameter\c!dx, + dy = \number\FLOWsplitparameter\c!dy, command = "", marking = "\FLOWsplitparameter\c!marking", before = "", @@ -314,11 +321,14 @@ align=, set=\setups{flowcell:text:place}] +\def\FLOWx{\getvariable{flowcell:text}{x}} % compatibility (for Willi) +\def\FLOWy{\getvariable{flowcell:text}{y}} % compatibility (for Willi) + % \c!background={\@@FLOWbackground,\FLOWoverlay}, \defineoverlay - [flowcell:figure] - [\overlayfigure{\getvariable{flowcell:text}{figure}}] + [flowcell:figure] + [\overlayfigure{\getvariable{flowcell:text}{figure}}] \startsetups flowcell:text:place \begingroup @@ -387,35 +397,73 @@ \defineframed[flowcell:mb][flowcell:base][\c!bottom=,\c!align=\v!middle] \defineframed[flowcell:cb][flowcell:base][\c!bottom=,\c!align=\v!middle] -% todo: each cell its own setup +% \startsetups flowcell:text:user +% \setupframed +% [flowcell:base] +% [background=flowcell] +% \definelayer +% [flowcell] +% [width=\namedframedparameter{flowcell:base}{width}, +% height=\namedframedparameter{flowcell:base}{height}] +% \setlayerframed +% [flowcell] +% [preset=rightbottom,offset=-2.75ex] +% [frame=off] +% {\tx\FLOWx.\FLOWy} +% \stopsetups +% +% % or: % -% \startsetups flowcell -% \definelayer -% [flowcell] -% [width=\FLOWshapewidth, -% height=\FLOWshapeheight] -% \setlayerframed -% [flowcell] -% [preset=rightbottom,offset=1ex] -% [frame=off] -% {\tx(\FLOWx,\FLOWy)} +% \setupframed +% [flowcell:base] +% [background={flowcell-1,flowcell-2}] +% +% \defineoverlay +% [flowcell-1] +% [\directsetup{flowcell-1}] +% +% \definelayer +% [flowcell-2] +% [width=\overlaywidth, +% height=\overlayheight] +% +% \startsetups flowcell-1 +% \setlayerframed +% [flowcell-2] +% [preset=rightbottom,offset=-2.75ex] +% [frame=off] +% {\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 |