From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/83073 Path: news.gmane.org!not-for-mail From: Pavneet Arora Newsgroups: gmane.comp.tex.context Subject: [***SPAM***] Scaling large (annotated) MetaFun drawing Date: Tue, 18 Jun 2013 09:13:13 -0400 Message-ID: <20130618131313.GA10396@haridwar> Reply-To: Pavneet Arora , mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1371561226 21511 80.91.229.3 (18 Jun 2013 13:13:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2013 13:13:46 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Jun 18 15:13:47 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 1UovjG-0006OM-M1 for gctc-ntg-context-518@m.gmane.org; Tue, 18 Jun 2013 15:13:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A8D0E101F5; Tue, 18 Jun 2013 15:13:45 +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 WyfKNWMh-4ag; Tue, 18 Jun 2013 15:13:43 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 924D9101E8; Tue, 18 Jun 2013 15:13:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 373F8101E8 for ; Tue, 18 Jun 2013 15:13:42 +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 SkiOYWYEBpdP for ; Tue, 18 Jun 2013 15:13:35 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 3DBB5101E6 for ; Tue, 18 Jun 2013 15:13:25 +0200 (CEST) Original-Received: from charkha.pavastupa.com (teresa.yourinstantserver.com [173.230.253.20] (may be forged)) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5IDDNss020674 for ; Tue, 18 Jun 2013 15:13:23 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by charkha.pavastupa.com (Postfix) with ESMTP id 420F186C283 for ; Tue, 18 Jun 2013 09:16:12 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at charkha.pavastupa.com Original-Received: from charkha.pavastupa.com ([127.0.0.1]) by localhost (charkha.pavastupa.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DO7vIN1lQuZG for ; Tue, 18 Jun 2013 09:16:06 -0400 (EDT) Original-Received: from localhost (bas5-toronto47-2925109844.dsl.bell.ca [174.89.162.84]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: pavneet_arora@pavastupa.com) by charkha.pavastupa.com (Postfix) with ESMTPSA id 03DD386C254 for ; Tue, 18 Jun 2013 09:16:05 -0400 (EDT) Content-Disposition: inline X-Bayes-Prob: 0.9999 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=173.230.253.20; country=US; region=MI; city=Dearborn; postalcode=48124; latitude=42.3027; longitude=-83.2456; metrocode=505; areacode=313; http://maps.google.com/maps?q=42.3027,-83.2456&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RJNNdnvL - 0246d851a011 - 20130618 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:83073 Archived-At: [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. 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 -- ---- Pavneet Arora m: 647.406.6843 Waroc Informatik t: 416.937.9276 ___________________________________________________________________________________ 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 ___________________________________________________________________________________