RE: support for 'macro' formatting languages

Subject: RE: support for 'macro' formatting languages
From: MARK.WROTH@xxxxxxxxxxx (Wroth, Mark)
Date: Wed, 15 Dec 1999 08:08:24 -0800
in The DSSSList Digest V3 #239, Pieter Rijken <pieter.rijken@xxxxxx>

>The idea of an SGML based document, DSSSL sytle sheet, and
>(Open)Jade is that one ideally only needs one and only one
>style sheet to generate output suitable for PDF, HTML, PS,
>TeX, RTF, etc?

No, I don't necessarily think so; DSSSL seems to have as its basic
orientation the printed page.  So HTML is a different critter, as TeX,
potentially.

>Now, suppose, I have an SGML file, and layout specification
>written in DSSSL. For printing purposes I would like the output
>to be exactly as described in the DSSSL file.
>However, since the SGML document actually is an 'article' and the
>publisher to which I will submit the article, uses LaTeX with the
>package 'revtex', not uncommon.

But you've specified two conflicting requirements.  You have a stylesheet
written in DSSSL, and your publisher wants you to use a LaTeX article using
RevTeX, which is a different stylesheet (almost certainly -- I don't know
what your DSSSL stylesheet actually looks like).

>In fact what happened is that I would like jade to generate
>the document in a 'macro language' like LaTeX with a certain package.
>The same applies to API specifications. One would like to include
>them in high quality manuals, but also as online manuals, e.g. 
>UNIX man.

In other words you want to create a markup transformation, rather than an
output stylesheet. LaTeX is your target markup language.

[Aside: TeX can be used as a pure formatting markup language, as it is in
JadeTeX, or as a high level markup language; the LaTeX documentclasses are
strongly biased towards the latter.]

[...]

>What is the best solution? Does anyone have an idea? Any suggestion
>would help me alot.

If your problem is that you have many documents written to an SGML DTD which
you wish to translate to LaTeX, then defining an automated translation from
the SGML DTD -> LaTeX documentclass is likely a good way to go.  If this is
a one off problem, it's probably faster (and will produce better LaTeX) to
do the translation by hand.

How easy the automated translation is will depend on the SGML DTD; the
easiest would be an SGML equivalent of the LaTeX article class :-).

The option of parsing the SGML document in TeX exists (as Sebastian notes),
but does not, I think, solve your problem; it will print the document, but
not transform it to what your publisher wants.  

I don't know of a common DTD that is a workable substitute for LaTeX in
scientific publishing -- DocBook is the closest, but is grossly lacking in
mathematical notation.

>P.S. At the moment I have added a backen to support SDML (specific
>     document markup language, or DECDocument, it runs on OpenVMS).
>     SDML is a macro package on top of TeX. I have documents written
>     in SGML, from which I generate TeX, RTF, and ...SDML. In order
>     to make optimal use of SDML, I would like to access macros defined
>     in SDML without having to modify the DSSSL scripts.

I don't follow what you want to do here, but it would appear to me that you
have the tool in place to do the automated high level transform that I would
think you need?

Sebastian Rahtz <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> commented

SR>my advice: switch to another publish, if they cannot handle SGML/XML.

I don't think this is a real option (quite aside from issues about the
ability to switch publishers).  Is there a generally published DTD suitable
for scientific papers?  As I said above, I don't think so -- and if I have
to rewrite for a "house style" for every different publisher, why do I care
if the house style is SGML or TeX?

PR > In fact what happened is that I would like jade to generate
PR > the document in a 'macro language' like LaTeX with a certain package.

SR>in fact, the same process as HTML output. moral: write another
SR>stylesheet, like the HTML ones have to be

I concur completely. A high level TeX backend (or appropriate set of
non-standard fos) would make the problem easier.

PR > What is the best solution? Does anyone have an idea? Any suggestion
PR > would help me alot.

SR>I don't think there is a magic bullet. An SGML to LaTeX transformation 
SR>is a high-level thing entirely at odds with the philosophy of DSSSL
SR>(and XSL FO). Of course, DSSSL (or XSLT) are good languages for
SR>writing this transformation

I hate to disagree on philosophy questions, but I think this need is
reasonably in keeping with the transformation language part of DSSSL. The
only place it is at odds is that the output markup is not SGML, which the
transformation language seems not to have envisioned. 
Mark


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread