From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83087 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: [***SPAM***] Scaling large (annotated) MetaFun drawing Date: Tue, 18 Jun 2013 23:43:00 +0200 Message-ID: <51C0D464.5050006@wxs.nl> References: <20130618131313.GA10396@haridwar> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1371591796 17967 80.91.229.3 (18 Jun 2013 21:43:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2013 21:43:16 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 18 23:43:18 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Up3gL-0008Dy-JP for gctc-ntg-context-518@m.gmane.org; Tue, 18 Jun 2013 23:43:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4697710207; Tue, 18 Jun 2013 23:43:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OceeLPwjY3M1; Tue, 18 Jun 2013 23:43:15 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 5787F101F5; Tue, 18 Jun 2013 23:43:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DA5F4101F5 for ; Tue, 18 Jun 2013 23:43:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oIrv8YfsDFbH for ; Tue, 18 Jun 2013 23:43:13 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id B1D34101EE for ; Tue, 18 Jun 2013 23:43:03 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5ILh220007347 for ; Tue, 18 Jun 2013 23:43:03 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.104; Original-Received: from [10.100.1.104] (unverified [10.100.1.104]) by pragma-net.nl (SurgeMail 6.3c2) with ESMTP id 8231-1713362 for ; Tue, 18 Jun 2013 23:43:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <20130618131313.GA10396@haridwar> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WJNVH2xG - b3629e48eba9 - 20130618 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:83087 Archived-At: On 6/18/2013 3:13 PM, Pavneet Arora wrote: > [Sorry about the previous null message.] > > Background: > > Typically I use MetaPost to create small figures, which I then can scale > as needed in larger documents. These figures contain no text so I can > simply use the .eps output of mpost as an inclusion. > > Recently, I have embarked on a large illustration replete with lots of > text labels. It is a "distilled" architectural drawing intended for > diagnostic and maintenance purposes. In it plumbing details are > overlaid over a layout. For simplicity, I standardized on unit size of > 1cm so that co-ordinates can easily map from physical dimensions with > the unusual hybrid scale of 1cm=1ft ;).. > > Status: > > With this set unit size, my drawing has grown very large. My intent is > to get it printed on one of the (U.S.) based architectural paper sizes, > or if it can be made legible on U.S. Tabloid size paper (17" x 11").. > My first successful approach (and where I stand right now) is to simply > use \startMPpage and \stopMPpage to scale to the page. > > Thera are a couple of issues, though, with this approach. First, I want > to add additional information to the page, other than what would be > handled by MetaPost, e.g., some tables, etc. Even without this > additional information, having the drawing scale to page size does not > give adequate margin buffering and if there are some labels right at the > edge, I have seen some clipping of the text. > > Objective: > > I would like to create a scalable drawing with all of its text > labels so that I can scale appropriately to different page sizes, and > also incorporate the illustration with other document elements. > > From what I have read at: > > http://wiki.contextgarden.net/MetaPost_in_ConTeXt > > I think what I need is something akin to \startuseMPgraphic with a > scaling option if I want to include the code inline. Otherwise, the > drawing is clipped on the page. you can use the \scale command \scale[width=1cm]{\useMPgraphic{somename}} it takes the same options as externalfigure > Or perhaps I simply try to convert the existing PDF output to PS, and > then include it? > > What I am hoping is to get a best practises workflow from the list so > that I can simply adopt it. > > advTHANKSance. > > Sample: > > A MWE is found below: > > \setuppapersize[tabloid,landscape][tabloid,landscape] > \starttext > > \setupMPinstance > [metafun] > [extensions=yes, > initializations=yes, > textstyle=bold] > > \startMPpage > u:=1cm; > > pickup pencircle scaled 1pt; > > draw (5u,0u) {dir 90}..(0u,5u) {dir 180}; > draw (0u,5u) .. (-1.5u,10.5u) {dir 90} .. (0u,16u); > draw (0u,16u) {dir 0} .. (5u,21u) {dir 90}; > draw (5u,21u) -- (39u,21u); > draw (39u,21u) {dir 270} .. (42u,18u) {dir 0}; > draw (42u,18u) .. (43.5u,10.5u) {dir 270} .. (42u,3u); > draw (42u,3u) {dir 180} .. (39u,0u) {dir 270}; > draw (39u,0u) -- (35u,0u); > draw (35u,0u) .. (22u,3u) {dir 180} .. (9u,0u); > draw (9u,0u) -- (5u,0u); > label(btex AN ARCHITECTURAL ELEMENT etex, (22u,10.5u)); > > \stopMPpage > \stoptext > > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________