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
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
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 ---
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 -------------------------------------------------------------------------
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 ---
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