ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* problem with the parshape example (metafun manual)
@ 2000-11-05 21:45 Denis B. Roegel
  2000-11-05 21:49 ` Denis B. Roegel
  0 siblings, 1 reply; 4+ messages in thread
From: Denis B. Roegel @ 2000-11-05 21:45 UTC (permalink / raw)
  Cc: roegel

When I compile the appended example with texexec --pdf,
mpost is not called and each shape is collapsed.
Moreover, tracing doesn't work either.
There is no error in the pdftex run, nor in any other place
I checked. Maybe there is a problem in the txt macros?

Thanks,

Denis

\useMPlibrary[txt]
\setupcolors[state=start]
\starttext

\startuseMPgraphic{text 1}
  path p ; p := fullcircle scaled 6cm;
  build_parshape(p,6pt,0,0,\baselinedistance,
    \strutheight,\strutdepth,\strutheight);
  draw p withpen pencircle scaled 1pt;
\stopuseMPgraphic

\startuseMPgraphic{text 2}
  path p ; p := fullsquare rotated 45 scaled 5cm;
  build_parshape(p,6pt,0,0,\baselinedistance,
    \strutheight,\strutdepth,\strutheight);
  draw p withpen pencircle scaled 1pt;
\stopuseMPgraphic

\startuseMPgraphic{text 3}
  numeric w, h; w:=h:=6cm;
  path p ; p := (.5w,h)--(0,h)--(w,0) &
    (w,0)..(.75w,.5h)..(w,h) & (w,h) -- cycle;
  build_parshape(p,6pt,0,0,\baselinedistance,
    \strutheight,\strutdepth,\strutheight);
  draw p withpen pencircle scaled 1pt;
\stopuseMPgraphic

\startuseMPgraphic{text 4}
  numeric w, h, o; 

  def shape = (o,o)--(w-o,o) & (w-o,o) .. (.75w-o,.5h) ..
    (w-2o,h-o) & (w-2o,h-o) -- (o,h-o) --cycle
  enddef;

  w := h := 6cm; o := 6pt; path p; p := shape;
  w := h := 6cm; o := 0pt; path q; q := shape;

  build_parshape(p,q,6pt,6pt,\baselinedistance,
    \strutheight,\strutdepth,\strutheight);
  draw q withpen pencircle scaled 1pt;
\stopuseMPgraphic

\defineoverlay[test 1][\useMPgraphic{test 1}]
\defineoverlay[test 2][\useMPgraphic{test 2}]
\defineoverlay[test 3][\useMPgraphic{test 3}]
\defineoverlay[test 4][\useMPgraphic{test 4}]

\startshapetext[test 1,test 2,test 3,test 4]
\dorecurse{100}{something long }
%  \input douglas % Douglas R. Hofstadter
\stopshapetext

\startbuffer
\setupframed
  [offset=overlay,align=normal,frame=off,
   width=\parwidth,height=\parheight]
\startcombination[2*2]
  {\framed[background=test 1]{\getshapetext}}{test 1}
  {\framed[background=test 2]{\getshapetext}}{test 2}
  {\framed[background=test 3]{\getshapetext}}{test 3}
  {\framed[background=test 4]{\getshapetext}}{test 4}
\stopcombination
\stopbuffer

\placefigure
  [here][fig:shapes]
  {A continuous text, typeset in a non||standard shape,
   spread over four areas, and right aligned.}
  {%\startMPinclusions
   %boolean trace_parshape; trace_parshape := true;
   %\stopMPinclusions
   \getbuffer}

\stoptext


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-11-06 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-05 21:45 problem with the parshape example (metafun manual) Denis B. Roegel
2000-11-05 21:49 ` Denis B. Roegel
2000-11-06 11:21   ` Christopher Tipper
2000-11-06 12:26     ` 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).