summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/meta-imp-pre.mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-12 17:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-12 17:15:07 +0100
commit8d8d528d2ad52599f11250cfc567fea4f37f2a8b (patch)
tree94286bc131ef7d994f9432febaf03fe23d10eef8 /tex/context/base/mkiv/meta-imp-pre.mkiv
parentf5aed2e51223c36c84c5f25a6cad238b2af59087 (diff)
downloadcontext-8d8d528d2ad52599f11250cfc567fea4f37f2a8b.tar.gz
2016-01-12 16:26:00
Diffstat (limited to 'tex/context/base/mkiv/meta-imp-pre.mkiv')
-rw-r--r--tex/context/base/mkiv/meta-imp-pre.mkiv68
1 files changed, 68 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/meta-imp-pre.mkiv b/tex/context/base/mkiv/meta-imp-pre.mkiv
new file mode 100644
index 000000000..098be030b
--- /dev/null
+++ b/tex/context/base/mkiv/meta-imp-pre.mkiv
@@ -0,0 +1,68 @@
+%D \module
+%D [ file=meta-pre,
+%D version=2001.03.21,
+%D title=\METAPOST\ Graphics,
+%D subtitle=Predefined Goodies,
+%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 In this library, we define a couple of handy graphics.
+
+% todo: use the predefine grid macros, mp code will move to
+% mp-* file
+
+\startuseMPgraphic{pagegrid}
+ StartPage ;
+ drawoptions(withcolor .8white) ;
+ fill Field[Text][Text] ;
+ drawoptions(withcolor .65white) ;
+ fill Field[Footer][Text] ;
+ fill Field[Header][Text] ;
+ fill Field[LeftMargin][Text] ;
+ fill Field[RightMargin][Text] ;
+ drawoptions(withcolor .65yellow) ;
+ fill Field[LeftEdge][Text] ;
+ fill Field[RightEdge][Text] ;
+ fill Field[Bottom][Text] ;
+ fill Field[Top][Text] ;
+ drawoptions(withpen pencircle scaled .3pt withcolor .65white) ;
+ for i=-3cm step 1cm until PaperWidth+3cm :
+ draw (i,-3cm)--(i,PaperHeight+3cm) ;
+ endfor ;
+ for i=PaperHeight+3cm step -1cm until -3cm :
+ draw (-3cm,i)--(PaperWidth+3cm,i) ;
+ endfor ;
+ drawoptions(withpen pencircle scaled .15pt) ;
+ for i=.5cm-3cm step 1cm until PaperWidth+3cm :
+ draw (i,-3cm)--(i,PaperHeight+3cm) ;
+ endfor ;
+ for i=PaperHeight-.5cm+3cm step -1cm until -3cm :
+ draw (-3cm,i)--(PaperWidth+3cm,i) ;
+ endfor ;
+ drawoptions(withpen pencircle scaled .3pt withcolor .65red) ;
+ for i=0 step 1cm until PaperWidth :
+ draw (i,0)--(i,PaperHeight) ;
+ endfor ;
+ for i=PaperHeight step -1cm until 0 :
+ draw (0,i)--(PaperWidth,i) ;
+ endfor ;
+ drawoptions(withpen pencircle scaled .15pt withcolor .65red) ;
+ for i=.5cm step 1cm until PaperWidth :
+ draw (i,0)--(i,PaperHeight) ;
+ endfor ;
+ for i=PaperHeight-.5cm step -1cm until 0 :
+ draw (0,i)--(PaperWidth,i) ;
+ endfor ;
+ drawoptions(withpen pencircle scaled 5pt withcolor .65red) ;
+ draw ulcorner Page ;
+ StopPage ;
+\stopuseMPgraphic
+
+\defineoverlay[pagegrid][\useMPgraphic{pagegrid}]
+
+\endinput