* Instructions for m-pstric
@ 2003-08-08 20:58 John Culleton
2003-08-08 22:03 ` Nigel King
2003-08-11 8:39 ` Hans Hagen
0 siblings, 2 replies; 4+ messages in thread
From: John Culleton @ 2003-08-08 20:58 UTC (permalink / raw)
Since I was mentioned in the code for this module I make bold to ask
this question =)
Exactly how is this module employed to enable PStricks statements to
be used in a Context job?
Alternatively, in MPFun, how might one surround the text on a page by
a border running symmetrically around the edge, a certain distance in
from the page edges? I know how I would do it in PSTricks but not in
Metapost/Metafun. A recent memoir by Norman Mailer has a broad gray
border with a thin black border just inside it on the title page. Very
spiffy.
--
John Culleton
Able Typesetters and Indexers
http://wexfordpress.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Instructions for m-pstric
2003-08-08 20:58 Instructions for m-pstric John Culleton
@ 2003-08-08 22:03 ` Nigel King
2003-08-11 8:51 ` Hans Hagen
2003-08-11 8:39 ` Hans Hagen
1 sibling, 1 reply; 4+ messages in thread
From: Nigel King @ 2003-08-08 22:03 UTC (permalink / raw)
John,
I did this to simulate a picture frame. Looking at it now I am sure it could
be simplified.
\setupoutput[pdftex]
\setupcolors[state=start]
\startreusableMPgraphic{bg}
StartPage ;
z11 = ulcorner Page ;
z12 = urcorner Page ;
z13 = lrcorner Page ;
z14 = llcorner Page ;
z91 = (-1, 1.414) ;
z92 = ( 1, 1.414) ;
z93 = ( 1,-1.414) ;
z94 = (-1,-1.414) ;
z21 = z11 - 16z91 ;
z22 = z12 - 16z92 ;
z23 = z13 - 16z93 ;
z24 = z14 - 16z94 ;
z31 = z21 - 6z91 ;
z32 = z22 - 6z92 ;
z33 = z23 - 6z93 ;
z34 = z24 - 6z94 ;
fill z11--z12--z13--z14--z11--z21--z24--z23--z22--z21--cycle withcolor
yellow ;
fill z21--z22--z32--z31--cycle withcolor .9white ;
fill z22--z23--z33--z32--cycle withcolor .8white ;
fill z23--z24--z34--z33--cycle withcolor .9white ;
fill z24--z21--z31--z34--cycle withcolor .8white ;
StopPage ;
\stopreusableMPgraphic
\defineoverlay
[bg]
[\reuseMPgraphic{bg}]
\setupbackgrounds
[page]
[background={bg}]
\starttext
\dorecurse{3}{\input knuth}
\stoptext
--
Nigel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Instructions for m-pstric
2003-08-08 20:58 Instructions for m-pstric John Culleton
2003-08-08 22:03 ` Nigel King
@ 2003-08-11 8:39 ` Hans Hagen
1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2003-08-11 8:39 UTC (permalink / raw)
At 16:58 08/08/2003 -0400, you wrote:
>Since I was mentioned in the code for this module I make bold to ask
>this question =)
>Exactly how is this module employed to enable PStricks statements to
>be used in a Context job?
see m-pstric.tex
>Alternatively, in MPFun, how might one surround the text on a page by
>a border running symmetrically around the edge, a certain distance in
>from the page edges? I know how I would do it in PSTricks but not in
>Metapost/Metafun. A recent memoir by Norman Mailer has a broad gray
>border with a thin black border just inside it on the title page. Very
>spiffy.
\startuniqueMPgraphic{textborder}
draw OverlayBox enlarged 3pt ;
\stopuniqueMPgraphic
\defineoverlay[textborder][\uniqueMPgraphic{textborder}]
\setupbackgrounds[text][background=textborder]
etc etc
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Instructions for m-pstric
2003-08-08 22:03 ` Nigel King
@ 2003-08-11 8:51 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2003-08-11 8:51 UTC (permalink / raw)
Hi Nigel,
how about:
>\setupoutput[pdftex]
>\setupcolors[state=start]
>
>\startreusableMPgraphic{bg}
> StartPage ;
> z11 = ulcorner Page ;
> z12 = urcorner Page ;
> z13 = lrcorner Page ;
> z14 = llcorner Page ;
> z91 = (-1, 1.414) ;
> z92 = ( 1, 1.414) ;
> z93 = ( 1,-1.414) ;
> z94 = (-1,-1.414) ;
> z21 = z11 - 16z91 ;
> z22 = z12 - 16z92 ;
> z23 = z13 - 16z93 ;
> z24 = z14 - 16z94 ;
> z31 = z21 - 6z91 ;
> z32 = z22 - 6z92 ;
> z33 = z23 - 6z93 ;
> z34 = z24 - 6z94 ;
> fill z11--z12--z13--z14--z11--z21--z24--z23--z22--z21--cycle withcolor
>yellow ;
> fill z21--z22--z32--z31--cycle withcolor .9white ;
> fill z22--z23--z33--z32--cycle withcolor .8white ;
> fill z23--z24--z34--z33--cycle withcolor .9white ;
> fill z24--z21--z31--z34--cycle withcolor .8white ;
> StopPage ;
>\stopreusableMPgraphic
\startreusableMPgraphic{bg}
StartPage ;
fill Page enlarged 1mm withcolor yellow ; % bleed
path p ; p := Page enlarged -5mm ;
path q ; q := Page enlarged -10mm ;
fill q withcolor white ;
drawoptions(withcolor red) ;
fill reverse topboundary q -- topboundary p -- cycle ;
fill reverse bottomboundary q -- bottomboundary p -- cycle ;
drawoptions(withcolor green) ;
fill reverse leftboundary q -- leftboundary p -- cycle ;
fill reverse rightboundary q -- rightboundary p -- cycle ;
StopPage ;
\stopreusableMPgraphic
>\defineoverlay
> [bg]
> [\reuseMPgraphic{bg}]
>
>\setupbackgrounds
> [page]
> [background={bg}]
>
>\starttext
>\dorecurse{3}{\input knuth}
>\stoptext
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-08-11 8:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 20:58 Instructions for m-pstric John Culleton
2003-08-08 22:03 ` Nigel King
2003-08-11 8:51 ` Hans Hagen
2003-08-11 8:39 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).