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: Wed, 26 May 1999 08:28:55 -0700
Sebastian Rahtz replied to my comment

Wroth, Mark writes:
 > implementation).  Perhaps an approach might be to have a TeX backend
 > emits macros which then require individual definition?  I'd find that

Sebastian Rahtz:
but thats what Jade is doing now. can you give a concrete example
of what you would change?

For a simple document like 

<address>John Doe<br>2920 N 19th St<br>Nowhere, IL 11223</address>
<para>Some discussion</para>
<para>Some more discussion</para>

and a stylesheet like

(element doc
   (make scroll
      (make environment type: "document"
(element frontmatter (make environment type: "front" (process-children)))
(element address (make environment type: "address" (process-children)))
(element body (make environment type: "body" (process-children)))

(element br (make macro type "\"))

(element para (make sequence
                (literal "^M^M") ; actually I want an empty line here
                (literal "^M^M") ; actually I want an empty line here

would produce the following output

\begin{address}John Doe\\2920 N 19th St\\Nowhere, IL 11223\end{address}

Some discussion

Some more discussion


Such an approach requires the creation of a suitable macro package in TeX,
or the adoption of an existing package, and so in some sense violates the
"spirit" of DSSSL as a formatting language since the format of the output
document is not specified by the DSSSL script but rather by the TeX macro
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 gets
done in a package well suited for that piece of the problem.

I think the two quasi-flow objects "environment" and "macro" would be all
that is needed (noting that to deal with LaTeX-style optional arguments
requires a little more complexity than I showed in my example).

 DSSSList info and archive:

Current Thread