From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/115155 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Nedeljkovic via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: Compiling a large metapost document Date: Thu, 2 Jun 2022 05:21:06 +0200 Message-ID: References: <1f166f27-61d9-e211-0239-b3f9591985de@telus.net> <86576d0a-1fa1-114a-7179-761e44834354@telus.net> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6387585168891408751==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Nedeljkovic , mailing list for ConTeXt users To: Max Chernoff Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 02 05:21:57 2022 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nwbPJ-00015D-FW for gctc-ntg-context-518@m.gmane-mx.org; Thu, 02 Jun 2022 05:21:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8027A281BB0; Thu, 2 Jun 2022 05:21:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XrzIxvBlDl5c; Thu, 2 Jun 2022 05:21:23 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3BADB28A1F3; Thu, 2 Jun 2022 05:21:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C28AA28A1EC for ; Thu, 2 Jun 2022 05:21:21 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2ZvXIe02aGSY for ; Thu, 2 Jun 2022 05:21:20 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.160.173; helo=mail-qt1-f173.google.com; envelope-from=tsar.srb@gmail.com; receiver= Original-Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id ACC7E281BB0 for ; Thu, 2 Jun 2022 05:21:20 +0200 (CEST) Original-Received: by mail-qt1-f173.google.com with SMTP id y15so2624541qtx.4 for ; Wed, 01 Jun 2022 20:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l0yv69bK7dDb/9m0udJDEYn88JiYaNB9V4koOnWq5R4=; b=XX0+Zs9AwSiuY/Y08GsFBEFcXPA3SkNLT2PS10tkkzazO9uzR5jhYL5++jNciKBOKk c6vM1YxSZ/f/H+l8lq6x95rZFPOlv7CvRKKwgK9vC/LnsPclvQ5EQlgoyIP6d/MI7cTA c9RSCxr9pYllX3mM08WlghGUb4mgdtGTLHLYuCf/xqc1/m4VbeqSRJw0yo+dl4q7Pd/H AFtxbd3fIBlEaAQVzbsXBxvxvDYkgDGj5kIHxyEQoHIApDbWQxPezxBcToJEBbDLmXu5 uzDP2IpgOP5t8/FZRerzTbqJNGDwBH6CYhvs0fY9NYUMOseT/EX99KG/+fXv5jxGV1CR L5EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l0yv69bK7dDb/9m0udJDEYn88JiYaNB9V4koOnWq5R4=; b=ui6hdlMHgbYoMUzatPFSXYqoywWcNICDvQndpdE8KqGE9ZX3TzQyP4lQWb6M2yx6kV 3Dw7H55jxdsz7nhtDuYUO/SljHg5DbX3jbDgYpDjua5sxEfoyjxX48xAoiwygTk3Q1Gj aYL/gFNYjK6z+qT9Ul+HC/FQCdFtI2eTaq056oK8fgFTrduApDbMu6KxIb2sWyILtvPU 3ZLAlE7C8a6euXMPK6CSL2Ks1BwNIpAZed6PiONq9NIIH6YEy8PfoElm5pRjHBGbKCkA HATD7H6t0wB9gayly9iBfxYiUJ5t7WxOTOrUmGK0G9h/lDNHqhtOnN7gS6Z55tGmeEgN Bm3w== X-Gm-Message-State: AOAM532ZOrdrsE5iuEguTZWmlJUag1Twvg6wNkchbzdfIPlJ/RK0H9qW CNIPcgjnav74078yhup1xJz264tJrgZZFF9tz2M= X-Google-Smtp-Source: ABdhPJyy8/i5cT3bUR/+R6R72pxFGcwqxWjV2aUY5F/FM7GC/9v5EMOz1iqdSKYFW+/wQwOLA7Dy7Y2T3V/wCyq+aes= X-Received: by 2002:ac8:5f86:0:b0:2fb:ad06:a71f with SMTP id j6-20020ac85f86000000b002fbad06a71fmr2298858qta.38.1654140076989; Wed, 01 Jun 2022 20:21:16 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:115155 Archived-At: --===============6387585168891408751== Content-Type: multipart/alternative; boundary="000000000000b2a2e005e06e7fdc" --000000000000b2a2e005e06e7fdc Content-Type: text/plain; charset="UTF-8" I figured it out. I was wrongly calculating the page size argument for gs. Thank you very, very much again Max! On Thu, Jun 2, 2022 at 4:41 AM Stefan Nedeljkovic wrote: > There is one more problem: the pdf generated has incorrect margins. I > tried to manually calculate the size in ps points and run gs directly, but > the results are the same. How can I get an accurate rendering of the page? > > On Thu, Jun 2, 2022 at 4:22 AM Max Chernoff wrote: > >> On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote: >> > Thank you very much Max! It works indeed! One more question. How would >> I >> > import the eps file back into MPpage, so I could do trickery with text. >> >> Convert the PostScript file into PDF with either "ps2pdf" or >> GhostScript, then you can import the file with "externalfigure": >> >> \startMPpage >> draw externalfigure "belgrade_gm.pdf"; >> draw textext.top("One") shifted (264.352, 116.362); >> draw textext.top("Two") shifted (306.821, 186.907); >> \stopMPpage >> >> -- Max >> > --000000000000b2a2e005e06e7fdc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I figured it out. I was wrongly calculating the page size = argument for gs.
Thank you very, very much again Max!

On Thu, Jun = 2, 2022 at 4:41 AM Stefan Nedeljkovic <tsar.srb@gmail.com> wrote:
There is one more problem: the pdf = generated has incorrect margins. I tried to manually=C2=A0calculate the siz= e in ps points and run gs directly, but the results are the same. How can I= get an accurate rendering of the page?

On Thu, Jun 2, 2022 at 4:22 AM Max C= hernoff <mseven@te= lus.net> wrote:
On 2022-06-01 8:00 p.m., Stefan Nedeljkovic wrote:
> Thank you very much Max! It works indeed! One more question. How would= I
> import the eps file back into MPpage, so I could do trickery with text= .

Convert the PostScript file into PDF with either "ps2pdf" or
GhostScript, then you can import the file with "externalfigure":<= br>
=C2=A0 =C2=A0 =C2=A0\startMPpage
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0draw externalfigure "belgrade_gm.pdf= ";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0draw textext.top("One") shifted= (264.352, 116.362);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0draw textext.top("Two") shifted= (306.821, 186.907);
=C2=A0 =C2=A0 =C2=A0\stopMPpage

-- Max
--000000000000b2a2e005e06e7fdc-- --===============6387585168891408751== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6387585168891408751==--