summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metapost/context/base/mp-form.mp6
-rw-r--r--metapost/context/base/mp-grid.mp7
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/strc-lst.mkiv72
-rw-r--r--tex/context/base/supp-box.lua13
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
7 files changed, 64 insertions, 40 deletions
diff --git a/metapost/context/base/mp-form.mp b/metapost/context/base/mp-form.mp
index a65ab6d73..1a80d618c 100644
--- a/metapost/context/base/mp-form.mp
+++ b/metapost/context/base/mp-form.mp
@@ -78,8 +78,8 @@ begingroup interim warningcheck := 0 ;
%%% Load auxiliary macros.
-input string
-input marith
+input string ;
+input marith ;
%%% Choosing the Layout %%%
@@ -318,7 +318,7 @@ enddef ;
% round and typeset a quantity z in exponent form.
%
% e scientific, p significant figures
-% p decimal, p digits right of the point
+% f decimal, p digits right of the point
% g decimal or scientific, p sig. figs.
% G decimal or scientific, p digits
diff --git a/metapost/context/base/mp-grid.mp b/metapost/context/base/mp-grid.mp
index f6e843489..c87df821c 100644
--- a/metapost/context/base/mp-grid.mp
+++ b/metapost/context/base/mp-grid.mp
@@ -107,7 +107,12 @@ def do_initialize_numbers =
textext.raw("${\times}10$") ,
textext.raw("${}^-$") ,
textext.raw("${}^2$") ) ;
- numbers_initialized := true ;
+ if unknown _trial_run_ :
+ numbers_initialized := true ;
+ else :
+ % no reset, otherwise textexts get out of sync
+ % slows down graphics a bit but not much
+ fi ;
fi ;
enddef ;
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 1248d1568..2d46457a9 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.12.12 17:06}
+\newcontextversion{2010.12.13 20:58}
%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.tex b/tex/context/base/context.tex
index 12939fa64..9065429f9 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.12.12 17:06}
+\edef\contextversion{2010.12.13 20:58}
%D For those who want to use this:
diff --git a/tex/context/base/strc-lst.mkiv b/tex/context/base/strc-lst.mkiv
index 526ed0409..f037ea6ae 100644
--- a/tex/context/base/strc-lst.mkiv
+++ b/tex/context/base/strc-lst.mkiv
@@ -70,9 +70,18 @@
\def\structurelistinject{\dotripleempty\dostructurelistinject}
-\def\dostructurelistinject[#1][#2][#3]%
+\def\dostructurelistinject[#1]% [#2][#3]% no check on nofarguments here
{\begingroup
- \edef\currentlistname{#1}%
+ \edef\currentlist{#1}%
+ \doifelse{\listparameter\c!state}\v!start\dodostructurelistinject\nonostructurelistinject}
+
+\def\dodostructurelistinject[#1][#2]%
+ {\endgroup}
+
+\def\dodostructurelistinject[#1][#2]%
+ {\getparameters[\??li\??li][\c!type=userdata,\c!location=\v!none,#1]%
+ \edef\currentlisttype {\@@li@@litype}%
+ \edef\currentlistlocation{\@@li@@lilocation}%
\setnextinternalreference
\edef\currentlistnumber{\ctxlua{structures.lists.push{
references = {
@@ -81,16 +90,15 @@
section = structures.sections.currentid(),
},
metadata = {
- kind = "#2",
- name = "\currentlistname",
+ kind = "\currentlisttype",
+ name = "\currentlist",
level = structures.sections.currentlevel(),
catcodes = \the\catcodetable,
},
- userdata = structures.helpers.touserdata(\!!bs\detokenize{#3}\!!es)
+ userdata = structures.helpers.touserdata(\!!bs\detokenize{#2}\!!es)
}}}%
- \edef\structurelistsynchronize{\getvalue{\??li::inject::#2::synchronize}}%
% we can do the enhance injection at the lua end which saves tokenization and a call
- \ifx\structurelistsynchronize\v!yes
+ \ifx\currentlistlocation\v!here
% this injects nodes !
\expanded{\ctxlatelua{structures.lists.enhance(\currentlistnumber)}}%
% new from here
@@ -381,23 +389,39 @@
\let\dowritetolist \gobblefourarguments
\let\dodowritetolist\gobblefourarguments
-% some day we will have \definestructurelistinjector or maybe just as key in #3
-
-\letvalue{\??li::inject::command::synchronize}\v!no
-\letvalue{\??li::inject::userdata::synchronize}\v!no
-\letvalue{\??li::inject::simple::synchronize}\v!yes
-
-\unexpanded\def\writebetweenlist[#1]#2%
- {\doif{\namedlistparameter{#1}\c!state}\v!start{\structurelistinject[#1][command][command={#2}]}}
-
-\unexpanded\def\writedatatolist
- {\dodoubleargument\dowritedatatolist}
-
-\def\dowritedatatolist[#1][#2]%
- {\doif{\namedlistparameter{#1}\c!state}\v!start{\structurelistinject[#1][userdata][#2]}}
-
-\unexpanded\def\writetolist[#1]#2#3%
- {\doif{\namedlistparameter{#1}\c!state}\v!start{\structurelistinject[#1][simple][first={#2},second={#3}]}}
+% command : location=none
+% userdata : location=none
+% simple : location=here
+
+\unexpanded\def\writebetweenlist{\dodoubleempty \dowritebetweenlist}
+\unexpanded\def\writedatatolist {\dotripleargument\dowritedatatolist}
+\unexpanded\def\writetolist {\dodoubleempty \dowritetolist}
+
+\def\dowritebetweenlist[#1][#2]#3% we can overload location
+ {\doif{\namedlistparameter{#1}\c!state}\v!start
+ {\ifsecondargument
+ \dostructurelistinject[#1][#2,\c!type=command][command={#3}]%
+ \else
+ \dostructurelistinject[#1][\c!type=command][command={#3}]%
+ \fi}}
+
+
+\def\dowritedatatolist[#1][#2][#3]% we can overload location
+ {\doif{\namedlistparameter{#1}\c!state}\v!start
+ {\ifthirdargument
+ \dostructurelistinject[#1][#2,\c!type=userdata][#3]%
+ \else
+ \dostructurelistinject[#1][\c!type=userdata][#2]%
+ \fi}}
+
+
+\def\dowritetolist[#1][#2]#3#4% we can overload location
+ {\doif{\namedlistparameter{#1}\c!state}\v!start
+ {\ifsecondargument
+ \dostructurelistinject[#1][\c!location=\v!here,#2,\c!type=simple][first={#3},second={#4}]%
+ \else
+ \dostructurelistinject[#1][\c!location=\v!here,\c!type=simple][first={#3},second={#4}]%
+ \fi}}
\installstructurelistprocessor{simple}
{\dodolistelement
diff --git a/tex/context/base/supp-box.lua b/tex/context/base/supp-box.lua
index 6c53a4c5f..c40995562 100644
--- a/tex/context/base/supp-box.lua
+++ b/tex/context/base/supp-box.lua
@@ -24,19 +24,14 @@ local texbox = tex.box
function hyphenatedlist(list)
while list do
- local id = list.id
- local next = list.next
- local prev = list.prev
+ local id, next, prev = list.id, list.next, list.prev
if id == disc_code then
local hyphen = list.pre
if hyphen then
local penalty = new_penalty(-500)
- hyphen.next = penalty
- penalty.prev = hyphen
- prev.next = hyphen
- next.prev = penalty
- penalty.next = next
- hyphen.prev = prev
+ hyphen.next, penalty.prev = penalty, hyphen
+ prev.next, next.prev = hyphen, penalty
+ penalty.next, hyphen.prev = next, prev
list.pre = nil
free_node(list)
end
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 1c692e810..6af528034 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 12/12/10 17:06:51
+-- merge date : 12/13/10 20:58:02
do -- begin closure to overcome local limits and interference