From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/9733 Path: main.gmane.org!not-for-mail From: "Gregory D. Collins" Newsgroups: gmane.comp.tex.context Subject: Re: Passing a string via texexec Date: Wed, 06 Nov 2002 10:57:33 -0500 Sender: ntg-context-admin@ref.ntg.nl Message-ID: <3DC93BED.30004@cs.yale.edu> References: <200211061036.01991.john@wexfordpress.com> Reply-To: ntg-context@ref.ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1036598332 20669 80.91.224.249 (6 Nov 2002 15:58:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 6 Nov 2002 15:58:52 +0000 (UTC) Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 189SY3-0005Ba-00 for ; Wed, 06 Nov 2002 16:56:55 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 1F5F110AF5; Wed, 6 Nov 2002 16:58:23 +0100 (MET) Original-Received: from netra.cs.yale.edu (netra.cs.yale.edu [128.36.229.21]) by ref.ntg.nl (Postfix) with ESMTP id BA1D710AF4 for ; Wed, 6 Nov 2002 16:57:55 +0100 (MET) Original-Received: from cs.yale.edu (net249-180.cluster.yale.edu [130.132.249.180]) by netra.cs.yale.edu (8.11.6/8.11.6) with ESMTP id gA6Fvsl13819 for ; Wed, 6 Nov 2002 10:57:54 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en Original-To: Context X-Enigmail-Version: 0.65.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Errors-To: ntg-context-admin@ref.ntg.nl X-BeenThere: ntg-context@ref.ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:9733 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:9733 John Culleton wrote: > This is more of a convenience feature than a necessity, but here goes. > > I plan to personalize copies of an ebook in pdf format by putting the > string: > "This copy prepared for Joe Smith" on the page, perhaps in a footer. > This means I have to recompile the book for each separate customer. It > would save a minute if I could just pass a named string to pdfetex in > the same way one passes a mode to the program. I am looking for > something like: > texexec --mode=ebook --string="Joe Smith" mybook.tex > > ...and then have a way to pick up that string in the TeX file and use > it. > > All this does is save me from editing the file in every instance. If > it is too big a deal forget it. You can solve this using scripting. In your TeX file: ...\input{name}... On the command line (in Windows): put then names in names.txt, then: for /f %i in (names.txt) do @echo %i > name.tex && texexec --pdf foo.tex && ren foo.pdf "%i.pdf" In the Bourne shell: for i in `cat names.txt`; do echo $i > name.tex; texexec --pdf foo.tex; mv foo.pdf "$i.pdf"; done -- Gregory D. Collins GPG key available at pgp.mit.edu keyserver, id 0xD2EECA60