![](https://secure.gravatar.com/avatar/8b3c344f0adba6016612e05447039f44.jpg?s=120&d=mm&r=g)
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. -- John Culleton Able Indexers and Typesetters, Rowse Reviews, Culleton Editorial Services http://wexfordpress.com
![](https://secure.gravatar.com/avatar/784264bea014927b5053fad0c238ce87.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/58d78ec800597c8a14aef7dcf513a122.jpg?s=120&d=mm&r=g)
Am Mittwoch, 6. November 2002 16:57 schrieb Gregory D. Collins:
I plan to personalize copies of an ebook in pdf format by putting the string: You can solve this using scripting. On the command line (in Windows): put then names in names.txt, then: ...
I do it similar with the actual date (maybe there's a date function in TeX, but I cannot TeX... ;-) Grüßlis vom Hraban! -- http://www.fiee.net http://www.ramm.ch ---
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
At 09:12 PM 11/6/2002 +0100, Henning Hraban Ramm wrote:
Am Mittwoch, 6. November 2002 16:57 schrieb Gregory D. Collins:
I plan to personalize copies of an ebook in pdf format by putting the string: You can solve this using scripting. On the command line (in Windows): put then names in names.txt, then: ...
I do it similar with the actual date (maybe there's a date function in TeX, but I cannot TeX... ;-)
\currentdate \currentdate[dd,mm,yy] etc Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
![](https://secure.gravatar.com/avatar/58d78ec800597c8a14aef7dcf513a122.jpg?s=120&d=mm&r=g)
Am Mittwoch, 6. November 2002 21:38 schrieb Hans Hagen:
I do it similar with the actual date (maybe there's a date function in TeX, but I cannot TeX... ;-) \currentdate \currentdate[dd,mm,yy] etc
Thank you. Andres showed me at thursday it's in the manual... Grüßlis vom Hraban! -- http://www.fiee.net http://www.ramm.ch ---
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
At 10:36 AM 11/6/2002 -0500, you 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.
in your tex file: \message{\envvar{test}{it does not work}}\wait combined with texexec --arguments="test=it works" test so, it's there -) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (4)
-
Gregory D. Collins
-
Hans Hagen
-
Henning Hraban Ramm
-
John Culleton