summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-03-30 11:21:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-03-30 11:21:00 +0200
commit979928a09452227dcb32ead1c7e8839dc8ec8c1f (patch)
tree80108c526141b8145ace95a974ab756ca56d5d23 /tex
parent28621e7ae94bca4954eecd07da1d542711daeb18 (diff)
downloadcontext-979928a09452227dcb32ead1c7e8839dc8ec8c1f.tar.gz
beta 2011.03.30 11:21
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/attr-lay.lua21
-rw-r--r--tex/context/base/attr-lay.mkiv2
-rw-r--r--tex/context/base/colo-ini.mkiv64
-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.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/lpdf-mis.lua4
-rw-r--r--tex/context/base/meta-ini.mkiv1
-rw-r--r--tex/context/base/page-ini.mkiv2
-rw-r--r--tex/context/base/s-pre-14.tex1
-rw-r--r--tex/context/base/s-pre-18.tex114
-rw-r--r--tex/context/base/s-pre-22.tex102
-rw-r--r--tex/context/base/s-pre-60.mkiv4
-rw-r--r--tex/context/base/s-pre-63.tex1
-rw-r--r--tex/context/base/s-pre-64.tex11
-rw-r--r--tex/context/base/scrn-but.mkvi4
-rw-r--r--tex/context/base/scrn-ref.lua2
-rw-r--r--tex/context/base/spac-grd.mkiv24
-rw-r--r--tex/context/base/status-files.pdfbin23560 -> 23555 bytes
-rw-r--r--tex/context/base/strc-ref.lua4
-rw-r--r--tex/context/base/supp-ran.mkiv2
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
23 files changed, 227 insertions, 146 deletions
diff --git a/tex/context/base/attr-lay.lua b/tex/context/base/attr-lay.lua
index 32812785a..1b652e469 100644
--- a/tex/context/base/attr-lay.lua
+++ b/tex/context/base/attr-lay.lua
@@ -23,18 +23,24 @@ local report_viewerlayers = logs.reporter("viewerlayers")
-- nb: attributes: color etc is much slower than normal (marks + literals) but ...
-- nb. too many "0 g"s
+-- nb: more local tables
local attributes, nodes = attributes, nodes
attributes.viewerlayers = attributes.viewerlayers or { }
local viewerlayers = attributes.viewerlayers
+local variables = interfaces.variables
+local v_local = variables["local"]
+local v_global = variables["global"]
+
local a_viewerlayer = attributes.private("viewerlayer")
viewerlayers = viewerlayers or { }
viewerlayers.data = allocate()
viewerlayers.registered = viewerlayers.registered or { }
viewerlayers.values = viewerlayers.values or { }
+viewerlayers.scopes = viewerlayers.scopes or { }
viewerlayers.listwise = allocate()
viewerlayers.attribute = a_viewerlayer
viewerlayers.supported = true
@@ -52,11 +58,13 @@ local unsetvalue = attributes.unsetvalue
storage.register("attributes/viewerlayers/registered", viewerlayers.registered, "attributes.viewerlayers.registered")
storage.register("attributes/viewerlayers/values", viewerlayers.values, "attributes.viewerlayers.values")
+storage.register("attributes/viewerlayers/scopes", viewerlayers.scopes, "attributes.viewerlayers.scopes")
local data = viewerlayers.data
local values = viewerlayers.values
local listwise = viewerlayers.listwise
local registered = viewerlayers.registered
+local scopes = viewerlayers.scopes
local template = "%s"
-- stacked
@@ -136,10 +144,12 @@ function viewerlayers.start(name)
viewerlayers.enable(true)
end
insert(stack,texgetattribute(a_viewerlayer))
- if global then
- texsetattribute("global",a_viewerlayer,register(name) or unsetvalue)
+ local a = register(name) or unsetvalue
+ if global or scopes[name] == v_global then
+ scopes[a] = v_global -- messy but we don't know the attributes yet
+ texsetattribute("global",a_viewerlayer,a)
else
- texsetattribute(a_viewerlayer,register(name) or unsetvalue)
+ texsetattribute(a_viewerlayer,a)
end
texsettokenlist("currentviewerlayertoks",name)
end
@@ -147,14 +157,14 @@ end
function viewerlayers.stop()
local a = remove(stack)
if a >= 0 then
- if global then
+ if global or scopes[a] == v_global then
texsetattribute("global",a_viewerlayer,a)
else
texsetattribute(a_viewerlayer,a)
end
texsettokenlist("currentviewerlayertoks",values[a])
else
- if global then
+ if global or scopes[a] == v_global then
texsetattribute("global",a_viewerlayer,unsetvalue)
else
texsetattribute(a_viewerlayer,unsetvalue)
@@ -172,6 +182,7 @@ function viewerlayers.define(settings)
if not title or title == "" then
settings.title = tag
end
+ scopes[tag] = settings.scope or v_local
codeinjections.defineviewerlayer(settings)
end
end
diff --git a/tex/context/base/attr-lay.mkiv b/tex/context/base/attr-lay.mkiv
index efea95bc9..b1f3c944e 100644
--- a/tex/context/base/attr-lay.mkiv
+++ b/tex/context/base/attr-lay.mkiv
@@ -36,6 +36,7 @@
[\c!state=\v!start,
\c!title=,
\c!printable=\v!yes,
+ \c!scope=\v!local, % maybe global but needs checking with layout
\c!method=\v!none]
\def\defineviewerlayer
@@ -50,6 +51,7 @@
visible = "\@@lrstate",
editable = "\v!yes",
printable = "\@@lrprintable",
+ scope = "\@@lrscope"
}}%
\doif\@@lrmethod\v!command
{\setugvalue{\e!start#1}{\startviewerlayer[#1]}%
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv
index 24627b68c..e4a9e4046 100644
--- a/tex/context/base/colo-ini.mkiv
+++ b/tex/context/base/colo-ini.mkiv
@@ -24,6 +24,10 @@
\unprotect
+%D In \MKIV\ we have independent color, colorspace and transparency
+%D but I'm still not sure if I keep it that way as it's probably more
+%D efficient to combine them (less attributes and finalizing).
+%D
%D We use a couple of local registers. That way we don't have
%D to group when converting colors. By the way, this is not
%D really faster. We can sqeeze half a second runtime for 50K
@@ -234,6 +238,9 @@
\newtoks\everysetupcolors
+\let\dosetcolorvalue \setvalue
+\def\colorfreezestate{false}
+
\def\dosetupcolors[#1]% some no longer make sense in MkIV
{\getparameters[\??cl][#1]%
\doifelse\@@clspot\v!yes
@@ -245,6 +252,13 @@
\doifelse\@@clexpansion\v!yes
\freezecolorstrue
\freezecolorsfalse
+ \iffreezecolors
+ \let\dosetcolorvalue\setevalue
+ \def\colorfreezestate{true}%
+ \else
+ \let\dosetcolorvalue\setvalue
+ \def\colorfreezestate{false}%
+ \fi
\doifelse\@@clfactor\v!no
\weightGRAYfalse
\weightGRAYtrue
@@ -769,6 +783,8 @@
% if it becomes a bottleneck we can set up a more complex system with one shared
% attribute for colorspace, color and transparency
+%
+% maybe always on
\def\doactivatecolor
{\ifproductionrun
@@ -792,21 +808,21 @@
\def\collectcolorinlist#1{\doglobal\addtocommalist{#1}\colorlist}
\def\doregistercolor#1#2%
- {\ctxcommand{defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}}
+ {\ctxcommand{defineprocesscolor("#1","#2",false,\colorfreezestate)}}
\def\dodefinecolor[#1][#2]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxcommand{defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
+ \ctxcommand{defineprocesscolor("#1","#2",false,\colorfreezestate)}%
\dodefinecolorcommand\setvalue{#1}}
\def\dodefineglobalcolor[#1][#2]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxcommand{defineprocesscolor("#1","#2",true,\iffreezecolors true\else false\fi)}%
+ \ctxcommand{defineprocesscolor("#1","#2",true,\colorfreezestate)}%
\dodefinecolorcommand\setgvalue{#1}}
\def\dodefinenamedcolor[#1][#2]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxcommand{defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
+ \ctxcommand{defineprocesscolor("#1","#2",false,\colorfreezestate)}%
\dodefinecolorcommand\setvalue{#1}}
\def\dodefinespotcolor[#1][#2][#3]%
@@ -829,7 +845,7 @@
\ctxcommand{setrastercolor("_raster_",\@@rastervalue)}} % sets attribute
\def\dodefinefastcolor[#1][#2]% still not fast but ok
- {\ctxcommand{defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
+ {\ctxcommand{defineprocesscolor("#1","#2",false,\colorfreezestate)}%
\dodefinecolorcommand\setvalue{#1}}
%D \macros
@@ -926,18 +942,48 @@
\appendtoks \initializemaintextcolor \to \everyjob
\appendtoks \initializemaintextcolor \to \everysetupcolors
+% \def\dodefinepaletcolor#1#2#3%
+% {\doifassignmentelse{#3}% \definepalet[test][xx={y=.4}]
+% {\definecolor[\??pa#1:#2][#3]%
+% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(cs:#1:#2)}{\csname(cs:\??pa#1:#2)\endcsname}%
+% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(ca:#1:#2)}{\csname(ca:\??pa#1:#2)\endcsname}}
+% {\ifcsname(cs:#3)\endcsname % \definepalet[test][xx=green]
+% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(cs:#1:#2)}{\csname(cs:#3)\endcsname}%
+% \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(ca:#1:#2)}{\csname(ca:#3)\endcsname}%
+% \else
+% % not entered when making format
+% \localundefine{(cs:#1:#2)}% \letvalue{(cs:#1:#2)}\undefined
+% \localundefine{(ca:#1:#2)}% \letvalue{(ca:#1:#2)}\undefined
+% \fi}}
+
+\def\doinheritdirectcs#1{\csname(cs:\ifcsname(cs:#1)\endcsname#1\fi)\endcsname}
+\def\doinheritdirectca#1{\csname(ca:\ifcsname(ca:#1)\endcsname#1\fi)\endcsname}
+\def\doinheritdirectts#1{\csname(ts:\ifcsname(ts:#1)\endcsname#1\fi)\endcsname}
+\def\doinheritdirectta#1{\csname(ta:\ifcsname(ta:#1)\endcsname#1\fi)\endcsname}
+
+\def\doinheritpaletca#1#2{\csname(ca:\ifcsname(ca:\??pa#1:#2)\endcsname\??pa#1:#2\fi)\endcsname}
+\def\doinheritpaletcs#1#2{\csname(cs:\ifcsname(cs:\??pa#1:#2)\endcsname\??pa#1:#2\fi)\endcsname}
+\def\doinheritpaletta#1#2{\csname(ta:\ifcsname(ta:\??pa#1:#2)\endcsname\??pa#1:#2\fi)\endcsname}
+\def\doinheritpaletts#1#2{\csname(ts:\ifcsname(ts:\??pa#1:#2)\endcsname\??pa#1:#2\fi)\endcsname}
+
\def\dodefinepaletcolor#1#2#3%
{\doifassignmentelse{#3}% \definepalet[test][xx={y=.4}]
{\definecolor[\??pa#1:#2][#3]%
- \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(cs:#1:#2)}{\csname(cs:\??pa#1:#2)\endcsname}%
- \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(ca:#1:#2)}{\csname(ca:\??pa#1:#2)\endcsname}}
+ \dosetcolorvalue{(cs:#1:#2)}{\doinheritpaletca{#1}{#2}}%
+ \dosetcolorvalue{(ca:#1:#2)}{\doinheritpaletcs{#1}{#2}}%
+ \dosetcolorvalue{(ts:#1:#2)}{\doinheritpaletta{#1}{#2}}%
+ \dosetcolorvalue{(ta:#1:#2)}{\doinheritpaletts{#1}{#2}}}
{\ifcsname(cs:#3)\endcsname % \definepalet[test][xx=green]
- \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(cs:#1:#2)}{\csname(cs:#3)\endcsname}%
- \iffreezecolors\@EA\setevalue\else\@EA\setvalue\fi{(ca:#1:#2)}{\csname(ca:#3)\endcsname}%
+ \dosetcolorvalue{(cs:#1:#2)}{\doinheritdirectcs{#3}}%
+ \dosetcolorvalue{(ca:#1:#2)}{\doinheritdirectca{#3}}%
+ \dosetcolorvalue{(ts:#1:#2)}{\doinheritdirectts{#3}}%
+ \dosetcolorvalue{(ta:#1:#2)}{\doinheritdirectta{#3}}%
\else
% not entered when making format
\localundefine{(cs:#1:#2)}% \letvalue{(cs:#1:#2)}\undefined
\localundefine{(ca:#1:#2)}% \letvalue{(ca:#1:#2)}\undefined
+ \localundefine{(ts:#1:#2)}% \letvalue{(cs:#1:#2)}\undefined
+ \localundefine{(ta:#1:#2)}% \letvalue{(ca:#1:#2)}\undefined
\fi}}
\setvalue{(cs:)}{} \setvalue{(ca:)}{0}
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 10ba078b6..a4ab5d51c 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.03.29 12:49}
+\newcontextversion{2011.03.30 11:21}
%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 eb932d1e8..2f9375bd0 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.03.29 12:49}
+\newcontextversion{2011.03.30 11:21}
%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.mkii b/tex/context/base/context.mkii
index c6952b7bb..70a7e00d1 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.03.29 12:49}
+\edef\contextversion{2011.03.30 11:21}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index d6b9fafee..b6d0771a7 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.03.29 12:49}
+\edef\contextversion{2011.03.30 11:21}
%D For those who want to use this:
diff --git a/tex/context/base/lpdf-mis.lua b/tex/context/base/lpdf-mis.lua
index d28439c26..426c00286 100644
--- a/tex/context/base/lpdf-mis.lua
+++ b/tex/context/base/lpdf-mis.lua
@@ -117,11 +117,11 @@ function codeinjections.registerdocumentcloseaction(close)
closedocument = close
end
-function codeinjections.flushpageopenaction(open)
+function codeinjections.registerpageopenaction(open)
openpage = open
end
-function codeinjections.flushpagecloseaction(close)
+function codeinjections.registerpagecloseaction(close)
closepage = close
end
diff --git a/tex/context/base/meta-ini.mkiv b/tex/context/base/meta-ini.mkiv
index 60011ff36..e95eb1786 100644
--- a/tex/context/base/meta-ini.mkiv
+++ b/tex/context/base/meta-ini.mkiv
@@ -879,6 +879,7 @@
\stopMPextensions
\startMPinitializations
+ CurrentLayout:="\currentlayout";
OverlayWidth:=\overlaywidth;
OverlayHeight:=\overlayheight;
OverlayDepth:=\overlayheight;
diff --git a/tex/context/base/page-ini.mkiv b/tex/context/base/page-ini.mkiv
index add2814dc..7969e4f3e 100644
--- a/tex/context/base/page-ini.mkiv
+++ b/tex/context/base/page-ini.mkiv
@@ -701,7 +701,7 @@
\newconstant\showgridstate
-\def\showgrid
+\unexpanded\def\showgrid
{\dosingleempty\doshowgrid}
\def\doshowgrid[#1]%
diff --git a/tex/context/base/s-pre-14.tex b/tex/context/base/s-pre-14.tex
index f44117e7c..93f8cdbc3 100644
--- a/tex/context/base/s-pre-14.tex
+++ b/tex/context/base/s-pre-14.tex
@@ -11,7 +11,6 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-
%D In the process of making a couple of simple styles for
%D \EUROTEX\ 99, I came to this one. The joke is in the
%D pagenumber. This style can be used for short presentations
diff --git a/tex/context/base/s-pre-18.tex b/tex/context/base/s-pre-18.tex
index 407f30824..d92117aaf 100644
--- a/tex/context/base/s-pre-18.tex
+++ b/tex/context/base/s-pre-18.tex
@@ -11,28 +11,24 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-
-
-% output=pdftex interface=en
-
-% todo: met pos en dan iedere titel
+% todo: met pos en dan iedere titel
\setuppapersize
[S6][S6]
\setupbodyfont
- [loc,ppl]
+ [loc,ppl]
\setupcolors
[state=start]
-\definecolor [shade-1] [s=.7]
-\definecolor [shade-2] [s=.1]
+\definecolor [shade-1] [s=.7]
+\definecolor [shade-2] [s=.1]
-\definecolor [shade-3] [s=.8]
-\definecolor [shade-4] [b=.8]
+\definecolor [shade-3] [s=.8]
+\definecolor [shade-4] [b=.8]
-\definecolor [shade-5] [g=.6]
+\definecolor [shade-5] [g=.6]
\setuplayout
[topspace=1cm,
@@ -52,58 +48,58 @@
\defineoverlay [text] [\useMPgraphic{text}]
\startuseMPgraphic{page}
- StartPage ;
- path p ; numeric s ; pair cp ; cp := center Page ;
+ StartPage ;
+ path p ; numeric s ; pair cp ; cp := center Page ;
s := define_circular_shade(cp,cp,0,TextWidth,
- \MPcolor{shade-1},\MPcolor{shade-2}) ;
- fill Page withshade s ;
+ \MPcolor{shade-1},\MPcolor{shade-2}) ;
+ fill Page withshade s ;
p := fullcircle xyscaled (TextWidth+1cm, TextHeight+1cm) shifted cp ;
s := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
- \MPcolor{shade-4}) ;
- fill p withshade s ;
+ \MPcolor{shade-4}) ;
+ fill p withshade s ;
StopPage
\stopuseMPgraphic
\startuseMPgraphic{text}
- StartPage ;
- path p ; numeric s, t ; pair cp ; cp := center Page ;
+ StartPage ;
+ path p ; numeric s, t ; pair cp ; cp := center Page ;
s := define_circular_shade(cp,cp,0,TextWidth,
- \MPcolor{shade-1},\MPcolor{shade-2}) ;
- fill Page withshade s ;
- p := llcorner Field[Text][Bottom] --
- lrcorner Field[Text][Bottom] --
- urcorner Field[Text][Text] --
- ulcorner Field[Text][Text] -- cycle ;
- p := p enlarged .5cm randomized .5cm ;
- t := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
- \MPcolor{shade-4}) ;
- fill p withshade t ;
-
- def bottom_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
- if (pp>0) and (rr>0) :
- if nn = 1 :
- p := (0,0)--(ww,hh/2)--(0,hh)--cycle ;
- elseif nn = 2 :
- p := (0,hh/2)--(ww,hh)--(ww,0)--cycle ;
+ \MPcolor{shade-1},\MPcolor{shade-2}) ;
+ fill Page withshade s ;
+ p := llcorner Field[Text][Bottom] --
+ lrcorner Field[Text][Bottom] --
+ urcorner Field[Text][Text] --
+ ulcorner Field[Text][Text] -- cycle ;
+ p := p enlarged .5cm randomized .5cm ;
+ t := define_circular_shade(cp,cp,0,TextWidth,\MPcolor{shade-3},
+ \MPcolor{shade-4}) ;
+ fill p withshade t ;
+
+ def bottom_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) =
+ if (pp>0) and (rr>0) :
+ if nn = 1 :
+ p := (0,0)--(ww,hh/2)--(0,hh)--cycle ;
+ elseif nn = 2 :
+ p := (0,hh/2)--(ww,hh)--(ww,0)--cycle ;
else :
- p := origin--cycle ;
- fi ;
- fill p randomized 2.5mm shifted (xx,yy) withshade s ;
- fi ;
- enddef ;
+ p := origin--cycle ;
+ fi ;
+ fill p randomized 2.5mm shifted (xx,yy) withshade s ;
+ fi ;
+ enddef ;
- \MPmenubuttons{bottom}
+ \MPmenubuttons{bottom}
- if length \MPstring{topic} > 0 :
+ if length \MPstring{topic} > 0 :
graphictext
- \MPstring{topic}
+ \MPstring{topic}
scaled 3
- shifted ulcorner Field[Text][Text]
- shifted (0,-1.5cm)
+ shifted ulcorner Field[Text][Text]
+ shifted (0,-1.5cm)
withshade s ;
fi ;
- StopPage ;
+ StopPage ;
\stopuseMPgraphic
\setupinteractionmenu
@@ -116,8 +112,8 @@
position=yes]
\startinteractionmenu[bottom]
- \but [previouspage] \\
- \but [nextpage] \\
+ \but [previouspage] \\
+ \but [nextpage] \\
\stopinteractionmenu
\setupinteraction
@@ -148,20 +144,20 @@
\setupbackgrounds[page][background=text]}
\def\TitleString#1#2%
- {\indent
+ {\indent
\startMPcode
graphictext
- "#2"
+ "#2"
scaled #1
withdrawcolor .4white
withfillcolor .7white
withpen pencircle scaled 2pt ;
\stopMPcode
- \vfill}
+ \vfill}
-\doifnotmode{demo}{\endinput}
+\doifnotmode{demo}{\endinput}
-\starttext
+\starttext
\StartTitlePage
\TitleString{8}{Welcome}
@@ -169,9 +165,9 @@
\TitleString{8}{Quotes}
\StopTitlePage
-\Topic {Douglas R. Hofstadter} \input douglas \page
-\Topic {Donald E. Knuth} \input knuth \page
-\Topic {Edward R. Tufte} \input tufte \page
-\Topic {Hermann Zapf} \input zapf \page
+\Topic {Douglas R. Hofstadter} \input douglas \page
+\Topic {Donald E. Knuth} \input knuth \page
+\Topic {Edward R. Tufte} \input tufte \page
+\Topic {Hermann Zapf} \input zapf \page
-\stoptext
+\stoptext
diff --git a/tex/context/base/s-pre-22.tex b/tex/context/base/s-pre-22.tex
index cb09816dc..8930c34be 100644
--- a/tex/context/base/s-pre-22.tex
+++ b/tex/context/base/s-pre-22.tex
@@ -14,27 +14,27 @@
%D This style was made on behalf of the \PDFTEX\ presentation
%D at \TUG\ 2000. It cycled a summary of each talk, with name
%D and title. When documenting this style, I changed
-%D reprocessing into pushing on layers.
-%D
+%D reprocessing into pushing on layers.
+%D
%D A \quote {problem} like this can be solved in several ways:
-%D
+%D
%D \startitemize
-%D \item writing a lot of semi||complex \TEX\ code as shown
-%D \item keeping track of positions and draw everything on the
+%D \item writing a lot of semi||complex \TEX\ code as shown
+%D \item keeping track of positions and draw everything on the
%D page layer
-%D \item defining an overlay for each summary and changing the
-%D order when flushing
+%D \item defining an overlay for each summary and changing the
+%D order when flushing
%D \item maintaining a so called field stack
%D \stopitemize
-%D
-%D We go for the first method. We assume that summaries are
-%D simple text snippets.
+%D
+%D We go for the first method. We assume that summaries are
+%D simple text snippets.
\startmode[asintended] \setupbodyfont[lbr] \stopmode
\setupbodyfont[14.4pt]
-%D We use the whole page area.
+%D We use the whole page area.
\setuppapersize
[S6][S6]
@@ -47,8 +47,8 @@
width=middle,
height=middle]
-%D We define a couple of matching colors and gray scales.
-%D Watch out, some are really meant to look dim.
+%D We define a couple of matching colors and gray scales.
+%D Watch out, some are really meant to look dim.
\setupcolors
[state=start]
@@ -63,14 +63,14 @@
%D We will use foreground colors. Because these can interfere
%D with the colors they overload, we can bets make sure that
-%D we don't have local colors.
+%D we don't have local colors.
\setupinteraction
[state=start,
color=,
contrastcolor=]
-%D The presentation is supposed to cycle automatically.
+%D The presentation is supposed to cycle automatically.
\setupinteractionscreen
[option=max,
@@ -78,13 +78,13 @@
\setuppagetransitions
-%D We will use random positioning of objects.
+%D We will use random positioning of objects.
\setupsystem
- [random=medium]
+ [random=medium]
%D We have two kind of graphics: the page background and
-%D the shape around the textual elements.
+%D the shape around the textual elements.
\defineoverlay [shape] [\uniqueMPgraphic{shape}]
\defineoverlay [page] [\reuseMPgraphic{page}]
@@ -106,30 +106,30 @@
draw p withpen pencircle scaled .50cm withcolor \MPcolor{PageColor} ;
fill p withcolor OverlayColor ;
draw p withpen pencircle scaled .25cm withcolor OverlayLineColor ;
- currentpicture := currentpicture xysized(OverlayWidth,OverlayHeight) ;
+ currentpicture := currentpicture xysized(OverlayWidth,OverlayHeight) ;
\stopuniqueMPgraphic
-%D The resizing at the end is needed to get a nice inverted
-%D hyperlink when we click on it in a browser.
+%D The resizing at the end is needed to get a nice inverted
+%D hyperlink when we click on it in a browser.
-%D Behind the page we put a forward button:
+%D Behind the page we put a forward button:
\defineoverlay [forward] [\overlaybutton{forward}]
-%D The content will be managed by means of two layers.
+%D The content will be managed by means of two layers.
\definelayer [main] \defineoverlay [main] [\composedlayer{main}]
\definelayer [temp] \defineoverlay [temp] [\composedlayer{temp}]
%D The first layer will hold everything to be shown, while
-%D the second one gets the data we currently focus on.
-%D Therefore the first layer will not be flushed each page.
+%D the second one gets the data we currently focus on.
+%D Therefore the first layer will not be flushed each page.
\setuplayer
[main]
[state=repeat]
-%D All the overlays go onto the page area.
+%D All the overlays go onto the page area.
\setupbackgrounds
[page]
@@ -138,16 +138,16 @@
%D We have to collect all data before we typeset it. Each
%D element will be typeset dim and bright. The dim
%D alternatives will be collected on the main layer, but each
-%D bring one goes onto a box stack.
+%D bring one goes onto a box stack.
\initializeboxstack{Summary}
\initializeboxstack{Subtext}
-%D The macros that take care of all this manipulations look
-%D more complicated than they actually are. We use a
-%D scratchbox to collect and inspect data. Also, because we
-%D typeset each element twice, we need to make sure that we use
-%D the same random seed for both.
+%D The macros that take care of all this manipulations look
+%D more complicated than they actually are. We use a
+%D scratchbox to collect and inspect data. Also, because we
+%D typeset each element twice, we need to make sure that we use
+%D the same random seed for both.
\doglobal\newcounter\CurrentSummary
@@ -158,12 +158,12 @@
{\doglobal\increment\CurrentSummary
\setbox\scratchbox=\hbox{\strut#1}
\getrandomseed\RandomSeed
- \setlayer[main]
+ \setlayer[main]
{\RandomSubtextBox{DoneColor}{BotColor}{BotColor}}
\setrandomseed\RandomSeed
\savebox{Subtext}{\CurrentSummary}
{\RandomSubtextBox{TextColor}{BotColor}{black}}
- \setbox\scratchbox=\hbox \bgroup
+ \setbox\scratchbox=\hbox \bgroup
\setbox\scratchbox=\hbox{\bfb\setstrut\strut\quad#2\quad}%
\SetAcceptableWidth
\framed [offset=0pt,width=fit,frame=off,align=middle,strut=no]
@@ -171,9 +171,9 @@
\doifsomething{#2}{\noindent\box\scratchbox\blank}}
\def\StopSummary
- {\egroup \egroup
+ {\egroup \egroup
\getrandomseed\RandomSeed
- \setlayer[main]
+ \setlayer[main]
{\RandomSummaryBox{DoneColor}{TopColor}{TopColor}}
\setrandomseed\RandomSeed
\savebox{Summary}{\CurrentSummary}
@@ -182,11 +182,11 @@
%D A \type {\doStartSummary#1#2#3\StopSummary} could have been
%D used too but this one is less sensitive for catcode changes
%D (not that we expect problems like this in this kind of
-%D application).
+%D application).
-%D The width is either derived from the width ot the title or
+%D The width is either derived from the width ot the title or
%D at random. The final width of the box is detemined by the
-%D content.
+%D content.
\def\SetAcceptableWidth
{\scratchdimen=.5\makeupwidth
@@ -196,15 +196,15 @@
\getrandomdimen\hsize{.5\makeupwidth}{.7\makeupwidth}%
\fi}
-%D The subtext box goes at the bottom, somewhere in the right
-%D corner.
+%D The subtext box goes at the bottom, somewhere in the right
+%D corner.
\def\RandomSubtextBox#1#2#3%
{\vbox to \makeupheight
{\vfill
\hbox to \makeupwidth
{\hfill
- \button
+ \button
[offset=2ex,frame=off,background=shape,strut=no,
backgroundcolor=#1,framecolor=#2,foregroundcolor=#3]
{\copy\scratchbox}%
@@ -214,8 +214,8 @@
\getrandomdimen\scratchdimen{.5cm}{1.5cm}
\vskip \scratchdimen}}
-%D The main text goes in the top half of the page, not to
-%D far from the center. The last \type {\vskip} makes sure
+%D The main text goes in the top half of the page, not to
+%D far from the center. The last \type {\vskip} makes sure
%D that we don't clash with the subtexts.
\definereference[thispage][page(\CurrentSummary)]
@@ -227,7 +227,7 @@
\hbox to \makeupwidth
{\getrandomdimen\scratchdimen{.5cm}\makeupwidth
\hskip 0pt plus \scratchdimen
- \button
+ \button
[offset=3ex,frame=off,background=shape,strut=no,
backgroundcolor=#1,framecolor=#2,foregroundcolor=#3]
{\copy\scratchbox}%
@@ -239,8 +239,8 @@
\vskip.2\makeupheight}}
%D Because we conly collect data, we hav eto make sure that at
-%D some moment it is processed and flushed. The following loop
-%D does this.
+%D some moment it is processed and flushed. The following loop
+%D does this.
\def\BuildPage
{\dorecurse{\CurrentSummary}
@@ -249,11 +249,11 @@
\setlayer[temp]{\foundbox{Subtext}\recurselevel}
\stopstandardmakeup}}
-%D We hook this macro into the \type {\stoptext} macro.
+%D We hook this macro into the \type {\stoptext} macro.
\appendtoks \BuildPage \to \everystoptext
-%D We still need a title page.
+%D We still need a title page.
\def\TitlePage%
{\dodoublegroupempty\doTitlePage}
@@ -270,13 +270,13 @@
\def\MakeTitlePage#1#2%
{\StartSummary{#1}{#2}\StopSummary}
-%D For old times sake:
+%D For old times sake:
\long\def\StartTopic#1\StopTopic{\StartSummary#1\StopSummary}
\doifnotmode{demo}{\endinput}
-%D The demo text.
+%D The demo text.
\starttext
diff --git a/tex/context/base/s-pre-60.mkiv b/tex/context/base/s-pre-60.mkiv
index 2ceb23773..aa5ec36d0 100644
--- a/tex/context/base/s-pre-60.mkiv
+++ b/tex/context/base/s-pre-60.mkiv
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+% use lua instead of global mess
+
\startmode[paper,print]
\let\StartSteps\relax
\let\StopSteps \relax
@@ -32,7 +34,7 @@
\dostepwiserecurse {\numexpr\StepMaximum+1\relax} {\getvariable{stepper}{nofsteps}} {1} {
\doifnotmode{nosteps,nostep} {
- \expanded{\defineviewerlayer[step:\recurselevel][state=stop]}
+ \expanded{\defineviewerlayer[step:\recurselevel][state=stop,scope=global]}
}
}
diff --git a/tex/context/base/s-pre-63.tex b/tex/context/base/s-pre-63.tex
index eb4c9f589..1a0fdf607 100644
--- a/tex/context/base/s-pre-63.tex
+++ b/tex/context/base/s-pre-63.tex
@@ -67,7 +67,6 @@ this module is under reconstruction
\setupbodyfont[8pt] \definefont[BigFont][Normal sa 4]
\starttext
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
\StartPage
\StartPair \StartLeft ZAPF \StopLeft \StartRight \input zapf \StopRight \StopPair
\StartPair \StartLeft DAVIS \StopLeft \StartRight \input davis \StopRight \StopPair
diff --git a/tex/context/base/s-pre-64.tex b/tex/context/base/s-pre-64.tex
index 1ad00fbab..9e82b255c 100644
--- a/tex/context/base/s-pre-64.tex
+++ b/tex/context/base/s-pre-64.tex
@@ -161,12 +161,15 @@
{\setuplayer[base][state=repeat]
\setlayer[base][preset=rightbottom]{\color[white]{\scale[height=9pt]{\strut#1}}}}
-\let\titlefont\relax
+\let\TitleFont\relax
\startmode[atpragma]
\definefontfeature[default][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes]
- \definedfont[palatinosanscom-regular*default at 12pt] \setupinterlinespace[line=15pt]
- \definefont[titlefont][palatinosanscom-bold*default at 48pt]
+ \definefont[TitleFont][palatinosanscom-bold*default at 48pt]
+ \definefont[MainTextFont][palatinosanscom-regular*default at 12pt] \setupinterlinespace[line=15pt]
+ \appendtoks
+ \MainTextFont % hack, as we define a bodyfont at that point (better have a proper typeface)
+ \to \everystarttext
\stopmode
\doifnotmode{demo}{\endinput}
@@ -179,7 +182,7 @@
\Title {hans hagen}
-\startstandardmakeup \titlefont \setupinterlinespace[line=3ex] \vfill
+\startstandardmakeup \TitleFont \setupinterlinespace[line=3ex] \vfill
\StartItem \dontleavehmode \quad {\morecolor zapfino, a} \StopItem
\StartItem \dontleavehmode \quad {\morecolor torture test} \StopItem
diff --git a/tex/context/base/scrn-but.mkvi b/tex/context/base/scrn-but.mkvi
index c2d4900e6..3a3a86a01 100644
--- a/tex/context/base/scrn-but.mkvi
+++ b/tex/context/base/scrn-but.mkvi
@@ -483,7 +483,7 @@
\def\scrn_menu_insert_indeed#location%
{\begingroup
- \edef\askedinteractionmenulocation{#location}%
+ \xdef\askedinteractionmenulocation{#location}%
\scrn_menu_set_final
\ifcase\scrn_menu_final_width \else \ifcase\scrn_menu_final_height \else
\forgetall
@@ -586,7 +586,7 @@
\newtoks \scrn_menu_mp_data
\def\scrn_menu_button_mp_template
- {\askedinteractionmenulocation_menu_button(%
+ {\askedinteractionmenulocation _menu_button(%
\number\scrn_menu_position,%
\number\scrn_menu_page_mode,%
\MPpos{\askedinteractionmenulocation:\number\scrn_menu_position}%
diff --git a/tex/context/base/scrn-ref.lua b/tex/context/base/scrn-ref.lua
index 9609e8aa2..0b1dff2c1 100644
--- a/tex/context/base/scrn-ref.lua
+++ b/tex/context/base/scrn-ref.lua
@@ -49,7 +49,7 @@ end
local function setclosepageaction(close)
local closepage = check(close)
if closepage then
- codeinjections.registerpagecloseaction(openpage)
+ codeinjections.registerpagecloseaction(closepage)
expandcurrent()
end
end
diff --git a/tex/context/base/spac-grd.mkiv b/tex/context/base/spac-grd.mkiv
index 979f56056..91fcf3207 100644
--- a/tex/context/base/spac-grd.mkiv
+++ b/tex/context/base/spac-grd.mkiv
@@ -247,6 +247,20 @@
\let\forcedbotbaselinecorrection\botbaselinecorrection
% experiment, todo: proper mkiv mechanism
+%
+% \input ward \par
+% \startframedtext test \stopframedtext
+% \input ward \par
+% \startlinecorrection \framed{xxx} \stoplinecorrection
+% \input ward \par
+%
+% \setupwhitespace[big]
+%
+% \input ward \par
+% \startframedtext test \stopframedtext
+% \input ward \par
+% \startlinecorrection \framed{xxx} \stoplinecorrection
+% \input ward \par
\def\dotopbaselinecorrection {\blank[\thetopbaselinecorrection ]}
\def\dobotbaselinecorrection {\blank[\thebotbaselinecorrection ]}
@@ -257,11 +271,19 @@
{\ifvmode
\bgroup
\setbaselinecorrections
- % \vspacing[white]
+ \vspacing[white]
\nointerlineskip
\dotopbaselinecorrection
\egroup
\fi}
+
+\def\dobaselinecorrection
+ {\ifdim\prevdepth>\zeropoint
+ \vspacing[\the\dimexpr-\prevdepth+\strutdp\relax]%
+ \else
+ \vspacing[\the\dimexpr\strutdp\relax]%
+ \fi
+ \prevdepth\strutdp}
\let\normalstartbaselinecorrection\startbaselinecorrection
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 35f708c26..f9dcd8e01 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index eeca38bb6..3379bbbdb 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -807,11 +807,11 @@ references.currentset = nil
--~ end
function commands.setreferenceoperation(k,v)
- references.currentset.operation[k] = v
+ references.currentset[k].operation = v
end
function commands.setreferencearguments(k,v)
- references.currentset.arguments[k] = v
+ references.currentset[k].arguments = v
end
local expandreferenceoperation = context.expandreferenceoperation
diff --git a/tex/context/base/supp-ran.mkiv b/tex/context/base/supp-ran.mkiv
index bd9a385aa..500170ab0 100644
--- a/tex/context/base/supp-ran.mkiv
+++ b/tex/context/base/supp-ran.mkiv
@@ -23,7 +23,7 @@
\def\getrandomnumber#1#2#3{\edef#1{\ctxcommand{getrandomcounta(\number#2,\number#3)}}}
\def\getrandomfloat #1#2#3{\edef#1{\ctxcommand{getrandomcountb(\number\dimexpr#2\points,\number\dimexpr#3\points)}}}
\def\setrandomseed #1{\ctxcommand{setrandomseed(\number#1)}}
-\def\getrandomseed {\ctxcommand{getrandomseed()}}
+\def\getrandomseed #1{\edef#1{\ctxcommand{getrandomseed()}}}
\def\freezerandomseed {\ctxcommand{freezerandomseed()}}
\def\defrostrandomseed {\ctxcommand{defrostrandomseed()}}
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index c401f5937..c909d6d94 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 : 03/29/11 12:49:38
+-- merge date : 03/30/11 11:21:09
do -- begin closure to overcome local limits and interference