[texhax] LaTeX enhancement

Randolph J. Herber herber at dcdrjh.fnal.gov
Thu Sep 9 00:16:59 CEST 2004


The following header lines retained to effect attribution:
>Date: Wed, 08 Sep 2004 21:28:37 +0630
>From: M Senthil Kumar <senthil at www.cdfd.org.in>
>Subject: Re: [texhax] LaTeX enhancement
>To: texhax at tug.org
>X-Spam-Level:
>	<mailto:texhax-request at tug.org?subject=subscribe>
>	<mailto:texhax-request at tug.org?subject=unsubscribe>

><SNIP>
>>   for file in filelist.txt; do rubber-pipe < $file > $file.ps; done

>> However, I don't think you can avoid the fork()/exec(), LaTeX is not a batch
>> processor I think.

>>   mvrgr, Wouter
></SNIP>

>Hi,
>Pardon me if i am wrong, can't we use the following to achieve the same
>thing from any Unix command line ?

>$ for i in *.tex;do latex $i;done

	Ah, a Bourne family shell user.

	This runs into the problem that I believe the original user
	encountered:  latex *.tex failed for too many arguments
	(errno E2BIG  Arg list too long) and tracked the problem
	to the exec family library call.

	This only moves the problem to the ``for'' builtin.

	find . -name '*.tex' -print0 | xargs -0 latex
  or
	find . -name '*.tex' -print | while read file; do latex $file;done

	This will also descending to sub directories.

	In the `Linux' find, for the current directory:

	find . -name '*.tex' -maxdepth 1 ....

>Regards,

>Senthil

>++++++++++++++++++++++++++++++++
>Linux User #283528 Mandrake 10.0
>++++++++++++++++++++++++++++++++

>_______________________________________________
>TeX FAQ: http://www.tex.ac.uk/faq
>TeX newsgroup: http://groups.google.com/groups?group=comp.text.tex
>Mailing list archives: http://tug.org/pipermail/texhax/
>More links: http://tug.org/begin.html

>Automated subscription management: http://tug.org/mailman/listinfo/texhax
>Human mailing list managers: postmaster at tug.org

Randolph J. Herber, herber at fnal.gov, +1 630 840 2966, CD/CDFTF PK-149F,
Mail Stop 318, Fermilab, Kirk & Pine Rds., PO Box 500, Batavia, IL 60510-0500,
USA.  (Speaking for myself and not for US, US DOE, FNAL nor URA.)  (Product,
trade, or service marks herein belong to their respective owners.)



More information about the texhax mailing list