[pdftex] TeX as a composition server?

James Quirk jjq at galcit.caltech.edu
Mon Oct 25 20:56:02 CEST 2010


> Basically, yes.  I just want to see how fast TeX can compose a few tens of
> thousands of pages of text.  It could all be "Lorem ipsum ..." or whatever.

A few lines of Perl, Python, Ruby, or whatever, is all you need.
For instance:

my $n = 100000;
my $lorem = <<'TXT';
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.


open LTX,">","lorem.tex";
print LTX <<'HEAD';
for($i=0;$i<$n;$i++) {
   print LTX $lorem;
print LTX <<'TAIL';

generates a document of 13044 pages.


> Thanks,
> -pd

More information about the pdftex mailing list