[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document formatting in Scheme



Hello!

On 27 Oct 2001, Riku Saikkonen wrote:

> I think you need both. I think TeX is a pretty good solution for the
> more low-level stuff (like tables or math formulas), but it still
> needs a more high-level interface for specifying structure that is
> specific to code. I think this is doable, because it's quite easy to
> create new abstractions for structural markup in (La)TeX - I create
> small ones in most of the LaTeX documents I write.
> 
> To produce good-quality output, it's not enough just to have a
> converter to TeX from something else: The source language also needs
> to have all the features of TeX - representations for all the
> thousands of mathematical symbols and typographical features (no-break
> space, different lengths of dashes, \@, hyphenation hints, etc.) and
> so forth. Otherwise the output quality isn't as good as it would be
> with a markup that uses a form of TeX as the source language.
>
Well, I do agree that some typesetting language is necessary 
and I agree that TeX is one of solutions possible. 
But is it an appropriate solution for a system which is targeted to Web
publishing rather than to paper documentation? 
And I do not like an idea of embedding all this low-level markup in Scheme sources.  

> thousands of mathematical symbols and typographical features (no-break
> space, different lengths of dashes, \@, hyphenation hints, etc.) and
in a program source code will make it difficult to understand. 

For a classical (WEB) literate programming style three different languages 
have to be used in a source document: programming language, typesetting language,
and a glue. 

IMHO, it is better to use a programming language and minimal structural
markup in source code, and describe layout in external stylesheets
or elucidative documents (in Kurt Noermark's style, for example)
using some typesetting/presentational markup language.

And I think that (La)TeX has great potential for such a purpose.

Just an example:
Christian Queinnec's l2t 
http://youpou.lip6.fr/queinnec/WWW/l2t.html
may be integrated with (S)XML using SXMLP package 
http://pair.com/lisovsky/sxml/sxmlp/
(if you have a recent l2t distribution - it is already included).

This makes it possible to insert some parts of XML document
in LaTeX document. In particular, it is possible to incorporate 
some parts of XML representation of a Scheme program into elucidative 
TeX document.

Of course, this is just a one of approaches possible...

Best regards,
       Kirill.