Peter, I don't know anything about Tex/Latex, but I had a similar question generating infobases( a proprietary binary format) out of xml. This requires a command line tool to do the conversion from a text format (fff) to a binary file. This was just a development tool, didn't go to production, but the coding required was minimal. I used xslt to generate the text format from the source xml (tex in your case), then used the source writing transformer (actually a simplified version of it that is sax based and only writes entire files), to write the text file out to the filesystem (The command line tool requires a file to operate on). My serializer then blocked the output of the source writing transformer and read it to get the name of the file , and did a Runtime.getRuntime().exec(cmd) out to dos to run the converter, and then sent the content generated from the dos command back to the user via the serializers output stream. If Latex has an api that could accept/return a stream from your serializer, that would save writing anything to the filesystem.
Something similar to this could work for Latex, not sure how the performance would be, but the coding is easy. Roger -----Original Message----- From: Peter Flynn [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 7:52 PM To: [EMAIL PROTECTED] Subject: Re: TeX to PDF serializator On Tue, 2003-06-10 at 23:57, Andre Thenot wrote: > On Tuesday, June 10, 2003, at 06:37 PM, Peter Flynn wrote: > > > In any case, it shouldn't be specific to LaTeX. All we need is an > > ability of Cocoon to spawn an external process and serve the result > > back to the user with a defined media type. > > There's a _big_ problem with this: how do I apply a transformer > on an external process? I cant! You don't, and you don't need to. All you need to do is transform the XML using an XSLT text-mode stylesheet and feed the *output* to LaTeX, then pass the resulting PDF back to the user. This is the same concept as transforming XML to FO and passing the result through a FO processor and passing the resulting PDF back to the user. > For your use (reading and serving), you could write a servlet > (or even use a plain web server, for that matter). I'd rather use Cocoon to manage the process. > Cocoon is an *XML* publishing framework. Except for the initial > input and final output, everything MUST be XML. I think this is more of a religious argument than a practical one. The problem is that the typographic quality of FO processors is extremely poor compared with LaTeX, and there seems little point in constantly reinventing the wheel by writing vastly complex XSL to output PDF when the job can be done more simply and accurately and efficiently by outputting LaTeX from XSLT. I'm astonished that the authors of FO processors have not learned from 25 years of automated typesetting using LaTeX. > I remember reading about TeXML a little while ago; I don't know > how broad it is or even if it's still alive. When it's better developed that would answer the case, as it would accept XML as input and emit PDF as output, same as FOP. ///Peter --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]