[texhax] LaTeX enhancement

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


The following header lines retained to effect attribution:
>Date: Wed, 08 Sep 2004 12:23:42 -0400
>From: "William F. Adams" <wadams at atlis.com>
>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>

>On Wednesday, September 8, 2004, at 10:58  AM, M Senthil Kumar wrote:

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

>The original query included:
>> We are in need of an enhancement to the LaTeX command-line so that it
>> will read a list of tex filenames from either STDIN or disk and, for
>> each filename in the list, create a DVI file without forking and
>> execing each time.

>As I understand it, for each file in the command above, there'll be an
>instance of loading a tex process into memory, processing a file, then
>unloading tex to repeat---it's this which the OP wants to avoid. It
>adds up to quite a bit of overhead for 80,000 iterations.

	Not as much as you might think.

herber at ncdf107 herber$ date
Wed Sep  8 17:20:12 CDT 2004
herber at ncdf107 herber$ i=0
herber at ncdf107 herber$ while [ $i -lt 10000 ]; do i=$(expr $i + 1); done
date
Wed Sep  8 17:20:45 CDT 2004

	I lost one or two seconds after the first data command
	doing command recall to restart and run the loop.  But,
	even including that time, it took 33 seconds on a 930
	Pentium ||| with 0.5GiB on memory.

	The file buffer cache acts as a dynamic RAM disk and the
	Virtual Memory Manager will try to recover code and static
	data pages.

>I think the development done on dvichop for instant preview in auctex
>(David Kastrup's project --- not 100% sure on the name) might be used
>for this.

>William

>William Adams, publishing specialist
>voice - 717-731-6707 | Fax - 717-731-6708
>www.atlis.com

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