Hello,

> >>I suggested to the author of the very feature rich LaTeX-Listings package,
> >>Carsten Heinz, to port this package to ConTeXt, and it seems, that he is
> >>interested. But before doing it, there are some questions:
> >>
> >>* What do Hans and other people thing about that?
> >>
> what is listings.sty providing? 

listings.sty is one of the very few packages from LaTeX, which I am still 
missing in ConTeXt. I yet never extensively used the listings functionality 
provided by ConTeXt, but from what I remember from reading the 
documentation, the liststings.sty is much more flexible.

It has an easy interface to define new languages (like Opal, a functional
programming language used in courses at my university), allows flexible line
numbering (all, every n lines), it allows customization of all fonts (line
numbers, keywords, comments, ...), indenting, ...

Most importantly for me: It allows easy escaping to TeX. One option is to 
interpret all comments as (La)TeX code. This was very useful for typesetting 
correctness proofs of programs using the Hoare Calculus, because it makes 
such listings much more readable. Then there are other niceties already 
provided by ConTeXt, like frames, floats, etc.

Oh, one other nice thing is, that it allows to use proportional fonts (is 
that the right translation? I mean non-fixed width fonts), and still can 
keep indentations correctly, e.g. with assignments like

        alongvariable = 1;
        short         = 2;

I think the algorithm is described a little in the documentation. As far as 
I remember, it assumes a (configurable) average character width of 
proportional fonts and typesets every word in a box of the width 
corresponding to the number of characters included in the word.

These were at least the features most important to me ...

-- 
Holger F. Schoener      TU Berlin; Dept. IV: EE and Computer Science
[EMAIL PROTECTED]       http://www.cs.tu-berlin.de/~hfsch/
Rooms FR2525            Tel: +49-30-314-73115, Fax: -73121
Office FR 2-1           Franklinstr. 28/29, D-10587 Berlin, Germany
_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to