Hi Frank,

My first reaction is to say: good luck ;-)

Frank Niedermann wrote:
> Hi,
> 
> is there a documentation on how to translate tex into XSL for usage with
> Apache FOP?

Not that I know of.


> We have a process in our ERP system that is using tex files for output
> generation (PS and PDF) and we would like to migrate this whole process to
> use Apache FOP instead. Now I have to created XSL files based on the tex
> files and it would be good to know if there is some documentation on how to
> do this.
> 
> It would help me for a start if there was something like a translation,
> example:
> \special{papersize=70.0mm,38.0mm} from tex means something like
> <fo:simple-page-master master-name="A4-portrait" page-height="70.0mm"
> page-width="28.0mm">
> 
> If there is some tool or guide to convert tex into XSL automatically that
> would be perfect for me, but I don't think that there is something like
> that.
> 
> Anything that helps one in migrating manually?

In theory, you could re-define all the commands you’re using in TeX to
produce XSL-FO instead. Obviously that requires extensive TeX knowledge.
Plus there will probably not be a one-to-one mapping, as in your example
above. The XSL-FO output will have to follow the structure required by
the standard.

You may want to have a look at TeX4ht [1], a tool originally designed
(I believe) to produce HTML pages out of TeX documents, but that can
also produce other output formats. Not sure a XSL-FO converter is
available, but it might be reasonably easy to write one. Or produce
XHTML or DocBook, and from there XSL-FO.

Are your source document plain TeX or LaTeX? If it’s plain TeX you
/might/ have the possibility of using ConTeXt [2] to produce XML.
ConTeXt is, like LaTeX, a set of macros above TeX to write
documentation, with a focus on XML. Maybe you can (ab)use it to convert
your own documents, but I’m far from sure.

At any rate, although I think your decision to switch to XSL-FO is
a good one, get prepared to have trouble with the conversion process.
Unless you TeX documents have a simple, common structure and don’t use
too many TeX tricks.

[1] http://www.cse.ohio-state.edu/~gurari/TeX4ht/
[2] http://en.wikipedia.org/wiki/ConTeXt


HTH,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to