blob: c3c6f769b0e910029cfa00acf4bbddcb93eb4985 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
%D \module
%D [ file=m-pstricks,
%D version=2010.03.14,
%D title=\CONTEXT\ Extra Modules,
%D subtitle=\PSTRICKS\ Connections,
%D author=Hans Hagen,
%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.
%D We don't support \PSTRICKS\ in \LMTX. In \MKIV\ it was already doen by calling
%D \PDFTEX\ and going the \POSTSCRIPT\ route. We could actually support it sort of
%D integrated if it were just graphics but I suppose fonts will make it a mess not
%D worth the trouble. One can always use \MKII\ directly if needed to make graphics
%D that get included as \PDF.
\ifcase\contextlmtxmode \else
\writestatus{modules}{the PStricks graphic system is not supported in LMTX}
\expandafter \endinput
\fi
\registerctxluafile{m-pstricks}{}
\unprotect
% best we can make a special colors module
%
% \let\@unused\plussixteen
% \let\alloc@ \gobblefivearguments
%
% \def\loadpstrickscolors#1%
% {\pushmacro\dodefinecolor
% \pushmacro\dodefinepalet
% \pushmacro\dodefinecolorgroup
% \def\dodefinecolor[##1][##2]%
% {\doifassignmentelse{##2}
% {\getparameters[pstricks][r=0,g=0,b=0,##2]%
% \expanded{\newrgbcolor{##1}{{\pstricksr} {\pstricksg} {\pstricksb}}}}%
% {}}%
% \def\dodefinepalet [##1][##2]{}%
% \def\dodefinecolorgroup[##1][##2][##3]{}%
% \writestatus{pstricks}{loading colors from #1}%
% \input #1 \relax
% \popmacro\dodefinecolorgroup
% \popmacro\dodefinepalet
% \popmacro\dodefinecolor}
%
% \input multido \relax
% \input pstricks \relax
% \input pst-plot \relax
%
% \loadpstrickscolors{colo-rgb}
\definebuffer[PSTRICKS]
\unexpanded\def\processPSTRICKS {\ctxlua{moduledata.pstricks.process(\thebuffernumber{PSTRICKS})}}
\unexpanded\def\usePSTRICKSmodule[#1]{\ctxlua{moduledata.pstricks.usemodule("#1")}}
\unexpanded\def\setPSTRICKS #1{\setbuffer[def-\thebuffernumber{PSTRICKS}]#1\endbuffer}
\let\stopPSTRICKS\processPSTRICKS
%D \starttyping
%D \usemodule[pstricks]
%D \usePSTRICKSmodule[pst-barcode]
%D
%D \startPSTRICKS
%D \pspicture(-4mm,-1mm)(38mm,26mm)
%D \psbarcode{9781860742712}{includetext guardwhitespace}{ean13}%
%D \endpspicture
%D \stopPSTRICKS
%D \stoptyping
\protect \endinput
|