From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40346 Path: news.gmane.org!not-for-mail From: "Yue Wang" Newsgroups: gmane.comp.tex.context Subject: Homework for Hans and Taco Date: Wed, 16 Apr 2008 21:34:13 +0800 Message-ID: <68bfdc900804160634g728b994q9ef05234308adc6b@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208353616 4737 80.91.229.12 (16 Apr 2008 13:46:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2008 13:46:56 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Apr 16 15:47:29 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1Jm7o7-00022e-EJ for gctc-ntg-context-518@m.gmane.org; Wed, 16 Apr 2008 15:36:15 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0832B1FD88; Wed, 16 Apr 2008 15:35:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09521-01-2; Wed, 16 Apr 2008 15:34:51 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 313811FD38; Wed, 16 Apr 2008 15:34:51 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 59EAF1FD0A for ; Wed, 16 Apr 2008 15:34:49 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09523-01 for ; Wed, 16 Apr 2008 15:34:14 +0200 (CEST) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by ronja.ntg.nl (Postfix) with ESMTP id 0EDF91FD7E for ; Wed, 16 Apr 2008 15:34:13 +0200 (CEST) Original-Received: by fg-out-1718.google.com with SMTP id e12so2254622fga.8 for ; Wed, 16 Apr 2008 06:34:13 -0700 (PDT) Original-Received: by 10.86.66.19 with SMTP id o19mr152510fga.10.1208352853496; Wed, 16 Apr 2008 06:34:13 -0700 (PDT) Original-Received: by 10.86.87.1 with HTTP; Wed, 16 Apr 2008 06:34:13 -0700 (PDT) Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40346 Archived-At: Hi, Exactly the same input as described in the metafont manual. \starttext Hello world! \useMPlibrary[txt] \startuseMPgraphic{test 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{test 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{test 3} numeric w, h ; w := h := 6cm ; path p ; p := (.5w,h) -- (0,h) -- (0,0) -- (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{test 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] \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 alligned.} {\getbuffer} \stoptext Yue Wang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________