summaryrefslogtreecommitdiff
path: root/tex/context
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-07-10 23:34:30 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-07-10 23:34:30 +0200
commiteebab79d84255890c1a6d320fba146b1c422c3a6 (patch)
tree1b3b581945b5ac395b36d74b0da10926e9536c9f /tex/context
parentba4875d8c328257fa3cb4d140d07ced41b8a576c (diff)
downloadcontext-eebab79d84255890c1a6d320fba146b1c422c3a6.tar.gz
2021-07-10 21:49:00
Diffstat (limited to 'tex/context')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-it.mkii1
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-def.lua4
-rw-r--r--tex/context/base/mkiv/mult-mps.lua2
-rw-r--r--tex/context/base/mkiv/mult-prm.lua1
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin23613 -> 23621 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin248476 -> 248500 bytes
-rw-r--r--tex/context/base/mkiv/symb-imp-was.mkiv206
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/meta-fig.mkxl5
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl110
-rw-r--r--tex/context/base/mkxl/mlib-pdf.lmt2
-rw-r--r--tex/context/base/mkxl/mlib-pps.lmt33
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl84
-rw-r--r--tex/context/interface/mkii/keys-it.xml1
19 files changed, 428 insertions, 33 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 422bcf32a..f40536141 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2021.07.09 18:13}
+\newcontextversion{2021.07.10 21:47}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 1cf730f4c..2b275f541 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.07.09 18:13}
+\edef\contextversion{2021.07.10 21:47}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index a1f572ef5..99ae15d9a 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -1236,6 +1236,7 @@
\setinterfaceconstant{splitoffset}{splitoffset}
\setinterfaceconstant{spot}{spot}
\setinterfaceconstant{stack}{stack}
+\setinterfaceconstant{stacking}{stacking}
\setinterfaceconstant{stackname}{stackname}
\setinterfaceconstant{start}{inizia}
\setinterfaceconstant{starter}{starter}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 2d989531d..2e8e2ac4c 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.07.09 18:13}
+\newcontextversion{2021.07.10 21:47}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 30ae6b70f..be8e09179 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.07.09 18:13}
+\edef\contextversion{2021.07.10 21:47}
%D Kind of special:
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index c097f2419..b6d6141e5 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -11810,6 +11810,10 @@ return {
["pe"]="توده",
["ro"]="stack",
},
+ ["stacking"]={
+ ["en"]="stacking",
+ ["nl"]="stapels",
+ },
["stackname"]={
["en"]="stackname",
["fr"]="nompile",
diff --git a/tex/context/base/mkiv/mult-mps.lua b/tex/context/base/mkiv/mult-mps.lua
index 6512091ae..b4eba21a7 100644
--- a/tex/context/base/mkiv/mult-mps.lua
+++ b/tex/context/base/mkiv/mult-mps.lua
@@ -58,7 +58,7 @@ return {
"prescriptpart", "postscriptpart",
"rgbcolor", "cmykcolor", -- "greycolor", "graycolor",
"colormodel", "graypart", "greypart", "greycolor", "graycolor",
- "dashpart", "penpart",
+ "dashpart", "penpart", "stackingpart",
-- "colorpart",
"stroked", "filled", "textual", "clipped", "bounded", "pathpart",
"expandafter",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index c3d0fa656..ae2b58a2a 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -307,6 +307,7 @@ return {
"enforced",
"etoksapp",
"etokspre",
+ "everybeforepar",
"everytab",
"exceptionpenalty",
"expand",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 8fb358fa4..4b9018dc7 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 8e2064949..44e5059a7 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/symb-imp-was.mkiv b/tex/context/base/mkiv/symb-imp-was.mkiv
new file mode 100644
index 000000000..424e60b65
--- /dev/null
+++ b/tex/context/base/mkiv/symb-imp-was.mkiv
@@ -0,0 +1,206 @@
+%D \module
+%D [ file=symb-was,
+%D version=2005.10.15,
+%D title=\CONTEXT\ Symbol Libraries,
+%D subtitle=Roland Waldi's Symbols (wasy-2),
+%D author=Henning Hraban Ramm,
+%D date=\currentdate,
+%D copyright={Public Domain}]
+%C
+%C This module is in the public domain.
+
+%D Converted to \MKIV\ by Hans but not yet complete.
+
+\unprotect
+
+\definefontsynonym [WaldiSymbol] [wasy10]
+\definefontsynonym [WaldiSymbolBold] [wasyb10]
+
+% \def\wasy@over#1#2{{\setbox0\hbox{$#2$}\hbox to \wd0{\hss$#1$\hss}\kern-\wd0\box0}}
+
+\def\WaldiSymbol {\getnamedglyphdirect{WaldiSymbol}} % #1
+\def\WaldiSymbol#1{\getglyph{WaldiSymbol}{\fontchar{#1}}}
+
+% general symbols
+
+\startsymbolset [wasy general]
+ \definesymbol [male] [\WaldiSymbol{male}]
+ \definesymbol [female] [\WaldiSymbol{female}]
+ \definesymbol [currency] [\WaldiSymbol{currency}]
+ \definesymbol [cent] [\WaldiSymbol{cent}]
+ \definesymbol [lozenge] [\WaldiSymbol{lozenge}]
+ \definesymbol [kreuz] [\WaldiSymbol{kreuz}]
+ \definesymbol [smiley] [\WaldiSymbol{smiley}]
+ \definesymbol [blacksmiley] [\WaldiSymbol{blacksmil}]
+ \definesymbol [frownie] [\WaldiSymbol{frownie}]
+ \definesymbol [sun] [\WaldiSymbol{sun}]
+ \definesymbol [checked] [\WaldiSymbol{checked}]
+ \definesymbol [brokenvert] [\WaldiSymbol{brokenver}]
+ \definesymbol [diameter] [\WaldiSymbol{diameter}]
+ \definesymbol [invdiameter] [\WaldiSymbol{invdiamet}]
+ \definesymbol [phone] [\WaldiSymbol{phone}]
+ \definesymbol [recorder] [\WaldiSymbol{recorder}]
+ \definesymbol [clock] [\WaldiSymbol{clock}]
+ \definesymbol [permil] [\WaldiSymbol{permil}]
+ \definesymbol [bell] [\WaldiSymbol{bell}]
+ \definesymbol [ataribox] [\WaldiSymbol{ataribox}]
+ \definesymbol [pointer] [\WaldiSymbol{pointer}]
+ \definesymbol [lightning] [\WaldiSymbol{lightning}]
+ \definesymbol [agemO] [\WaldiSymbol{agemO}]
+\stopsymbolset
+
+\startsymbolset [wasy music]
+ \definesymbol [eighthnote] [\WaldiSymbol{eighthnote}]
+ \definesymbol [quarternote] [\WaldiSymbol{quarternote}]
+ \definesymbol [halfnote] [\WaldiSymbol{halfnote}]
+ \definesymbol [fullnote] [\WaldiSymbol{fullnote}]
+ \definesymbol [twonotes] [\WaldiSymbol{twonotes}]
+\stopsymbolset
+
+\startsymbolset [wasy astronomy]
+ \definesymbol [ascnode] [\WaldiSymbol{ascnode}]
+ \definesymbol [descnode] [\WaldiSymbol{descnode}]
+ \definesymbol [astrosun] [\WaldiSymbol{astrosun}]
+ \definesymbol [sun] [\WaldiSymbol{sun}]
+ \definesymbol [newmoon] [\WaldiSymbol{newmoon}]
+ \definesymbol [fullmoon] [\WaldiSymbol{fullmoon}]
+ \definesymbol [rightmoon] [\WaldiSymbol{rightmoon}]
+ \definesymbol [leftmoon] [\WaldiSymbol{leftmoon}]
+ \definesymbol [vernal] [\WaldiSymbol{vernal}]
+ \definesymbol [mercury] [\WaldiSymbol{mercury}]
+ \definesymbol [mars] [\WaldiSymbol{mars}]
+ \definesymbol [saturn] [\WaldiSymbol{saturn}]
+ \definesymbol [neptune] [\WaldiSymbol{neptune}]
+ \definesymbol [earth] [\WaldiSymbol{earth}]
+ \definesymbol [venus] [\WaldiSymbol{venus}]
+ \definesymbol [jupiter] [\WaldiSymbol{jupiter}]
+ \definesymbol [uranus] [\WaldiSymbol{uranus}]
+ \definesymbol [pluto] [\WaldiSymbol{pluto}]
+\stopsymbolset
+
+\startsymbolset [wasy astrology]
+ \definesymbol [conjunction] [\WaldiSymbol{conjunction}]
+ \definesymbol [opposition] [\WaldiSymbol{opposition}]
+ \definesymbol [aries] [\WaldiSymbol{aries}]
+ \definesymbol [libra] [\WaldiSymbol{libra}]
+ \definesymbol [taurus] [\WaldiSymbol{taurus}]
+ \definesymbol [scorpio] [\WaldiSymbol{scorpio}]
+ \definesymbol [gemini] [\WaldiSymbol{gemini}]
+ \definesymbol [sagittarius] [\WaldiSymbol{sagittarius}]
+ \definesymbol [cancer] [\WaldiSymbol{cancer}]
+ \definesymbol [capricornus] [\WaldiSymbol{capricornus}]
+ \definesymbol [leo] [\WaldiSymbol{leo}]
+ \definesymbol [aquarius] [\WaldiSymbol{aquarius}]
+ \definesymbol [virgo] [\WaldiSymbol{virgo}]
+ \definesymbol [pisces] [\WaldiSymbol{pisces}]
+\stopsymbolset
+
+\startsymbolset [wasy geometry]
+ \definesymbol [fivestar] [\WaldiSymbol{fivestar}] % HHR additional
+ \definesymbol [hexstar] [\WaldiSymbol{hexstar}]
+ \definesymbol [varhexstar] [\WaldiSymbol{varhexstar}]
+ \definesymbol [davidsstar] [\WaldiSymbol{davidsstar}]
+ \definesymbol [Circle] [\WaldiSymbol{Circle}]
+ \definesymbol [CIRCLE] [\WaldiSymbol{CIRCLE}]
+ \definesymbol [Leftcircle] [\WaldiSymbol{Leftcircle}]
+ \definesymbol [LEFTCIRCLE] [\WaldiSymbol{LEFTCIRCLE}]
+ \definesymbol [Rightcircle] [\WaldiSymbol{Rightcircle}]
+ \definesymbol [RIGHTCIRCLE] [\WaldiSymbol{RIGHTCIRCLE}]
+% \definesymbol [LEFTcircle] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol {LEFTCIRCLE}\hss}\WaldiSymbol{Circle}]
+% \definesymbol [RIGHTcircle] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{RIGHTCIRCLE}\hss}\WaldiSymbol{Circle}]
+ \definesymbol [LEFTarrow] [\WaldiSymbol{LEFTarrow}]
+ \definesymbol [RIGHTarrow] [\WaldiSymbol{RIGHTarrow}]
+ \definesymbol [UParrow] [\WaldiSymbol{UParrow}]
+ \definesymbol [DOWNarrow] [\WaldiSymbol{DOWNarrow}]
+ \definesymbol [Box] [\WaldiSymbol{Box}]
+ \definesymbol [APLbox] [\WaldiSymbol{APLbox}]
+ \definesymbol [XBox] [\WaldiSymbol{XBox}]
+ \definesymbol [Bowtie] [\WaldiSymbol{Bowtie}]
+ \definesymbol [Diamond] [\WaldiSymbol{Diamond}]
+ \definesymbol [octagon] [\WaldiSymbol{octagon}]
+ \definesymbol [hexagon] [\WaldiSymbol{hexagon}]
+ \definesymbol [varhexagon] [\WaldiSymbol{varhexagon}]
+ \definesymbol [pentagon] [\WaldiSymbol{pentagon}]
+% \definesymbol [pentastar] [\dontleavehmode\hbox to \zeropoint{\WaldiSymbol{pentagon}\hss}\lower.04em\hbox{\WaldiSymbol{fivestar}}]
+\stopsymbolset
+
+% \startsymbolset [wasy physics]
+% \definesymbol [varangle] [\WaldiSymbol{30}]
+% \definesymbol [invneg] [\WaldiSymbol{24}]
+% \definesymbol [leftturn] [\WaldiSymbol{34}]
+% \definesymbol [rightturn] [\WaldiSymbol{33}]
+% \definesymbol [diameter] [\WaldiSymbol{31}]
+% \definesymbol [invdiameter] [\WaldiSymbol{21}] % additional
+% \definesymbol [therefore] [\WaldiSymbol {5}]
+% \definesymbol [AC] [\mbox{\kern.05em\WaldiSymbol{58}\kern.05em}]
+% \definesymbol [HF] [\dontleavehmode
+% \lower.09em\hbox to \zeropoint{\kern.05em\WaldiSymbol{58}\hss}%
+% \raise.09em\hbox{\kern.05em\WaldiSymbol{58}\kern.05em}]
+% \definesymbol [VHF] [\WaldiSymbol{64}]
+% \definesymbol [photon] [\hbox{\WaldiSymbol{58}\WaldiSymbol{58}\WaldiSymbol{58}\WaldiSymbol{58}}]
+% \definesymbol [gluon] [\hbox{\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}\WaldiSymbol{80}}]
+% \stopsymbolset
+
+% \startsymbolset [wasy apl]
+% \definesymbol [APLup] [\WaldiSymbol{0}]
+% \definesymbol [APLdown] [\WaldiSymbol{70}]
+% \definesymbol [APLbox] [\WaldiSymbol{126}]
+% \definesymbol [APLinv] [\dontleavehmode\hbox to \zeropoint{$\div$\hss}\WaldiSymbol{126}]
+% \definesymbol [APLleftarrowbox] [\WaldiSymbol{112}]
+% \definesymbol [APLrightarrowbox][\WaldiSymbol{113}]
+% \definesymbol [APLuparrowbox] [\WaldiSymbol{110}]
+% \definesymbol [APLdownarrowbox] [\WaldiSymbol{111}]
+% \definesymbol [APLinput] [\WaldiSymbol{125}]
+% \definesymbol [APLminus] [\dontleavehmode\raise.7ex\hbox{$-$}]
+% \definesymbol [APLlog] [\WaldiSymbol{22}]
+% \definesymbol [APLstar] [\WaldiSymbol{69}]
+% \definesymbol [APLcomment] [\WaldiSymbol{127}]
+% % \definesymbol [notslash] [\wasy@over{/}{-}]
+% % \definesymbol [notbackslash] [\wasy@over{\backslash}{-}]
+% % %
+% % %definesymbol [APLvert] [\WaldiSymbol{}]
+% % %definesymbol [APLnot] [\WaldiSymbol{}]
+% % %definesymbol [APLcirc] [\WaldiSymbol{}]
+% % %
+% % % HH: messy, best define all combinations (todo)
+% % %
+% % \def\APLnot #1{\wasy@over{\sim }{#1}}
+% % \def\APLcirc#1{\wasy@over{\circ}{#1}}
+% % \def\APLvert#1{\wasy@over{\vert}{#1}}
+% % %
+% \stopsymbolset
+
+\protect
+
+\continueifinputfile{symb-imp-was.mkiv}
+
+\usemodule[article-basic]
+
+\starttext
+
+\starttitle[title=Regular]
+
+ \startsubject[title={wasy general}] \showsymbolset[wasy general] \stopsubject
+ \startsubject[title={wasy music}] \showsymbolset[wasy music] \stopsubject
+ \startsubject[title={wasy astronomy}] \showsymbolset[wasy astronomy] \stopsubject
+ \startsubject[title={wasy astrology}] \showsymbolset[wasy astrology] \stopsubject
+ \startsubject[title={wasy geometry}] \showsymbolset[wasy geometry] \stopsubject
+
+\stoptitle
+
+\starttitle[title=Bold]
+
+ \startsubject[title={wasy general}] \start \bf \showsymbolset[wasy general] \stop \stopsubject
+ \startsubject[title={wasy music}] \start \bf \showsymbolset[wasy music] \stop \stopsubject
+ \startsubject[title={wasy astronomy}] \start \bf \showsymbolset[wasy astronomy] \stop \stopsubject
+ \startsubject[title={wasy astrology}] \start \bf \showsymbolset[wasy astrology] \stop \stopsubject
+ \startsubject[title={wasy geometry}] \start \bf \showsymbolset[wasy geometry] \stop \stopsubject
+
+\stoptitle
+
+
+% \startsubject[title={wasy physics}] \showsymbolset[wasy physics] \stopsubject
+% \startsubject[title={wasy apl}] \showsymbolset[wasy apl] \stopsubject
+
+\stoptext
+
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 4fec9a7f9..974b7c4df 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.07.09 18:13}
+\newcontextversion{2021.07.10 21:47}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 4339426be..efba80182 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2021.07.09 18:13}
+\immutable\edef\contextversion{2021.07.10 21:47}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/meta-fig.mkxl b/tex/context/base/mkxl/meta-fig.mkxl
index b8a22f6fe..8348dfbaf 100644
--- a/tex/context/base/mkxl/meta-fig.mkxl
+++ b/tex/context/base/mkxl/meta-fig.mkxl
@@ -42,13 +42,16 @@
[MPpage]
[\c!align=,
\c!command=\meta_process_graphic_command,
+ \c!stacking=,
\c!instance=]
\permanent\protected\def\setupMPpage
{\setupfittingpage[MPpage]}
\protected\def\meta_process_graphic_command
- {\meta_process_graphic_instance{\fittingpageparameter\c!instance}}
+ {\meta_process_graphic_instance
+ {\fittingpageparameter\c!instance}%
+ {\fittingpageparameter\c!stacking}}
%D \macros
%D {MPfigure}
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index def3900fe..8fca5d503 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -279,11 +279,12 @@
\meta_relocate_graphic
\popMPboundingbox}
-\protected\def\meta_process_graphic_instance#1%
+\protected\def\meta_process_graphic_instance#1#2% used in startMPpage
{\edef\currentMPinstance{#1}%
\ifempty\currentMPinstance
\let\currentMPinstance\defaultMPinstance
\fi
+ \setmpcategoryparameter\c!stacking{#2}%
\edef\currentMPformat{\MPinstanceparameter\s!format}%
\meta_process_graphic}
@@ -302,7 +303,7 @@
inclusions {\meta_flush_current_inclusions}%
definitions {\meta_flush_current_definitions}%
figure {\MPaskedfigure}%
- filtering {\mpcategoryparameter\c!list}
+ filtering {\mpcategoryparameter\c!stacking}
method {\MPinstanceparameter\c!method}%
namespace {\??graphicvariable\currentmpcategory:}%
\relax}%
@@ -661,7 +662,31 @@
\permanent\protected\def\meta_start_unique_graphic_indeed#1#2#3\stopuniqueMPgraphic
{\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_unique_graphic{#1}{#2}{#3}}}
-\permanent\tolerant\protected\def\uniqueMPgraphic#=#*#=%
+% \permanent\tolerant\protected\def\uniqueMPgraphic#=#*#=%
+% {\meta_begin_graphic_group{#1}%
+% \checkmpcategoryparent
+% \let\currentmpcategory\currentMPgraphicname
+% \setupcurrentmpcategory[#2]%
+% \begincsname\??mpgraphic#1\endcsname\empty
+% \meta_end_graphic_group}
+
+\permanent\tolerant\protected\def\uniqueMPgraphic
+ {\futureexpandis[\meta_uniquempgraphic_yes\meta_uniquempgraphic_nop}
+
+\def\meta_uniquempgraphic_yes[#1]#*#=%
+ {% ugly code but we run on top of older code
+ \letdummyparameter\c!instance\empty
+ \getdummyparameters[#1]%
+ \edef\currentMPinstance{\dummyparameter\c!instance}%
+ % here we feed the instance into the analyzer
+ \meta_begin_graphic_group{\ifempty\currentMPinstance\else\currentMPinstance::\fi#1}%
+ \checkmpcategoryparent
+ \let\currentmpcategory\currentMPgraphicname
+ \setupcurrentmpcategory[#1]%
+ \begincsname\??mpgraphic#2\endcsname\empty
+ \meta_end_graphic_group}
+
+\def\meta_uniquempgraphic_nop#=#*#=%
{\meta_begin_graphic_group{#1}%
\checkmpcategoryparent
\let\currentmpcategory\currentMPgraphicname
@@ -719,7 +744,51 @@
\protected\def\meta_start_reusable_graphic_indeed#1#2#3\stopreusableMPgraphic
{\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_reusable_graphic{#1}{#2}{#3}}}
-\permanent\tolerant\protected\def\useMPgraphic#=#*#=%
+% \permanent\tolerant\protected\def\useMPgraphic#=#*#=%
+% {\meta_begin_graphic_group{#1}%
+% \ifcsname\??mpgraphic#1\endcsname
+% \edef\currentmpcategory{#1}%
+% \orelse\ifcsname\??mpgraphic\currentMPgraphicname\endcsname
+% \let\currentmpcategory\currentMPgraphicname
+% \else
+% \let\currentmpcategory\empty
+% \fi
+% \ifempty\currentmpcategory
+% % message
+% \else
+% \checkmpcategoryparent
+% \doifsomething{#2}{\setupcurrentmpcategory[#2]}%
+% \csname\??mpgraphic\currentmpcategory\endcsname
+% \fi
+% \meta_end_graphic_group}
+
+\permanent\tolerant\protected\def\useMPgraphic
+ {\futureexpandis[\meta_usempgraphic_yes\meta_usempgraphic_nop}
+
+\def\meta_usempgraphic_yes[#1]#*#=%
+ {% ugly code but we run on top of older code
+ \letdummyparameter\c!instance\empty
+ \getdummyparameters[#1]%
+ \edef\currentMPinstance{\dummyparameter\c!instance}%
+ % here we feed the instance into the analyzer
+ \meta_begin_graphic_group{\ifempty\currentMPinstance\else\currentMPinstance::\fi#2}%
+ \ifcsname\??mpgraphic#2\endcsname
+ \edef\currentmpcategory{#2}%
+ \orelse\ifcsname\??mpgraphic\currentMPgraphicname\endcsname
+ \let\currentmpcategory\currentMPgraphicname
+ \else
+ \let\currentmpcategory\empty
+ \fi
+ \ifempty\currentmpcategory
+ % message
+ \else
+ \checkmpcategoryparent
+ \setupcurrentmpcategory[#1]%
+ \csname\??mpgraphic\currentmpcategory\endcsname
+ \fi
+ \meta_end_graphic_group}
+
+\def\meta_usempgraphic_nop#=#*#=%
{\meta_begin_graphic_group{#1}%
\ifcsname\??mpgraphic#1\endcsname
\edef\currentmpcategory{#1}%
@@ -892,7 +961,22 @@
%D
%D The most simple case:
-\permanent\tolerant\protected\def\startMPcode#=#:#2\stopMPcode
+% \permanent\tolerant\protected\def\startMPcode#=#:#2\stopMPcode
+% {\begingroup
+% \edef\currentMPinstance{#1}%
+% \ifempty\currentMPinstance
+% \let\currentMPinstance\defaultMPinstance
+% \fi
+% \let\currentMPgraphicname\empty
+% \edef\currentMPformat{\MPinstanceparameter\s!format}%
+% \meta_enable_include
+% \meta_process_graphic{#2}%
+% \endgroup}
+
+\permanent\tolerant\protected\def\startMPcode
+ {\futureexpandis[\meta_start_mpcode_yes\meta_start_mpcode_nop}
+
+\tolerant\def\meta_start_mpcode_nop#:#=#:#2\stopMPcode
{\begingroup
\edef\currentMPinstance{#1}%
\ifempty\currentMPinstance
@@ -904,6 +988,22 @@
\meta_process_graphic{#2}%
\endgroup}
+\def\meta_start_mpcode_yes[#1]#2\stopMPcode
+ {\begingroup
+ \letdummyparameter\c!instance\empty
+ \letdummyparameter\c!stacking\empty
+ \getdummyparameters[#1]%
+ \edef\currentMPinstance{\dummyparameter\c!instance}%
+ \setmpcategoryparameter\c!stacking{\dummyparameter\c!stacking}%
+ \ifempty\currentMPinstance
+ \let\currentMPinstance\defaultMPinstance
+ \fi
+ \let\currentMPgraphicname\empty
+ \edef\currentMPformat{\MPinstanceparameter\s!format}%
+ \meta_enable_include
+ \meta_process_graphic{#2}%
+ \endgroup}
+
\permanent\protected\lettonothing\stopMPcode
%D This one is not optimized because it's only used for small snippets, if it
diff --git a/tex/context/base/mkxl/mlib-pdf.lmt b/tex/context/base/mkxl/mlib-pdf.lmt
index 11f211b2b..58a1129eb 100644
--- a/tex/context/base/mkxl/mlib-pdf.lmt
+++ b/tex/context/base/mkxl/mlib-pdf.lmt
@@ -388,7 +388,7 @@ function metapost.flush(specification,result)
local textfigure = flusher.textfigure
-- local processspecial = flusher.processspecial or metapost.processspecial
local tocomment = flusher.tocomment
- if type(filtering) ~= "table" then
+ if type(filtering) ~= "table" or not next(filtering) then
filtering = false
end
-- patterns: we always use image 1 and then can use patterns for 2..n (or one number)
diff --git a/tex/context/base/mkxl/mlib-pps.lmt b/tex/context/base/mkxl/mlib-pps.lmt
index 7790f0f23..cea8a179d 100644
--- a/tex/context/base/mkxl/mlib-pps.lmt
+++ b/tex/context/base/mkxl/mlib-pps.lmt
@@ -6,6 +6,7 @@ if not modules then modules = { } end modules ['mlib-pps'] = {
license = "see context related readme files",
}
+local next = next
local format, gmatch, match, split, gsub = string.format, string.gmatch, string.match, string.split, string.gsub
local tonumber, type, unpack, next, select = tonumber, type, unpack, next, select
local round, sqrt, min, max, abs = math.round, math.sqrt, math.min, math.max, math.abs
@@ -592,9 +593,13 @@ function metapost.graphic_base_pass(specification)
top.data = data
top.initializations = initializations
if filtering then
- local t = { }
- stepper(filtering,function(k) t[k] = true end)
- filtering = t
+ if #filtering > 0 then
+ local t = { }
+ stepper(filtering,function(k) t[k] = true end)
+ filtering = next(t) and t or false
+ else
+ filtering = false
+ end
end
if trace_runs then
report_metapost("running job %s, asked figure %a",nofruns,askedfig)
@@ -1558,15 +1563,19 @@ end
-- groups
local function getcorners(path)
- local p1 = path[1]
- local p2 = path[2]
- local p3 = path[3]
- local p4 = path[4]
- return
- min(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord),
- min(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord),
- max(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord),
- max(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord)
+-- if #path == 1 then
+-- return 0, 0, 0, 0
+-- else
+ local p1 = path[1]
+ local p2 = path[2]
+ local p3 = path[3]
+ local p4 = path[4]
+ return
+ min(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord),
+ min(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord),
+ max(p1.x_coord,p2.x_coord,p3.x_coord,p4.x_coord),
+ max(p1.y_coord,p2.y_coord,p3.y_coord,p4.y_coord)
+-- end
end
local function gr_process(object,prescript,before,after)
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index c13e5eaef..15e349330 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -16,13 +16,77 @@
%D this loader is found in \type {syst-tex.tex}. Some of the comment's are Don
%D Knuths and more of it can be found in the plain \TEX\ format.
%D
+%D Successive versions will be adapted to \LUAMETATEX. That also means that we
+%D define things a bit differently than in \MKII\ and \MKIV. This is party due to
+%D the fact that in this engine we removed some side effects or added features. The
+%D original \TEX\ program is well defined and documented and is still the benchmark.
+%D The \ETEX\ extensions originally were meant as systematic follow up but that
+%D never went beyond a first upgrade. It had a dual mode: compatible or extensible.
+%D We always used the second mode. The \LUATEX\ engines don't have that.
+%D
+%D There are some hard coded properties that relate to for instance node types but
+%D we always used abstraction. There are also side effects that (probably) originate
+%D in the fact that \ETEX\ had to stay compatible with the dominant set of macros
+%D using the original \TEX\ ones (either or not wrapped). Even unwanted side effects
+%D eventually become features. In\LUATEX\ and even more in \LUAMETATEX\ we get
+%D around that by additional mode variables that you can find below.
+%D
+%D Side note: those who complain about \TEX\ as rather special language, \ETEX\
+%D extensions that should have been or be different, should really look into how
+%D \TEX\ and friends evolved, and not come to quick and wrong conclusions. There are
+%D only a very few languages that evolve this way. As a comparison one can wonder
+%D why \CCODE\ never had proper strings like \PASCAL\ bit it's just hindsight and
+%D discussing it has no use. In a similar fashion one should keep in mind that what
+%D you see here is just a logical follow up in \MKII\ where we had to bend the rules
+%D and \MKIV\ where we had a bit more available. Not many who look at the latest
+%D engines had to jump though all the hoops.
+%D
+%D This is for instance noticeable in the names of some primitvies: \CONTEXT\ has a
+%D concept of protection before \type {\protected} showed up, and similarly had
+%D expansion helpers. This is why in \MKII\ you find \type {\protected}, \type
+%D {\expanded}, and \type {\unexpanded} commands with different meanings than the
+%D later \ETEX\ primitives. In \MKIV\ we stuck to the \CONTEXT\ originals and use
+%D \type {\normal...} ones when needed (so \type {\normal...} is there for a
+%D reason!). In \LMTX\ we made the transition from \type {\unexpanded} to \type
+%D {\protected} so again this file looks different than the \MKIV\ ancestor.
+%D
+%D When primitives get initialized they come from the \TEX\ namespace (the
+%D originals), the \ETEX\ extensions (although we dropped some) and \LUATEX\ which
+%D includes the \LUAMETATEX\ ones. The most noticeable \ETEX\ extensions we kept are
+%D those that relate to expansion and the expression scanners. The last group has
+%D always been somewhat special because (we were told) it was modelled after a macro
+%D set so it had to be compatible. It is tempting to replace it (and eventually I
+%D might do that) but for now we stick to them (although with an integer divide
+%D extension (like the \LUA\ \type {//} and the source has commented binary
+%D operators but I haven't yet decided on the symbols to use because we need to
+%D avoid expansion issues). For the record: the more extensive, related to \ETEX\
+%D follow up \NTS\ never took of, probably because of the implementation language
+%D and because performance made it unuseable. This is also why \LUATEX\ took a
+%D different route: extending by an extension language. Of course in the end some
+%D core functionality got added too.
+%D
+%D The most noticeable \LUAMETATEX\ specific code here has to do with additional
+%D data types (integer and dimension constants) and macro argument extensions. We
+%D also set up some defaults in handling math, languages, etc. Elsewhere in the
+%D \CONTEXT\ source the real configuration and usage happens so don't consider this
+%D an tutorial (as the plain format is).
+%D
+%D Category codes are another areas where subtle changed happened. You might not
+%D grasp it (maybe because \CONTEXT\ is alien to you) but whenever you see something
+%D that looks weird keep in mind that there is a valid reason for it.
+%D
+%D In due time I will add some more comments here, also because some \CONTEXT\
+%D users might be interested in the hostiry. Now to the code!
+
%D Characters can have special states, that can be triggered by setting their
%D category coded. Some are preset, others are to be set as soon as possible,
%D otherwise we cannot define any useful macros.
%D
%D First we define a bunch of constants. Normally we would \type {\setconstant}
%D but we're prestine and have no macros defined yet. Abstraction also makes it
-%D possible to avoid the \type {^^} in the input.
+%D possible to avoid the \type {^^} in the input. We no longer define the \ETEX\
+%D nodes here (we have not only more, but also different numbers) so we do it
+%D elsewhere.
% cheatsheet
%
@@ -311,7 +375,10 @@
%D consecutive ranges more easily, for instance if for \MPLIB\ we want to allocate a
%D continuous range of boxes. It also permits us to do a proper upward allocation
%D for inserts. The current code evolved from code that dealt with older engines but
-%D as all engines now provide many registers we removed all traces.
+%D as all engines now provide many registers we removed all traces. If you ever run
+%D into the \MKII\ \type {mptopdf} code, you'll notice that some register magic was
+%D needed to fit into existing macro packages. The same is true for \PICTEX\ that we
+%D used in (gheneric) \PPCHTEX.
\ifdefined\writestatus \else
%\protected\def\writestatus#1#2{\immediate\write\statuswrite{#1: #2}}
@@ -563,8 +630,8 @@
{\showboxdepth \plusthree
\showboxbreadth\plusfive}
-%D Some expected plain variants follow. We don't reuse registers because we
-%D don't want clashes.
+%D Some expected plain variants follow. We don't reuse registers because we don't
+%D want clashes. These will go away and packages that need them have to define them.
\aliased\let\p@ \onepoint
\aliased\let\m@ne \minusone
@@ -639,9 +706,12 @@
\newif\ifscratchconditionone
\newif\ifscratchconditiontwo
+%D This used to be a protected definition with a \type {dimexpr} but now we have
+%D it natively (less tracking noise).
+
\aliased\let\htdp\boxtotal
-%D A few shortcuts:
+%D A few shortcuts (gone by now):
% \permanent\protected\def\udef {\protected\def }
% \permanent\protected\def\ugdef{\protected\gdef}
@@ -660,7 +730,7 @@
\permanent\protected\def\defUmathchar #1#2#3#4{\global\immutable\Umathchardef #1 "#2 "#3 "#4 }
%D For a while we keep the following, as systems like tikz need it. Best not use
-%D that one \CONTEXT.
+%D that one \CONTEXT. It will probably move to the tikz loader.
\aliased\let\active\activecatcode
@@ -1177,7 +1247,7 @@
{\ifflags#2\permanent\permanent\fi % the rest is taken with the copy
\def#1{\syst_suggested_alias#1#2}}
-% A few traditional allocations (these might go):
+% A few traditional allocations (these might go too):
% \countdef \count@ 255 % hm, used in \newif .. todo: replace it there
% \dimendef \dimen@ 0
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 43db8cfc1..db0dee470 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -1242,6 +1242,7 @@
<cd:constant name='splitoffset' value='splitoffset'/>
<cd:constant name='spot' value='spot'/>
<cd:constant name='stack' value='stack'/>
+ <cd:constant name='stacking' value='stacking'/>
<cd:constant name='stackname' value='stackname'/>
<cd:constant name='start' value='inizia'/>
<cd:constant name='starter' value='starter'/>