From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96543 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: buffers inside startMPpage Date: Fri, 14 Oct 2016 10:34:29 +0200 Message-ID: <58009895.8050209@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8725034708369207878==" X-Trace: blaine.gmane.org 1476434123 15853 195.159.176.226 (14 Oct 2016 08:35:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Oct 2016 08:35:23 +0000 (UTC) User-Agent: Postbox 5.0.4 (Macintosh/20161007) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 14 10:35:19 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buxxI-0001vP-4J for gctc-ntg-context-518@m.gmane.org; Fri, 14 Oct 2016 10:35:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 307531AEDD; Fri, 14 Oct 2016 10:34:49 +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 TtxM-8za2uif; Fri, 14 Oct 2016 10:34:48 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 33E921AEDE; Fri, 14 Oct 2016 10:34:48 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A6ACF1AEDC for ; Fri, 14 Oct 2016 10:34:46 +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 FwVMIJ1R6Hh4 for ; Fri, 14 Oct 2016 10:34:45 +0200 (CEST) Original-Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id D4ABD1AEDB for ; Fri, 14 Oct 2016 10:34:34 +0200 (CEST) Original-Received: by mail-lf0-f51.google.com with SMTP id b75so183542940lfg.3 for ; Fri, 14 Oct 2016 01:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=9zWj+mJTdfymaQta+x/zIGIbSX+hPpkzLhYnZqScDWg=; b=B0o3kbsLBwtpkpe8ldcue2ZEVOkxfYYGHE21oI7fPh/PdjdAvmAxBW52dC2lErWt6m q6SVh0LWfaVMOuhIDMXsoMhOH3wantMWegZx2AnZMZQXyshNdxjnwyzLQPty8oAsRegc TTuU3w2x6GUAgy6ZWAaxhUA5D6AqJXMvIs9Q5suGzb7A9/HH82d8br90YSJetlX5k1Vr /f8q9iDxx0aIftoDRCOgx0orhWlxTvEp9XTUM1XrSbFMMU3R/M/U5+dul6z1rcvoBSzX ClRG7MCzlTurhkwkj7qcMbpS1i6z5xXEYYsLLhycBRVCLVpaMXoSVio40FhVAucytgCG WC3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=9zWj+mJTdfymaQta+x/zIGIbSX+hPpkzLhYnZqScDWg=; b=QtTOSO7ycNCaaiMcYiYzCBnPIk1FI91N+widsyV528Zs7d77j4pLsALkLNVXUBiVjl TD8+T2Gr+fw/e6TWg2pkyzSKlrrJLrMpXXv/MMRyuLPEm+L0iZZSVw5jC3tD+i1aTxfC z814MNOcx32F94lZcs0WAoMAqw2svSueOyEdZ9th/fwsMuDzzXlPUQN7aJ9L30DvUfN6 LUiYPkQ2oC2ZK2EE/mxfkdGkcRGvjh2FiAvI+SKsk4WFYOnfLxaxElqjwuEj3/6X++dA xaK3Tbw6ronhkJPefM+n9TN6uJNtPHbaR8B2cbUABt5p4ZiZy+ZaelUzOiKiSQYrViyU r1+Q== X-Gm-Message-State: AA6/9Rm8+p7s8YEsMg9KjhIKw6dbQ7BGIVxDfMadXUkVgvY8vsO9cZG8lnPXvLSkyh+4KQ== X-Received: by 10.25.34.11 with SMTP id i11mr2141406lfi.119.1476434071882; Fri, 14 Oct 2016 01:34:31 -0700 (PDT) Original-Received: from keima.localdomain (x2f2510b.dyn.telefonica.de. [2.242.81.11]) by smtp.gmail.com with ESMTPSA id 144sm4764595ljf.6.2016.10.14.01.34.30 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Oct 2016 01:34:31 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:96543 Archived-At: This is a multi-part message in MIME format. --===============8725034708369207878== Content-Type: multipart/alternative; boundary="------------000503050402010702000309" This is a multi-part message in MIME format. --------------000503050402010702000309 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Jan Willem Flamma > 14. Oktober 2016 um 10:12 > Dear list members, > > I create all my MetaFun drawings in a separate environment file where > each individual drawing sits inside a start/stopbuffer. This allows me > to easily use those drawings in all my documents using > \processMPbuffer[name]. Works just fine. > > However, I also wish to have all the drawing available in a pdf file > (each drawing on a separate page). This allows me to split the pdf and > use the drawing elsewhere (e.g. in a Powerpoint) or include page(s) > from the pdf in another document. > > The below MWE represent my MetaFun drawings file. > The idea is that by uncommenting the \enablemode[makepdf] I can create > the pdf file with drawings. It seems however that startMPpage does not > accept buffers (I also tried processbuffer and processMPbuffer). > > Is it possible to somehow make this work? You can use \startTEXpage \processMPbuffer[…] \stopTEXpage but loading a buffer in MPpage doesn’t work because the content of the environment is just passed to MetaPost and buffers can’t be loaded inside MetaPost code unless Hans adds a function for this, e.g. \startMPcode buffer("mybuffer") \stopMPcode Wolfgang --------------000503050402010702000309 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
14. Oktober 2016 um 10:12
Dear list members,

I create all my MetaFun drawings in a separate environment file where each individual drawing sits inside a start/stopbuffer. This allows me to easily use those drawings in all my documents using \processMPbuffer[name]. Works just fine.

However, I also wish to have all the drawing available in a pdf file (each drawing on a separate page). This allows me to split the pdf and use the drawing elsewhere (e.g. in a Powerpoint) or include page(s) from the pdf in another document.

The below MWE represent my MetaFun drawings file.
The idea is that by uncommenting the \enablemode[makepdf] I can create the pdf file with drawings. It seems however that startMPpage does not accept buffers (I also tried processbuffer and processMPbuffer).

Is it possible to somehow make this work?
You can use

    \startTEXpage
        \processMPbuffer[…]
    \stopTEXpage

but loading a buffer in MPpage doesn’t work because the content of the environment
is just passed to MetaPost and buffers can’t be loaded inside MetaPost code unless
Hans adds a function for this, e.g.

    \startMPcode
        buffer("mybuffer")
    \stopMPcode

Wolfgang
--------------000503050402010702000309-- --===============8725034708369207878== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwOi8vZm91bmRyeS5zdXBl bGVjLmZyL3Byb2plY3RzL2NvbnRleHRyZXYvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRnYXJk ZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============8725034708369207878==--