m-tikz.mkiv /size: 2698 b    last modification: 2021-10-28 13:51
1%D \module
2%D   [       file=m-tikz,
3%D        version=2021.07.12,
4%D          title=\CONTEXT\ Extra Modules,
5%D       subtitle=TIKZ support,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14%D A fixed variant of the t-tikz module distributed with tikz. For
15%D practical reasons per 2021 we split the module for \MKIV\ and
16%D \LMTX. (Maybe some day I'll optimize TIKZ a bit.)
17
18\ifdefined\pdflastxpos \else
19    \unprotect
20        \frozen\overloaded\protected\def\pdflastxpos{\numexpr\clf_lastxpos\relax}
21        \frozen\overloaded\protected\def\pdflastypos{\numexpr\clf_lastypos\relax}
22    \protect
23\fi
24
25\pushcatcodetable
26
27    \setcatcodetable\texcatcodes
28
29    \catcode`\@=11
30    \catcode`\|=12
31    \catcode`\!=12
32
33    \input t-pgf.tex
34    \input t-pgffor.tex
35    \input tikz.code.tex
36
37\popcatcodetable
38
39\permanent\protected\def\tikzerrormessage#1#2#3%
40  {\writestatus{#1}{#2}}
41
42\let\starttikzsettings\relax
43\let\stoptikzsettings \relax
44
45\protected\def\starttikzpicture
46  {% \dontleavehmode
47   \begingroup
48   \ifdefined\PackageError\else \let\PackageError\tikzerrormessage \fi
49   \tikzpicture}
50
51\protected\def\stoptikzpicture
52  {\endtikzpicture
53   \endgroup}
54
55% \input t-pgf.tex
56
57\ifx\pgfdefined\undefined
58
59    \let\pgfdefined\relax
60
61   % \input t-pgfcor.tex
62
63    \ifx\pgfcoredefined\undefined
64
65        \let\pgfcoredefined=\relax
66
67        \input t-pgfsys.tex
68
69        \edef\pgfcoreatcode     {\the\catcode`\@}
70        \edef\pgfcorebarcode    {\the\catcode`\|}
71        \edef\pgfcoreexclaimcode{\the\catcode`\!}
72
73        \catcode`\@=11
74        \catcode`\|=12
75        \catcode`\!=12
76
77        \input pgfcore.code.tex
78
79        \catcode`\@=\pgfcoreatcode
80        \catcode`\|=\pgfcorebarcode
81        \catcode`\!=\pgfcoreexclaimcode
82
83        \let\startpgfpicture             \pgfpicture              \let\stoppgfpicture            \endpgfpicture
84        \let\startpgfscope               \pgfscope                \let\stoppgfscope              \endpgfscope
85        \let\startpgflowlevelscope       \pgflowlevelscope        \let\stoppgflowlevelscope      \endpgflowlevelscope
86        \let\startpgfinterruptpath       \pgfinterruptpath        \let\stoppgfinterruptpath      \endpgfinterruptpath
87        \let\startpgfinterruptpicture    \pgfinterruptpicture     \let\stoppgfinterruptpicture   \endpgfinterruptpicture
88        \let\startpgfinterruptboundingbox\pgfinterruptboundinbox  \let\stoppgfinterruptboudingbox\endpgfinterruptboundingbox
89
90    \fi
91
92    \usepgfmodule[shapes,plot]
93
94\fi
95
96\stopmodule
97