[cl-typesetting-devel] HTML rendering
Marc Battyani
marc.battyani at fractalconcept.com
Mon Apr 19 23:20:01 UTC 2004
Marc> Sure, of course the doc should be written with cl-typesetting :)
Klaus>| I disagree there :-)
> | I think that it should be written in some kind of standard format that
> | can be rendered by cl-typesetting, which isn't the same thing. I'd
> | suggest using XHTML, and personally I'd even prefer POD (Perl "Plain
> | Old Documentation"), which has the advantage of having minimally
> | intrusive markup and therefore is unpainful to type.
> |
> | Compare:
> |
> | (with-style (:font "Times-Italic") "italic")
> | " and "
> | (with-style (:font "Times-Bold") "bold")
> | "text.
> |
> | \texit{italic} and \texbb{bold} text.
> |
> | <i>italic</i> and <b>bold</b> text.
> |
> | I<italic> and B<bold> text.
> |
> | Of course the Lisp version could be abbreviated, but even the minimal
> |
> | (I "italic") " and " (B "bold") " text."
> |
> | is still way too long, and I'd hate having to put all the text I'm
> | writing into double quotes, and having to worry about escaping
> | backslashes and such things.
There is also the TeX syntax which is rather popular.
Dmitri> We do need something like this to deal with font variants in
cl-typesetting.
> IMHO, that should not use strings in double quotes, but keywords instead.
To
> achive that, we can split font names into :font-family and :font-style (or
> :font-variant) components.
>
> (with-style (:font-family "Times")
> ...
> (with-style (:font-style :bold) ; or (:font-style :b)
> ...))
>
> The require-cyr-font function (see the attachment) could be a starting
> sample.
I agree for the principle I will look at it tomorrow. (thought it's already
tomorow ;-)
> |...snip...|
> | In general, I think there's a huge opportunity for Lisp here - XML is
> | for the most part extremely easy to read and write with Lisp (except
> | for character encoding issues), and since apparently many people love
> | XML syntax (and are alarmed by Lisp parentheses), I think that's a
> | great way to interface with the rest of the world.
>
> I am not an XML expert, but many respectful lispniks (IIRC Eric Naggum,
> Erann Gat to name a few) do not share your love with XML :-)
Ahem, I don't think Klaus wants to work with XML, just import some.
> It would be well having all the above as optional modules. But I am not
for
> making cl-typesetting depend entirely on X-<something>. And I agree with
> Marc about what cl-typesetting doc should be written with.
Klaus>Well, I guess we'll just have to agree to disagree there. But please
>imagine for a minute how confusing the input text will look for a
>document that explains how to use cl-typesetting and is itself written in
>that language (despite verbatim).
The syntax is a subject that was debated a lot on c.l.l My position is that
the intermediate syntax layer must be s-expr based otherwise we would loose
a lot of power. But though some (like Dmitri) prefer to work directly in
this syntax, it seems that people generally prefer to work on a more user
friendly syntax.
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.
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.
Klaus>What I mean regarding FO is just that some *semantic* compatibility
would
>be nice - the font property selection is IMHO something that this
>standard got right.
Sure, in fact the current cl-typesetting lisp syntax is loosely inspired by
HTML/CSS so a semantic compatilibity with FO is a good idea.
BTW, I looked at some FO typesetting systems and it seems that the price of
a server licence can be of more than 80Keuros !
Marc
More information about the cl-typesetting-devel
mailing list