From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82247 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: TEXpage filename Date: Thu, 2 May 2013 08:44:12 +0200 Message-ID: <9C89B551-F3D9-400A-8C73-2EE08FD3EE3A@gmail.com> References: <20130501121645.561d2d21@iram-hb-003386.extra.cea.fr> <32A90BEC-D99D-424B-9E1F-87887A13D31F@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1367477076 23303 80.91.229.3 (2 May 2013 06:44:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 May 2013 06:44:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 02 08:44:36 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 1UXnFn-0005oa-IJ for gctc-ntg-context-518@m.gmane.org; Thu, 02 May 2013 08:44:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A6AC7101E4; Thu, 2 May 2013 08:44:30 +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 5YLkGV2Um6Zg; Thu, 2 May 2013 08:44:29 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0EA41101E5; Thu, 2 May 2013 08:44:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2192D101E5 for ; Thu, 2 May 2013 08:44:28 +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 N8fapek8DXFs for ; Thu, 2 May 2013 08:44:27 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id F19C7101E4 for ; Thu, 2 May 2013 08:44:16 +0200 (CEST) Original-Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com [74.125.83.44]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r426iGmZ004929 for ; Thu, 2 May 2013 08:44:16 +0200 Original-Received: by mail-ee0-f44.google.com with SMTP id t10so101111eei.31 for ; Wed, 01 May 2013 23:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer; bh=GQujYmNno0AjvAuJ2OQzoLEqMklkSnm8sXIAmUnqwB0=; b=fWOefw2M+3aH6N6naBApl9CxrjedWXaHYwxpakavJOTbSfavjNUrL0KZoFpik7bcuh 9/12Cx7trxho56PLyxMdO2NklKfVYAO9Alyxfp+rWWWmKI47a9qBp+5HH4vCkBUmbnGl C5WRjG3yuNa+ui3/3Jax2eO/WUHtEkMUzQNid2civ7k5h/WwhFf8kPIGlrQXwvHX+oNr oO3l/lbjVUdr/kLe16+tUcPmEbp/AI0k1iCfuA0ggqJbRYBB5Gw/ZlwzNFGzJOJ/pvEu 43Nfdz2x2qtpVrgitUWKclZa2Y/kz8YKfUpvOzSHaAFrBLrVLz7/21RNVQ3/nu8hRdQE p9fA== X-Received: by 10.14.3.9 with SMTP id 9mr9908229eeg.33.1367477056190; Wed, 01 May 2013 23:44:16 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbfbc2e.pool.mediaWays.net. [77.191.188.46]) by mx.google.com with ESMTPSA id bp51sm5704387eeb.5.2013.05.01.23.44.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 May 2013 23:44:15 -0700 (PDT) In-Reply-To: <32A90BEC-D99D-424B-9E1F-87887A13D31F@gmail.com> X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.44; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJuSIgz7 - 157ff4d0646a - 20130502 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:82247 Archived-At: Am 01.05.2013 um 23:02 schrieb Wolfgang Schuster : > = > Am 01.05.2013 um 12:16 schrieb Alan BRASLAU : > = >> Hello, >> = >> In the production of (scientific) articles for journal submissions, >> one is often expected to supply the figures as separate files. >> = >> One workflow can be through the use of \startTEXpage\stopTEXpage >> followed by an external extraction of single pdf pages to separate >> files. >> = >> However, is it possible or would it be possible to directly output to a >> named file, as in: >> \startTEXpage{figure1.pdf} >> \stopTEXpage >> or perhaps >> \startTEXpage [file=3Dfigure1.pdf] >> \stopTEXpage >> ? (I could not find an answer looking at the source.) >> = >> One could then (optionally) reinclude the figure in a review copy of >> the full text through the use of \externalfigure [figure1] > = > You can put each graphic in a separate document and tell context to > create a pdf with the \typesetfile command. \startbuffer[extract:before] \startTEXpage \stopbuffer \startbuffer[extract:after] \stopTEXpage \stopbuffer \def\startextract {\dosingleempty\dostartextract} \def\dostartextract[#1]% {\edef\extractfilename{#1}% \grabbufferdata[extract:content][startextract][stopextract]} \def\stopextract {\doifsomething\extractfilename {\savebuffer[list=3D{extract:before,extract:content,extract:after},fil= e=3D\extractfilename.tex,prefix=3Dno]% \typesetfile[\extractfilename][]}} \starttext \startplacefigure[title=3D{External file}] \startextract[extract-1] \blackrule[width=3D4cm,height=3D4cm,color=3Dorange] \stopextract \stopplacefigure \stoptext > Creating a new environment which does all of this itself isn=92t hard > because most of the stuff which is needed can be seen in the example > below. > = > % the external file > = > \startbuffer[figure-1] > \startTEXpage > \blackrule[width=3D4cm,height=3D4cm,color=3Dblue] > \stopTEXpage > \stopbuffer > = > \savebuffer[list=3Dfigure-1,file=3Dfigure-1.tex,prefix=3Dno] > = > % process the external file at runtime > = > \starttext > \placefigure{External file}{\typesetfile[figure-1]} The second argument for \typesetfile is needed to get this working: \placefigure{External file}{\typesetfile[figure-1][]} Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________