RE: TeX backend (was re: The DSSSList Digest V3 #50)

Subject: RE: TeX backend (was re: The DSSSList Digest V3 #50)
From: MARK.WROTH@xxxxxxxxxxx (Wroth, Mark)
Date: Thu, 27 May 1999 08:54:21 -0700
Date: Wed, 26 May 1999 22:36:42 +0100 (BST)
From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: TeX backend (was re: The DSSSList Digest V3 #50)

Sebastian Rahtz comments on my daydream about easy Jade + TeX formatting,
exemplified by my notional stylesheet:

Wroth, Mark writes:
 > and a stylesheet like
 > (element doc
 >    (make scroll
 >       (make environment type: "document"
 >         (process-children)
 >       )
 >     )
 > )
 > (element frontmatter (make environment type: "front" (process-children)))
 > (element address (make environment type: "address" (process-children)))
 > (element body (make environment type: "body" (process-children)))

Sebastian Rahtz:
oh sure, but this would be a) a million miles from the spirit of DSSSL, b)
limited to Jade, and c) just as easily implemented in XSL + TeXML

 > Such an approach requires the creation of a suitable macro package in
 > or the adoption of an existing package, and so in some sense violates the

Sebastian Rahtz:
I think that would be no problem at all

 > package.  Nonetheless, *I* would find it a useful alternative; DSSSL
 > provides a flexible method for interpreting the input document (in
 > particular re-ordering, which is a pain in TeX), while the typesetting
 > done in a package well suited for that piece of the problem.

Mark Wroth (new text)
Well, I *said* it in some sense violates the spirit of DSSSL :-).
Seriously, while this combination is not at all what the designers of DSSSL
apparently had in mind, this nonstandard DSSSL could be very useful in the
same kinds of ways the non-standard transformation ojects are.  Jade does
not implement the transformation language part of the DSSSL specification
... but with James' very limited set of additions, it becomes quite useful
for transformations.  The more I think about it, the more I think such a TeX
approach would be very helpful for certain problems, including some that are
quite difficult with simple-page-sequence (at least as far as I can see).

Sebastian Rahtz:
is it really much work work to the use SGML backend, and stuff like

(element entity
    (literal "\\SetNote{")
    (literal (attribute-string "set" ))
    (literal "}{")
    (literal (attribute-string "id"))
    (literal "}{")
    (literal (attribute-string "id" (parent)))
    (literal "}")

which I just located in a DSSSL style sheet of mine? you can already
write literal TeX. all you are asking for is some wrapping features

Mark Wroth (new text)
Well, I'm not quite sure what this code is doing, so that's hard to answer
:-) But in terms of ease of use, I'd much rather have something like 

(element entity (make macro type (literal (attribute-string "id"

than the code above (noting again that I may have butchered the intended
result of Sebastian's code).

It may be easy to write DSSSL code which implements what I suggested and
therefore "hides" the complexity of emitting the TeX; that may well be an
easy way to deal with the problem.  The thought hadn't occurred to me, and
will not go in my "to do" pile.

Apparently, though, I'm not the only one who thought of this.  Norman Gray's
"simple backend" sounds like pretty much what I was thinking of.  I confess
that the idea of hacking a backend together is pretty intimidating to me --
I am by no stretch of the imagination a C++ programmer.  But I'd find
something like that a worthwhile addition to an "OpenJade".

Date: Wed, 26 May 1999 11:06:26 +0100 (GMT)
From: Norman Gray <norman@xxxxxxxxxxxxxxx>
Subject: RE: The DSSSList Digest V3 #50
The backend is simple because it's more-or-less a copy of the SGML
transformation backend.  I realise that, apart from one afternoon's
experimentation, I've only ever used Jade for transformation, to
another DTD or to high-level LaTeX markup.

The point I'd make is that Jade is a tremendously powerful tool even
if you never once crack open Clause 12, and if we're talking about
Jade development priorities, I'd put in a vote for leaving ever-fancier
formatting to post-processors, and instead adding more modules to Jade's
grove plan.

Perhaps Jade and DSSSL's Big Thing could become their direct and easy
access to the document's and subdocuments' groves.  [Also, XSL looks
like hell-on-earth - I _never_ want to write any of it...]

Mark Wroth (new text)
Norman has stated the concept I was grappling with very nicely; the power of
SGML + DSSSL---for the applications I've found for it---is not its nice
formatting of the output.  It's the ability (which I've only partially
mastered) to grab stuff and move it around or assemble it in different
orders than are in the document itself.  Doing that directly in TeX is
possible, but the straightforward solutions involve things like external
sort routines (e.g. BibTeX, MakeIndex).  

	I wouldn't claim this is universally true, and I certainly wouldn't
mind seeing a Jade++ that implemented everything in the DSSSL spec and
produced the output formats I need---with good typesetting.  In fact, I
think that would be a very useful tool.  But that also appears to be *HARD*,
as is a general solution in the current JadeTeX approach.  Adding a "simple
TeX backend" a la Norman's  would only solve a class of problems, not be a
general solution.  It happens that the class it would solve would be useful
to me; YMMV.

 DSSSList info and archive:

Current Thread