summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-02-19 11:14:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-02-19 11:14:00 +0100
commit5dd97e482d7c8f05b98c79ba84be57b308cdc333 (patch)
treebd4bdb1a58a09bcb3440cd5242faf5c3c0095917 /tex
parent81f5a2e306755c030618f3a51229bce98df31f20 (diff)
downloadcontext-5dd97e482d7c8f05b98c79ba84be57b308cdc333.tar.gz
beta 2013.02.19 11:14
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.pdfbin4129 -> 4125 bytes
-rw-r--r--tex/context/base/context-version.pngbin40386 -> 40168 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/java-imp-fld.mkiv100
-rw-r--r--tex/context/base/meta-ini.mkiv6
-rw-r--r--tex/context/base/mlib-ctx.lua6
-rw-r--r--tex/context/base/mlib-pdf.mkiv6
-rw-r--r--tex/context/base/mlib-pps.lua3
-rw-r--r--tex/context/base/status-files.pdfbin24748 -> 24740 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin208696 -> 208784 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
14 files changed, 94 insertions, 37 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index a982a819a..1a9d5f66e 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{2013.02.18 15:46}
+\newcontextversion{2013.02.19 11:14}
%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 6e45607a8..6f0e0a030 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.02.18 15:46}
+\newcontextversion{2013.02.19 11:14}
%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 8bf8163b4..51484e393 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 91c290491..4cbe38448 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 86748141b..ec3971c66 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{2013.02.18 15:46}
+\edef\contextversion{2013.02.19 11:14}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index f31e16ad4..6f7745361 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.02.18 15:46}
+\edef\contextversion{2013.02.19 11:14}
%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 625bfce11..28dc3523e 100644
--- a/tex/context/base/java-imp-fld.mkiv
+++ b/tex/context/base/java-imp-fld.mkiv
@@ -266,10 +266,14 @@ function ForgetChanges() {
\startJSpreamble FieldStack used later
+function Field_Name(FieldSet,i) {
+ return this.getField(FieldSet + ":" + i)
+}
+
function Reset_Fields(FieldSet) {
var i = 1 ;
while (true) {
- v = this.getField(FieldSet+":"+i) ;
+ v = Field_Name(FieldSet,i) ;
if (!v) {
break ;
} else {
@@ -282,7 +286,7 @@ function Reset_Fields(FieldSet) {
function Set_Fields(FieldSet) {
var i = 1 ;
while (true) {
- v = this.getField(FieldSet+":"+i) ;
+ v = Field_Name(FieldSet,i) ;
if (!v) {
break ;
} else {
@@ -294,7 +298,7 @@ function Set_Fields(FieldSet) {
function Set_Field(FieldSet, FieldName) {
Reset_Fields(FieldSet) ;
- v = this.getField(FieldSet+":"+FieldName) ;
+ v = Field_Name(FieldSet,FieldName) ;
if (v) {
v.value = "Yes" ;
}
@@ -302,7 +306,7 @@ function Set_Field(FieldSet, FieldName) {
function Reset_Field(FieldSet, FieldName) {
Set_Fields(FieldSet) ;
- v = this.getField(FieldSet+":"+FieldName) ;
+ v = Field_Name(FieldSet,FieldName) ;
if (v) {
v.value = "Off" ;
}
@@ -311,15 +315,15 @@ function Reset_Field(FieldSet, FieldName) {
function Walk_Field(FieldSet) {
var i = 1 ;
while (true) {
- v = this.getField(FieldSet + ":" + i) ;
+ v = Field_Name(FieldSet,i) ;
if (v) {
if (v.value != "Off") {
v.value = "Off" ;
var ii = i ;
ii++ ;
- v = this.getField(FieldSet + ":" + ii) ;
+ v = Field_Name(FieldSet,ii) ;
if (! v) {
- v = this.getField(FieldSet + ":" + 1) ;
+ v = Field_Name(FieldSet,1) ;
}
if (v) {
v.value = "Yes" ;
@@ -338,35 +342,55 @@ var FieldSets = new Array() ;
function Do_Get_Check_Walk_Field(FieldSet) {
var f = FieldSets[FieldSet]
if (! f) {
- f = new Array() ;
+ f = new Array() ;
f.number = 0 ;
f.delay = 500 ;
f.paused = false ;
f.running = false ;
f.name = FieldSet ;
f.timeout = null ;
+ f.repeat = true ;
+ f.total = 0 ;
FieldSets[FieldSet] = f ;
+ for (var i=1; i>0; i++) {
+ var v = Field_Name(FieldSet,i) ;
+ if (! v) {
+ f.total = i - 1 ;
+ break ;
+ }
+ }
+ f.start = 0 ;
+ f.stop = f.total ;
}
return f
}
+function Do_Next_Auto_Walk_Field_Step(FieldSet,fieldset,n) {
+ var v = Field_Name(FieldSet,fieldset.number) ;
+ if (v) {
+ if (v.value != "Off") {
+ v.value = "Off" ;
+ }
+ }
+ v = Field_Name(FieldSet,n) ;
+ if (v) {
+ fieldset.number = n ;
+ v.value = "Yes" ;
+ }
+}
+
function Do_Next_Auto_Walk_Field(FieldSet) {
var fieldset = Do_Get_Check_Walk_Field(FieldSet) ;
if (fieldset) {
- var v = this.getField(FieldSet + ":" + fieldset.number) ;
- if (v) {
- if (v.value != "Off") {
- v.value = "Off" ;
+ if (fieldset.number >= fieldset.stop) {
+ if (fieldset.repeat == false) {
+ fieldset.running = false ;
+ Do_Stop_Auto_Walk_Field(fieldset) ;
+ } else {
+ Do_Next_Auto_Walk_Field_Step(FieldSet,fieldset,fieldset.start) ;
}
- }
- fieldset.number++ ;
- v = this.getField(FieldSet + ":" + fieldset.number) ;
- if (! v) {
- fieldset.number = 1 ;
- v = this.getField(FieldSet + ":" + fieldset.number) ;
- }
- if (v) {
- v.value = "Yes" ;
+ } else {
+ Do_Next_Auto_Walk_Field_Step(FieldSet,fieldset,fieldset.number+1) ;
}
}
}
@@ -386,6 +410,7 @@ function Do_Start_Auto_Walk_Field(FieldSet) {
var fieldset = Do_Get_Check_Walk_Field(FieldSet) ;
if (fieldset) {
Do_Stop_Auto_Walk_Field(FieldSet) ;
+ Do_Next_Auto_Walk_Field(FieldSet) ;
fieldset.timeout = app.setInterval("Do_Next_Auto_Walk_Field('"+FieldSet+"')", fieldset.delay) ;
}
}
@@ -419,9 +444,28 @@ function Pause_Walk_Field(FieldSet) {
}
}
-function Start_Pause_Walk_Field(FieldSet, Delay) {
+function Start_Pause_Walk_Field(FieldSet, Delay, Option, Start, Stop) {
var fieldset = Do_Get_Check_Walk_Field(FieldSet) ;
if (fieldset) {
+ if (Option == "once") {
+ fieldset.repeat = false ;
+ } else {
+ fieldset.repeat = true ;
+ }
+ if (typeof Start == "string") {
+ fieldset.start = parseInt(Start) ;
+ } else if (typeof Start == "number") {
+ fieldset.start = Start ;
+ } else {
+ fieldset.start = 1 ;
+ }
+ if (typeof Stop == "string") {
+ fieldset.stop = parseInt(Stop) ;
+ } else if (typeof Stop == "number") {
+ fieldset.stop = Stop ;
+ } else {
+ fieldset.stop = fieldset.total ;
+ }
if (fieldset.running) {
if (fieldset.paused) {
Do_Start_Auto_Walk_Field(FieldSet) ;
@@ -431,7 +475,7 @@ function Start_Pause_Walk_Field(FieldSet, Delay) {
fieldset.paused = true ;
}
} else {
- fieldset.number = 0 ;
+ fieldset.number = fieldset.start - 1 ;
if (Delay) {
fieldset.delay = Delay ;
}
@@ -470,14 +514,14 @@ function Previous_Walk_Field(FieldSet) {
fieldset.running = false ;
fieldset.paused = false ;
if (fieldset.number>0) {
- var v = this.getField(FieldSet + ":" + fieldset.number) ;
+ var v = Field_Name(FieldSet,fieldset.number) ;
if (v) {
if (v.value != "Off") {
v.value = "Off" ;
}
}
fieldset.number-- ;
- v = this.getField(FieldSet + ":" + fieldset.number) ;
+ v = Field_Name(FieldSet,fieldset.number) ;
if (v) {
v.value = "Yes" ;
}
@@ -492,16 +536,16 @@ function Next_Walk_Field(FieldSet) {
fieldset.running = false ;
fieldset.paused = false ;
var f = fieldset.number + 1 ;
- var v = this.getField(FieldSet + ":" + f) ;
+ var v = Field_Name(FieldSet,f) ;
if (v) {
- var v = this.getField(FieldSet + ":" + fieldset.number) ;
+ var v = Field_Name(FieldSet,fieldset.number) ;
if (v) {
if (v.value != "Off") {
v.value = "Off" ;
}
}
fieldset.number++ ;
- v = this.getField(FieldSet + ":" + fieldset.number) ;
+ v = Field_Name(FieldSet,fieldset.number) ;
if (v) {
v.value = "Yes" ;
}
diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv
index 6e660bdb6..0ec3ed942 100644
--- a/tex/context/base/meta-ini.mkiv
+++ b/tex/context/base/meta-ini.mkiv
@@ -265,13 +265,17 @@
\unexpanded\def\meta_process_graphic#1% todo: extensions and inclusions outside beginfig
{\meta_start_current_graphic
\forgetall
+ \edef\p_extensions{\MPinstanceparameter\s!extensions}%
\meta_process_graphic_start
\normalexpanded{\noexpand\ctxlua{metapost.graphic {
instance = "\currentMPinstance",
format = "\currentMPformat",
data = \!!bs#1;\!!es,
initializations = \!!bs\meta_flush_current_initializations\!!es,
- useextensions = "\MPinstanceparameter\s!extensions",
+% useextensions = "\MPinstanceparameter\s!extensions",
+\ifx\p_extensions\v!yes
+ extensions = \!!bs\ctxcommand{getmpextensions("\currentMPinstance")}\!!es,
+\fi
inclusions = \!!bs\meta_flush_current_inclusions\!!es,
definitions = \!!bs\meta_flush_current_definitions\!!es,
figure = "\MPaskedfigure",
diff --git a/tex/context/base/mlib-ctx.lua b/tex/context/base/mlib-ctx.lua
index a795b0214..04e0efcb4 100644
--- a/tex/context/base/mlib-ctx.lua
+++ b/tex/context/base/mlib-ctx.lua
@@ -77,12 +77,16 @@ function metapost.getextensions(instance,state)
end
end
+function commands.getmpextensions(instance,state)
+ context(metapost.getextensions(instance,state))
+end
+
function metapost.graphic(specification)
setmpsformat(specification)
metapost.graphic_base_pass(specification)
end
-function metapost.getclippath(specification)
+function metapost.getclippath(specification) -- why not a special instance for this
setmpsformat(specification)
local mpx = specification.mpx
local data = specification.data or ""
diff --git a/tex/context/base/mlib-pdf.mkiv b/tex/context/base/mlib-pdf.mkiv
index f55888107..594a811d2 100644
--- a/tex/context/base/mlib-pdf.mkiv
+++ b/tex/context/base/mlib-pdf.mkiv
@@ -140,12 +140,16 @@
\let\stopMPLIBtoPDF \directstopMPLIBtoPDF
\meta_start_current_graphic
\forgetall
+ \edef\p_extensions{\MPinstanceparameter\s!extensions}%
\normalexpanded{\noexpand\ctxlua{metapost.graphic {
instance = "\currentMPinstance",
format = "\currentMPformat",
data = \!!bs#2;\!!es,
initializations = \!!bs\meta_flush_current_initializations\!!es,
- useextensions = "\MPinstanceparameter\s!extensions",
+% useextensions = "\MPinstanceparameter\s!extensions",
+\ifx\p_extensions\v!yes
+ extensions = \!!bs\ctxcommand{getmpextensions("\currentMPinstance")}\!!es,
+\fi
inclusions = \!!bs\meta_flush_current_inclusions\!!es,
definitions = \!!bs\meta_flush_current_definitions\!!es,
figure = "all",
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index c98bef8b8..78e35d8b0 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -539,7 +539,8 @@ function metapost.graphic_base_pass(specification)
local mpx = specification.mpx -- mandate
local data = specification.data or ""
local definitions = specification.definitions or ""
- local extensions = metapost.getextensions(specification.instance,specification.useextensions) -- specification.extensions or ""
+-- local extensions = metapost.getextensions(specification.instance,specification.useextensions)
+ local extensions = specification.extensions or ""
local inclusions = specification.inclusions or ""
local initializations = specification.initializations or ""
local askedfig = specification.figure -- no default else no wrapper
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index ce0c19c1f..411639630 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 a44b8d25e..0e4300c4b 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 61dea0c9b..117e0ced5 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 : 02/18/13 15:46:30
+-- merge date : 02/19/13 11:14:18
do -- begin closure to overcome local limits and interference