[pdftex] TeX as a composition server?

Ross Moore ross.moore at mq.edu.au
Mon Oct 25 21:35:03 CEST 2010


Hi James,

Why write it into a long file?
You can do the loop in TeX itself.


\loop
 ... Blah blah ...
 \newpage
\ifnum\value{page}<10000 \repeat


I'm assuming LaTeX here, for \newpage and \value .
This is probably more practical than a Plain TeX test, which would be even faster, after declaring a counter for use within the loop.


Hope this helps,

      Ross


Sent from my iPad

On 26/10/2010, at 5:56 AM, James Quirk <jjq at galcit.caltech.edu> wrote:

> Peter,
> 
>> 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:
> 
> #------------------start--------------------------------
> 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.
> 
> TXT
> 
> open LTX,">","lorem.tex";
> print LTX <<'HEAD';
> \documentclass{article}
> \begin{document}
> HEAD
> for($i=0;$i<$n;$i++) {
>   print LTX $lorem;
> }
> print LTX <<'TAIL';
> \end{document}
> TAIL
> #------------------end--------------------------------
> 
> generates a document of 13044 pages.
> 
> James
> 
>> 
>> Thanks,
>> -pd
>> 



More information about the pdftex mailing list