summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4105 -> 4112 bytes
-rw-r--r--tex/context/base/context-version.pngbin105305 -> 105750 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/m-chart.lua77
-rw-r--r--tex/context/base/status-files.pdfbin24095 -> 24113 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin163918 -> 163916 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 67 insertions, 20 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 184b572cc..9ac76e424 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.10.19 23:10}
+\newcontextversion{2011.10.20 11:44}
%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 1e045568d..438df663c 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.10.19 23:10}
+\newcontextversion{2011.10.20 11:44}
%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-version.pdf b/tex/context/base/context-version.pdf
index 3753826da..86bb8863b 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index f031c57fb..6463ff5a7 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 98ee11df7..03e9469dd 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.10.19 23:10}
+\edef\contextversion{2011.10.20 11:44}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 49ca9eec4..d5e4549ec 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.10.19 23:10}
+\edef\contextversion{2011.10.20 11:44}
%D For those who want to use this:
diff --git a/tex/context/base/m-chart.lua b/tex/context/base/m-chart.lua
index 1d76e9845..2b1761558 100644
--- a/tex/context/base/m-chart.lua
+++ b/tex/context/base/m-chart.lua
@@ -101,10 +101,29 @@ local validshapes = {
}
local validlabellocations = {
- l = "l", left = "l",
- r = "r", right = "r",
- t = "t", top = "t",
- b = "b", bottom = "b",
+ l = "l", left = "l",
+ r = "r", right = "r",
+ t = "t", top = "t",
+ b = "b", bottom = "b",
+ lt = "lt",
+ rt = "rt",
+ lb = "lb",
+ rb = "rb",
+}
+
+local validcommentlocations = {
+ l = "l", left = "l",
+ r = "r", right = "r",
+ t = "t", top = "t",
+ b = "b", bottom = "b",
+ lt = "lt",
+ rt = "rt",
+ lb = "lb",
+ rb = "rb",
+ tl = "lt",
+ tr = "rt",
+ bl = "lb",
+ br = "rb",
}
setmetatableindex(validshapes,function(t,k)
@@ -180,7 +199,6 @@ end
function commands.flow_start_cell(settings)
temp = {
labels = { },
- comments = { },
exits = { },
connections = { },
settings = settings,
@@ -231,11 +249,20 @@ function commands.flow_set_label(location,text)
}
end
-function commands.flow_set_comment(name,str)
- temp.comments[#temp.comments+1] = {
- location = location,
- text = text,
- }
+function commands.flow_set_comment(location,text)
+ local connections = temp.connections
+ if connections then
+ local connection = connections[#connections]
+ if connection then
+ local comments = connection.comments
+ if comments then
+ comments[#comments+1] = {
+ location = location,
+ text = text,
+ }
+ end
+ end
+ end
end
function commands.flow_set_exit(location,text)
@@ -408,6 +435,7 @@ function commands.flow_set_connection(location,displacement,name)
dx = dx or 0,
dy = dy or 0,
name = name,
+ comments = { },
}
end
@@ -453,7 +481,6 @@ local function process_cells(chart,xoffset,yoffset)
context("flow_shape_line_width := %s ; " , points(shapesettings.rulethickness))
end
context("flow_peepshape := false ;") -- todo
--- context("flow_new_shape(%s,%s,%s) ;",cell.x+xoffset,cell.y+yoffset,shapedata.number)
context("flow_new_shape(%s,%s,%s) ;",cell.x+xoffset,cell.y+yoffset,shapedata.number)
context("flow_end_sub_chart ;")
end
@@ -523,7 +550,7 @@ local function process_connections(chart,xoffset,yoffset)
context("flow_dsp_x := %s ; flow_dsp_y := %s ;",connection.dx or 0, connection.dy or 0)
context("flow_connection_line_color := \\MPcolor{%s} ;",linesettings.color)
context("flow_connection_line_width := 2pt ;",points(linesettings.rulethickness))
- context("flow_connect_%s_%s(%s,%s,%s) (%s,%s,%s) ;",where_cell,where_other,cellx,celly,what_cell,otherx,othery,what_other)
+ context("flow_connect_%s_%s (%s) (%s,%s,%s) (%s,%s,%s) ;",where_cell,where_other,j,cellx,celly,what_cell,otherx,othery,what_other)
context("flow_dsp_x := 0 ; flow_dsp_y := 0 ;")
end
end
@@ -535,6 +562,8 @@ end
local texttemplate = "\\setvariables[flowcell:text][x=%s,y=%s,text={%s},align={%s},figure={%s},destination={%s}]"
+local splitter = lpeg.splitat(":")
+
local function process_texts(chart,xoffset,yoffset)
local data = chart.data
local hash = chart.hash
@@ -577,9 +606,24 @@ local function process_texts(chart,xoffset,yoffset)
end
end
end
- local comments = cell.comments
- for i=1,#comments do
- -- invisible
+ local connections = cell.connections
+ for i=1,#connections do
+ local comments = connections[i].comments
+ for j=1,#comments do
+ local comment = comments[j]
+ local text = comment.text
+ local location = comment.location or ""
+ local length = 0
+ local loc, len = lpegmatch(splitter,location)
+ if loc then
+ location = loc
+ length = tonumber(len) or 0
+ end
+ location = validcommentlocations[location]
+ if text and location then
+ context('flow_chart_draw_comment(%s,%s,%s,%s,textext("%s"),"%s",%s) ;',x,y,i,j,text,location,length)
+ end
+ end
end
end
end
@@ -702,10 +746,13 @@ local function makechart(chart)
local gridwidth = shapewidth + 2*settings.chart.dx
local shapeheight = settings.chart.height
local gridheight = shapeheight + 2*settings.chart.dy
+ local chartoffset = settings.chart.offset
+
context("flow_grid_width := %s ;", points(gridwidth))
context("flow_grid_height := %s ;", points(gridheight))
context("flow_shape_width := %s ;", points(shapewidth))
context("flow_shape_height := %s ;", points(shapeheight))
+ context("flow_chart_offset := %s ;", points(chartoffset))
--
local radius = settings.line.radius
local rulethickness = settings.line.rulethickness
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index d299bfc1a..f73987ff8 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index ec6a091ca..1022b300b 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 4f82f9b8f..1a110f706 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/19/11 23:10:36
+-- merge date : 10/20/11 11:44:39
do -- begin closure to overcome local limits and interference