[pdftex] TeX as a composition server?

Reinhard Kotucha reinhard.kotucha at web.de
Tue Oct 26 23:20:07 CEST 2010


On 26 October 2010 Peter Davis wrote:

 > 2010/10/26 James Quirk <jjq at galcit.caltech.edu>
 > 
 > > Reinhard,
 > >
 > > I'd already point that out to Peter. Anyhow, this
 > > LaTeX works at my end:
 > >
 > > \documentclass{article}
 > > \begin{document}
 > > \loop
 > > \par 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.
 > > \ifnum\value{page}<10000 \repeat
 > > \end{document}
 > >
 > > James
 > >
 > 
 > Thanks, James.  I'm trying to use plain TeX to maximize the
 > throughput.  

Before you decide to use plain TeX, please investigate whether it
provides everything you need.  Since you are using TeX as a
replacement for InDesign, I suppose that your "Lorem ipsum" doesn't
tell you the whole truth.  I'm not talking about the many macro
packages.  You probably don't need many of them and if you are
familiar with TeX macro programming, you certainly can provide similar
functionality in plain TeX.  But if you have to support floating
objects, for example, you probably need a more sophisticated output
routine, like LaTeX's one.  I can guarantee you that you don't want to
write such a beast yourself.  I remember that Frank Mittelbach was
offline for a month while he wrote the LaTeX-3 output routine...

IMO the first step should be to determine what is actually needed and
whether these features are supported by particular incarnations of TeX.  

In other words, make sure not to run into a one-way road now.

I don't know anything about your project, but if you are going to use
TeX as a replacement for InDesign, I fear that you need quite
sophisticated typesetting.  From the tests I mentioned in a previous
mail you can see that glyph expansion is an expensive operation.  If
you have to extend plain TeX's output routine, you probably don't gain
anything by using plain TeX.

Are the files you are producing always huge?  Otherwise it's also
worthwhile to determine how many documents TeX can produce per second.
But this is more difficult because LaTeX loads more external files at
the beginning than plain TeX.  But in your final workflow you
certainly want to have a dedicated format file which contains all the
macros already you need at runtime, just in order to minimize the
file I/O overhead at startup time.

It's difficult to give good advice remotely, all I can say is that
when I have to solve a problem, I spend some time in order to
determine which program or programming language is most suitable. 
A wrong decision costs much more time.

I'm even not convinced that pdfTeX is a good choice.  You already said
that you need support for fonts used today.  pdfTeX is an 8-bit system
and can only address 256 characters in a font at the same time.

If you replace "Lorem ipsum...," by "русский язык, tiếng Việt\par",
you'll see that what you are testing right now is not relevant in
practice unless you have to typeset Latin only.  Even LaTeX's UTF-8
support doesn't solve the problems with font encodings.  Try this:

\begin{verbatim}
русский язык, tiếng Việt
\end{verbatim}  

You certainly need engines which support OTF, like XeTeX or LuaTeX, in
order to avoid such problems.

Anyway, determine very carefully first what you actually need before
you decide which engine and format is most appropriate.  It may take
some time, especially if you don't know much about ConTeXt and the
limitations of plain TeX and various TeX engines.  Believe me, a wrong
decision costs much more time.  And what you are testing now is fine
if you can be absolutely sure that you don't have to typeset anything
else but Latin, without glyph scaling,...

I fear that what you are testing right now is too far away from reality.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the pdftex mailing list