[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] XSL-FO to groff to PDF?

From: Larry Kollar
Subject: Re: [Groff] XSL-FO to groff to PDF?
Date: Thu, 20 Oct 2005 07:54:58 -0400

OK, somehow my entire reply got deleted before I sent it (my copy in "Sent" is also blank).

Michael Smith wanted to know if anyone ever thought about a utility to translate XSL:FO to groff. My opinion is that it would be better to skip the translation to FO and go straight to groff, for several reasons:

1) By transforming directly to groff markup based on a macro package (ms or mm, or perhaps a purpose-built package), you can simplify the XSLT enormously, improving readability and maintainability.

2) As groff is a typesetting language, deferring typesetting issues to groff would seem to be The Right Thing.

3) By using command-line parameters, the same generated groff markup could be used to create, say, A4 and USletter versions of a manual.

4) By transforming source -> FO -> groff, you create an unnecessary step. Why not cut out the middleman, especially when he's not adding any value?

5) If your budget or philosophy requires Free Software, the only Free FO processor (FOP) is really inadequate for typesetting -- it's missing things like keep-with, for example. Someone on the FrameUser's list was complaining about that yesterday morning.

6) Groff, as a *roff derivative, is designed to be hand-edited. If you have a formatting crisis with a deadline (and that's when the crises happen, right?), it's a *lot* easier to go in & make a tweak to generated groff than it would be for FO... and then it would probably be easier to find and fix the problem at its source later (see #1).

7) FO is a display language, rather than a content markup language. Personally, I think that defeats the whole purpose of XML to begin with.

I can anticipate some objections here, primarily that many popular XML doc types already have XSL:FO stylesheets. But I'm not sure it would be any more work, short-term, to build new transforms directly to groff than it would be to create a groff -> FO utility (which could be done with XSLT itself). Long-term, I'm pretty certain it would be less work to transform directly to groff.

Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]