summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-11-08 23:59:48 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-11-08 23:59:48 +0100
commit3c5bdb02c68293a907c765f109641c3939c13f6c (patch)
tree59d2539750f6bf7daabf9546323b9a9087e992ec /tex/context/modules/mkiv
parent75fbb107b15d01179a4b772844144e0661240e77 (diff)
downloadcontext-3c5bdb02c68293a907c765f109641c3939c13f6c.tar.gz
2017-11-08 22:50:00
Diffstat (limited to 'tex/context/modules/mkiv')
-rw-r--r--tex/context/modules/mkiv/m-three.mkiv72
-rw-r--r--tex/context/modules/mkiv/x-setups-basics.mkiv1
2 files changed, 73 insertions, 0 deletions
diff --git a/tex/context/modules/mkiv/m-three.mkiv b/tex/context/modules/mkiv/m-three.mkiv
new file mode 100644
index 000000000..c8ff2167a
--- /dev/null
+++ b/tex/context/modules/mkiv/m-three.mkiv
@@ -0,0 +1,72 @@
+%D \module
+%D [ file=m-three,
+%D version=2017.11.08,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=\METAPOST\ pseudo-3D module support,
+%D author=Hans Hagen and Alan Braslau,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%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
+
+\defineMPinstance
+ [three]
+ [\s!format=metafun,
+ \s!extensions=\v!yes,
+ \s!initializations=\v!yes,
+ \c!method=\s!double]
+
+\startMPdefinitions{three}
+ loadmodule "tres" ;
+\stopMPdefinitions
+
+\protect
+
+\continueifinputfile{m-three.mkiv}
+
+%D We put this test here as in \type {meta-tex.mkiv} it would abort due to redefinition
+%D of namespaces.
+
+\starttext
+
+%D Alan: we need to make a fill example:
+
+\startMPpage[instance=three]
+ path f ; f := (
+ projection Origin --
+ projection (1,0,0) --
+ projection (1,1,0) --
+ projection (0,1,0) --
+ projection (0,1,1) --
+ projection (1,1,1) --
+ projection (1,0,1) --
+ projection (0,0,1) --
+ cycle
+ ) scaled 5cm ;
+
+ fill f withcolor "darkred" ;
+
+ path p ; p := (
+ projection Origin --
+ projection (1,0,0) --
+ projection (1,1,0) --
+ projection (0,1,0) --
+ projection (0,1,1) --
+ projection (1,1,1) --
+ projection (1,0,1) --
+ projection (0,0,1) --
+ cycle
+ ) scaled 5cm ;
+
+ draw p withcolor .5white ;
+
+ for i=0 upto length p :
+ draw point i of p withpen currentpen scaled 2mm withcolor "lightblue" ;
+ endfor ;
+\stopMPpage
+
+\stoptext
diff --git a/tex/context/modules/mkiv/x-setups-basics.mkiv b/tex/context/modules/mkiv/x-setups-basics.mkiv
index f3c5d2d53..6975df684 100644
--- a/tex/context/modules/mkiv/x-setups-basics.mkiv
+++ b/tex/context/modules/mkiv/x-setups-basics.mkiv
@@ -508,6 +508,7 @@
\edef\m_cmd_instance{\expandafter\secondoftwoarguments\cmd_id}%
\fi
\xmlsetup{\expandafter\firstoftwoarguments\cmd_id}{xml:setups:typeset}
+ \let\m_cmd_instance\empty
\fi
\stopelement
\stopelement}