[cl-typesetting-devel] HTML rendering

Marc Battyani marc.battyani at fractalconcept.com
Tue Apr 20 07:37:33 UTC 2004


"Klaus Weidner" <klaus at atsec.com> wrote:

> On Tue, Apr 20, 2004 at 01:20:01AM +0200, Marc Battyani wrote:
>
> I think that parsing TeX would be harder than XML (unless you restrict
> yourself to a very small subset), and you'd have to be careful not to
> inherit the limitations. The TeX/LaTeX table model is not a good thing to
> emulate. If somebody wants to do this, more power to them, but it isn't
> going to be me.

Trying to layout a table in TeX/LaTeX/ConTeX is what made me write
cl-typesetting. :)

> > I think both are needed. When I write a document, A user friendly syntax
is
> > better IMO. But when I write code to generate a document then I prefer
to
> > work on the s-expr syntax.
>
> I fully agree here. It's great to have the full power of Lisp at your
> fingertips if you want to do something complex, but most of the time I
> just want to write text and let the engine handle the formatting.
>
> It's not an either/or choice, you can simply pick the right tool for the
> job at hand.
>
> > A lot of people proposed some syntaxes that could be cool but so far
nobody
> > has published one.  :(
> > So all syntaxes are welcomed as long as there is some lisp code to
convert
> > it to s-expr.
>
> That's exactly what I'm working on. Here's an extract from my XHTML tree
> rewriter (which corresponds to an XSL-FO stylesheet expressed in Lisp):
>
>     (case elem
>       ((:h1) `(with-style ()
>                :fresh-page
>                (paragraph (:font "Helvetica-Bold" :font-size 20
>                                  :top-margin 12 :bottom-margin 12)
>                  (tt::make-ref-mark (cons :chapter ,(incf *chapter-num*))
>                                     ,(xml-extract-text node))
>                  , at clst)))
>       ((:pre) `(with-style (:font "Courier" :font-size 12 :bottom-margin
0)
>                            (verbatim , at clst)))
>       ((:nobr) `(with-style () (hbox () , at clst)))
>       ((:br) :eol)
>       ((:i :em :var) `(with-style (:font "Times-Italic") , at clst))
>       ((:b :strong) `(with-style (:font "Times-Bold") , at clst))
>       ((:tt :kbd :samp :code :address) `(with-style (:font "Courier")
, at clst))
>       ((:big) `(with-style (:font-size 14) , at clst))

Cool!

> > BTW, I looked at some FO typesetting systems and it seems that the price
of
> > a server licence can be of more than 80Keuros !
>
> Yes, the commercial systems are horrendously expensive.
>
> There are some free alternatives - FOP is a Java-based solution developed
> by the Apache team (which I couldn't get working on my machine), and
> there's passivetex a.k.a. xmltex, which appears to be rather fragile due
> to the choice of a TeX backend.

Yes, if we find the time to finish this, it will be a good Java/Lisp test on
a real complex application.

Marc





More information about the cl-typesetting-devel mailing list