summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/context/lua/mtxrun.lua2
-rw-r--r--scripts/context/stubs/mswin/mtxrun.lua2
-rw-r--r--scripts/context/stubs/unix/mtxrun2
-rw-r--r--tex/context/base/anch-pos.lua70
-rw-r--r--tex/context/base/anch-pos.mkiv37
-rw-r--r--tex/context/base/attr-col.lua23
-rw-r--r--tex/context/base/attr-col.mkiv61
-rw-r--r--tex/context/base/attr-eff.lua47
-rw-r--r--tex/context/base/attr-eff.mkiv36
-rw-r--r--tex/context/base/attr-ini.lua10
-rw-r--r--tex/context/base/attr-ini.mkiv4
-rw-r--r--tex/context/base/attr-neg.lua50
-rw-r--r--tex/context/base/attr-neg.mkiv11
-rw-r--r--tex/context/base/buff-ver.lua31
-rw-r--r--tex/context/base/colo-ext.mkiv2
-rw-r--r--tex/context/base/colo-ini.lua64
-rw-r--r--tex/context/base/colo-ini.mkiv64
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.mkii4
-rw-r--r--tex/context/base/context.mkiv1
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-def.mkiv2
-rw-r--r--tex/context/base/core-ini.mkiv3
-rw-r--r--tex/context/base/font-ini.mkiv134
-rw-r--r--tex/context/base/font-otf.lua3
-rw-r--r--tex/context/base/l-lpeg.lua2
-rw-r--r--tex/context/base/l-pdfview.lua6
-rw-r--r--tex/context/base/m-pictex.tex2
-rw-r--r--tex/context/base/node-mig.mkiv2
-rw-r--r--tex/context/base/regi-ini.lua70
-rw-r--r--tex/context/base/regi-ini.mkiv2
-rw-r--r--tex/context/base/regi-syn.mkii (renamed from tex/context/base/regi-syn.tex)0
-rw-r--r--tex/context/base/strc-mar.lua17
-rw-r--r--tex/context/base/strc-mar.mkiv36
-rw-r--r--tex/context/base/strc-not.mkiv1
-rw-r--r--tex/context/base/symb-cow.mkii132
-rw-r--r--tex/context/base/symb-cow.mkiv130
-rw-r--r--tex/context/base/symb-cow.tex132
-rw-r--r--tex/context/base/symb-eur.mkii (renamed from tex/context/base/symb-eur.tex)0
-rw-r--r--tex/context/base/symb-glm.mkii (renamed from tex/context/base/symb-glm.tex)0
-rw-r--r--tex/context/base/symb-ini.mkii11
-rw-r--r--tex/context/base/symb-ini.mkiv47
-rw-r--r--tex/context/base/symb-jmn.mkii (renamed from tex/context/base/symb-jmn.tex)9
-rw-r--r--tex/context/base/symb-jmn.mkiv196
-rw-r--r--tex/context/base/symb-mis.mkii (renamed from tex/context/base/symb-mis.tex)28
-rw-r--r--tex/context/base/symb-mis.mkiv55
-rw-r--r--tex/context/base/symb-mvs.mkii (renamed from tex/context/base/symb-mvs.tex)0
-rw-r--r--tex/context/base/symb-mvs.mkiv263
-rw-r--r--tex/context/base/symb-nav.mkii (renamed from tex/context/base/symb-nav.tex)6
-rw-r--r--tex/context/base/symb-nav.mkiv129
-rw-r--r--tex/context/base/symb-run.mkiv75
-rw-r--r--tex/context/base/symb-uni.mkii (renamed from tex/context/base/symb-uni.tex)0
-rw-r--r--tex/context/base/symb-was.mkii (renamed from tex/context/base/symb-was.tex)0
-rw-r--r--tex/context/base/thrd-pic.mkii (renamed from tex/context/base/thrd-pic.tex)0
-rw-r--r--tex/context/base/thrd-tab.mkii (renamed from tex/context/base/thrd-tab.tex)0
-rw-r--r--tex/context/base/type-otf.mkiv2
-rw-r--r--tex/context/base/v-tex.lua101
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua7
58 files changed, 1608 insertions, 520 deletions
diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua
index 354fe6392..d8a8e89e5 100644
--- a/scripts/context/lua/mtxrun.lua
+++ b/scripts/context/lua/mtxrun.lua
@@ -184,7 +184,7 @@ lpeg.patterns = lpeg.patterns or { } -- so that we can share
local patterns = lpeg.patterns
local P, R, S, V, match = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
-local Ct, C, Cs, Cc, Cf, Cg = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Cf, lpeg.Cg
+local Ct, C, Cs, Cc = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc
local lpegtype = lpeg.type
local utfcharacters = string.utfcharacters
diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua
index 354fe6392..d8a8e89e5 100644
--- a/scripts/context/stubs/mswin/mtxrun.lua
+++ b/scripts/context/stubs/mswin/mtxrun.lua
@@ -184,7 +184,7 @@ lpeg.patterns = lpeg.patterns or { } -- so that we can share
local patterns = lpeg.patterns
local P, R, S, V, match = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
-local Ct, C, Cs, Cc, Cf, Cg = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Cf, lpeg.Cg
+local Ct, C, Cs, Cc = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc
local lpegtype = lpeg.type
local utfcharacters = string.utfcharacters
diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun
index 354fe6392..d8a8e89e5 100644
--- a/scripts/context/stubs/unix/mtxrun
+++ b/scripts/context/stubs/unix/mtxrun
@@ -184,7 +184,7 @@ lpeg.patterns = lpeg.patterns or { } -- so that we can share
local patterns = lpeg.patterns
local P, R, S, V, match = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
-local Ct, C, Cs, Cc, Cf, Cg = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Cf, lpeg.Cg
+local Ct, C, Cs, Cc = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc
local lpegtype = lpeg.type
local utfcharacters = string.utfcharacters
diff --git a/tex/context/base/anch-pos.lua b/tex/context/base/anch-pos.lua
index d47109891..f31880278 100644
--- a/tex/context/base/anch-pos.lua
+++ b/tex/context/base/anch-pos.lua
@@ -25,7 +25,7 @@ local jobpositions = {
job.positions = jobpositions
-_plib_, _ptbs_, _pcol_ = jobpositions, tobesaved, collected -- global
+_ptbs_, _pcol_ = tobesaved, collected -- global
local dx, dy = "0pt", "0pt"
@@ -50,18 +50,27 @@ function jobpositions.replace(name,...)
collected[name] = {...}
end
-function jobpositions.doifelse(name)
- commands.testcase(collected[name] or tobesaved[name])
+function jobpositions.page(id)
+ local jpi = collected[id] or tobesaved[id]
+ context(jpi and jpi[1] or '0')
end
-function jobpositions.MPp(id) local jpi = collected[id] or tobesaved[id] context(jpi and jpi[1] or '0' ) end
-function jobpositions.MPx(id) local jpi = collected[id] or tobesaved[id] context(jpi and jpi[2] or '0pt') end
-function jobpositions.MPy(id) local jpi = collected[id] or tobesaved[id] context(jpi and jpi[3] or '0pt') end
-function jobpositions.MPw(id) local jpi = collected[id] or tobesaved[id] context(jpi and jpi[4] or '0pt') end
-function jobpositions.MPh(id) local jpi = collected[id] or tobesaved[id] context(jpi and jpi[5] or '0pt') end
-function jobpositions.MPd(id) local jpi = collected[id] or tobesaved[id] context(jpi and jpi[6] or '0pt') end
+function jobpositions.width(id)
+ local jpi = collected[id] or tobesaved[id]
+ context(jpi and jpi[4] or '0pt')
+end
+
+function jobpositions.height(id)
+ local jpi = collected[id] or tobesaved[id]
+ context(jpi and jpi[5] or '0pt')
+end
-function jobpositions.MPx(id)
+function jobpositions.depth(id)
+ local jpi = collected[id] or tobesaved[id]
+ context(jpi and jpi[6] or '0pt')
+end
+
+function jobpositions.x(id)
local jpi = collected[id] or tobesaved[id]
local x = jpi and jpi[2]
if x then
@@ -71,7 +80,7 @@ function jobpositions.MPx(id)
end
end
-function jobpositions.MPy(id)
+function jobpositions.y(id)
local jpi = collected[id] or tobesaved[id]
local y = jpi and jpi[3]
if y then
@@ -85,7 +94,7 @@ end
-- can be writes and no format needed any more
-function jobpositions.MPxy(id)
+function jobpositions.xy(id)
local jpi = collected[id] or tobesaved[id]
if jpi then
context('(%s-%s,%s-%s)',jpi[2],dx,jpi[3],dy)
@@ -94,7 +103,7 @@ function jobpositions.MPxy(id)
end
end
-function jobpositions.MPll(id)
+function jobpositions.lowerleft(id)
local jpi = collected[id] or tobesaved[id]
if jpi then
context('(%s-%s,%s-%s-%s)',jpi[2],dx,jpi[3],jpi[6],dy)
@@ -103,7 +112,7 @@ function jobpositions.MPll(id)
end
end
-function jobpositions.MPlr(id)
+function jobpositions.lowerright(id)
local jpi = collected[id] or tobesaved[id]
if jpi then
context('(%s+%s-%s,%s-%s-%s)',jpi[2],jpi[4],dx,jpi[3],jpi[6],dy)
@@ -112,7 +121,7 @@ function jobpositions.MPlr(id)
end
end
-function jobpositions.MPur(id)
+function jobpositions.upperright(id)
local jpi = collected[id] or tobesaved[id]
if jpi then
context('(%s+%s-%s,%s+%s-%s)',jpi[2],jpi[4],dx,jpi[3],jpi[5],dy)
@@ -121,7 +130,7 @@ function jobpositions.MPur(id)
end
end
-function jobpositions.MPul(id)
+function jobpositions.upperleft(id)
local jpi = collected[id] or tobesaved[id]
if jpi then
context('(%s-%s,%s+%s-%s)',jpi[2],dx,jpi[3],jpi[5],dy)
@@ -130,7 +139,7 @@ function jobpositions.MPul(id)
end
end
-function jobpositions.MPpos(id)
+function jobpositions.position(id)
local jpi = collected[id] or tobesaved[id]
if jpi then
context(concat(jpi,',',1,6))
@@ -141,7 +150,7 @@ end
local splitter = lpeg.Ct(lpeg.splitat(","))
-function jobpositions.MPplus(id,n,default)
+function jobpositions.pardata(id,n,default)
local jpi = collected[id] or tobesaved[id]
if not jpi then
context(default)
@@ -155,7 +164,30 @@ function jobpositions.MPplus(id,n,default)
end
end
-function jobpositions.MPrest(id,default)
+function jobpositions.extradata(id,default)
local jpi = collected[id] or tobesaved[id]
context(jpi and jpi[7] or default)
end
+
+-- interface
+
+commands.replacepospxywhd = jobpositions.replace
+commands.copyposition = jobpositions.copy
+commands.MPp = jobpositions.page
+commands.MPx = jobpositions.x
+commands.MPy = jobpositions.y
+commands.MPw = jobpositions.width
+commands.MPh = jobpositions.height
+commands.MPd = jobpositions.depth
+commands.MPxy = jobpositions.xy
+commands.MPll = jobpositions.lowerleft
+commands.MPlr = jobpositions.lowerright
+commands.MPur = jobpositions.upperright
+commands.MPul = jobpositions.upperleft
+commands.MPpos = jobpositions.position
+commands.MPplus = jobpositions.pardata
+commands.MPrest = jobpositions.extradata
+
+function commands.doifelse(name)
+ commands.testcase(collected[name] or tobesaved[name])
+end
diff --git a/tex/context/base/anch-pos.mkiv b/tex/context/base/anch-pos.mkiv
index e19cab0c2..d136dbc0a 100644
--- a/tex/context/base/anch-pos.mkiv
+++ b/tex/context/base/anch-pos.mkiv
@@ -35,7 +35,6 @@
% at some point (when we no longer share code) we will move to numbers
% do that we have less garbage collection and hashing
%
-% the global table _plib_ is equivalent to job.positions
% the global table _ptbs_ is equivalent to job.positions.tobesaved
% the global table _pcol_ is equivalent to job.positions.collected
%
@@ -121,7 +120,7 @@
\def\lastsavedpositiony {\the\dimexpr\pdflastypos\scaledpoint\relax}
\let\savecurrentposition\pdfsavepos
-\def\dosetposition#1%
+\def\dosetposition#1% will become commands.setposition
{\savecurrentposition
\normalexpanded{\ctxlatelua{_ptbs_['#1']={%
\noexpand\realfolio,"\noexpand\lastsavedpositionx","\noexpand\lastsavedpositiony"}}}}
@@ -163,7 +162,7 @@
%D Sometimes we want to trick the position handler a bit:
-\def\replacepospxywhd#1#2#3#4#5#6#7{\ctxlua{_plib_.replace('#1',\number#2,"\the\dimexpr#3\relax","\the\dimexpr#4\relax","\the\dimexpr#5\relax","\the\dimexpr#6\relax","\the\dimexpr#7\relax")}}
+\def\replacepospxywhd#1#2#3#4#5#6#7{\ctxlua{commands.replacepospxywhd('#1',\number#2,"\the\dimexpr#3\relax","\the\dimexpr#4\relax","\the\dimexpr#5\relax","\the\dimexpr#6\relax","\the\dimexpr#7\relax")}}
%D For postprocessing purposes, we save the number of
%D positions.
@@ -208,18 +207,18 @@
% \the\dimexpr\noexpand\lastsavedpositionx\ifnum\positionanchormode=\plusone-\MPx\pageanchor\fi\relax
% \the\dimexpr\noexpand\lastsavedpositiony\ifnum\positionanchormode=\plusone-\MPx\pageanchor\fi\relax
-\def\MPp #1{\ctxlua{_plib_.MPp("#1")}}
-\def\MPx #1{\ctxlua{_plib_.MPx("#1")}}
-\def\MPy #1{\ctxlua{_plib_.MPy("#1")}}
-\def\MPw #1{\ctxlua{_plib_.MPw("#1")}}
-\def\MPh #1{\ctxlua{_plib_.MPh("#1")}}
-\def\MPd #1{\ctxlua{_plib_.MPd("#1")}}
-\def\MPxy #1{\ctxlua{_plib_.MPxy("#1")}}
-\def\MPll #1{\ctxlua{_plib_.MPll("#1")}}
-\def\MPlr #1{\ctxlua{_plib_.MPlr("#1")}}
-\def\MPur #1{\ctxlua{_plib_.MPur("#1")}}
-\def\MPul #1{\ctxlua{_plib_.MPul("#1")}}
-\def\MPpos#1{\ctxlua{_plib_.MPpos("#1")}}
+\def\MPp #1{\ctxlua{commands.MPp("#1")}}
+\def\MPx #1{\ctxlua{commands.MPx("#1")}}
+\def\MPy #1{\ctxlua{commands.MPy("#1")}}
+\def\MPw #1{\ctxlua{commands.MPw("#1")}}
+\def\MPh #1{\ctxlua{commands.MPh("#1")}}
+\def\MPd #1{\ctxlua{commands.MPd("#1")}}
+\def\MPxy #1{\ctxlua{commands.MPxy("#1")}}
+\def\MPll #1{\ctxlua{commands.MPll("#1")}}
+\def\MPlr #1{\ctxlua{commands.MPlr("#1")}}
+\def\MPur #1{\ctxlua{commands.MPur("#1")}}
+\def\MPul #1{\ctxlua{commands.MPul("#1")}}
+\def\MPpos#1{\ctxlua{commands.MPpos("#1")}}
%D \macros
%D {MPplus, MPrest, MPv, MPvv}
@@ -241,8 +240,8 @@
%D
%D The extra parameters are not treated.
-\def\MPplus#1#2#3{\ctxlua{_plib_.MPplus("#1",#2,"#3")}} \let\MPv \MPplus
-\def\MPrest #1#2{\ctxlua{_plib_.MPrest("#1","#2")}} \let\MPvv\MPrest
+\def\MPplus#1#2#3{\ctxlua{commands.MPplus("#1",#2,"#3")}} \let\MPv \MPplus
+\def\MPrest #1#2{\ctxlua{commands.MPrest("#1","#2")}} \let\MPvv\MPrest
%D \macros
%D {MPanchor}
@@ -403,7 +402,7 @@
%D
%D Again, this is a global action.
-\def\copyposition#1#2{\ctxlua{_plib_.copy('#1','#2')}}
+\def\copyposition#1#2{\ctxlua{commands.copyposition('#1','#2')}}
%D The fact that handling positions is a two pass operation, is
%D one of the reasons why we need to be able to test for
@@ -413,7 +412,7 @@
%D \doifpositionelse {identifier} {found action} {not found action}
%D \stoptyping
-\def\doifpositionelse#1{\ctxlua{_plib_.doifelse('#1')}}
+\def\doifpositionelse#1{\ctxlua{commands.doifpositionelse('#1')}}
%D We have now arrived at a few macros that would make sense as
%D support macros, but ended up in the core.
diff --git a/tex/context/base/attr-col.lua b/tex/context/base/attr-col.lua
index 24c76ae6d..0a60ba52a 100644
--- a/tex/context/base/attr-col.lua
+++ b/tex/context/base/attr-col.lua
@@ -64,15 +64,14 @@ local unsetvalue = attributes.unsetvalue
-- We assume that only processcolors are defined in the format.
attributes.colors = attributes.colors or { }
-local colors = attributes.colors _clib_ = colors -- fast access (less tokens too)
-
-colors.data = allocate()
-colors.values = colors.values or { }
-colors.registered = colors.registered or { }
+local colors = attributes.colors
local a_color = attributes.private('color')
local a_selector = attributes.private('colormodel')
+colors.data = allocate()
+colors.values = colors.values or { }
+colors.registered = colors.registered or { }
colors.weightgray = true
colors.attribute = a_color
colors.selector = a_selector
@@ -350,7 +349,7 @@ end
-- transparencies
attributes.transparencies = attributes.transparencies or { }
-local transparencies = attributes.transparencies _tlib_ = transparencies -- fast access (less tokens too)
+local transparencies = attributes.transparencies
transparencies.registered = transparencies.registered or { }
transparencies.data = allocate()
transparencies.values = transparencies.values or { }
@@ -493,7 +492,7 @@ function colorintents.register(stamp)
return registered[stamp] or registered.overprint
end
-attributes.colorintents.handler = nodes.installattributehandler {
+colorintents.handler = nodes.installattributehandler {
name = "colorintent",
namespace = colorintents,
initializer = states.initialize,
@@ -504,3 +503,13 @@ attributes.colorintents.handler = nodes.installattributehandler {
function colorintents.enable()
tasks.enableaction("shipouts","attributes.colorintents.handler")
end
+
+-- interface
+
+commands.enablecolor = colors.enable
+commands.enabletransparency = transparencies.enable
+commands.enablecolorintent = colorintents.enable
+
+function commands.registercolor (...) context(colors .register(...)) end
+function commands.registertransparency(...) context(transparencies.register(...)) end
+function commands.registercolorintent (...) context(colorintents .register(...)) end
diff --git a/tex/context/base/attr-col.mkiv b/tex/context/base/attr-col.mkiv
index 5dc0e477e..5b09bf38b 100644
--- a/tex/context/base/attr-col.mkiv
+++ b/tex/context/base/attr-col.mkiv
@@ -24,47 +24,46 @@
%
% We could combine this in one attribute but this is not faster and also
% less flexible because sometimes we want to freeze the attribute bit.
-%
-% Watch out: real color support will be implemented later.
-
-\newcount\currentcolormodel
-
-\def\dosetcolormodel#1%
- {\currentcolormodel\ctxlua{tex.print(_clib_.setmodel('#1'))}%
- \attribute\colormodelattribute\currentcolormodel}
-
-\dosetcolormodel{all}
-
-\appendtoks
- \dosetcolormodel{all}% redundant?
-\to \everyjob
-
-\def\registerrgbcolor #1#2#3#4{\ctxlua{_clib_.register('#1','rgb' ,#2,#3,#4)}}
-\def\registercmykcolor#1#2#3#4#5{\ctxlua{_clib_.register('#1','cmyk',#2,#3,#4,#5)}}
-\def\registergraycolor #1#2{\ctxlua{_clib_.register('#1','gray',#2)}}
-
-% transparency
-
-\def\registertransparency#1#2#3%
- {\setevalue{(ts:#1)}{\attribute\transparencyattribute\ctxlua{tex.write(_tlib_.register(#2,#3))} }}
-
-\def\sometransparencyswitch#1{\csname(ts:#1)\endcsname}
-\def\sometransparencyswitch
- {\ctxlua{_tlib_.enable()}%
- \gdef\sometransparencyswitch##1{\csname(ts:##1)\endcsname}%
- \sometransparencyswitch}
+% % color (layer on top)
+%
+% \def\dosetcolormodel#1% overloaded later
+% {\ctxlua{commands.setcolormodel('#1')}} % sets attribute
+%
+% \dosetcolormodel{all}
+%
+% \def\registerrgbcolor#1#2#3#4% not used
+% {\setevalue{(cs:#1)}{\attribute\colorattribute\ctxlua{commands.registercolor('#1','rgb' ,#2,#3,#4)}}}
+%
+% \def\registercmykcolor#1#2#3#4#5% not used
+% {\setevalue{(cs:#1)}{\attribute\colorattribute\ctxlua{commands.registercolor('#1','cmyk',#2,#3,#4,#5)}}}
+%
+% \def\registergraycolor#1#2% not used
+% {\setevalue{(cs:#1)}{\attribute\colorattribute\ctxlua{commands.registercolor('#1','gray',#2)}}}
+% % transparency (layer on top)
+%
+% \def\registertransparency#1#2#3%
+% {\setevalue{(ts:#1)}{\attribute\transparencyattribute\ctxlua{commands.registertransparency(#2,#3)} }}
+%
+% \def\sometransparencyswitch#1%
+% {\csname(ts:#1)\endcsname}
+%
+% \def\sometransparencyswitch
+% {\ctxlua{commands.enabletransparency()}%
+% \gdef\sometransparencyswitch##1{\csname(ts:##1)\endcsname}%
+% \sometransparencyswitch}
+%
% \registertransparency {one} {1} {.5}
% \registertransparency {two} {1} {.6}
% overprint
\def\registercolorintent#1#2%
- {\setevalue{(os:#1)}{\attribute\colorintentattribute\ctxlua{tex.write(attributes.colorintents.register('#2'))} }}
+ {\setevalue{(os:#1)}{\attribute\colorintentattribute\ctxlua{commands.registercolorintent('#2')} }}
\def\dotriggercolorintent
- {\ctxlua{attributes.colorintents.enable()}%
+ {\ctxlua{commands.enablecolorintents()}%
\gdef\dotriggercolorintent##1{\csname(os:##1)\endcsname}%
\dotriggercolorintent}
diff --git a/tex/context/base/attr-eff.lua b/tex/context/base/attr-eff.lua
index 53610cbff..6ed64f201 100644
--- a/tex/context/base/attr-eff.lua
+++ b/tex/context/base/attr-eff.lua
@@ -12,16 +12,20 @@ local allocate = utilities.storage.allocate
local attributes, nodes = attributes, nodes
-local states = attributes.states
-local tasks = nodes.tasks
-local nodeinjections = backends.nodeinjections
+local states = attributes.states
+local tasks = nodes.tasks
+local nodeinjections = backends.nodeinjections
+local settexattribute = tex.setattribute
attributes.effects = attributes.effects or { }
local effects = attributes.effects
+
+local a_effect = attributes.private('effect')
+
effects.data = allocate()
effects.values = effects.values or { }
effects.registered = effects.registered or { }
-effects.attribute = attributes.private("effect")
+effects.attribute = a_effect
storage.register("attributes/effects/registered", effects.registered, "attributes.effects.registered")
storage.register("attributes/effects/values", effects.values, "attributes.effects.values")
@@ -52,7 +56,15 @@ end
setmetatable(effects, { __index = extender })
setmetatable(effects.data, { __index = reviver })
-function effects.register(effect,stretch,rulethickness)
+effects.handler = nodes.installattributehandler {
+ name = "effect",
+ namespace = effects,
+ initializer = states.initialize,
+ finalizer = states.finalize,
+ processor = states.process,
+}
+
+local function register(effect,stretch,rulethickness)
local stamp = format(template,effect,stretch,rulethickness)
local n = registered[stamp]
if not n then
@@ -63,14 +75,21 @@ function effects.register(effect,stretch,rulethickness)
return n
end
-attributes.effects.handler = nodes.installattributehandler {
- name = "effect",
- namespace = effects,
- initializer = states.initialize,
- finalizer = states.finalize,
- processor = states.process,
-}
-
-function effects.enable()
+local function enable()
tasks.enableaction("shipouts","attributes.effects.handler")
end
+
+effects.register = register
+effects.enable = enable
+
+-- interface
+
+local enabled = false
+
+function commands.triggereffect(effect,stretch,rulethickness)
+ if not enabled then
+ enable()
+ enabled = true
+ end
+ settexattribute(a_effect,register(effect,stretch,rulethickness))
+end
diff --git a/tex/context/base/attr-eff.mkiv b/tex/context/base/attr-eff.mkiv
index ea2dfcd4b..1b9adf718 100644
--- a/tex/context/base/attr-eff.mkiv
+++ b/tex/context/base/attr-eff.mkiv
@@ -15,20 +15,25 @@
\registerctxluafile{attr-eff}{1.001}
-% more will move to the lua end (old code, early luatex approach)
-
\unprotect
-\def\registereffect#1#2#3% #2=stretch #3=rulethickness
- {\setxvalue{(es:#1:#2:\number\dimexpr#3\relax)}%
- {\attribute\effectattribute\ctxlua{tex.write(attributes.effects.register('#1',#2,\number\dimexpr#3\relax))}\relax}}
-
-\def\dotriggereffect
- {\ctxlua{attributes.effects.enable()}%
- \gdef\dotriggereffect##1##2##3%
- {\ifcsname(es:##1:##2:\number\dimexpr##3\relax)\endcsname\else\registereffect{##1}{##2}{##3}\fi
- \csname(es:##1:##2:\number\dimexpr##3\relax)\endcsname}%
- \dotriggereffect}
+% \def\registereffect#1#2#3% #2=stretch #3=rulethickness
+% {\setxvalue{(es:#1:#2:\number\dimexpr#3\relax)}% todo: set attribute at lua end
+% {\attribute\effectattribute\ctxlua{commands.registereffect('#1',#2,\number\dimexpr#3\relax)}\relax}}
+%
+% \def\dotriggereffect
+% {\ctxlua{commands.enableeffect()}% can then move to caller
+% \gdef\dotriggereffect##1##2##3%
+% {\ifcsname(es:##1:##2:\number\dimexpr##3\relax)\endcsname\else\registereffect{##1}{##2}{##3}\fi
+% \csname(es:##1:##2:\number\dimexpr##3\relax)\endcsname}%
+% \dotriggereffect}
+%
+% \def\registereffect#1#2#3% #2=stretch #3=rulethickness
+% {\setxvalue{(es:#1:#2:\number\dimexpr#3\relax)}% todo: set attribute at lua end
+% {\attribute\effectattribute\ctxlua{commands.registereffect('#1',#2,\number\dimexpr#3\relax)}\relax}}
+
+\gdef\dotriggereffect#1#2#3%
+ {\ctxlua{commands.triggereffect('#1',#2,\number\dimexpr#3\relax)}}
\unexpanded\def\setupeffect
{\dodoubleargument\dosetupeffect}
@@ -43,12 +48,15 @@
{\getparameters[\??et#1][\c!method=\v!none,\c!stretch=0,\c!rulethickness=\zeropoint,\c!alternative=\v!normal,#2]%
\doif{\getvalue{\??et#1\c!method}}\v!command
{\setugvalue{\e!start#1}{\starteffect[#1]}%
- \setugvalue{\e!stop #1}{\stopeffect }}}
+ \setugvalue{\e!stop #1}{\stopeffect}}}
% yes or no grouped
\unexpanded\def\starteffect[#1]%
- {\dotriggereffect{\getvalue{\??et#1\c!alternative}}{\getvalue{\??et#1\c!stretch}}{\getvalue{\??et#1\c!rulethickness}}}
+ {\dotriggereffect
+ {\csname\??et#1\c!alternative \endcsname}%
+ {\csname\??et#1\c!stretch \endcsname}%
+ {\csname\??et#1\c!rulethickness\endcsname}}
\unexpanded\def\stopeffect % can be special
{\dotriggereffect\v!normal0\zeropoint}
diff --git a/tex/context/base/attr-ini.lua b/tex/context/base/attr-ini.lua
index 2a1879c9a..6c281d643 100644
--- a/tex/context/base/attr-ini.lua
+++ b/tex/context/base/attr-ini.lua
@@ -58,7 +58,7 @@ function attributes.private(name) -- at the lua end (hidden from user)
return number
end
--- new
+-- new (actually a tracer)
function attributes.ofnode(n)
local a = n.attr
@@ -71,3 +71,11 @@ function attributes.ofnode(n)
end
end
end
+
+-- interface
+
+commands.defineattribute = attributes.define
+
+function commands.getprivateattribute(name)
+ context(attributes.private(name))
+end
diff --git a/tex/context/base/attr-ini.mkiv b/tex/context/base/attr-ini.mkiv
index c3d33ddb5..eccb5ffbc 100644
--- a/tex/context/base/attr-ini.mkiv
+++ b/tex/context/base/attr-ini.mkiv
@@ -43,7 +43,7 @@
{\expandafter\newattribute\csname @attr@#1\endcsname
\expandafter\newconstant \csname :attr:#1\endcsname
\csname :attr:#1\endcsname\lastallocatedattribute
- \ctxlua{attributes.define("#1",\number\lastallocatedattribute)}%
+ \ctxlua{commands.defineattribute("#1",\number\lastallocatedattribute)}%
%\writestatus\m!systems{defining attribute #1 with number \number\lastallocatedattribute}%
\doifnotinset\s!global{#2}{\appendetoks\csname @attr@#1\endcsname\attributeunsetvalue\to\attributesresetlist}%
\doifinset \s!public{#2}{\expandafter\let\csname#1attribute\expandafter\endcsname\csname :attr:#1\endcsname}}
@@ -52,7 +52,7 @@
{\dodoubleempty\dodefinesystemattribute}
\def\dodefinesystemattribute[#1][#2]% alternatively we can let lua do the housekeeping
- {\scratchcounter\ctxlua{tex.print(attributes.private("#1"))}\relax
+ {\scratchcounter\ctxlua{commands.getprivateattribute("#1")}\relax
\expandafter\attributedef\csname @attr@#1\endcsname\scratchcounter
\expandafter\newconstant \csname :attr:#1\endcsname
\csname :attr:#1\endcsname\scratchcounter
diff --git a/tex/context/base/attr-neg.lua b/tex/context/base/attr-neg.lua
index ba95382ce..c8f294c71 100644
--- a/tex/context/base/attr-neg.lua
+++ b/tex/context/base/attr-neg.lua
@@ -13,20 +13,25 @@ local format = string.format
local attributes, nodes = attributes, nodes
-local states = attributes.states
-local tasks = nodes.tasks
-local nodeinjections = backends.nodeinjections
+local states = attributes.states
+local tasks = nodes.tasks
+local nodeinjections = backends.nodeinjections
+local settexattribute = tex.setattribute
+local variables = interfaces.variables
--- negative / positive
-attributes.negatives = attributes.negatives or { }
-local negatives = attributes.negatives
-negatives.data = negatives.data or { }
-negatives.attribute = attributes.private("negative")
+attributes.negatives = attributes.negatives or { }
+local negatives = attributes.negatives
+
+local a_negative = attributes.private("negative")
+
+negatives.data = negatives.data or { }
+negatives.attribute = a_negative
negatives.registered = {
- positive = 1,
- negative = 2,
+ [variables.positive] = 1,
+ [variables.negative] = 2,
}
local data, registered = negatives.data, negatives.registered
@@ -54,11 +59,7 @@ end
setmetatable(negatives, { __index = extender })
setmetatable(negatives.data, { __index = reviver })
-function negatives.register(stamp)
- return registered[stamp] or registered.positive
-end
-
-attributes.negatives.handler = nodes.installattributehandler {
+negatives.handler = nodes.installattributehandler {
name = "negative",
namespace = negatives,
initializer = states.initialize,
@@ -66,6 +67,25 @@ attributes.negatives.handler = nodes.installattributehandler {
processor = states.process,
}
-function negatives.enable()
+local function register(stamp)
+ return registered[stamp] or registered.positive
+end
+
+local function enable()
tasks.enableaction("shipouts","attributes.negatives.handler")
end
+
+negatives.register = register
+negatives.enable = enable
+
+-- interface
+
+local enabled = false
+
+function commands.triggernegative(stamp)
+ if not enabled then
+ enable()
+ enabled = true
+ end
+ settexattribute(a_negative,register(stamp))
+end
diff --git a/tex/context/base/attr-neg.mkiv b/tex/context/base/attr-neg.mkiv
index 7ffd7ae19..402af0bf5 100644
--- a/tex/context/base/attr-neg.mkiv
+++ b/tex/context/base/attr-neg.mkiv
@@ -17,16 +17,9 @@
\unprotect
-\def\registernegative#1#2%
- {\setevalue{(ns:#1)}{\attribute\negativeattribute\ctxlua{tex.write(attributes.negatives.register('#2'))}\relax}}
+% positive and negative are preregistered
-\def\dotriggernegative
- {\ctxlua{attributes.negatives.enable()}%
- \gdef\dotriggernegative##1{\csname(ns:##1)\endcsname}%
- \dotriggernegative}
-
-\registernegative{positive}{positive}
-\registernegative{negative}{negative}
+\def\dotriggernegative#1{\ctxlua{commands.triggernegative('#1'))}}
\unexpanded\def\startnegative{\dotriggernegative\v!negative}
\unexpanded\def\stopnegative {\dotriggernegative\v!positive}
diff --git a/tex/context/base/buff-ver.lua b/tex/context/base/buff-ver.lua
index 2cc8d6df9..d62d31df7 100644
--- a/tex/context/base/buff-ver.lua
+++ b/tex/context/base/buff-ver.lua
@@ -156,6 +156,15 @@ function visualizers.newgrammar(name,t)
return t
end
+local function getvisualizer(method,nature)
+ local m = specifications[method] or specifications.default
+ if nature then
+ return m and (m[nature] or m.parser) or nil
+ else
+ return m and m.parser or nil
+ end
+end
+
local fallback = context.verbatim
local function makepattern(visualizer,kind,pattern)
@@ -172,8 +181,19 @@ local function makepattern(visualizer,kind,pattern)
end
end
-visualizers.pattern = makepattern
+local function makenested(handler,how,start,stop)
+ local b, e, f = P(start), P(stop), how
+ if type(how) == "string" then
+ f = function(s) getvisualizer(how,"direct")(s) end
+ end
+ return makepattern(handler,"name",b)
+ * ((1-e)^1/f)
+ * makepattern(handler,"name",e)
+end
+
+visualizers.pattern = makepattern
visualizers.makepattern = makepattern
+visualizers.makenested = makenested
function visualizers.load(name)
if rawget(specifications,name) == nil then
@@ -258,15 +278,6 @@ function visualizers.register(name,specification)
return specification
end
-local function getvisualizer(method,nature)
- local m = specifications[method] or specifications.default
- if nature then
- return m and (m[nature] or m.parser) or nil
- else
- return m and m.parser or nil
- end
-end
-
local escapepatterns = { } visualizers.escapepatterns = escapepatterns
local function texmethod(s)
diff --git a/tex/context/base/colo-ext.mkiv b/tex/context/base/colo-ext.mkiv
index bc1c2fc41..c1e338469 100644
--- a/tex/context/base/colo-ext.mkiv
+++ b/tex/context/base/colo-ext.mkiv
@@ -105,7 +105,7 @@
\def\dododefineintermediatecolor[#1][#2,#3,#4][#5]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxlua{_clib_.defineintermediatecolor("#1","#2",
+ \ctxlua{commands.defineintermediatecolor("#1","#2",
\thecolorattribute{#3},\thecolorattribute{#4},
\thetransparencyattribute{#3},\thetransparencyattribute{#4},
"#5",false,\iffreezecolors true\else false\fi)}% not global
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index 238693bd0..b12e383c6 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -20,14 +20,17 @@ local attributes, context, commands = attributes, context, commands
local settings_to_hash_strict = utilities.parsers.settings_to_hash_strict
-local colors = attributes.colors
-local transparencies = attributes.transparencies
-local registrations = backends.registrations
-
-local a_color = attributes.private('color')
-local a_transparency = attributes.private('transparency')
-local a_colorspace = attributes.private('colormodel')
-local a_background = attributes.private('background')
+local colors = attributes.colors
+local transparencies = attributes.transparencies
+local colorintents = attributes.colorintents
+local registrations = backends.registrations
+local settexattribute = tex.setattribute
+local gettexattribute = tex.getattribute
+
+local a_color = attributes.private('color')
+local a_transparency = attributes.private('transparency')
+local a_colorspace = attributes.private('colormodel')
+local a_background = attributes.private('background')
local register_color = colors.register
local attributes_list = attributes.list
@@ -410,7 +413,7 @@ function colors.definemultitonecolor(name,multispec,colorspec,selfspec)
end
end
-function colors.mp(model,ca,ta,default) -- will move to mlib-col
+function colors.mpcolor(model,ca,ta,default) -- will move to mlib-col
local cv = colors.supported and colors.value(ca) -- faster when direct colors.values[ca]
if cv then
local tv = transparencies.supported and transparencies.value(ta)
@@ -586,3 +589,46 @@ function colors.defineintermediatecolor(name,fraction,c_one,c_two,a_one,a_two,sp
definetransparent(name,transparencies.register(name,ta,tt),global)
end
end
+
+-- interface
+
+local setcolormodel = colors.setmodel
+
+function commands.setcolormodel(model,weight)
+ settexattribute(a_colorspace,setcolormodel(model,weight))
+end
+
+function commands.setrastercolor(name,s)
+ settexattribute(a_color,colors.definesimplegray(name,s))
+end
+
+function commands.registermaintextcolor(a)
+ colors.main = a
+end
+
+commands.defineprocesscolor = colors.defineprocesscolor
+commands.definespotcolor = colors.definespotcolor
+commands.definemultitonecolor = colors.definemultitonecolor
+commands.definetransparency = colors.definetransparency
+commands.defineintermediatecolor = colors.defineintermediatecolor
+
+function commands.spotcolorname (a) context(colors.spotcolorname (a)) end
+function commands.spotcolorparent (a) context(colors.spotcolorparent (a)) end
+function commands.spotcolorvalue (a) context(colors.spotcolorvalue (a)) end
+function commands.colorcomponents (a) context(colors.colorcomponents (a)) end
+function commands.transparencycomponents(a) context(colors.transparencycomponents(a)) end
+function commands.formatcolor (a) context(colors.formatcolor (a)) end
+function commands.formatgray (a) context(colors.formatgray (a)) end
+
+function commands.mpcolor(model,ca,ta,default)
+ context(colors.mpcolor(model,ca,ta,default))
+end
+
+function commands.doifblackelse(a)
+ commands.doifelse(colors.isblack(a))
+end
+
+function commands.doifdrawingblackelse()
+ commands.doifelse(colors.isblack(gettexattribute(a_color)))
+end
+
diff --git a/tex/context/base/colo-ini.mkiv b/tex/context/base/colo-ini.mkiv
index af3c1ebf4..d6ded253c 100644
--- a/tex/context/base/colo-ini.mkiv
+++ b/tex/context/base/colo-ini.mkiv
@@ -714,19 +714,15 @@
% draw btex test etex withprescript \mptexcolor{blue} ;
% \stopMPpage
-\ifx\currentcolormodel\undefined \newcount\currentcolormodel \fi
+% \ifx\currentcolormodel\undefined \newcount\currentcolormodel \fi
-% \def\setcolormodel#1%
-% {\showcolormessage\m!colors1{#1}%
-% \dosetcolormodel{#1}}
+\def\currentcolormodel{\attribute\colormodelattribute}
\def\dosetcolormodel#1% no message
- {\currentcolormodel\ctxlua{tex.print(_clib_.setmodel('#1',\ifweightGRAY true\else false\fi))}%
- \attribute\colormodelattribute\currentcolormodel}
+ {\ctxlua{commands.setcolormodel('#1',\ifweightGRAY true\else false\fi)}} % sets attribute
\dosetcolormodel{all}
-
\def\dosetupcolormodel
{\ifincolor
\ifRGBsupported
@@ -787,7 +783,7 @@
\def\doactivatecolor
{\ifproductionrun
- \ctxlua{_clib_.enable() _tlib_.enable()}% not that efficient but at least robust
+ \ctxlua{commands.enablecolor() commands.enabletransparency()}% not that efficient but at least robust
\let\doactivatecolor\normaldoactivatecolor
\expandafter\doactivatecolor
\else
@@ -806,44 +802,45 @@
\setfalse\collectcolorsinlist
\def\collectcolorinlist#1{\doglobal\addtocommalist{#1}\colorlist}
-\def\doregistercolor#1#2{\ctxlua{_clib_.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}}
+\def\doregistercolor#1#2%
+ {\ctxlua{commands.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}}
\def\dodefinecolor[#1][#2]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxlua{_clib_.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
+ \ctxlua{commands.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
\dodefinecolorcommand\setvalue{#1}}
\def\dodefineglobalcolor[#1][#2]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxlua{_clib_.defineprocesscolor("#1","#2",true,\iffreezecolors true\else false\fi)}%
+ \ctxlua{commands.defineprocesscolor("#1","#2",true,\iffreezecolors true\else false\fi)}%
\dodefinecolorcommand\setgvalue{#1}}
\def\dodefinenamedcolor[#1][#2]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxlua{_clib_.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
+ \ctxlua{commands.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
\dodefinecolorcommand\setvalue{#1}}
\def\dodefinespotcolor[#1][#2][#3]%
{\ifconditional\collectcolorsinlist\collectcolorinlist{#1}\fi
- \ctxlua{_clib_.definespotcolor("#1","#2","#3",true)}%
+ \ctxlua{commands.definespotcolor("#1","#2","#3",true)}%
\dodefinecolorcommand\setxvalue{#1}}
\def\dodefinemultitonecolor[#1][#2][#3][#4]%
- {\ctxlua{_clib_.definemultitonecolor("#1","#2","#3","#4",true)}%
+ {\ctxlua{commands.definemultitonecolor("#1","#2","#3","#4",true)}%
\dodefinecolorcommand\setxvalue{#1}}
\def\dodefinetransparency[#1][#2]%
- {\ctxlua{_clib_.definetransparency("#1",#2)}}
+ {\ctxlua{commands.definetransparency("#1",#2)}}
\def\dosetrastercolor#1% slow, we need a fast one
{\edef\@@rastervalue{#1}%
\ifx\@@rastervalue\empty
\let\@@rastervalue\@@rsscreen
\fi
- \attribute\colorattribute\ctxlua{tex.sprint(_clib_.definesimplegray("_raster_",\@@rastervalue))}\relax}
+ \ctxlua{commands.setrastercolor("_raster_",\@@rastervalue))}} % sets attribute
\def\dodefinefastcolor[#1][#2]% still not fast but ok
- {\ctxlua{_clib_.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
+ {\ctxlua{commands.defineprocesscolor("#1","#2",false,\iffreezecolors true\else false\fi)}%
\dodefinecolorcommand\setvalue{#1}}
%D \macros
@@ -877,7 +874,7 @@
%D A bit like \type {\definedfont}:
\unexpanded\def\colored[#1]%
- {\ctxlua{_clib_.defineprocesscolor("@colored@","#1",false,false)}%
+ {\ctxlua{commands.defineprocesscolor("@colored@","#1",false,false)}%
\groupedcommand{\doactivatecolor{@colored@}}{}}
%D \macros
@@ -917,7 +914,8 @@
\ifx\maintextcolor\empty\else\doactivatecolor\maintextcolor\fi
\to \everybeforeoutput
-\def\registermaintextcolor{\ctxlua{_clib_.main = \thecolorattribute\maintextcolor}}
+\def\registermaintextcolor
+ {\ctxlua{commands.registermaintextcolor(\thecolorattribute\maintextcolor)}}
\unexpanded\def\starttextcolor[#1]%
{\doifsomething{#1}
@@ -964,7 +962,7 @@
%D Low level defs:
\def\colordefalc#1#2{\setevalue{(ca:#1)}{#2}\setvalue {(cs:#1)}{\attribute\colorattribute #2 }}
-\def\colordefagc#1#2{\setxvalue{(ca:#1)}{#2}\setvalue {(cs:#1)}{\attribute\colorattribute #2 }}
+\def\colordefagc#1#2{\setxvalue{(ca:#1)}{#2}\setgvalue{(cs:#1)}{\attribute\colorattribute #2 }} % was not g
\def\colordefalt#1#2{\setevalue{(ta:#1)}{#2}\setvalue {(ts:#1)}{\attribute\transparencyattribute#2 }}
\def\colordefagt#1#2{\setxvalue{(ta:#1)}{#2}\setgvalue{(ts:#1)}{\attribute\transparencyattribute#2 }}
@@ -997,28 +995,28 @@
%D \getbuffer
%D \stopvoorbeeld
-\def\colorformatseparator{ }
-
-\def\MPcolor#1{\ctxlua{tex.sprint(_clib_.mp(\number\currentcolormodel,\number\doinheritca{#1},\number\doinheritta{#1}))}}
-
\let\currentcolorname\s!black % todo
\let\outercolorname \s!black % todo
+\let\colorformatseparator\space
+
+\def\MPcolor #1{\ctxlua{commands.mpcolor(\number\currentcolormodel,\number\doinheritca{#1},\number\doinheritta{#1})}}
+
\def\thecolorattribute #1{\number\csname(ca:\ifcsname(ca:\currentpalet#1)\endcsname\currentpalet#1\else\ifcsname(ca:#1)\endcsname#1\fi\fi)\endcsname}
\def\thetransparencyattribute#1{\number\csname(ta:\ifcsname(ta:\currentpalet#1)\endcsname\currentpalet#1\else\ifcsname(ta:#1)\endcsname#1\fi\fi)\endcsname}
-\def\internalspotcolorname #1{\ctxlua{tex.sprint(_clib_.spotcolorname (\thecolorattribute{#1}))}}
-\def\internalspotcolorparent#1{\ctxlua{tex.sprint(_clib_.spotcolorparent(\thecolorattribute{#1}))}}
-\def\internalspotcolorsize #1{\ctxlua{tex.sprint(_clib_.spotcolorvalue (\thecolorattribute{#1}))}}
+\def\internalspotcolorname #1{\ctxlua{commands.spotcolorname(\thecolorattribute{#1})}}
+\def\internalspotcolorparent #1{\ctxlua{commands.spotcolorparent(\thecolorattribute{#1})}}
+\def\internalspotcolorsize #1{\ctxlua{commands.spotcolorvalue(\thecolorattribute{#1})}}
-\def\colorcomponents #1{\ctxlua{tex.sprint(_clib_.colorcomponents (\thecolorattribute {#1}))}}
-\def\transparencycomponents#1{\ctxlua{tex.sprint(_clib_.transparencycomponents(\thetransparencyattribute{#1}))}}
+\def\colorcomponents #1{\ctxlua{commands.colorcomponents(\thecolorattribute{#1})}}
+\def\transparencycomponents #1{\ctxlua{commands.transparencycomponents(\thetransparencyattribute{#1})}}
-\def\colorvalue#1{\ctxlua{tex.sprint(_clib_.formatcolor(\thecolorattribute{#1},"\colorformatseparator"))}}
-\def\grayvalue #1{\ctxlua{tex.sprint(_clib_.formatgray (\thecolorattribute{#1},"\colorformatseparator"))}}
+\def\colorvalue #1{\ctxlua{commands.formatcolor(\thecolorattribute{#1},"\colorformatseparator")}}
+\def\grayvalue #1{\ctxlua{commands.formatgray (\thecolorattribute{#1},"\colorformatseparator")}}
-\def\doifblackelse #1{\ctxlua{commands.doifelse(_clib_.isblack(\thecolorattribute{#1}))}}
-\def\doifdrawingblackelse {\ctxlua{commands.doifelse(_clib_.isblack(tex.attribute[attributes.numbers['color']]))}}
+\def\doifblackelse #1{\ctxlua{commands.doifblackelse(\thecolorattribute{#1})}}
+\def\doifdrawingblackelse {\ctxlua{commands.doifdrawingblackelse()}}
%D \macros
%D {forcecolorhack}
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 8303a0ab2..480b99dff 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.07 10:47}
+\newcontextversion{2010.12.09 12:11}
%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 4156f2b59..3bbb7e304 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -114,7 +114,7 @@
%D just go for the best there is and load \TABLE. Just to be
%D sure we do it here, before we redefine \type{|}.
-\loadcorefile{thrd-tab} % based on: Michael Wichura / will be reimplemented
+\loadmarkfile{thrd-tab} % based on: Michael Wichura's TaBlE
%D Here comes the last support modules. They take care of
%D some language specific things.
@@ -125,7 +125,7 @@
%D load additional definition modules when needed.
\loadmarkfile{regi-ini}
-\loadcorefile{regi-syn}
+\loadmarkfile{regi-syn}
\loadmarkfile{enco-ini}
%loadmarkfile{filt-ini}
\loadmarkfile{hand-ini}
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 7e15413c5..9ed4161a6 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -118,7 +118,6 @@
\loadmarkfile{cont-fil}
\loadmarkfile{regi-ini}
-\loadcorefile{regi-syn}
\loadmarkfile{enco-ini}
\loadmarkfile{hand-ini}
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index c7a547f53..2836c355e 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.07 10:47}
+\edef\contextversion{2010.12.09 12:11}
%D For those who want to use this:
diff --git a/tex/context/base/core-def.mkiv b/tex/context/base/core-def.mkiv
index 989a13c75..44e59ecae 100644
--- a/tex/context/base/core-def.mkiv
+++ b/tex/context/base/core-def.mkiv
@@ -18,7 +18,7 @@
\unprotect
-\usesymbols[mis,mvs,nav]
+\usesymbols[mis,nav] % no longer mvs preloaded
\setupsymbolset[navigation 1]
diff --git a/tex/context/base/core-ini.mkiv b/tex/context/base/core-ini.mkiv
index cd2d2e25e..90ec9df24 100644
--- a/tex/context/base/core-ini.mkiv
+++ b/tex/context/base/core-ini.mkiv
@@ -21,7 +21,7 @@
\everypar \emptytoks
\neverypar \emptytoks
-\appendtoks \flushnotes \to \everypar
+%appendtoks \flushnotes \to \everypar
\appendtoks \synchronizesidefloats \to \everypar
\appendtoks \checkindentation \to \everypar
@@ -29,6 +29,7 @@
\appendtoks \restoreinterlinepenalty \to \everypar
\appendtoks \flushmargincontents \to \everypar
\appendtoks \flushcommentanchors \to \everypar
+\appendtoks \flushnotes \to \everypar
\appendtoks \synchronizenotes \to \everypar
\appendtoks \OTRSETshowstatus \to \everypar
\appendtoks \flushpostponedbookmark \to \everypar
diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv
index 326cc0d53..29b95aeb1 100644
--- a/tex/context/base/font-ini.mkiv
+++ b/tex/context/base/font-ini.mkiv
@@ -1737,24 +1737,23 @@
% some day we can do an auto-fam if needed
-\def\checkmathbodyfont#1#2#3% style alt size / gdef % #3 can be empty
- {%\message{!m #1 #2 #3!}%
- % #1 #2 #3 = signal
- %setugvalue {#2}{\setcurrentfontalternative {#2}}% \mr \mb
- \setugvalue {#1}{\setcurrentfontstyle {#1}}}% \mm
+\def\checkmathbodyfont#1#2#3% style alt size / gdef % #3 can be empty (checking needed as \bf is already defined)
+ {%\message{!m #1 #2 #3!}% #1 #2 #3 = signal
+ %ifcsname #2\endcsname\else\setugvalue {#2}{\setcurrentfontalternative {#2}}\fi % \mr \mb
+ \ifcsname #1\endcsname\else\setugvalue {#1}{\setcurrentfontstyle {#1}}\fi} % \mm
-\def\checktextbodyfont#1#2#3% style alt size / gdef % #3 can be empty
+\def\checktextbodyfont#1#2#3% style alt size / gdef % #3 can be empty (checking needed as \bf is already defined)
{%\message{!t #1 #2 #3!}%
- \setugvalue {#1#3}{\setcurrentfontstylesize {#1}{#3}}% \rma
- \setugvalue {#2#3}{\setcurrentfontalternativesize {#2}{#3}}% \sla
- \setugvalue {#1#2#3}{\setcurrentfontstylealternativesize{#1}{#2}{#3}}% \rmsla
- \setugvalue {#1}{\setcurrentfontstyle {#1}}% \rm
- \setugvalue {#2}{\setcurrentfontalternative {#2}}% \sl
- \setugvalue {#1\c!x}{\setcurrentfontxstylealternative {#1}}% \rmx
- \setugvalue{#1\c!xx}{\setcurrentfontxxstylealternative {#1}}% \rmxx
- \setugvalue {#2\c!x}{\setcurrentfontxalternative {#2}}% \slx
- \setugvalue{#2\c!xx}{\setcurrentfontxxalternative {#2}}% \slxx
- \setugvalue {#1#2}{\setcurrentfontstylealternative {#1}{#2}}}% \rmsl
+ \ifcsname #1#3\endcsname\else\setugvalue {#1#3}{\setcurrentfontstylesize {#1}{#3}}\fi % \rma
+ \ifcsname #2#3\endcsname\else\setugvalue {#2#3}{\setcurrentfontalternativesize {#2}{#3}}\fi % \sla
+ \ifcsname #1#2#3\endcsname\else\setugvalue {#1#2#3}{\setcurrentfontstylealternativesize{#1}{#2}{#3}}\fi % \rmsla
+ \ifcsname #1\endcsname\else\setugvalue {#1}{\setcurrentfontstyle {#1}}\fi % \rm
+ \ifcsname #2\endcsname\else\setugvalue {#2}{\setcurrentfontalternative {#2}}\fi % \sl
+ \ifcsname #1\c!x\endcsname\else\setugvalue {#1\c!x}{\setcurrentfontxstylealternative {#1}}\fi % \rmx
+ \ifcsname#1\c!xx\endcsname\else\setugvalue{#1\c!xx}{\setcurrentfontxxstylealternative {#1}}\fi % \rmxx
+ \ifcsname #2\c!x\endcsname\else\setugvalue {#2\c!x}{\setcurrentfontxalternative {#2}}\fi % \slx
+ \ifcsname#2\c!xx\endcsname\else\setugvalue{#2\c!xx}{\setcurrentfontxxalternative {#2}}\fi % \slxx
+ \ifcsname #1#2\endcsname\else\setugvalue {#1#2}{\setcurrentfontstylealternative {#1}{#2}}\fi} % \rmsl
\def\dodefinedefaultbodyfont[#1][#2][#3]% sizes styles identifier
{\def\dododefinedefaultbodyfont##1%
@@ -3226,9 +3225,6 @@
\ifx\fontalternative\c!bs \sl \else
\tf \fi\fi}
-\let\typeface\normaltypeface
-\let\boldface\normalboldface
-
\unexpanded\def\swaptypeface
{\relax
\ifx\fontalternative\c!it \tf \else
@@ -3238,6 +3234,10 @@
\ifx\fontalternative\c!bi \bf \else
\emphasistypeface \fi\fi\fi\fi\fi}
+\let\typeface\normaltypeface
+\let\boldface\normalboldface
+\let\swapface\swaptypeface
+
%D To be set with the default body font environment: \type
%D {em} being \type {slanted} or \type {italic}.
@@ -3580,36 +3580,90 @@
\let\thedefinedfont\relax
-\def\symbolicsizedfont#1#2#3%
- {\scaledfontsize#1%
- \scaledfontsize#2\scaledfontsize
- \font\thedefinedfont=\truefontname{\glyphfontfile{#3}} at \currentfontbodyscale\scaledfontsize\relax
- \thedefinedfont}
+% \def\symbolicsizedfont#1#2#3%
+% {\scaledfontsize#1%
+% \scaledfontsize#2\scaledfontsize
+% \font\thedefinedfont=\truefontname{\glyphfontfile{#3}} at \currentfontbodyscale\scaledfontsize\relax
+% \thedefinedfont}
+%
+% \def\symbolicscaledfont
+% {\symbolicsizedfont\fontbody}
+%
+% \unexpanded\def\symbolicfont
+% {\symbolicsizedfont\fontbody\plusone}
+%
+% \unexpanded\def\getglyph#1#2% slow, faster, much faster
+% %{{\definefont[\s!dummy][\glyphfontfile{#1} sa \currentfontscale]\dummy#2}}
+% %{{\definefont[\s!dummy][\glyphfontfile{#1} sa *]\dummy#2}}
+% %{{\symbolicfont{#1}#2}}
+% {{\symbolicfont{#1}\doifnumberelse{#2}\char\donothing#2}}
+%
+% \unexpanded\def\getscaledglyph#1#2#3%
+% {{\symbolicscaledfont{#1}{#2}\doifnumberelse{#3}\char\donothing#3}}
+%
+% \unexpanded\def\getrawglyph#1#2% for simple symbols
+% {{\scaledfontsize\fontbody
+% \font\thedefinedfont=#1 at \currentfontbodyscale\scaledfontsize\relax
+% \thedefinedfont\doifnumberelse{#2}\char\donothing#2}}
+%
+% \unexpanded\def\getfontchar#1#2%
+% {{\symbolicfont{#1}\fontchar{#2}}}
+
+\def\setscaledstyledsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
+ {\edef\askedsymbolfont{\truefontname{\glyphfontfile{#3}} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
+ \ifcsname\??ss->\askedsymbolfont\endcsname
+ \csname\??ss->\askedsymbolfont\endcsname
+ \else
+ \dodefinesymbolicfont
+ \fi}
+
+\def\setscaleddirectsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
+ {\edef\askedsymbolfont{\truefontname{#3} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
+ \ifcsname\??ss->\askedsymbolfont\endcsname
+ \csname\??ss->\askedsymbolfont\endcsname
+ \else
+ \dodefinesymbolicfont
+ \fi}
+
+\def\setstyledsymbolicfont#1% quite a slowdown, glyphfontfile
+ {\edef\askedsymbolfont{\truefontname{\glyphfontfile{#1}} at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody}%
+ \ifcsname\??ss->\askedsymbolfont\endcsname
+ \csname\??ss->\askedsymbolfont\endcsname
+ \else
+ \dodefinesymbolicfont
+ \fi}
-\def\symbolicscaledfont
- {\symbolicsizedfont\fontbody}
+\def\setdirectsymbolicfont#1%
+ {\edef\askedsymbolfont{\truefontname{#1} at \the\dimexpr\currentfontbodyscale\dimexpr\fontbody}%
+ \ifcsname\??ss->\askedsymbolfont\endcsname
+ \csname\??ss->\askedsymbolfont\endcsname
+ \else
+ \dodefinesymbolicfont
+ \fi}
-\unexpanded\def\symbolicfont
- {\symbolicsizedfont\fontbody\plusone}
+\def\dodefinesymbolicfont
+ {\definefont[currentsymbolfont][\askedsymbolfont]%
+ \currentsymbolfont
+ \global\expandafter\let\csname\??ss->\askedsymbolfont\endcsname\lastrawfontcall}
-\unexpanded\def\getglyph#1#2% slow, faster, much faster
- %{{\definefont[\s!dummy][\glyphfontfile{#1} sa \currentfontscale]\dummy#2}}
- %{{\definefont[\s!dummy][\glyphfontfile{#1} sa *]\dummy#2}}
- %{{\symbolicfont{#1}#2}}
- {{\symbolicfont{#1}\doifnumberelse{#2}\char\donothing#2}}
+\unexpanded\def\getnamedglyphstyled#1#2{{\setstyledsymbolicfont{#1}\ctxlua{fonts.char("#2")}}}
+\unexpanded\def\getnamedglyphdirect#1#2{{\setdirectsymbolicfont{#1}\ctxlua{fonts.char("#2")}}}
+\unexpanded\def\getglyphstyled #1#2{{\setstyledsymbolicfont{#1}\doifnumberelse{#2}\char\donothing#2}}
+\unexpanded\def\getglyphdirect #1#2{{\setdirectsymbolicfont{#1}\doifnumberelse{#2}\char\donothing#2}}
+\unexpanded\def\getscaledglyph #1#2#3{{\setscaledstyledsymbolicfont{#1}{#2}\doifnumberelse{#3}\char\donothing#3}}
-\unexpanded\def\getscaledglyph#1#2#3%
- {{\symbolicscaledfont{#1}{#2}\doifnumberelse{#3}\char\donothing#3}}
+\let\getglyph \getglyphstyled % old
+\let\getrawglyph \getglyphdirect % old
+\let\symbolicsizedfont\setscaledstyledsymbolicfont % old
+\let\symbolicfont \setstyledsymbolicfont % old
-\unexpanded\def\getrawglyph#1#2% for simple symbols
- {{\scaledfontsize\fontbody
- \font\thedefinedfont=#1 at \currentfontbodyscale\scaledfontsize\relax
- \thedefinedfont\doifnumberelse{#2}\char\donothing#2}}
+\unexpanded\def\symbolicscaledfont{\setsscaledstyledsymbolicfont\fontbody}
+\unexpanded\def\symbolicscaledfont{\setscaledstyledsymbolicfont\fontbody}
%D The last implementation of \type {\getglyph} permits
%D definitions like:
%D
-%D \starttyping
+%D \starttypings
%D \definefontsynonym [EuroSans] [eurose]
%D \definefontsynonym [EuroSansBold] [euroseb]
%D \definefontsynonym [EuroSansItalic] [eurosei]
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 922574ed2..ba64b1326 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -1028,7 +1028,8 @@ actions["prepare unicodes"] = function(data,filename,raw)
-- beware: the indices table is used to initialize the tfm table
local encname = lower(data.enc_name or (mapenc and mapenc[1] and mapenc[1].enc_name) or "") -- mapenc will go away
-- will become: local encname = lower(data.enc_name or "")
- if encname == "" or encname == "unicodebmp" or encname == "unicodefull" then -- maybe find(encname,"unicode")
+--~ if encname == "" or encname == "unicodebmp" or encname == "unicodefull" then -- maybe find(encname,"unicode")
+ if find(encname,"unicode") then
if trace_loading then
report_otf("using extra unicode map")
end
diff --git a/tex/context/base/l-lpeg.lua b/tex/context/base/l-lpeg.lua
index be5d56947..6b611c2c8 100644
--- a/tex/context/base/l-lpeg.lua
+++ b/tex/context/base/l-lpeg.lua
@@ -17,7 +17,7 @@ lpeg.patterns = lpeg.patterns or { } -- so that we can share
local patterns = lpeg.patterns
local P, R, S, V, match = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
-local Ct, C, Cs, Cc, Cf, Cg = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Cf, lpeg.Cg
+local Ct, C, Cs, Cc = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc
local lpegtype = lpeg.type
local utfcharacters = string.utfcharacters
diff --git a/tex/context/base/l-pdfview.lua b/tex/context/base/l-pdfview.lua
index 85545cd10..b4285fd8a 100644
--- a/tex/context/base/l-pdfview.lua
+++ b/tex/context/base/l-pdfview.lua
@@ -11,17 +11,17 @@ local format, concat = string.format, table.concat
pdfview = pdfview or { }
local opencalls = {
- ['default'] = "pdfopen --file", -- "pdfopen --back --file"
+ ['default'] = "pdfopen --ax --file", -- "pdfopen --back --file"
['xpdf'] = "xpdfopen",
}
local closecalls= {
- ['default'] = "pdfclose --file",
+ ['default'] = "pdfclose --ax --file",
['xpdf'] = nil,
}
local allcalls = {
- ['default'] = "pdfclose --all",
+ ['default'] = "pdfclose --ax --all",
['xpdf'] = nil,
}
diff --git a/tex/context/base/m-pictex.tex b/tex/context/base/m-pictex.tex
index abb81b76e..71b0a78fe 100644
--- a/tex/context/base/m-pictex.tex
+++ b/tex/context/base/m-pictex.tex
@@ -27,7 +27,7 @@
\fi
\ifx\beginpicture\undefined
\ifx\newenvironment\undefined
- \readfile{thrd-pic.tex}{}{}
+ \loadmarkfile{thrd-pic}%
\else
\input prepictex.tex \relax
\input pictex.tex \relax
diff --git a/tex/context/base/node-mig.mkiv b/tex/context/base/node-mig.mkiv
index 3047ac3af..337703611 100644
--- a/tex/context/base/node-mig.mkiv
+++ b/tex/context/base/node-mig.mkiv
@@ -45,7 +45,7 @@
\newtoks \everyautomigratefootnotes
\newtoks \everyautomigratemarks
-\def\automigrateinserts{\the\everyautomigratefootnotes}
+\def\automigrateinserts{\the\everyautomigratefootnotes} % soon default but does not work (yet) for notes in captions (themselves inserts)
\def\automigratemarks {\the\everyautomigratemarks}
\appendtoks
diff --git a/tex/context/base/regi-ini.lua b/tex/context/base/regi-ini.lua
index c6456b242..979a39994 100644
--- a/tex/context/base/regi-ini.lua
+++ b/tex/context/base/regi-ini.lua
@@ -23,16 +23,66 @@ local data = regimes.data
regimes.utf = regimes.utf or { }
-regimes.synonyms = regimes.synonyms or { }
-local synonyms = regimes.synonyms
+-- regimes.synonyms = regimes.synonyms or { }
+-- local synonyms = regimes.synonyms
+--
+-- if storage then
+-- storage.register("regimes/synonyms", synonyms, "regimes.synonyms")
+-- else
+-- regimes.synonyms = { }
+-- end
+
+local synonyms = {
+
+ ["windows-1250"] = "cp1250",
+ ["windows-1251"] = "cp1251",
+ ["windows-1252"] = "cp1252",
+ ["windows-1253"] = "cp1253",
+ ["windows-1254"] = "cp1254",
+ ["windows-1255"] = "cp1255",
+ ["windows-1256"] = "cp1256",
+ ["windows-1257"] = "cp1257",
+ ["windows-1258"] = "cp1258",
+
+ ["il1"] = "8859-1",
+ ["il2"] = "8859-2",
+ ["il3"] = "8859-3",
+ ["il4"] = "8859-4",
+ ["il5"] = "8859-9",
+ ["il6"] = "8859-10",
+ ["il7"] = "8859-13",
+ ["il8"] = "8859-14",
+ ["il9"] = "8859-15",
+ ["il10"] = "8859-16",
+
+ ["iso-8859-1"] = "8859-1",
+ ["iso-8859-2"] = "8859-2",
+ ["iso-8859-3"] = "8859-3",
+ ["iso-8859-4"] = "8859-4",
+ ["iso-8859-9"] = "8859-9",
+ ["iso-8859-10"] = "8859-10",
+ ["iso-8859-13"] = "8859-13",
+ ["iso-8859-14"] = "8859-14",
+ ["iso-8859-15"] = "8859-15",
+ ["iso-8859-16"] = "8859-16",
+
+ ["latin1"] = "8859-1",
+ ["latin2"] = "8859-2",
+ ["latin3"] = "8859-3",
+ ["latin4"] = "8859-4",
+ ["latin5"] = "8859-9",
+ ["latin6"] = "8859-10",
+ ["latin7"] = "8859-13",
+ ["latin8"] = "8859-14",
+ ["latin9"] = "8859-15",
+ ["latin10"] = "8859-16",
+
+ ["utf-8"] = "utf",
+ ["utf8"] = "utf",
+
+ ["windows"] = "cp1252",
-if storage then
- storage.register("regimes/synonyms", synonyms, "regimes.synonyms")
-else
- regimes.synonyms = { }
-end
-
--- setmetatable(regimes.data,_empty_table_)
+}
regimes.currentregime = "utf"
@@ -44,7 +94,7 @@ function regimes.number(n)
if type(n) == "string" then return tonumber(n,16) else return n end
end
-function regimes.setsynonym(synonym,target)
+function regimes.setsynonym(synonym,target) -- more or less obsolete
synonyms[synonym] = target
end
diff --git a/tex/context/base/regi-ini.mkiv b/tex/context/base/regi-ini.mkiv
index db7a224ac..b306d87f4 100644
--- a/tex/context/base/regi-ini.mkiv
+++ b/tex/context/base/regi-ini.mkiv
@@ -25,7 +25,7 @@
%D \macros
%D {defineregimesynonym,trueregimename}
-\unexpanded\def\defineregimesynonym
+\unexpanded\def\defineregimesynonym % more or less obsolete
{\dodoubleargument\dodefineregimesynonym}
\def\dodefineregimesynonym[#1][#2]%
diff --git a/tex/context/base/regi-syn.tex b/tex/context/base/regi-syn.mkii
index 7a8a9c146..7a8a9c146 100644
--- a/tex/context/base/regi-syn.tex
+++ b/tex/context/base/regi-syn.mkii
diff --git a/tex/context/base/strc-mar.lua b/tex/context/base/strc-mar.lua
index f92d594ab..7db26b10e 100644
--- a/tex/context/base/strc-mar.lua
+++ b/tex/context/base/strc-mar.lua
@@ -547,3 +547,20 @@ function marks.number(tag,n) -- no spec
-- no prefix (as it is the prefix)
lists.savednumber(tag,n)
end
+
+-- interface
+
+commands.definemarking = marks.define
+commands.relatemarking = marks.relate
+commands.setmarking = marks.set
+commands.resetmarking = marks.reset
+commands.synchronizemarking = marks.synchronize
+commands.getmarking = marks.fetch
+commands.fetchonemark = marks.fetchonemark
+commands.fetchtwomarks = marks.fetchtwomarks
+commands.fetchallmarks = marks.fetchallmarks
+
+function commands.doifelsemarking(str) -- can be shortcut
+ commands.testcase(marks.exists(str))
+end
+
diff --git a/tex/context/base/strc-mar.mkiv b/tex/context/base/strc-mar.mkiv
index 23c1239a4..a7458f2d8 100644
--- a/tex/context/base/strc-mar.mkiv
+++ b/tex/context/base/strc-mar.mkiv
@@ -82,31 +82,31 @@
\def\dodefinemarking[#1][#2]% marking parent
{\doifelsenothing{#2}
- {\ctxlua{structures.marks.define("#1")}%
+ {\ctxlua{commands.definemarking("#1")}%
\getparameters[\??mk#1][\s!parent=\??mk]}
- {\ctxlua{structures.marks.define("#1",{ parent = "#2" })}%
+ {\ctxlua{commands.definemarking("#1",{ parent = "#2" })}%
\getparameters[\??mk#1][\s!parent=\??mk#2]}}
\def\dorelatemarking[#1][#2]%
- {\ctxlua{structures.marks.relate("#1","#2")}}
+ {\ctxlua{commands.relatemarking("#1","#2")}}
\def\dosetmarking[#1]#2%
{\ifconditional\inhibitsetmarking
% nothing
\else
\doifelse{\namedmarkingparameter{#1}\c!expansion}\v!yes
- {\ctxlua{structures.marks.set("#1",\!!bs#2\!!es)}}
- {\ctxlua{structures.marks.set("#1",\!!bs\detokenize{#2}\!!es)}}%
+ {\ctxlua{commands.setmarking("#1",\!!bs#2\!!es)}}
+ {\ctxlua{commands.setmarking("#1",\!!bs\detokenize{#2}\!!es)}}%
\fi}
\def\doresetmarking[#1]%
- {\ctxlua{structures.marks.reset("#1")}}
+ {\ctxlua{commands.resetmarking("#1")}}
\def\doifelsemarking#1%
- {\ctxlua{commands.testcase(structures.marks.exists("#1"))}}
+ {\ctxlua{commands.doifelsemarking("#1")}}
\def\dosynchronizemarking[#1][#2]% class boxnumber (some day also name), maybe second argument table
- {\ifvoid#2\else\ctxlua{structures.marks.synchronize("#1",\number#2)}\fi}
+ {\ifvoid#2\else\ctxlua{commands.synchronizemarking("#1",\number#2)}\fi}
% \appendtoks
% \dosynchronizemarking[\v!page][\normalpagebox]%
@@ -138,23 +138,27 @@
\setsystemmode\v!marking
\the\everymarking
\ifthirdargument
- \ctxlua{structures.marks.fetch("#1","#2","#3")}%
+ \ctxlua{commands.getmarking("#1","#2","#3")}%
\else
- \ctxlua{structures.marks.fetch("#1","\v!page","#2")}%
+ \ctxlua{commands.getmarking("#1","\v!page","#2")}%
\fi
\endgroup}}
% the fetchers are fully expandable: [name][method]
-\def\fetchmark[#1]#2[#3]{\ifconditional\inhibitgetmarking\else\ctxlua{structures.marks.fetchonemark ("#1","\v!page","#2")}\fi}
-\def\fetchtwomarks [#1]{\ifconditional\inhibitgetmarking\else\ctxlua{structures.marks.fetchtwomarks("#1","\v!page")}\fi}
-\def\fetchallmarks [#1]{\ifconditional\inhibitgetmarking\else\ctxlua{structures.marks.fetchallmarks("#1","\v!page")}\fi}
+\def\fetchonemark[#1]#2[#3]{\ifconditional\inhibitgetmarking\else\ctxlua{commands.fetchonemark ("#1","\v!page","#2")}\fi}
+\def\fetchtwomarks [#1]{\ifconditional\inhibitgetmarking\else\ctxlua{commands.fetchtwomarks("#1","\v!page")}\fi}
+\def\fetchallmarks [#1]{\ifconditional\inhibitgetmarking\else\ctxlua{commands.fetchallmarks("#1","\v!page")}\fi}
+
+\let\fetchmark\fetchonemark
% also fully expandable but here we have: [name][range][method]
-\def\fetchmarking[#1]#2[#3]#4[#5]{\ifconditional\inhibitgetmarking\else\ctxlua{structures.marks.fetchonemark ("#1","#3","#5")}\fi}
-\def\fetchtwomarkings [#1]#2[#3]{\ifconditional\inhibitgetmarking\else\ctxlua{structures.marks.fetchtwomarks("#1","#3")}\fi}
-\def\fetchallmarkings [#1]#2[#3]{\ifconditional\inhibitgetmarking\else\ctxlua{structures.marks.fetchallmarks("#1","#3")}\fi}
+\def\fetchonemarking[#1]#2[#3]#4[#5]{\ifconditional\inhibitgetmarking\else\ctxlua{commands.fetchonemark ("#1","#3","#5")}\fi}
+\def\fetchtwomarkings [#1]#2[#3]{\ifconditional\inhibitgetmarking\else\ctxlua{commands.fetchtwomarks("#1","#3")}\fi}
+\def\fetchallmarkings [#1]#2[#3]{\ifconditional\inhibitgetmarking\else\ctxlua{commands.fetchallmarks("#1","#3")}\fi}
+
+\let\fetchmarking\fetchonemarking
\def\markingseparator#1{\namedmarkingparameter{#1}\c!separator}
\def\markingcommand #1{\namedmarkingparameter{#1}\c!filtercommand}
diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv
index d011cf0f3..8d3ef7773 100644
--- a/tex/context/base/strc-not.mkiv
+++ b/tex/context/base/strc-not.mkiv
@@ -831,6 +831,7 @@
\let\flushnotes\relax
\let\postponenotes\relax
\forgetall
+ \resetallattributes % new, we don't want color bleed into notes
\to \everybeforenoteinsert
\appendtoks
diff --git a/tex/context/base/symb-cow.mkii b/tex/context/base/symb-cow.mkii
new file mode 100644
index 000000000..fac6ca485
--- /dev/null
+++ b/tex/context/base/symb-cow.mkii
@@ -0,0 +1,132 @@
+%D \module
+%D [ file=symb-cow,
+%D version=2006.06.23,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Cow Symbols,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\loadmapfile[koeieletters.map]
+
+\definefontsynonym [Cows] [koeielett]
+\definefontsynonym [CowsContour] [koeielett-contour]
+\definefontsynonym [CowsLogo] [koeielogos]
+\definefontsynonym [CowsLogoContour] [koeielogos-contour]
+
+\definecolor [lsky] [r=.6,g=.6,b=1]
+\definecolor [dsky] [r=.1,g=.1,b=1]
+\definecolor [lground] [r=.3,g=.9,b=.3]
+\definecolor [dground] [r=0,g=.5,b=0]
+\definecolor [cspots] [r=.33,g=.1,b=0]
+
+\definecolor [tlsky] [t=.5,a=1,r=.6,g=.6,b=1]
+\definecolor [tdsky] [t=.5,a=1,r=.1,g=.1,b=1]
+\definecolor [tlground] [t=.5,a=1,r=.3,g=.9,b=.3]
+\definecolor [tdground] [t=.5,a=1,r=0,g=.5,b=0]
+\definecolor [tcspots] [t=.5,a=1,r=.33,g=.1,b=0]
+
+\definepalet
+ [cow]
+ [normal=lground,
+ contour=dground,
+ sky=lsky]
+
+\def\CowNormal#1%
+ {\dontleavehmode\hbox{\color[cow:normal]{\getglyph{Cows}{#1}}}}
+
+\def\ScaledCowNormal#1#2%
+ {\dontleavehmode\hbox{\color[cow:normal]{\definedfont[Cows sa #1]#2}}}
+
+\def\ScaledCowOverlay#1#2%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\definedfont[CowsContour sa #1]#2}}%
+ \color[cow:normal] {\definedfont[Cows sa #1]#2}}}
+
+\def\CowOverlay#1%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\getglyph{CowsContour}{#1}}}%
+ \color[cow:normal] {\getglyph{Cows} {#1}}}}
+
+\def\CowContour#1%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\getglyph{CowsLogoContour}{#1}}}%
+ \color[cow:normal] {\getglyph{CowsLogo} {#1}}}}
+
+\def\CowLogo #1{\getglyph{CowsLogo} {\char#1\relax}}
+\def\CowContourLogo#1{\getglyph{CowsLogoContour}{\char#1\relax}}
+
+\chardef\CowPragmaNormal= 1
+\chardef\CowPragmaShaded=20
+
+\startsymbolset[cownormal]
+
+ \definesymbol[CowPragmaADE] [\CowLogo{0}]
+ \definesymbol[CowPragma] [\CowLogo{1}]
+ \definesymbol[CowConTeXt] [\CowLogo{2}]
+ \definesymbol[CowConTeXtComplete] [\CowLogo{3}]
+ \definesymbol[CowConTeXtShadow] [\CowLogo{4}]
+ \definesymbol[CowConTeXtContour] [\CowLogo{5}]
+ \definesymbol[CowConTeXtOutline] [\CowLogo{6}]
+ \definesymbol[CowConTeXtDots] [\CowLogo{7}]
+ \definesymbol[CowMP] [\CowLogo{8}]
+ \definesymbol[CowMPComplete] [\CowLogo{9}]
+ \definesymbol[CowTeX] [\CowLogo{10}]
+ \definesymbol[CowTeXComplete] [\CowLogo{11}]
+ \definesymbol[CowBoo] [\CowLogo{12}]
+ \definesymbol[CowCow] [\CowLogo{13}]
+ \definesymbol[CowExampleComplete] [\CowLogo{14}]
+ \definesymbol[CowFoxetComplete] [\CowLogo{15}]
+ \definesymbol[CowMetafun] [\CowLogo{16}]
+ \definesymbol[CowMetafunComplete] [\CowLogo{17}]
+ \definesymbol[CowTEXComplete] [\CowLogo{18}]
+ \definesymbol[CowWikiComplete] [\CowLogo{19}]
+ \definesymbol[CowPragmaADEComplete][\CowLogo{20}]
+ \definesymbol[CowPragmaComplete] [\CowLogo{21}]
+ \definesymbol[CowExample] [\CowLogo{22}]
+ \definesymbol[CowFoxet] [\CowLogo{23}]
+ \definesymbol[CowTEX] [\CowLogo{24}]
+ \definesymbol[CowWiki] [\CowLogo{25}]
+ \definesymbol[CowCowTeXtComplete] [\CowLogo{26}]
+ \definesymbol[CowCowTeXt] [\CowLogo{27}]
+
+\stopsymbolset
+
+\startsymbolset[cowcontour]
+
+ \definesymbol[CowPragmaADE] [\CowContourLogo{0}]
+ \definesymbol[CowPragma] [\CowContourLogo{1}]
+ \definesymbol[CowConTeXt] [\CowContourLogo{2}]
+ \definesymbol[CowConTeXtComplete] [\CowContourLogo{3}]
+ \definesymbol[CowConTeXtShadow] [\CowContourLogo{4}]
+ \definesymbol[CowConTeXtContour] [\CowContourLogo{5}]
+ \definesymbol[CowConTeXtOutline] [\CowContourLogo{6}]
+ \definesymbol[CowConTeXtDots] [\CowContourLogo{7}]
+ \definesymbol[CowMP] [\CowContourLogo{8}]
+ \definesymbol[CowMPComplete] [\CowContourLogo{9}]
+ \definesymbol[CowTeX] [\CowContourLogo{10}]
+ \definesymbol[CowTeXComplete] [\CowContourLogo{11}]
+ \definesymbol[CowBoo] [\CowContourLogo{12}]
+ \definesymbol[CowCow] [\CowContourLogo{13}]
+ \definesymbol[CowExampleComplete] [\CowContourLogo{14}]
+ \definesymbol[CowFoxetComplete] [\CowContourLogo{15}]
+ \definesymbol[CowMetafun] [\CowContourLogo{16}]
+ \definesymbol[CowMetafunComplete] [\CowContourLogo{17}]
+ \definesymbol[CowTEXComplete] [\CowContourLogo{18}]
+ \definesymbol[CowWikiComplete] [\CowContourLogo{19}]
+ \definesymbol[CowPragmaADEComplete][\CowContourLogo{20}]
+ \definesymbol[CowPragmaComplete] [\CowContourLogo{21}]
+ \definesymbol[CowExample] [\CowContourLogo{22}]
+ \definesymbol[CowFoxet] [\CowContourLogo{23}]
+ \definesymbol[CowTEX] [\CowContourLogo{24}]
+ \definesymbol[CowWiki] [\CowContourLogo{25}]
+ \definesymbol[CowCowTeXtComplete] [\CowContourLogo{26}]
+ \definesymbol[CowCowTeXt] [\CowContourLogo{27}]
+
+\stopsymbolset
+
+\endinput
diff --git a/tex/context/base/symb-cow.mkiv b/tex/context/base/symb-cow.mkiv
new file mode 100644
index 000000000..adfd484d8
--- /dev/null
+++ b/tex/context/base/symb-cow.mkiv
@@ -0,0 +1,130 @@
+%D \module
+%D [ file=symb-cow,
+%D version=2006.06.23,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Cow Symbols,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=\PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\definefontsynonym [Cows] [koeielett]
+\definefontsynonym [CowsContour] [koeielett-contour]
+\definefontsynonym [CowsLogo] [koeielogos]
+\definefontsynonym [CowsLogoContour] [koeielogos-contour]
+
+\definecolor [lsky] [r=.6,g=.6,b=1]
+\definecolor [dsky] [r=.1,g=.1,b=1]
+\definecolor [lground] [r=.3,g=.9,b=.3]
+\definecolor [dground] [r=0,g=.5,b=0]
+\definecolor [cspots] [r=.33,g=.1,b=0]
+
+\definecolor [tlsky] [t=.5,a=1,r=.6,g=.6,b=1]
+\definecolor [tdsky] [t=.5,a=1,r=.1,g=.1,b=1]
+\definecolor [tlground] [t=.5,a=1,r=.3,g=.9,b=.3]
+\definecolor [tdground] [t=.5,a=1,r=0,g=.5,b=0]
+\definecolor [tcspots] [t=.5,a=1,r=.33,g=.1,b=0]
+
+\definepalet
+ [cow]
+ [normal=lground,
+ contour=dground,
+ sky=lsky]
+
+\def\CowNormal#1%
+ {\dontleavehmode\hbox{\color[cow:normal]{\getnamedglyphdirect{Cows}{#1}}}}
+
+\def\ScaledCowNormal#1#2%
+ {\dontleavehmode\hbox{\color[cow:normal]{\definedfont[Cows sa #1]#2}}}
+
+\def\ScaledCowOverlay#1#2%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\definedfont[CowsContour sa #1]#2}}%
+ \color[cow:normal] {\definedfont[Cows sa #1]#2}}}
+
+\def\CowOverlay#1%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\getnamedglyphdirect{CowsContour}{#1}}}%
+ \color[cow:normal] {\getnamedglyphdirect{Cows} {#1}}}}
+
+\def\CowContour#1%
+ {\dontleavehmode\hbox
+ {\color[cow:contour]{\hsmash{\getnamedglyphdirect{CowsLogoContour}{#1}}}%
+ \color[cow:normal] {\getnamedglyphdirect{CowsLogo} {#1}}}}
+
+\def\CowLogo {\getnamedglyphdirect{CowsLogo}} % #1
+\def\CowContourLogo{\getnamedglyphdirect{CowsLogoContour}} % #1
+
+\chardef\CowPragmaNormal= 1
+\chardef\CowPragmaShaded=20
+
+\startsymbolset[cownormal]
+
+ \definesymbol[CowPragmaADE] [\CowLogo{P_r_a_g_m_a_A_d_e}]
+ \definesymbol[CowPragma] [\CowLogo{p_r_a_g_m_a_a_d_e}]
+ \definesymbol[CowConTeXt] [\CowLogo{c_o_n_t_e_x_t}]
+ \definesymbol[CowConTeXtComplete] [\CowLogo{contextlogo}]
+ \definesymbol[CowConTeXtShadow] [\CowLogo{contextlogo.shadow}]
+ \definesymbol[CowConTeXtContour] [\CowLogo{contextlogo.contour}]
+ \definesymbol[CowConTeXtOutline] [\CowLogo{contextlogo.skeleton}]
+ \definesymbol[CowConTeXtDots] [\CowLogo{contextlogo.dots}]
+ \definesymbol[CowMP] [\CowLogo{M_P}]
+ \definesymbol[CowMPComplete] [\CowLogo{mplogo}]
+ \definesymbol[CowTeX] [\CowLogo{T_e_X}]
+ \definesymbol[CowTeXComplete] [\CowLogo{texlogo.alt}]
+ \definesymbol[CowBoo] [\CowLogo{boo}]
+ \definesymbol[CowCow] [\CowLogo{cow}]
+ \definesymbol[CowExampleComplete] [\CowLogo{E_x_a_m_p_l_e}]
+ \definesymbol[CowFoxetComplete] [\CowLogo{F_o_X_e_t}]
+ \definesymbol[CowMetafun] [\CowLogo{m_e_t_a_f_u_n}]
+ \definesymbol[CowMetafunComplete] [\CowLogo{metafunlogo}]
+ \definesymbol[CowTEXComplete] [\CowLogo{texlogo}]
+ \definesymbol[CowWikiComplete] [\CowLogo{wikilogo}]
+ \definesymbol[CowPragmaADEComplete][\CowLogo{PragmaADElogo}]
+ \definesymbol[CowPragmaComplete] [\CowLogo{pragmaadelogo}]
+ \definesymbol[CowExample] [\CowLogo{examplelogo}]
+ \definesymbol[CowFoxet] [\CowLogo{foxetlogo}]
+ \definesymbol[CowTEX] [\CowLogo{T_E_X}]
+ \definesymbol[CowWiki] [\CowLogo{W_i_k_i}]
+ \definesymbol[CowCowTeXtComplete] [\CowLogo{cowtextlogo}]
+ \definesymbol[CowCowTeXt] [\CowLogo{C_o_w_t_e_x_t}]
+
+\stopsymbolset
+
+\startsymbolset[cowcontour]
+
+ \definesymbol[CowPragmaADE] [\CowLogo{P_r_a_g_m_a_A_d_e}]
+ \definesymbol[CowPragma] [\CowLogo{p_r_a_g_m_a_a_d_e}]
+ \definesymbol[CowConTeXt] [\CowLogo{c_o_n_t_e_x_t}]
+ \definesymbol[CowConTeXtComplete] [\CowLogo{contextlogo}]
+ \definesymbol[CowConTeXtShadow] [\CowLogo{contextlogo.shadow}]
+ \definesymbol[CowConTeXtContour] [\CowLogo{contextlogo.contour}]
+ \definesymbol[CowConTeXtOutline] [\CowLogo{contextlogo.skeleton}]
+ \definesymbol[CowConTeXtDots] [\CowLogo{contextlogo.dots}]
+ \definesymbol[CowMP] [\CowLogo{M_P}]
+ \definesymbol[CowMPComplete] [\CowLogo{mplogo}]
+ \definesymbol[CowTeX] [\CowLogo{T_e_X}]
+ \definesymbol[CowTeXComplete] [\CowLogo{texlogo.alt}]
+ \definesymbol[CowBoo] [\CowLogo{boo}]
+ \definesymbol[CowCow] [\CowLogo{cow}]
+ \definesymbol[CowExampleComplete] [\CowLogo{E_x_a_m_p_l_e}]
+ \definesymbol[CowFoxetComplete] [\CowLogo{F_o_X_e_t}]
+ \definesymbol[CowMetafun] [\CowLogo{m_e_t_a_f_u_n}]
+ \definesymbol[CowMetafunComplete] [\CowLogo{metafunlogo}]
+ \definesymbol[CowTEXComplete] [\CowLogo{texlogo}]
+ \definesymbol[CowWikiComplete] [\CowLogo{wikilogo}]
+ \definesymbol[CowPragmaADEComplete][\CowLogo{PragmaADElogo}]
+ \definesymbol[CowPragmaComplete] [\CowLogo{pragmaadelogo}]
+ \definesymbol[CowExample] [\CowLogo{examplelogo}]
+ \definesymbol[CowFoxet] [\CowLogo{foxetlogo}]
+ \definesymbol[CowTEX] [\CowLogo{T_E_X}]
+ \definesymbol[CowWiki] [\CowLogo{W_i_k_i}]
+ \definesymbol[CowCowTeXtComplete] [\CowLogo{cowtextlogo}]
+ \definesymbol[CowCowTeXt] [\CowLogo{C_o_w_t_e_x_t}]
+
+\stopsymbolset
+
+\endinput
diff --git a/tex/context/base/symb-cow.tex b/tex/context/base/symb-cow.tex
deleted file mode 100644
index c04ca0108..000000000
--- a/tex/context/base/symb-cow.tex
+++ /dev/null
@@ -1,132 +0,0 @@
-%D \module
-%D [ file=symb-cow,
-%D version=2006.06.23,
-%D title=\CONTEXT\ Symbol Libraries,
-%D subtitle=Cow Symbols,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright=\PRAGMA]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-\loadmapfile[koeieletters.map]
-
-\definefontsynonym [Cows] [koeielett]
-\definefontsynonym [CowsContour] [koeielett-contour]
-\definefontsynonym [CowsLogo] [koeielogos]
-\definefontsynonym [CowsLogoContour] [koeielogos-contour]
-
-\definecolor [lsky] [r=.6,g=.6,b=1]
-\definecolor [dsky] [r=.1,g=.1,b=1]
-\definecolor [lground] [r=.3,g=.9,b=.3]
-\definecolor [dground] [r=0,g=.5,b=0]
-\definecolor [cspots] [r=.33,g=.1,b=0]
-
-\definecolor [tlsky] [t=.5,a=1,r=.6,g=.6,b=1]
-\definecolor [tdsky] [t=.5,a=1,r=.1,g=.1,b=1]
-\definecolor [tlground] [t=.5,a=1,r=.3,g=.9,b=.3]
-\definecolor [tdground] [t=.5,a=1,r=0,g=.5,b=0]
-\definecolor [tcspots] [t=.5,a=1,r=.33,g=.1,b=0]
-
-\definepalet
- [cow]
- [normal=lground,
- contour=dground,
- sky=lsky]
-
-\def\CowNormal#1%
- {\dontleavehmode\hbox{\color[cow:normal]{\getglyph{Cows}{#1}}}}
-
-\def\ScaledCowNormal#1#2%
- {\dontleavehmode\hbox{\color[cow:normal]{\definedfont[Cows sa #1]#2}}}
-
-\def\ScaledCowOverlay#1#2%
- {\dontleavehmode\hbox
- {\color[cow:contour]{\hsmash{\definedfont[CowsContour sa #1]#2}}%
- \color[cow:normal] {\definedfont[Cows sa #1]#2}}}
-
-\def\CowOverlay#1%
- {\dontleavehmode\hbox
- {\color[cow:contour]{\hsmash{\getglyph{CowsContour}{#1}}}%
- \color[cow:normal] {\getglyph{Cows} {#1}}}}
-
-\def\CowContour#1%
- {\dontleavehmode\hbox
- {\color[cow:contour]{\hsmash{\getglyph{CowsLogoContour}{#1}}}%
- \color[cow:normal] {\getglyph{CowsLogo} {#1}}}}
-
-\def\CowLogo #1{\getglyph{CowsLogo} {\char#1\relax}}
-\def\CowContourLogo#1{\getglyph{CowsLogoContour}{\char#1\relax}}
-
-\chardef\CowPragmaNormal= 1
-\chardef\CowPragmaShaded=20
-
-\startsymbolset[cownormal]
-
-\definesymbol[CowPragmaADE] [\CowLogo{0}]
-\definesymbol[CowPragma] [\CowLogo{1}]
-\definesymbol[CowConTeXt] [\CowLogo{2}]
-\definesymbol[CowConTeXtComplete] [\CowLogo{3}]
-\definesymbol[CowConTeXtShadow] [\CowLogo{4}]
-\definesymbol[CowConTeXtContour] [\CowLogo{5}]
-\definesymbol[CowConTeXtOutline] [\CowLogo{6}]
-\definesymbol[CowConTeXtDots] [\CowLogo{7}]
-\definesymbol[CowMP] [\CowLogo{8}]
-\definesymbol[CowMPComplete] [\CowLogo{9}]
-\definesymbol[CowTeX] [\CowLogo{10}]
-\definesymbol[CowTeXComplete] [\CowLogo{11}]
-\definesymbol[CowBoo] [\CowLogo{12}]
-\definesymbol[CowCow] [\CowLogo{13}]
-\definesymbol[CowExampleComplete] [\CowLogo{14}]
-\definesymbol[CowFoxetComplete] [\CowLogo{15}]
-\definesymbol[CowMetafun] [\CowLogo{16}]
-\definesymbol[CowMetafunComplete] [\CowLogo{17}]
-\definesymbol[CowTEXComplete] [\CowLogo{18}]
-\definesymbol[CowWikiComplete] [\CowLogo{19}]
-\definesymbol[CowPragmaADEComplete][\CowLogo{20}]
-\definesymbol[CowPragmaComplete] [\CowLogo{21}]
-\definesymbol[CowExample] [\CowLogo{22}]
-\definesymbol[CowFoxet] [\CowLogo{23}]
-\definesymbol[CowTEX] [\CowLogo{24}]
-\definesymbol[CowWiki] [\CowLogo{25}]
-\definesymbol[CowCowTeXtComplete] [\CowLogo{26}]
-\definesymbol[CowCowTeXt] [\CowLogo{27}]
-
-\stopsymbolset
-
-\startsymbolset[cowcontour]
-
-\definesymbol[CowPragmaADE] [\CowContourLogo{0}]
-\definesymbol[CowPragma] [\CowContourLogo{1}]
-\definesymbol[CowConTeXt] [\CowContourLogo{2}]
-\definesymbol[CowConTeXtComplete] [\CowContourLogo{3}]
-\definesymbol[CowConTeXtShadow] [\CowContourLogo{4}]
-\definesymbol[CowConTeXtContour] [\CowContourLogo{5}]
-\definesymbol[CowConTeXtOutline] [\CowContourLogo{6}]
-\definesymbol[CowConTeXtDots] [\CowContourLogo{7}]
-\definesymbol[CowMP] [\CowContourLogo{8}]
-\definesymbol[CowMPComplete] [\CowContourLogo{9}]
-\definesymbol[CowTeX] [\CowContourLogo{10}]
-\definesymbol[CowTeXComplete] [\CowContourLogo{11}]
-\definesymbol[CowBoo] [\CowContourLogo{12}]
-\definesymbol[CowCow] [\CowContourLogo{13}]
-\definesymbol[CowExampleComplete] [\CowContourLogo{14}]
-\definesymbol[CowFoxetComplete] [\CowContourLogo{15}]
-\definesymbol[CowMetafun] [\CowContourLogo{16}]
-\definesymbol[CowMetafunComplete] [\CowContourLogo{17}]
-\definesymbol[CowTEXComplete] [\CowContourLogo{18}]
-\definesymbol[CowWikiComplete] [\CowContourLogo{19}]
-\definesymbol[CowPragmaADEComplete][\CowContourLogo{20}]
-\definesymbol[CowPragmaComplete] [\CowContourLogo{21}]
-\definesymbol[CowExample] [\CowContourLogo{22}]
-\definesymbol[CowFoxet] [\CowContourLogo{23}]
-\definesymbol[CowTEX] [\CowContourLogo{24}]
-\definesymbol[CowWiki] [\CowContourLogo{25}]
-\definesymbol[CowCowTeXtComplete] [\CowContourLogo{26}]
-\definesymbol[CowCowTeXt] [\CowContourLogo{27}]
-
-\stopsymbolset
-
-\endinput
diff --git a/tex/context/base/symb-eur.tex b/tex/context/base/symb-eur.mkii
index 400e88ac5..400e88ac5 100644
--- a/tex/context/base/symb-eur.tex
+++ b/tex/context/base/symb-eur.mkii
diff --git a/tex/context/base/symb-glm.tex b/tex/context/base/symb-glm.mkii
index 0b01ca7df..0b01ca7df 100644
--- a/tex/context/base/symb-glm.tex
+++ b/tex/context/base/symb-glm.mkii
diff --git a/tex/context/base/symb-ini.mkii b/tex/context/base/symb-ini.mkii
index f7bffd240..d8adc94e6 100644
--- a/tex/context/base/symb-ini.mkii
+++ b/tex/context/base/symb-ini.mkii
@@ -233,7 +233,7 @@
\let\currentsymboldef\empty
-\def\startsymbolset[#1]
+\def\startsymbolset[#1]%
{\def\currentsymboldef{#1}}
\def\stopsymbolset
@@ -263,11 +263,12 @@
%D \showsetup{usesymbols}
\def\dousesymbols#1%
- {\makeshortfilename[\truefilename{\f!symbolprefix#1}]%
- \startreadingfile
- \readsysfile\shortfilename
+ {\startreadingfile
+ \readsysfile{\truefilename{\f!symbolprefix#1}.\mksuffix}
{\showmessage\m!symbols1{#1}}
- \donothing
+ {\readsysfile{\truefilename{\f!symbolprefix#1}}
+ {\showmessage\m!symbols1{#1}}
+ \donothing}%
\stopreadingfile}
\def\usesymbols[#1]%
diff --git a/tex/context/base/symb-ini.mkiv b/tex/context/base/symb-ini.mkiv
index 3b7e55d4a..de1e11396 100644
--- a/tex/context/base/symb-ini.mkiv
+++ b/tex/context/base/symb-ini.mkiv
@@ -48,14 +48,6 @@
\unexpanded\def\definesymbol
{\dotripleempty\dodefinesymbol}
-% \def\dodefinesymbol[#1][#2][#3]% class name meaning
-% {\ifthirdargument
-% \setvalue{\??ss:#1:#2}{#3}%
-% \doifsomething{#1}{\addvalue{\??ss*#1}{#2}}%
-% \else
-% \setvalue{\??ss:\currentsymboldef:#1}{#2}%
-% \fi}
-
\def\dodefinesymbol[#1][#2][#3]% class name meaning
{\ifthirdargument
\setvalue{\??ss:#1:#2}{#3}%
@@ -65,11 +57,19 @@
\addvalue{\??ss*\currentsymboldef}{#1}%
\fi}
-\def\doifinsymbolsetelse#1#2{\doifdefinedelse{\??ss:#1:#2}}
-\def\doifinsymbolset #1#2{\doifdefined {\??ss:#1:#2}}
-\def\doifsymbolsetelse #1{\doifdefinedelse{\??ss*#1}}
+% \def\doifinsymbolsetelse#1#2{\doifdefinedelse{\??ss:#1:#2}}
+% \def\doifinsymbolset #1#2{\doifdefined {\??ss:#1:#2}}
+% \def\doifsymbolsetelse #1{\doifdefinedelse{\??ss*#1}}
+%
+% \def\symbolset#1{\executeifdefined{\??ss*#1}\empty} % no [#1], to be used in commalists etc
+
+\def\doifinsymbolsetelse#1#2{\ifcsname\??ss:#1:#2\endcsname\@EA\firstoftwoarguments\else\@EA\secondoftwoarguments\fi}
+\def\doifinsymbolset #1#2{\ifcsname\??ss:#1:#2\endcsname\@EA\firstofoneargument \else\@EA\gobbleoneargument \fi}
+\def\doifsymbolsetelse #1{\ifcsname\??ss*#1\endcsname \@EA\firstoftwoarguments\else\@EA\secondoftwoarguments\fi}
+
+\letvalue{\??ss*}\empty
-\def\symbolset#1{\executeifdefined{\??ss*#1}\empty} % no [#1], to be used in commalists etc
+\def\symbolset#1{\csname\??ss*\ifcsname\??ss*#1\endcsname#1\fi\endcsname} % no [#1], to be used in commalists etc
%D Since symbols are used frequently in interactive
%D documents, we speed up this one. Well, that was history,
@@ -84,8 +84,11 @@
\def\dodosymbol#1#2% \relax's prevent lookahead problems
{\nosymbolfalse{\the\everysymbol\csname\??ss:#1:#2\endcsname\relax}\relax}
+\letvalue{\??ss:}\firstofoneargument
+
\def\directsymbol#1#2% no \relax, there can be an argument, see lists
- {\executeifdefined{\??ss:#1:#2}\firstofoneargument}
+ {%\executeifdefined{\??ss:#1:#2}\firstofoneargument}
+ \csname\??ss:\ifcsname\??ss:#1:#2\endcsname#1:#2\fi\endcsname}
% We support both:
%
@@ -125,12 +128,8 @@
\fi}
\def\redosymbol#1%
-% {\doifinsymbolsetelse\empty{#1}{\dodosymbol\empty{#1}}{#1}} % more efficient:
{\doifinsymbolsetelse\empty{#1}{\dodosymbol\empty}\firstofoneargument{#1}}
-% % % % %
-% this should go in symb-fig, to be loaded after core-fig
-
%D \macros
%D {definefiguresymbol}
%D
@@ -163,12 +162,6 @@
\definesymbol[#1][{\dofiguresymbol[#2][#3]}]%
\fi}
-% but for the moment we keep it here
-% % % % % %
-
-%\def\objectsymbol[#1]%
-% {\dopresetfieldsymbol{#1}\dogetfieldsymbol{#1}}
-
%D \macros
%D {doifsymboldefinedelse}
%D
@@ -233,7 +226,7 @@
\let\currentsymboldef\empty
-\unexpanded\def\startsymbolset[#1]
+\unexpanded\def\startsymbolset[#1]%
{\def\currentsymboldef{#1}}
\unexpanded\def\stopsymbolset
@@ -264,9 +257,11 @@
\def\dousesymbols#1%
{\startreadingfile
- \readsysfile{\truefilename{\f!symbolprefix#1}}
+ \readsysfile{\truefilename{\f!symbolprefix#1}.\mksuffix}
{\showmessage\m!symbols1{#1}}
- \donothing
+ {\readsysfile{\truefilename{\f!symbolprefix#1}}
+ {\showmessage\m!symbols1{#1}}
+ \donothing}%
\stopreadingfile}
\def\usesymbols[#1]%
diff --git a/tex/context/base/symb-jmn.tex b/tex/context/base/symb-jmn.mkii
index 1ed65d16e..392cac552 100644
--- a/tex/context/base/symb-jmn.tex
+++ b/tex/context/base/symb-jmn.mkii
@@ -40,13 +40,8 @@
\loadmapfile[original-base.map] % \loadmapfile [original-context-symbol.map]
-\ifnum\texengine=\luatexengine
- \definefontsynonym[NavigationNormal] [hans.tfm]
- \definefontsynonym[NavigationShadowed] [hans-sh.tfm]
-\else
- \definefontsynonym[NavigationNormal] [hans]
- \definefontsynonym[NavigationShadowed] [hans-sh]
-\fi
+\definefontsynonym[NavigationNormal] [hans]
+\definefontsynonym[NavigationShadowed] [hans-sh]
\definefontsynonym[NavigationFont] [NavigationNormal]
%definefontsynonym[NavigationFont] [NavigationShadowed]
diff --git a/tex/context/base/symb-jmn.mkiv b/tex/context/base/symb-jmn.mkiv
new file mode 100644
index 000000000..593e3e375
--- /dev/null
+++ b/tex/context/base/symb-jmn.mkiv
@@ -0,0 +1,196 @@
+%D \module
+%D [ file=symb-jmn,
+%D version=2004.08.02,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Special Navigational Symbols,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA ADE]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+%D This file defines a few navigational symbol vectors. The font used
+%D here is designed by Janusz M.~Nowacki, one of the Polish Font
+%D Gurus who made this font specially for me, hence the name. If you
+%D you want to meet its designer, come to Bachotek! In case you're
+%D not familiar with his work, take a look at the Antikwa, Iwona and
+%D Kurier fonts!
+%D
+%D \usesymbols[jmn]
+%D
+%D \showsymbolset[navigation 1]
+%D \showsymbolset[navigation 3]
+%D \showsymbolset[navigation 2]
+%D \showsymbolset[navigation 4]
+%D
+%D \page
+%D \showfont[NavigationNormal]
+%D \page
+%D \showfont[NavigationShadowed]
+%D \page
+
+% needed:
+%
+% - inverted crossed
+% - curved diamond
+% - begin/end bars
+
+\unprotect
+
+\definefontsynonym[NavigationNormal] [hans]
+\definefontsynonym[NavigationShadowed] [hans-sh]
+
+\definefontsynonym[NavigationFont] [NavigationNormal]
+%definefontsynonym[NavigationFont] [NavigationShadowed]
+
+\def\NavigationGlyph{\getnamedglyphdirect{NavigationFont}} % #1
+
+\unprotect
+
+% lowercase up/down
+
+\startsymbolset [navigation 1]
+
+ \definesymbol [\v!PreviousJump] [\NavigationGlyph{CC}]
+ \definesymbol [\v!NextJump] [\NavigationGlyph{DD}]
+ \definesymbol [\v!CloseDocument] [\NavigationGlyph{M}]
+
+ \definesymbol [\v!firstpage] [\NavigationGlyph{CCC}]
+ \definesymbol [\v!previouspage] [\NavigationGlyph{C}]
+ \definesymbol [\v!nextpage] [\NavigationGlyph{D}]
+ \definesymbol [\v!lastpage] [\NavigationGlyph{DDD}]
+
+ \definesymbol [\v!firstsubpage] [\NavigationGlyph{ccc}]
+ \definesymbol [\v!previoussubpage] [\NavigationGlyph{c}]
+ \definesymbol [\v!nextsubpage] [\NavigationGlyph{d}]
+ \definesymbol [\v!lastsubpage] [\NavigationGlyph{ddd}]
+
+ \definesymbol [\v!StartSound] [\NavigationGlyph{D}]
+ \definesymbol [\v!PauseSound] [\NavigationGlyph{YY}]
+ \definesymbol [\v!StopSound] [\NavigationGlyph{M}]
+
+ \definesymbol [\v!StartMovie] [\NavigationGlyph{D}]
+ \definesymbol [\v!PauseMovie] [\NavigationGlyph{YY}]
+ \definesymbol [\v!StopMovie] [\NavigationGlyph{M}]
+
+ \definesymbol [\v!StartRendering] [\NavigationGlyph{D}]
+ \definesymbol [\v!PauseRendering] [\NavigationGlyph{YY}]
+ \definesymbol [\v!StopRendering] [\NavigationGlyph{M}]
+ \definesymbol [\v!ResumeRendering] [\NavigationGlyph{D}]
+
+\stopsymbolset
+
+\startsymbolset [navigation 2]
+
+ \definesymbol [\v!PreviousJump] [\NavigationGlyph{AA}]
+ \definesymbol [\v!NextJump] [\NavigationGlyph{BB}]
+ \definesymbol [\v!CloseDocument] [\NavigationGlyph{N}]
+
+ \definesymbol [\v!firstpage] [\NavigationGlyph{AAA}]
+ \definesymbol [\v!previouspage] [\NavigationGlyph{A}]
+ \definesymbol [\v!nextpage] [\NavigationGlyph{B}]
+ \definesymbol [\v!lastpage] [\NavigationGlyph{BBB}]
+
+ \definesymbol [\v!firstsubpage] [\NavigationGlyph{aaa}]
+ \definesymbol [\v!previoussubpage] [\NavigationGlyph{a}]
+ \definesymbol [\v!nextsubpage] [\NavigationGlyph{b}]
+ \definesymbol [\v!lastsubpage] [\NavigationGlyph{bbb}]
+
+ \definesymbol [\v!StartSound] [\NavigationGlyph{B}]
+ \definesymbol [\v!PauseSound] [\NavigationGlyph{XX}]
+ \definesymbol [\v!StopSound] [\NavigationGlyph{N}]
+
+ \definesymbol [\v!StartMovie] [\NavigationGlyph{B}]
+ \definesymbol [\v!PauseMovie] [\NavigationGlyph{XX}]
+ \definesymbol [\v!StopMovie] [\NavigationGlyph{N}]
+
+ \definesymbol [\v!StartRendering] [\NavigationGlyph{B}]
+ \definesymbol [\v!PauseRendering] [\NavigationGlyph{XX}]
+ \definesymbol [\v!StopRendering] [\NavigationGlyph{N}]
+ \definesymbol [\v!ResumeRendering] [\NavigationGlyph{B}]
+
+\stopsymbolset
+
+\startsymbolset [navigation 3]
+
+ \definesymbol [\v!PreviousJump] [\NavigationGlyph{KK}]
+ \definesymbol [\v!NextJump] [\NavigationGlyph{LL}]
+ \definesymbol [\v!CloseDocument] [\NavigationGlyph{M}]
+
+ \definesymbol [\v!firstpage] [\NavigationGlyph{KKK}]
+ \definesymbol [\v!previouspage] [\NavigationGlyph{K}]
+ \definesymbol [\v!nextpage] [\NavigationGlyph{L}]
+ \definesymbol [\v!lastpage] [\NavigationGlyph{LLL}]
+
+ \definesymbol [\v!firstsubpage] [\NavigationGlyph{kkk}]
+ \definesymbol [\v!previoussubpage] [\NavigationGlyph{k}]
+ \definesymbol [\v!nextsubpage] [\NavigationGlyph{l}]
+ \definesymbol [\v!lastsubpage] [\NavigationGlyph{lll}]
+
+ \definesymbol [\v!StartSound] [\NavigationGlyph{L}]
+ \definesymbol [\v!PauseSound] [\NavigationGlyph{YY}]
+ \definesymbol [\v!StopSound] [\NavigationGlyph{M}]
+
+ \definesymbol [\v!StartMovie] [\NavigationGlyph{L}]
+ \definesymbol [\v!PauseMovie] [\NavigationGlyph{YY}]
+ \definesymbol [\v!StopMovie] [\NavigationGlyph{M}]
+
+ \definesymbol [\v!StartRendering] [\NavigationGlyph{L}]
+ \definesymbol [\v!PauseRendering] [\NavigationGlyph{YY}]
+ \definesymbol [\v!StopRendering] [\NavigationGlyph{M}]
+ \definesymbol [\v!ResumeRendering] [\NavigationGlyph{L}]
+
+\stopsymbolset
+
+\startsymbolset [navigation 4]
+
+ \definesymbol [\v!PreviousJump] [\NavigationGlyph{II}]
+ \definesymbol [\v!NextJump] [\NavigationGlyph{JJ}]
+ \definesymbol [\v!CloseDocument] [\NavigationGlyph{N}]
+
+ \definesymbol [\v!firstpage] [\NavigationGlyph{III}]
+ \definesymbol [\v!previouspage] [\NavigationGlyph{I}]
+ \definesymbol [\v!nextpage] [\NavigationGlyph{J}]
+ \definesymbol [\v!lastpage] [\NavigationGlyph{JJJ}]
+
+ \definesymbol [\v!firstsubpage] [\NavigationGlyph{iii}]
+ \definesymbol [\v!previoussubpage] [\NavigationGlyph{i}]
+ \definesymbol [\v!nextsubpage] [\NavigationGlyph{j}]
+ \definesymbol [\v!lastsubpage] [\NavigationGlyph{jjj}]
+
+ \definesymbol [\v!StartSound] [\NavigationGlyph{J}]
+ \definesymbol [\v!PauseSound] [\NavigationGlyph{XX}]
+ \definesymbol [\v!StopSound] [\NavigationGlyph{N}]
+
+ \definesymbol [\v!StartMovie] [\NavigationGlyph{J}]
+ \definesymbol [\v!PauseMovie] [\NavigationGlyph{XX}]
+ \definesymbol [\v!StopMovie] [\NavigationGlyph{N}]
+
+ \definesymbol [\v!StartRendering] [\NavigationGlyph{J}]
+ \definesymbol [\v!PauseRendering] [\NavigationGlyph{XX}]
+ \definesymbol [\v!StopRendering] [\NavigationGlyph{N}]
+ \definesymbol [\v!ResumeRendering] [\NavigationGlyph{J}]
+
+\stopsymbolset
+
+% 1 left : 065 067 073 075
+% 2 left : 128 132 144 148
+% 3 left : 129 133 145 149
+
+% 1 right : 066 068 074 076
+% 2 right : 130 134 146 150
+% 3 right : 131 135 147 151
+
+% crossed : 160 160 160 160
+% opened : 152 152 156 156
+% closed : 154 154 158 158
+
+% larrow : 208 210 212 214
+% rarrow : 209 211 213 215
+% barrow : 178 178 178 178
+% ocircle : 168 168 168 168
+% ccircle : 170 170 170 170
+
+\protect \endinput
diff --git a/tex/context/base/symb-mis.tex b/tex/context/base/symb-mis.mkii
index d108b8902..9921fa94f 100644
--- a/tex/context/base/symb-mis.tex
+++ b/tex/context/base/symb-mis.mkii
@@ -31,14 +31,14 @@
\definesymbol [medcircle] [\hbox{\raise.1ex\hbox{\mathematics{\scriptstyle \bigcirc}}}]
\definesymbol [bigcircle] [\mathematics{\bigcirc}]
-\definesymbol [1] [{\symbol[bullet]}]
-\definesymbol [2] [{\symbol[dash]}]
-\definesymbol [3] [{\symbol[star]}]
-\definesymbol [4] [{\symbol[triangle]}]
-\definesymbol [5] [{\symbol[circle]}]
-\definesymbol [6] [{\symbol[medcircle]}]
-\definesymbol [7] [{\symbol[bigcircle]}]
-\definesymbol [8] [{\symbol[square]}]
+\definesymbol [1] [\symbol{bullet}]
+\definesymbol [2] [\symbol{dash}]
+\definesymbol [3] [\symbol{star}]
+\definesymbol [4] [\symbol{triangle}]
+\definesymbol [5] [\symbol{circle}]
+\definesymbol [6] [\symbol{medcircle}]
+\definesymbol [7] [\symbol{bigcircle}]
+\definesymbol [8] [\symbol{square}]
%D Special hyperlinks, namely those to pages or navigational
%D properties, are associated with symbols.
@@ -55,15 +55,15 @@
\definesymbol [\v!NextJump] [\goforjumpcharacter]
\definesymbol [\v!CloseDocument] [\closecharacter]
-\definesymbol [\v!first] [{\symbol[\v!firstpage]}]
-\definesymbol [\v!previous] [{\symbol[\v!previouspage]}]
-\definesymbol [\v!next] [{\symbol[\v!nextpage]}]
-\definesymbol [\v!last] [{\symbol[\v!lastpage]}]
+\definesymbol [\v!first] [\symbol{\v!firstpage}]
+\definesymbol [\v!previous] [\symbol{\v!previouspage}]
+\definesymbol [\v!next] [\symbol{\v!nextpage}]
+\definesymbol [\v!last] [\symbol{\v!lastpage}]
\definesymbol [\v!somewhere] [\gotosomewherecharacter]
\definesymbol [\v!nowhere] [\gonowherecharacter]
-\definesymbol [\v!backward] [{\symbol[\v!previouspage]}]
-\definesymbol [\v!forward] [{\symbol[\v!nextpage]}]
+\definesymbol [\v!backward] [\symbol{\v!previouspage}]
+\definesymbol [\v!forward] [\symbol{\v!nextpage}]
%D The next two symbols (\symbol[P] and \symbol[S]) are
%D variations in their math counterparts. The following ones
diff --git a/tex/context/base/symb-mis.mkiv b/tex/context/base/symb-mis.mkiv
new file mode 100644
index 000000000..8985e31d0
--- /dev/null
+++ b/tex/context/base/symb-mis.mkiv
@@ -0,0 +1,55 @@
+%D \module
+%D [ file=symb-mis,
+%D version=2002.05.07,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Miscelaneous,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA-ADE]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+%D We predefine some common symbols and conversions that will
+%D be understood by many commands. The \type {\mathematics}
+%D is no longer needed, although only math fonts might have
+%D these symbols.
+
+\definesymbol [\v!none] []
+
+\definesymbol [bullet] [\mathematics{\bullet}]
+\definesymbol [dash] [\mathematics{-}]
+\definesymbol [star] [\mathematics{\star}]
+\definesymbol [triangle] [\mathematics{\triangleright}]
+\definesymbol [circle] [\mathematics{\circ}]
+\definesymbol [square] [\mathematics{\square}]
+\definesymbol [diamond] [\mathematics{\diamond}]
+
+\definesymbol [smallcircle] [\hbox{\raise.1ex\hbox{\mathematics{\scriptscriptstyle\bigcirc}}}]
+\definesymbol [medcircle] [\hbox{\raise.1ex\hbox{\mathematics{\scriptstyle \bigcirc}}}]
+\definesymbol [bigcircle] [\mathematics{\bigcirc}]
+
+\definesymbol [1] [\symbol{bullet}]
+\definesymbol [2] [\symbol{dash}]
+\definesymbol [3] [\symbol{star}]
+\definesymbol [4] [\symbol{triangle}]
+\definesymbol [5] [\symbol{circle}]
+\definesymbol [6] [\symbol{medcircle}]
+\definesymbol [7] [\symbol{bigcircle}]
+\definesymbol [8] [\symbol{square}]
+
+\definesymbol [S] [\sectionmark]
+\definesymbol [P] [\paragraphmark]
+\definesymbol [Numero] [N\textnumero]
+\definesymbol [numero] [n\textnumero]
+\definesymbol [euro] [\texteuro]
+
+\let\euro\texteuro
+
+\def\Numero{\symbol[Numero]} % obsolete
+\def\numero{\symbol[numero]} % obsolete
+
+\protect \endinput
diff --git a/tex/context/base/symb-mvs.tex b/tex/context/base/symb-mvs.mkii
index 1dd3da0a0..1dd3da0a0 100644
--- a/tex/context/base/symb-mvs.tex
+++ b/tex/context/base/symb-mvs.mkii
diff --git a/tex/context/base/symb-mvs.mkiv b/tex/context/base/symb-mvs.mkiv
new file mode 100644
index 000000000..312a50a88
--- /dev/null
+++ b/tex/context/base/symb-mvs.mkiv
@@ -0,0 +1,263 @@
+%D \module
+%D [ file=symb-mvs,
+%D version=2010.12.08, % 2000.03.30,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Martin Vogels Symbole,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\definefontsynonym [MartinVogel] [marvosym.ttf]
+
+\def\MartinVogelSymbol{\getnamedglyphdirect{MartinVogel}} % #1
+
+\startsymbolset [astronomic]
+
+ \definesymbol [Sun] [\MartinVogelSymbol{Sun}]
+ \definesymbol [Moon] [\MartinVogelSymbol{Moon}]
+ \definesymbol [Mercury] [\MartinVogelSymbol{Mercury}]
+ \definesymbol [Venus] [\MartinVogelSymbol{Venus}]
+ \definesymbol [Mars] [\MartinVogelSymbol{Mars}]
+ \definesymbol [Jupiter] [\MartinVogelSymbol{Jupiter}]
+ \definesymbol [Saturn] [\MartinVogelSymbol{Saturn}]
+ \definesymbol [Uranus] [\MartinVogelSymbol{Uranus}]
+ \definesymbol [Neptune] [\MartinVogelSymbol{Neptune}]
+ \definesymbol [Pluto] [\MartinVogelSymbol{Pluto}]
+
+\stopsymbolset
+
+\startsymbolset [zodiac]
+
+ \definesymbol [Aries] [\MartinVogelSymbol{Aries}]
+ \definesymbol [Taurus] [\MartinVogelSymbol{Taurus}]
+ \definesymbol [Gemini] [\MartinVogelSymbol{Gemini}]
+ \definesymbol [Cancer] [\MartinVogelSymbol{Cancer}]
+ \definesymbol [Leo] [\MartinVogelSymbol{Leo}]
+ \definesymbol [Virgo] [\MartinVogelSymbol{Virgo}]
+ \definesymbol [Libra] [\MartinVogelSymbol{Libra}]
+ \definesymbol [Scorpio] [\MartinVogelSymbol{Scorpio}]
+ \definesymbol [Sagittarius] [\MartinVogelSymbol{Sagittarius}]
+ \definesymbol [Capricorn] [\MartinVogelSymbol{Capricorn}]
+ \definesymbol [Aquarius] [\MartinVogelSymbol{Aquarius}]
+ \definesymbol [Pisces] [\MartinVogelSymbol{Pisces}]
+
+\stopsymbolset
+
+\startsymbolset [europe]
+
+ \definesymbol [EUR] [\MartinVogelSymbol{EUR}]
+ \definesymbol [EURhv] [\MartinVogelSymbol{EurHv}]
+ \definesymbol [EURcr] [\MartinVogelSymbol{EurCr}]
+ \definesymbol [EURtm] [\MartinVogelSymbol{EurTm}]
+ \definesymbol [EURdig] [\MartinVogelSymbol{EurDig}]
+ \definesymbol [CEsign] [\MartinVogelSymbol{CESign}]
+
+\stopsymbolset
+
+\startsymbolset [martinvogel 1]
+
+ \definesymbol [MVZero] [\MartinVogelSymbol{MVZero}]
+ \definesymbol [MVOne] [\MartinVogelSymbol{MVOne}]
+ \definesymbol [MVTwo] [\MartinVogelSymbol{MVTwo}]
+ \definesymbol [MVThree] [\MartinVogelSymbol{MVThree}]
+ \definesymbol [MVFour] [\MartinVogelSymbol{MVFour}]
+ \definesymbol [MVFive] [\MartinVogelSymbol{MVFive}]
+ \definesymbol [MVSix] [\MartinVogelSymbol{MVSix}]
+ \definesymbol [MVSeven] [\MartinVogelSymbol{MVSeven}]
+ \definesymbol [MVEight] [\MartinVogelSymbol{MVEight}]
+ \definesymbol [MVNine] [\MartinVogelSymbol{MVNine}]
+
+ \definesymbol [MVAt] [\MartinVogelSymbol{MVAt}]
+ \definesymbol [MVArrowDown] [\MartinVogelSymbol{MVArrowDown}]
+ \definesymbol [MVComma] [\MartinVogelSymbol{MVComma}]
+ \definesymbol [MVDivision] [\MartinVogelSymbol{MVDivision}]
+ \definesymbol [MVLeftBracket] [\MartinVogelSymbol{MVLeftBracket}]
+ \definesymbol [MVMinus] [\MartinVogelSymbol{MVMinus}]
+ \definesymbol [MVMultiplication] [\MartinVogelSymbol{MVMultiplication}]
+ \definesymbol [MVPeriod] [\MartinVogelSymbol{MVPeriod}]
+ \definesymbol [MVPlus] [\MartinVogelSymbol{MVPlus}]
+ \definesymbol [MVRightArrow] [\MartinVogelSymbol{MVRightArrow}]
+ \definesymbol [MVRightBracket] [\MartinVogelSymbol{MVRightBracket}]
+ \definesymbol [MVspace] [\MartinVogelSymbol{MVspace}]
+
+\stopsymbolset
+
+% Office signs, crosses, circles, arrows (names as in file)
+
+\startsymbolset [martinvogel 2]
+
+ \definesymbol [AngleSign] [\MartinVogelSymbol{AngleSign}]
+ \definesymbol [Ankh] [\MartinVogelSymbol{Ankh}]
+ \definesymbol [ArrowOver] [\MartinVogelSymbol{ArrowOver}]
+ \definesymbol [AtForty] [\MartinVogelSymbol{AtForty}]
+ \definesymbol [AtNinetyFive] [\MartinVogelSymbol{AtNinetyFive}]
+ \definesymbol [AtSixty] [\MartinVogelSymbol{AtSixty}]
+ %definesymbol [BOLogo] [\MartinVogelSymbol{BOLogo}]
+ %definesymbol [BOLogoL] [\MartinVogelSymbol{BOLogoL}]
+ %definesymbol [BOLogoP] [\MartinVogelSymbol{BOLogoP}]
+ \definesymbol [BSEFree] [\MartinVogelSymbol{BSEFree}]
+ \definesymbol [BarOver] [\MartinVogelSymbol{BarOver}]
+ \definesymbol [Bat] [\MartinVogelSymbol{Bat}]
+ \definesymbol [Beam] [\MartinVogelSymbol{Beam}]
+ \definesymbol [Bearing] [\MartinVogelSymbol{Bearing}]
+ \definesymbol [Bicycle] [\MartinVogelSymbol{Bicycle}]
+ \definesymbol [Biohazard] [\MartinVogelSymbol{Biohazard}]
+ \definesymbol [Bleech] [\MartinVogelSymbol{Bleech}]
+ \definesymbol [Bouquet] [\MartinVogelSymbol{Bouquet}]
+ \definesymbol [CeltCross] [\MartinVogelSymbol{CeltCross}]
+ \definesymbol [CheckedBox] [\MartinVogelSymbol{CheckedBox}]
+ \definesymbol [CircPipe] [\MartinVogelSymbol{CircPipe}]
+ \definesymbol [CircSteel] [\MartinVogelSymbol{CircSteel}]
+ \definesymbol [CircledA] [\MartinVogelSymbol{CircledA}]
+ \definesymbol [CleaningA] [\MartinVogelSymbol{CleaningA}]
+ \definesymbol [CleaningF] [\MartinVogelSymbol{CleaningF}]
+ \definesymbol [CleaningFF] [\MartinVogelSymbol{CleaningFF}]
+ \definesymbol [CleaningP] [\MartinVogelSymbol{CleaningP}]
+ \definesymbol [CleaningPP] [\MartinVogelSymbol{CleaningPP}]
+ \definesymbol [ClockLogo] [\MartinVogelSymbol{ClockLogo}]
+ \definesymbol [Coffeecup] [\MartinVogelSymbol{Coffeecup}]
+ \definesymbol [ComputerMouse] [\MartinVogelSymbol{ComputerMouse}]
+ \definesymbol [Conclusion] [\MartinVogelSymbol{Conclusion}]
+ \definesymbol [Congruent] [\MartinVogelSymbol{Congruent}]
+ \definesymbol [Corresponds] [\MartinVogelSymbol{Corresponds}]
+ \definesymbol [Cross] [\MartinVogelSymbol{Cross}]
+ \definesymbol [CrossedBox] [\MartinVogelSymbol{CrossedBox}]
+ \definesymbol [CutLeft] [\MartinVogelSymbol{CutLeft}]
+ \definesymbol [CutLine] [\MartinVogelSymbol{CutLine}]
+ \definesymbol [CutRight] [\MartinVogelSymbol{CutRight}]
+ \definesymbol [CuttingLine] [\MartinVogelSymbol{CuttingLine}]
+ \definesymbol [Deleatur] [\MartinVogelSymbol{Deleatur}]
+ \definesymbol [Divides] [\MartinVogelSymbol{Divides}]
+ \definesymbol [DividesNot] [\MartinVogelSymbol{DividesNot}]
+ \definesymbol [EMail] [\MartinVogelSymbol{EMail}]
+ \definesymbol [Earth] [\MartinVogelSymbol{Earth}]
+ \definesymbol [EmailCT] [\MartinVogelSymbol{EmailCT}]
+ \definesymbol [Equivalence] [\MartinVogelSymbol{Equivalence}]
+ \definesymbol [Estatically] [\MartinVogelSymbol{Estatically}]
+ \definesymbol [EstimatedSign] [\MartinVogelSymbol{EstimatedSign}]
+ \definesymbol [Explosionsafe] [\MartinVogelSymbol{Explosionsafe}]
+ \definesymbol [EyesDollar] [\MartinVogelSymbol{EyesDollar}]
+ \definesymbol [FAX] [\MartinVogelSymbol{FAX}]
+ \definesymbol [FEMALE] [\MartinVogelSymbol{FEMALE}]
+ \definesymbol [Fax] [\MartinVogelSymbol{Fax}]
+ \definesymbol [Female] [\MartinVogelSymbol{Female}]
+ \definesymbol [FemaleFemale] [\MartinVogelSymbol{FemaleFemale}]
+ \definesymbol [FemaleMale] [\MartinVogelSymbol{FemaleMale}]
+ \definesymbol [FixedBearing] [\MartinVogelSymbol{FixedBearing}]
+ \definesymbol [FlatSteel] [\MartinVogelSymbol{FlatSteel}]
+ \definesymbol [Florin] [\MartinVogelSymbol{Florin}]
+ \definesymbol [Football] [\MartinVogelSymbol{Football}]
+ \definesymbol [Forward] [\MartinVogelSymbol{Forward}]
+ \definesymbol [ForwardToEnd] [\MartinVogelSymbol{ForwardToEnd}]
+ \definesymbol [ForwardToIndex] [\MartinVogelSymbol{ForwardToIndex}]
+ \definesymbol [Frowny] [\MartinVogelSymbol{Frowny}]
+ \definesymbol [Gentsroom] [\MartinVogelSymbol{Gentsroom}]
+ \definesymbol [HERMAPHRODITE] [\MartinVogelSymbol{HERMAPHRODITE}]
+ \definesymbol [HandWash] [\MartinVogelSymbol{HandWash}]
+ \definesymbol [Heart] [\MartinVogelSymbol{Heart}]
+ \definesymbol [Hermaphrodite] [\MartinVogelSymbol{Hermaphrodite}]
+ \definesymbol [HexaSteel] [\MartinVogelSymbol{HexaSteel}]
+ \definesymbol [HollowBox] [\MartinVogelSymbol{HollowBox}]
+ \definesymbol [IRONING] [\MartinVogelSymbol{IRONING}]
+ \definesymbol [Industry] [\MartinVogelSymbol{Industry}]
+ \definesymbol [Info] [\MartinVogelSymbol{Info}]
+ \definesymbol [Ironing] [\MartinVogelSymbol{Ironing}]
+ \definesymbol [Keyboard] [\MartinVogelSymbol{Keyboard}]
+ \definesymbol [LSteel] [\MartinVogelSymbol{LSteel}]
+ \definesymbol [Ladiesroom] [\MartinVogelSymbol{Ladiesroom}]
+ \definesymbol [LargerOrEqual] [\MartinVogelSymbol{LargerOrEqual}]
+ \definesymbol [Laserbeam] [\MartinVogelSymbol{Laserbeam}]
+ \definesymbol [LeftScissors] [\MartinVogelSymbol{LeftScissors}]
+ \definesymbol [LeftTorque] [\MartinVogelSymbol{LeftTorque}]
+ \definesymbol [LessOrEqual] [\MartinVogelSymbol{LessOrEqual}]
+ \definesymbol [Letter] [\MartinVogelSymbol{Letter}]
+ \definesymbol [Lightning] [\MartinVogelSymbol{Lightning}]
+ \definesymbol [Lineload] [\MartinVogelSymbol{Lineload}]
+ \definesymbol [LooseBearing] [\MartinVogelSymbol{LooseBearing}]
+ \definesymbol [MALE] [\MartinVogelSymbol{MALE}]
+ \definesymbol [Male] [\MartinVogelSymbol{Male}]
+ \definesymbol [MaleMale] [\MartinVogelSymbol{MaleMale}]
+ \definesymbol [ManFace] [\MartinVogelSymbol{ManFace}]
+ \definesymbol [MineSign] [\MartinVogelSymbol{MineSign}]
+ \definesymbol [Mobilefone] [\MartinVogelSymbol{Mobilefone}]
+ \definesymbol [MoveDown] [\MartinVogelSymbol{MoveDown}]
+ \definesymbol [MoveUp] [\MartinVogelSymbol{MoveUp}]
+ \definesymbol [MultiplicationDot] [\MartinVogelSymbol{MultiplicationDot}]
+ \definesymbol [Mundus] [\MartinVogelSymbol{Mundus}]
+ \definesymbol [Neutral] [\MartinVogelSymbol{Neutral}]
+ \definesymbol [NoBleech] [\MartinVogelSymbol{NoBleech}]
+ \definesymbol [NoBreakSpace] [\MartinVogelSymbol{NoBreakSpace}]
+ \definesymbol [NoChemicalCleaning] [\MartinVogelSymbol{NoChemicalCleaning}]
+ \definesymbol [NoIroning] [\MartinVogelSymbol{NoIroning}]
+ \definesymbol [NoTumbler] [\MartinVogelSymbol{NoTumbler}]
+ \definesymbol [NoWash] [\MartinVogelSymbol{NoWash}]
+ \definesymbol [NotCongruent] [\MartinVogelSymbol{NotCongruent}]
+ \definesymbol [OktoSteel] [\MartinVogelSymbol{OktoSteel}]
+ \definesymbol [PackingWaste] [\MartinVogelSymbol{PackingWaste}]
+ \definesymbol [ParallelPort] [\MartinVogelSymbol{ParallelPort}]
+ \definesymbol [PeaceDove] [\MartinVogelSymbol{PeaceDove}]
+ \definesymbol [Pfund] [\MartinVogelSymbol{Pfund}]
+ \definesymbol [Pickup] [\MartinVogelSymbol{Pickup}]
+ \definesymbol [PointingHand] [\MartinVogelSymbol{PointingHand}]
+ \definesymbol [Printer] [\MartinVogelSymbol{Printer}]
+ \definesymbol [Radioactivity] [\MartinVogelSymbol{Radioactivity}]
+ \definesymbol [RectPipe] [\MartinVogelSymbol{RectPipe}]
+ \definesymbol [RectSteel] [\MartinVogelSymbol{RectSteel}]
+ \definesymbol [Recycling] [\MartinVogelSymbol{Recycling}]
+ \definesymbol [Rewind] [\MartinVogelSymbol{Rewind}]
+ \definesymbol [RewindToIndex] [\MartinVogelSymbol{RewindToIndex}]
+ \definesymbol [RewindToStart] [\MartinVogelSymbol{RewindToStart}]
+ \definesymbol [RightScissors] [\MartinVogelSymbol{RightScissors}]
+ \definesymbol [RightTorque] [\MartinVogelSymbol{RightTorque}]
+ \definesymbol [RoundedLSteel] [\MartinVogelSymbol{RoundedLSteel}]
+ \definesymbol [RoundedTSteel] [\MartinVogelSymbol{RoundedTSteel}]
+ \definesymbol [RoundedTTSteel] [\MartinVogelSymbol{RoundedTTSteel}]
+ \definesymbol [SerialInterface] [\MartinVogelSymbol{SerialInterface}]
+ \definesymbol [SerialPort] [\MartinVogelSymbol{SerialPort}]
+ \definesymbol [Shilling] [\MartinVogelSymbol{Shilling}]
+ \definesymbol [ShortFifty] [\MartinVogelSymbol{ShortFifty}]
+ \definesymbol [ShortForty] [\MartinVogelSymbol{ShortForty}]
+ \definesymbol [ShortNinetyfive] [\MartinVogelSymbol{ShortNinetyfive}]
+ \definesymbol [ShortSixty] [\MartinVogelSymbol{ShortSixty}]
+ \definesymbol [ShortThirty] [\MartinVogelSymbol{ShortThirty}]
+ \definesymbol [Smiley] [\MartinVogelSymbol{Smiley}]
+ \definesymbol [SoftHyphen] [\MartinVogelSymbol{SoftHyphen}]
+ \definesymbol [SpecialForty] [\MartinVogelSymbol{SpecialForty}]
+ \definesymbol [SquarePipe] [\MartinVogelSymbol{SquarePipe}]
+ \definesymbol [SquareSteel] [\MartinVogelSymbol{SquareSteel}]
+ \definesymbol [Stopsign] [\MartinVogelSymbol{Stopsign}]
+ \definesymbol [StrikingThrough] [\MartinVogelSymbol{StrikingThrough}]
+ \definesymbol [TSteel] [\MartinVogelSymbol{TSteel}]
+ \definesymbol [TTSteel] [\MartinVogelSymbol{TTSteel}]
+ \definesymbol [Telephone] [\MartinVogelSymbol{Telefon}]
+ \definesymbol [ToBottom] [\MartinVogelSymbol{ToBottom}]
+ \definesymbol [ToTop] [\MartinVogelSymbol{ToTop}]
+ \definesymbol [Tumbler] [\MartinVogelSymbol{Tumbler}]
+ \definesymbol [Valve] [\MartinVogelSymbol{Valve}]
+ \definesymbol [WashCotton] [\MartinVogelSymbol{WashCotton}]
+ \definesymbol [WashSynthetics] [\MartinVogelSymbol{WashSynthetics}]
+ \definesymbol [WashWool] [\MartinVogelSymbol{WashWool}]
+ \definesymbol [Wheelchair] [\MartinVogelSymbol{Wheelchair}]
+ \definesymbol [WomanFace] [\MartinVogelSymbol{WomanFace}]
+ \definesymbol [WritingHand] [\MartinVogelSymbol{WritingHand}]
+ \definesymbol [YinYang] [\MartinVogelSymbol{YinYang}]
+ \definesymbol [arrowOver] [\MartinVogelSymbol{arrowOver}]
+ \definesymbol [barOver] [\MartinVogelSymbol{barOver}]
+ \definesymbol [fax] [\MartinVogelSymbol{fax}]
+ %definesymbol [hyphen] [\MartinVogelSymbol{hyphen}]
+ \definesymbol [ironing] [\MartinVogelSymbol{ironing}]
+ %definesymbol [nonmarkingreturn] [\MartinVogelSymbol{nonmarkingreturn}]
+
+\stopsymbolset
+
+%D \showsymbolset[astronomic]
+%D \showsymbolset[zodiac]
+%D \showsymbolset[europe]
+%D \showsymbolset[martinvogel 1]
+%D \showsymbolset[martinvogel 2]
+
+\endinput
diff --git a/tex/context/base/symb-nav.tex b/tex/context/base/symb-nav.mkii
index 90a798e01..93badbc4d 100644
--- a/tex/context/base/symb-nav.tex
+++ b/tex/context/base/symb-nav.mkii
@@ -15,11 +15,7 @@
\loadmapfile[original-base.map] % \loadmapfile [original-context-symbol.map]
-\ifnum\texengine=\luatexengine
- \definefontsynonym [ContextNavigation] [contnav.tfm]
-\else
- \definefontsynonym [ContextNavigation] [contnav]
-\fi
+\definefontsynonym [ContextNavigation] [contnav]
\def\ContextNavigationGlyph#1{\getglyph{ContextNavigation}{\char#1}}
diff --git a/tex/context/base/symb-nav.mkiv b/tex/context/base/symb-nav.mkiv
new file mode 100644
index 000000000..0f5fd289f
--- /dev/null
+++ b/tex/context/base/symb-nav.mkiv
@@ -0,0 +1,129 @@
+%D \module
+%D [ file=symb-nav,
+%D version=1998.07.20,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Navigational Symbols,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\unprotect
+
+\definesymbol [\v!first] [\symbol{\v!firstpage}]
+\definesymbol [\v!previous] [\symbol{\v!previouspage}]
+\definesymbol [\v!next] [\symbol{\v!nextpage}]
+\definesymbol [\v!last] [\symbol{\v!lastpage}]
+\definesymbol [\v!backward] [\symbol{\v!previouspage}]
+\definesymbol [\v!forward] [\symbol{\v!nextpage}]
+\definesymbol [\v!nowhere] [\symbol{bullet}]
+\definesymbol [\v!somewhere] [\startoverlay{\symbol\v!previouspage}{\symbol\v!nextpage}\stopoverlay]
+
+\definefontsynonym [ContextNavigation] [contnav]
+
+\def\ContextNavigationGlyph{\getnamedglyphdirect{ContextNavigation}} % #1
+
+\startsymbolset [navigation 1]
+
+ \definesymbol [\v!firstpage] [\ContextNavigationGlyph{char03}]
+ \definesymbol [\v!previouspage] [\ContextNavigationGlyph{char01}]
+ \definesymbol [\v!nextpage] [\ContextNavigationGlyph{char02}]
+ \definesymbol [\v!lastpage] [\ContextNavigationGlyph{char04}]
+
+ \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{char05}]
+ \definesymbol [\v!NextJump] [\ContextNavigationGlyph{char06}]
+
+ \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{char07}]
+
+ \definesymbol [\v!firstsubpage] [\ContextNavigationGlyph{char03}]
+ \definesymbol [\v!previoussubpage] [\ContextNavigationGlyph{char01}]
+ \definesymbol [\v!nextsubpage] [\ContextNavigationGlyph{char02}]
+ \definesymbol [\v!lastsubpage] [\ContextNavigationGlyph{char04}]
+
+ \definesymbol [\v!StartSound] [\ContextNavigationGlyph{char02}]
+ \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{char08}]
+ \definesymbol [\v!StopSound] [\ContextNavigationGlyph{char07}]
+
+ \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{char02}]
+ \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{char08}]
+ \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{char07}]
+
+ \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{char02}]
+ \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{char08}]
+ \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{char07}]
+ \definesymbol [\v!ResumeRendering] [\ContextNavigationGlyph{char02}]
+
+\stopsymbolset
+
+\startsymbolset [navigation 2]
+
+ \definesymbol [\v!firstpage] [\ContextNavigationGlyph{char67}]
+ \definesymbol [\v!previouspage] [\ContextNavigationGlyph{char65}]
+ \definesymbol [\v!nextpage] [\ContextNavigationGlyph{char66}]
+ \definesymbol [\v!lastpage] [\ContextNavigationGlyph{char68}]
+
+ \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{char69}]
+ \definesymbol [\v!NextJump] [\ContextNavigationGlyph{char6a}]
+
+ \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{char6b}]
+
+ \definesymbol [\v!firstsubpage] [\ContextNavigationGlyph{char67}]
+ \definesymbol [\v!previoussubpage] [\ContextNavigationGlyph{char65}]
+ \definesymbol [\v!nextsubpage] [\ContextNavigationGlyph{char66}]
+ \definesymbol [\v!lastsubpage] [\ContextNavigationGlyph{char68}]
+
+ \definesymbol [\v!StartSound] [\ContextNavigationGlyph{char66}]
+ \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{char6c}]
+ \definesymbol [\v!StopSound] [\ContextNavigationGlyph{char6b}]
+
+ \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{char66}]
+ \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{char6c}]
+ \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{char6b}]
+
+ \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{char66}]
+ \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{char6c}]
+ \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{char6b}]
+ \definesymbol [\v!ResumeRendering] [\ContextNavigationGlyph{char66}]
+
+\stopsymbolset
+
+\startsymbolset [navigation 3]
+
+ \definesymbol [\v!firstpage] [\ContextNavigationGlyph{charcb}]
+ \definesymbol [\v!previouspage] [\ContextNavigationGlyph{charc9}]
+ \definesymbol [\v!nextpage] [\ContextNavigationGlyph{charca}]
+ \definesymbol [\v!lastpage] [\ContextNavigationGlyph{charcc}]
+
+ \definesymbol [\v!PreviousJump] [\ContextNavigationGlyph{charcd}]
+ \definesymbol [\v!NextJump] [\ContextNavigationGlyph{charce}]
+
+ \definesymbol [\v!CloseDocument] [\ContextNavigationGlyph{charcf}]
+
+ \definesymbol [\v!firstsubpage] [\ContextNavigationGlyph{charcb}]
+ \definesymbol [\v!previoussubpage] [\ContextNavigationGlyph{charc9}]
+ \definesymbol [\v!nextsubpage] [\ContextNavigationGlyph{charca}]
+ \definesymbol [\v!lastsubpage] [\ContextNavigationGlyph{charcc}]
+
+ \definesymbol [\v!StartSound] [\ContextNavigationGlyph{charca}]
+ \definesymbol [\v!PauseSound] [\ContextNavigationGlyph{chard0}]
+ \definesymbol [\v!StopSound] [\ContextNavigationGlyph{charcf}]
+
+ \definesymbol [\v!StartMovie] [\ContextNavigationGlyph{charca}]
+ \definesymbol [\v!PauseMovie] [\ContextNavigationGlyph{chard0}]
+ \definesymbol [\v!StopMovie] [\ContextNavigationGlyph{charcf}]
+
+ \definesymbol [\v!StartRendering] [\ContextNavigationGlyph{charca}]
+ \definesymbol [\v!PauseRendering] [\ContextNavigationGlyph{chard0}]
+ \definesymbol [\v!StopRendering] [\ContextNavigationGlyph{charcf}]
+ \definesymbol [\v!ResumeRendering] [\ContextNavigationGlyph{charca}]
+
+\stopsymbolset
+
+%D \showsymbolset[navigation 1]
+%D \showsymbolset[navigation 2]
+%D \showsymbolset[navigation 3]
+
+\protect \endinput
diff --git a/tex/context/base/symb-run.mkiv b/tex/context/base/symb-run.mkiv
index 4e714832c..8efb5e63d 100644
--- a/tex/context/base/symb-run.mkiv
+++ b/tex/context/base/symb-run.mkiv
@@ -1,54 +1,53 @@
%D \module
-%D [ file=symb-run, % code moved from symb-ini
-%D version=1998.07.20,
+%D [ file=symb-run,
+%D version=2010.12.08, % 1998.07.20,
%D title=\CONTEXT\ Symbol Libraries,
%D subtitle=Runtime Macros,
%D author=Hans Hagen,
%D date=\currentdate,
-%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
+%D copyright=PRAGMA]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+\startluacode
+ function commands.showsymbolset(collection,symbols)
+ if type(symbols) == "string" then
+ symbols = utilities.parsers.settings_to_array(symbols)
+ end
+ context.start()
+ context.forcesymbolset { collection }
+ context.starttabulate { "|lT|l|l|" }
+ for i=1,#symbols do
+ local symbol = symbols[i]
+ context.NC()
+ context(symbol)
+ context.NC()
+ context.symbol(symbol)
+ context.NC()
+ context.color (
+ { "red" },
+ context.nested.ruledhbox(
+ context.nested.color (
+ { "black" },
+ context.nested.symbol(symbol)
+ )
+ )
+ )
+ context.NR()
+ end
+ context.stoptabulate()
+ context.stop()
+ end
+\stopluacode
+
\unprotect
-\gdef\doshowsymbolset[#1][#2]% todo: make nicer, use legend or so
- {\vbox\bgroup
- \blank
- \getparameters[\??ss][\c!n=5,#2]%
- \forcesymbolset[#1]%
- \doifsymbolsetelse{#1}
- {\global\let\allfigures\empty
- \doglobal\newcounter\figurecounter
- \setupcolors[\c!state=\v!start]% to prevent mps color conversion
- \dontcomplain
- \def\doshowsymbols% global needed due to grouping in alignment
- {\expanded{\globalprocesscommalist[\symbolset{#1}]}\docommand}%
- \def\docommand##1%
- {\vbox
- {\forgetall
- \tttf
- \halign
- {\hss\quad####\strut\quad\hss\cr
- \symbol[##1]\quad{\red\ruledhbox{\black\symbol[##1]}}\cr
- \tfx##1\cr}}%
- \doglobal\increment\figurecounter
- \ifnum\figurecounter=\@@ssn
- \doglobal\newcounter\figurecounter
- \def\next{\crcr\noalign{\vskip1ex}}%
- \else
- \def\next{&}%
- \fi
- \next}%
- \tabskip\zeropoint \!!plus 1fill
- \halign to \hsize
- {&\hss##\hss\cr\doshowsymbols\crcr}}%
- {}%
- \blank
- \egroup}
+\gdef\doshowsymbolset[#1]%
+ {\ctxlua{commands.showsymbolset("#1","\symbolset{#1}")}}
\gdef\showsymbolset
- {\dodoubleempty\doshowsymbolset}
+ {\dosingleargument\doshowsymbolset}
\protect \endinput
diff --git a/tex/context/base/symb-uni.tex b/tex/context/base/symb-uni.mkii
index fcd613e7f..fcd613e7f 100644
--- a/tex/context/base/symb-uni.tex
+++ b/tex/context/base/symb-uni.mkii
diff --git a/tex/context/base/symb-was.tex b/tex/context/base/symb-was.mkii
index d6c324864..d6c324864 100644
--- a/tex/context/base/symb-was.tex
+++ b/tex/context/base/symb-was.mkii
diff --git a/tex/context/base/thrd-pic.tex b/tex/context/base/thrd-pic.mkii
index 3c25d8a81..3c25d8a81 100644
--- a/tex/context/base/thrd-pic.tex
+++ b/tex/context/base/thrd-pic.mkii
diff --git a/tex/context/base/thrd-tab.tex b/tex/context/base/thrd-tab.mkii
index dd3838ce2..dd3838ce2 100644
--- a/tex/context/base/thrd-tab.tex
+++ b/tex/context/base/thrd-tab.mkii
diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv
index 1423f4f6f..4d6f00bfe 100644
--- a/tex/context/base/type-otf.mkiv
+++ b/tex/context/base/type-otf.mkiv
@@ -1267,7 +1267,7 @@
\starttypescript
\definefontsynonym [ZapfDingbats] [uzdr]
\definefontsynonym [RalfSmithFormalScript] [rsfs10]
- \definefontsynonym [MartinVogel] [fmvr8x]
+ \definefontsynonym [MartinVogel] [\s!file:marvosym.ttf]
\stoptypescript
\stoptypescriptcollection
diff --git a/tex/context/base/v-tex.lua b/tex/context/base/v-tex.lua
index 0977ca571..1973017f3 100644
--- a/tex/context/base/v-tex.lua
+++ b/tex/context/base/v-tex.lua
@@ -11,6 +11,8 @@ local P, S, V, patterns = lpeg.P, lpeg.S, lpeg.V, lpeg.patterns
local context = context
local verbatim = context.verbatim
local makepattern = visualizers.makepattern
+local makenested = visualizers.makenested
+local getvisualizer = visualizers.getvisualizer
local TexSnippet = context.TexSnippet
local startTexSnippet = context.startTexSnippet
@@ -36,36 +38,93 @@ local handler = visualizers.newhandler {
-- todo: unicode letters in control sequences (slow as we need to test the nature)
-local comment = S("%")
-local name = P("\\") * (patterns.letter + S("@!?"))^1
-local escape = P("\\") * (patterns.anything - patterns.newline)^-1 -- else we get \n
-local group = S("${}")
-local boundary = S('[]()<>#="')
-local special = S("/^_-&+'`|")
+local comment = S("%")
+local name = P("\\") * (patterns.letter + S("@!?"))^1
+local escape = P("\\") * (patterns.anything - patterns.newline)^-1 -- else we get \n
+local group = S("${}")
+local boundary = S('[]()<>#="')
+local special = S("/^_-&+'`|")
-local pattern = visualizers.pattern
+local p_comment = makepattern(handler,"comment",comment)
+ * (V("space") + V("content"))^0
+local p_name = makepattern(handler,"name",name)
+local p_escape = makepattern(handler,"name",escape)
+local p_group = makepattern(handler,"group",group)
+local p_boundary = makepattern(handler,"boundary",boundary)
+local p_special = makepattern(handler,"special",special)
+local p_somespace = V("newline") * V("emptyline")^0 * V("beginline")
+ + V("space")
+
+--~ local pattern = visualizers.pattern
local grammar = visualizers.newgrammar("default", { "visualizer",
- comment = makepattern(handler,"comment",comment)
- * (V("space") + V("content"))^0,
- name = makepattern(handler,"name",name),
- escape = makepattern(handler,"name",escape),
- group = makepattern(handler,"group",group),
- boundary = makepattern(handler,"boundary",boundary),
- special = makepattern(handler,"special",special),
+ comment = p_comment,
+ name = p_name,
+ escape = p_escape,
+ group = p_group,
+ boundary = p_boundary,
+ special = p_special,
+ somespace = p_somespace,
- pattern =
- V("comment") + V("name") + V("escape") + V("group") + V("boundary") + V("special")
- + V("newline") * V("emptyline")^0 * V("beginline")
- + V("space")
- + V("default"),
+ pattern = V("comment")
+ + V("name") + V("escape") + V("group") + V("boundary") + V("special")
+ + V("newline") * V("emptyline")^0 * V("beginline")
+ + V("space")
+ + V("default"),
- visualizer =
- V("pattern")^1
+ visualizer = V("pattern")^1
} )
local parser = P(grammar)
visualizers.register("tex", { parser = parser, handler = handler, grammar = grammar } )
+
+local function makecommand(handler,how,start,left,right)
+ local c, l, r, f = P(start), P(left), P(right), how
+ local n = ( P { l * ((1 - (l + r)) + V(1))^0 * r } + P(1-r) )^0
+ if type(how) == "string" then
+ f = function(s) getvisualizer(how,"direct")(s) end
+ end
+ return makepattern(handler,"name",c)
+ * V("somespace")^0
+ * makepattern(handler,"group",l)
+ * (n/f)
+ * makepattern(handler,"group",r)
+end
+
+local grammar = visualizers.newgrammar("default", { "visualizer",
+
+ comment = p_comment,
+ name = p_name,
+ escape = p_escape,
+ group = p_group,
+ boundary = p_boundary,
+ special = p_special,
+ somespace = p_somespace,
+
+ mpcode = makenested(handler,"mp","\\startMPcode","\\stopMPcode")
+ + makenested(handler,"mp","\\startMPgraphic","\\stopMPgraphic")
+ + makenested(handler,"mp","\\startuseMPgraphic","\\stopuseMPgraphic")
+ + makenested(handler,"mp","\\startreusableMPgraphic","\\stopreusableMPgraphic")
+ + makenested(handler,"mp","\\startuniqueMPgraphic","\\stopuniqueMPgraphic")
+ + makenested(handler,"mp","\\startMPpage","\\stopMPpage"),
+
+ luacode = makenested (handler,"lua","\\startluacode","\\stopluacode")
+ + makecommand(handler,"lua","\\ctxlua","{","}"),
+
+ pattern = V("comment")
+ + V("mpcode") + V("luacode")
+ + V("name") + V("escape") + V("group") + V("boundary") + V("special")
+ + V("newline") * V("emptyline")^0 * V("beginline")
+ + V("space")
+ + V("default"),
+
+ visualizer = V("pattern")^1
+
+} )
+
+local parser = P(grammar)
+
+visualizers.register("context", { parser = parser, handler = handler, grammar = grammar } )
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 6f9888418..13a546b5f 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/07/10 10:47:58
+-- merge date : 12/09/10 12:11:44
do -- begin closure to overcome local limits and interference
@@ -150,7 +150,7 @@ lpeg.patterns = lpeg.patterns or { } -- so that we can share
local patterns = lpeg.patterns
local P, R, S, V, match = lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.match
-local Ct, C, Cs, Cc, Cf, Cg = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Cf, lpeg.Cg
+local Ct, C, Cs, Cc = lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc
local lpegtype = lpeg.type
local utfcharacters = string.utfcharacters
@@ -6617,7 +6617,8 @@ actions["prepare unicodes"] = function(data,filename,raw)
-- beware: the indices table is used to initialize the tfm table
local encname = lower(data.enc_name or (mapenc and mapenc[1] and mapenc[1].enc_name) or "") -- mapenc will go away
-- will become: local encname = lower(data.enc_name or "")
- if encname == "" or encname == "unicodebmp" or encname == "unicodefull" then -- maybe find(encname,"unicode")
+--~ if encname == "" or encname == "unicodebmp" or encname == "unicodefull" then -- maybe find(encname,"unicode")
+ if find(encname,"unicode") then
if trace_loading then
report_otf("using extra unicode map")
end