From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82321 Path: news.gmane.org!not-for-mail From: Alan Bowen Newsgroups: gmane.comp.tex.context Subject: Re: TEXpage filename Date: Sat, 4 May 2013 07:50:16 -0400 Message-ID: References: <20130501121645.561d2d21@iram-hb-003386.extra.cea.fr> <32A90BEC-D99D-424B-9E1F-87887A13D31F@gmail.com> <9C89B551-F3D9-400A-8C73-2EE08FD3EE3A@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1605369531==" X-Trace: ger.gmane.org 1367668234 28265 80.91.229.3 (4 May 2013 11:50:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 May 2013 11:50:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat May 04 13:50:35 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 1UYaz3-0008L8-Qw for gctc-ntg-context-518@m.gmane.org; Sat, 04 May 2013 13:50:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DE3BF101E5; Sat, 4 May 2013 13:50:32 +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 MejtfRc9V-VC; Sat, 4 May 2013 13:50:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id B8064101E7; Sat, 4 May 2013 13:50:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 37E59101E7 for ; Sat, 4 May 2013 13:50: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 C8QALgQENmDd for ; Sat, 4 May 2013 13:50:29 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id EFC65101E5 for ; Sat, 4 May 2013 13:50:18 +0200 (CEST) Original-Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r44BoHiR014525 for ; Sat, 4 May 2013 13:50:17 +0200 Original-Received: by mail-vc0-f171.google.com with SMTP id m16so2120967vca.30 for ; Sat, 04 May 2013 04:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=LpRmQrlOMh5eE0PpDhJBXX/80I4stPiT5rS+n5SAxxI=; b=PipkCLjOQv1mPhluPBvIEvyOPVySYPjCBd5mStguoV64Utw9NiWZBpM6tjVUe3HlYW /I2SGTIOaapBE9fBk5aBI55OpBnTBm7Krqs6TZQzfBUJJ06353zobc2jbgvsk11r3Iyn kzo4k01GKXcv8cRz9Pg6ZBqVk58ZM0q1+6REYi0TD7otd5n2JQidZtwA4+6LarodPffp 6wC8ecoozhJO9iJXaAr6EfWU1weWjZ69gELtID7iPmsx4CI5KjrcPpiTE58pAHCFg5+X o8M2HIUNDF+3V2CWn3xd46U/kvt26pcX9Cbxc+/W8kBBQ4SR/Zc4ARoJqeoexL3gCkee RNJg== X-Received: by 10.58.221.134 with SMTP id qe6mr4806093vec.2.1367668216777; Sat, 04 May 2013 04:50:16 -0700 (PDT) Original-Received: by 10.220.149.8 with HTTP; Sat, 4 May 2013 04:50:16 -0700 (PDT) In-Reply-To: <9C89B551-F3D9-400A-8C73-2EE08FD3EE3A@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.171; 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: 0VJvLOh25 - 3f8e520b4dc9 - 20130504 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:82321 Archived-At: --===============1605369531== Content-Type: multipart/alternative; boundary=047d7bf0e8de3b541f04dbe312b6 --047d7bf0e8de3b541f04dbe312b6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Wolfgang=97 Can this be extended so as to allow the extraction of the individual component files (as PDFs with their component names) when processing a product file? Alan On Thu, May 2, 2013 at 2:44 AM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote: > > Am 01.05.2013 um 23:02 schrieb Wolfgang Schuster < > schuster.wolfgang@gmail.com>: > > > > > 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},file= =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 > 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 > > _________________________________________________________________________= __________ > --047d7bf0e8de3b541f04dbe312b6 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Wolfgang=97

Can this be extended = so as to allow the extraction of the individual component files (as PDFs wi= th their component names) when processing a product file?
<= br>
Alan



On Thu, May 2, 2013 at 2:44 AM, Wo= lfgang Schuster <schuster.wolfgang@gmail.com> wrot= e:

Am 01.05.2013 um 23:02 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

>
> Am 01.05.2013 um 12:16 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
>
>> 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:
>> =A0 =A0 =A0\startTEXpage{figure1.pdf}
>> =A0 =A0 =A0\stopTEXpage
>> or perhaps
>> =A0 =A0 =A0\startTEXpage [file=3Dfigure1.pdf]
>> =A0 =A0 =A0\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]
=A0 \startTEXpage
\stopbuffer

\startbuffer[extract:after]
=A0 \stopTEXpage
\stopbuffer

\def\startextract
=A0 {\dosingleempty\dostartextract}

\def\dostartextract[#1]%
=A0 {\edef\extractfilename{#1}%
=A0 =A0\grabbufferdata[extract:content][startextract][stopextract]}

\def\stopextract
=A0 {\doifsomething\extractfilename
=A0 =A0 =A0{\savebuffer[list=3D{extract:before,extract:content,extract:afte= r},file=3D\extractfilename.tex,prefix=3Dno]%
=A0 =A0 =A0 \typesetfile[\extractfilename][]}}

\starttext

\startplacefigure[title=3D{External file}]
=A0 \startextract[extract-1]
=A0 \blackrule[width=3D4cm,height=3D4cm,color=3Dorange]
=A0 \stopextract
\stopplacefigure

\stoptext

> Creating a new environment which does all of this itself isn=92t hard<= br> > 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 / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________

--047d7bf0e8de3b541f04dbe312b6-- --===============1605369531== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1605369531==--