ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* listings.sty
@ 2004-06-27 17:23 Peter Münster
  2004-06-28  7:38 ` listings.sty Patrick Gundlach
  2008-07-10  0:27 ` listings.sty Mohamed Bana
  0 siblings, 2 replies; 19+ messages in thread
From: Peter Münster @ 2004-06-27 17:23 UTC (permalink / raw)
  Cc: Carsten Heinz

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?
* listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
  same things as keyval, or should listings stay with keyval?

Greetings, Peter

-- 
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2004-06-27 17:23 listings.sty Peter Münster
@ 2004-06-28  7:38 ` Patrick Gundlach
  2004-06-28  8:03   ` listings.sty Hans Hagen
  2008-07-10  0:27 ` listings.sty Mohamed Bana
  1 sibling, 1 reply; 19+ messages in thread
From: Patrick Gundlach @ 2004-06-28  7:38 UTC (permalink / raw)


Hello Peter,

> 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?

Hmm, I never use listings.sty with LaTeX. Once I used the ConTeXt
variant of listings.sty. Perhaps the ConTeXt built in support for
listings is sufficient.

> * listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
>   same things as keyval, or should listings stay with keyval?

I'd suggest to go for the ConTeXt specific. I could help with it. See
syst-gen.tex and syst-ext.tex for details on the macros for a=b kind
of assignments in ConTeXt.

Patrick

-- 
texshow-web:  http://members.ping.de:8061
ConTeXt wiki: http://members.ping.de:8062

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28  7:38 ` listings.sty Patrick Gundlach
@ 2004-06-28  8:03   ` Hans Hagen
  2004-06-28  8:18     ` Morten Høgholm
                       ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Hans Hagen @ 2004-06-28  8:03 UTC (permalink / raw)


Patrick Gundlach wrote:

>Hello Peter,
>
>  
>
>>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? 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28  8:03   ` listings.sty Hans Hagen
@ 2004-06-28  8:18     ` Morten Høgholm
  2004-06-28  8:39     ` Holger Schöner
  2004-06-28  9:26     ` Peter Münster
  2 siblings, 0 replies; 19+ messages in thread
From: Morten Høgholm @ 2004-06-28  8:18 UTC (permalink / raw)


On Mon, 28 Jun 2004 10:03:37 +0200, Hans Hagen <pragma@wxs.nl> wrote:


> what is listings.sty providing?

Pretty printing of source code for a large number of programming  
languages. Lots of bells and whistles, and easily extensible. The manual  
<http://www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf>  
shows a lot of examples.
-- 
Morten Høgholm

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28  8:03   ` listings.sty Hans Hagen
  2004-06-28  8:18     ` Morten Høgholm
@ 2004-06-28  8:39     ` Holger Schöner
  2004-06-28  9:26     ` Peter Münster
  2 siblings, 0 replies; 19+ messages in thread
From: Holger Schöner @ 2004-06-28  8:39 UTC (permalink / raw)


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
hfsch@cs.tu-berlin.de	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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28  8:03   ` listings.sty Hans Hagen
  2004-06-28  8:18     ` Morten Høgholm
  2004-06-28  8:39     ` Holger Schöner
@ 2004-06-28  9:26     ` Peter Münster
  2004-06-28 14:39       ` Hans Hagen
  2 siblings, 1 reply; 19+ messages in thread
From: Peter Münster @ 2004-06-28  9:26 UTC (permalink / raw)


On Mon, 28 Jun 2004, Hans Hagen wrote:

> what is listings.sty providing? 

Hello Hans,
here some features of listings.sty:
- support for a lot of languages (for example C)
- easy to add further languages
- line breaking (see my email from 19. June mentioning \lstinline)
- line numbering
- different options for column alignment
- escaping to TeX
- layout elements (frames, spacing, background, captions, etc)
- indexing
- floating listings
- special treatment of comments
- a lot more...

I don't know about all the \definetyping features (only those, that are
documented), perhaps the capabilities of ConTeXt are already sufficient. On
the other side, listings.sty is a very great package and mostly written in
Plain TeX. So perhaps it's worth the effort. I don't know...

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28  9:26     ` Peter Münster
@ 2004-06-28 14:39       ` Hans Hagen
  2004-06-28 17:46         ` Peter Münster
  0 siblings, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2004-06-28 14:39 UTC (permalink / raw)


Peter Münster wrote:

>On Mon, 28 Jun 2004, Hans Hagen wrote:
>
>  
>
>>what is listings.sty providing? 
>>    
>>
>
>Hello Hans,
>here some features of listings.sty:
>- support for a lot of languages (for example C)
>- easy to add further languages
>- line breaking (see my email from 19. June mentioning \lstinline)
>- line numbering
>- different options for column alignment
>- escaping to TeX
>- layout elements (frames, spacing, background, captions, etc)
>- indexing
>- floating listings
>- special treatment of comments
>- a lot more...
>
>I don't know about all the \definetyping features (only those, that are
>documented), perhaps the capabilities of ConTeXt are already sufficient. On
>the other side, listings.sty is a very great package and mostly written in
>Plain TeX. So perhaps it's worth the effort. I don't know...
>  
>
A verbatim environment is tricky because one has to play with catcodes and the endcondition. There are also some spacing issues when used in combination with other macro package features. Another complication is that active characters are used for other features as well. I had put it on my todo list to reimplement some of the context verbatim features using etex (more robust and faster). 

When cooking up a new environment, it's best to separate functionality and use built in support when possible. For instance, line numbering, layout elements, floating listings are kind of independent of such a mechanisms.  

If some features are missing in the current verbatim environment (one of the older parts of context) i can add them if needed. On the other hand,  it does not hurt to have multiple alternatives. 

One potential problem with third party modules is that they set tex variables without context knowing about it. Also, redefining low level context macros is asking for problems, so if some special kind of support is needed for a user module, better ask me so that i can provide that low level feature in the kernel. Third party modules start with t-*    

Hans 
 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28 14:39       ` Hans Hagen
@ 2004-06-28 17:46         ` Peter Münster
  2004-06-28 21:51           ` Nikolai Weibull
  2004-07-10  9:44           ` Peter Münster
  0 siblings, 2 replies; 19+ messages in thread
From: Peter Münster @ 2004-06-28 17:46 UTC (permalink / raw)


On Mon, 28 Jun 2004, Hans Hagen wrote:

> When cooking up a new environment, it's best to separate functionality
> and use built in support when possible. For instance, line numbering,
> layout elements, floating listings are kind of independent of such a
> mechanisms.

Yes, for such features the LaTeX built in mechanisms are used (for example
"\addcontentsline{lol}{lstlisting}{...}". Here the LaTeX interface must be
replaced by a ConTeXt interface.

> If some features are missing in the current verbatim environment (one of
> the older parts of context) i can add them if needed. On the other hand,
> it does not hurt to have multiple alternatives.

In general, the users prefer one solid way to go, instead of multiple
choices but each one with missing features.
If you want to rewrite the verbatim environment anyway, perhaps it's the
easiest way to take listings.sty as starting point?

Personally for me, today I'm just looking for two features:
- line breaking as suggested in my email from 19. June (-> \hyphenatedfile)
- support for C and C++

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28 17:46         ` Peter Münster
@ 2004-06-28 21:51           ` Nikolai Weibull
  2004-07-10  9:44           ` Peter Münster
  1 sibling, 0 replies; 19+ messages in thread
From: Nikolai Weibull @ 2004-06-28 21:51 UTC (permalink / raw)


* Peter Münster <pmlists@free.fr> [Jun 28, 2004 20:00]:
> Personally for me, today I'm just looking for two features:
> - line breaking as suggested in my email from 19. June (-> \hyphenatedfile)
> - support for C and C++

What I think would work best is if someone could document the verbatim
environment thoroughly---and how to add new types---so that it would be
easy to add support for C and C++ oneself.  I'm probably going to need
to define one for Ruby at some point,
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Re: listings.sty
  2004-06-28 17:46         ` Peter Münster
  2004-06-28 21:51           ` Nikolai Weibull
@ 2004-07-10  9:44           ` Peter Münster
  1 sibling, 0 replies; 19+ messages in thread
From: Peter Münster @ 2004-07-10  9:44 UTC (permalink / raw)


On Mon, 28 Jun 2004, Peter Münster wrote:

> Personally for me, today I'm just looking for two features:
> - line breaking as suggested in my email from 19. June (-> \hyphenatedfile)

What do you think, will this be possible in the near future?
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_____________________________________
FilmSearch engine: http://f-s.sf.net/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2004-06-27 17:23 listings.sty Peter Münster
  2004-06-28  7:38 ` listings.sty Patrick Gundlach
@ 2008-07-10  0:27 ` Mohamed Bana
  2008-07-10 12:29   ` listings.sty Aditya Mahajan
  2008-07-10 18:26   ` listings.sty nico
  1 sibling, 2 replies; 19+ messages in thread
From: Mohamed Bana @ 2008-07-10  0:27 UTC (permalink / raw)
  To: ntg-context

Peter Münster <pmlists <at> free.fr> writes:

> 
> 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?
> * listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
>   same things as keyval, or should listings stay with keyval?
> 
> Greetings, Peter
> 


Hi,

I anyone got any status on the port?  Here's the link for the package;
http://www.ctan.org/tex-archive/macros/latex/contrib/listings/.

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-10  0:27 ` listings.sty Mohamed Bana
@ 2008-07-10 12:29   ` Aditya Mahajan
  2008-07-10 18:26   ` listings.sty nico
  1 sibling, 0 replies; 19+ messages in thread
From: Aditya Mahajan @ 2008-07-10 12:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1148 bytes --]

On Thu, 10 Jul 2008, Mohamed Bana wrote:

> Peter Münster <pmlists <at> free.fr> writes:
>
>>
>> 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?
>> * listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
>>   same things as keyval, or should listings stay with keyval?
>>
>> Greetings, Peter
>>
>
>
> Hi,
>
> I anyone got any status on the port?  Here's the link for the package;
> http://www.ctan.org/tex-archive/macros/latex/contrib/listings/.

I don't know the status of this port. However, Carsten Heinz no longer 
maintains listings, currently Brooks Moses does. Brooks used to be active 
in both ConTeXt and LaTeX communities and had started a project of 
converting core LaTeX functionality into ConTeXt. As such he is an ideal 
person to evaluate the feasibility of porting listings to ConTeXt. I would 
suggest writing to him to see his opinion on this.

Aditya

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-10  0:27 ` listings.sty Mohamed Bana
  2008-07-10 12:29   ` listings.sty Aditya Mahajan
@ 2008-07-10 18:26   ` nico
  2008-07-10 20:34     ` listings.sty Mohamed Bana
  2008-07-10 21:31     ` listings.sty Hans Hagen
  1 sibling, 2 replies; 19+ messages in thread
From: nico @ 2008-07-10 18:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 10 Jul 2008 02:27:45 +0200, Mohamed Bana <abbg770@city.ac.uk>  
wrote:

> Peter Münster <pmlists <at> free.fr> writes:
>
>>
>> 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?
>> * listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
>>   same things as keyval, or should listings stay with keyval?

I don't see the point. The native ConTeXt verbatim support seems to cover  
all what listings can do.

The wiki page gives some examples:  
http://wiki.contextgarden.net/Verbatim_text

Regards,
BG
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-10 18:26   ` listings.sty nico
@ 2008-07-10 20:34     ` Mohamed Bana
  2008-07-10 22:02       ` listings.sty Aditya Mahajan
  2008-07-10 21:31     ` listings.sty Hans Hagen
  1 sibling, 1 reply; 19+ messages in thread
From: Mohamed Bana @ 2008-07-10 20:34 UTC (permalink / raw)
  To: ntg-context

nico <nicolas.marsgui <at> libertysurf.fr> writes:

> 
> I don't see the point. The native ConTeXt verbatim support seems to cover  
> all what listings can do.
> 
> The wiki page gives some examples:  
> http://wiki.contextgarden.net/Verbatim_text
> 
> Regards,
> BG
>


Hi,

take a look at http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf, note you
can customize the style of the font numbering, you can place a caption and my
favourite is the colouring; if you use Eclipse you'll notice that it's the same
colour the editor uses.


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-10 18:26   ` listings.sty nico
  2008-07-10 20:34     ` listings.sty Mohamed Bana
@ 2008-07-10 21:31     ` Hans Hagen
  2008-07-11 21:51       ` listings.sty Mohamed Bana
  1 sibling, 1 reply; 19+ messages in thread
From: Hans Hagen @ 2008-07-10 21:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

nico wrote:
> On Thu, 10 Jul 2008 02:27:45 +0200, Mohamed Bana <abbg770@city.ac.uk>  
> wrote:
> 
>> Peter Münster <pmlists <at> free.fr> writes:
>>
>>> 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?
>>> * listings.sty uses keyval.sty, how is the proper ConTeXt-way to do the
>>>   same things as keyval, or should listings stay with keyval?
> 
> I don't see the point. The native ConTeXt verbatim support seems to cover  
> all what listings can do.
> 
> The wiki page gives some examples:  
> http://wiki.contextgarden.net/Verbatim_text

there will be a new pretty print mechanism which provided more control 
in mkiv

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-10 20:34     ` listings.sty Mohamed Bana
@ 2008-07-10 22:02       ` Aditya Mahajan
  0 siblings, 0 replies; 19+ messages in thread
From: Aditya Mahajan @ 2008-07-10 22:02 UTC (permalink / raw)
  To: ntg-context

Quoting Mohamed Bana <abbg770@city.ac.uk>:

> nico <nicolas.marsgui <at> libertysurf.fr> writes:
>
>>
>> I don't see the point. The native ConTeXt verbatim support seems to cover
>> all what listings can do.
>>
>> The wiki page gives some examples:
>> http://wiki.contextgarden.net/Verbatim_text
>>
>> Regards,
>> BG
>>
>
>
> Hi,
>
> take a look at  
> http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf, note you
> can customize the style of the font numbering, you can place a caption and my
> favourite is the colouring; if you use Eclipse you'll notice that  
> it's the same
> colour the editor uses.

This can be done easily with current ConTeXt, for example:

\setupcolors[state=start]

\starttext
\setuplinenumbering[location=intext]

\setuptyping[option=color]

\startJV
/**
  * The HelloWorldApp class implements an application that
  * simply prints "Hello World!" to standard output.
  */
class HelloWorldApp {
     public static void main(String[] args) {
         System.out.println("Hello World!"); // Display the string.
     }
}
\stopJV


See the wiki page for adding line numbering and frames (or ask here if  
the wiki page is confusing). It is possible to change the color scheme  
and the wiki page gives an example. To make sure that the frames break  
around pages, you will need to use backgroundtext rather than  
framedtext.

The only advantage of listings is that it provides support for a *lot*  
of languages out of the box. Writing a syntax highlighter is not easy.  
I mean, you need to define all kinds of keywords, write regex or  
parser for identifying comments, strings, escape sequences etc. No  
matter what language is used to write a syntax highlighter, writing a  
good syntax highlighter takes time. And hence the advantage of  
listing. In terms of features, I think it is not difficult to add the  
required display features in ConTeXt. Line numbering every n lines[1],  
using proportional fonts, fancy frames, etc are pretty  
straight-forward things.

One option for the long term could be to write a module for mkiv, that  
can parse the syntax highlighting files of some editor and use them  
directly. Since most decent editors have syntax highlighting files for  
lot of languages, we will not have to do the hard work. (well, in case  
you don't like any available syntax highlighting, and want to roll  
your own, then it is a different matter).

There is a module that uses vim to generate syntax highlighting. Mojca  
started the module, and I extended it when I needed syntax  
highlighting for a project. After that, I have not really updated it.  
It works by using vim to generate a tex file which is then read by  
context. The only drawback is the starting and stopping times of vim  
are fairly large (few secs for each file to be transformed).

Aditya

[1] Actually, line numbering every n lines is already supported.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-10 21:31     ` listings.sty Hans Hagen
@ 2008-07-11 21:51       ` Mohamed Bana
  2008-07-11 22:53         ` listings.sty Hans Hagen
  2008-07-11 22:54         ` listings.sty Aditya Mahajan
  0 siblings, 2 replies; 19+ messages in thread
From: Mohamed Bana @ 2008-07-11 21:51 UTC (permalink / raw)
  To: ntg-context

Hans Hagen <pragma <at> wxs.nl> writes:

> 
> there will be a new pretty print mechanism which provided more control 
> in mkiv
> 
> Hans
> 

Hi Hans,

Will it support more or less the same features?

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-11 21:51       ` listings.sty Mohamed Bana
@ 2008-07-11 22:53         ` Hans Hagen
  2008-07-11 22:54         ` listings.sty Aditya Mahajan
  1 sibling, 0 replies; 19+ messages in thread
From: Hans Hagen @ 2008-07-11 22:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mohamed Bana wrote:
> Hans Hagen <pragma <at> wxs.nl> writes:
> 
>> there will be a new pretty print mechanism which provided more control 
>> in mkiv
>>
>> Hans
>>
> 
> Hi Hans,
> 
> Will it support more or less the same features?

yes, and more

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: listings.sty
  2008-07-11 21:51       ` listings.sty Mohamed Bana
  2008-07-11 22:53         ` listings.sty Hans Hagen
@ 2008-07-11 22:54         ` Aditya Mahajan
  1 sibling, 0 replies; 19+ messages in thread
From: Aditya Mahajan @ 2008-07-11 22:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 11 Jul 2008, Mohamed Bana wrote:

> Hans Hagen <pragma <at> wxs.nl> writes:
>
>>
>> there will be a new pretty print mechanism which provided more control
>> in mkiv
>>
>> Hans
>>
>
> Hi Hans,
>
> Will it support more or less the same features?

Which features of listings do you find are missing from ConTeXt? Since I 
rarely use listings, it is very hard for me evaluate what ConTeXt is 
lacking. If you can explicitly point out the features that you want, it 
will be much easier to ensure that are implemented.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-07-11 22:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-27 17:23 listings.sty Peter Münster
2004-06-28  7:38 ` listings.sty Patrick Gundlach
2004-06-28  8:03   ` listings.sty Hans Hagen
2004-06-28  8:18     ` Morten Høgholm
2004-06-28  8:39     ` Holger Schöner
2004-06-28  9:26     ` Peter Münster
2004-06-28 14:39       ` Hans Hagen
2004-06-28 17:46         ` Peter Münster
2004-06-28 21:51           ` Nikolai Weibull
2004-07-10  9:44           ` Peter Münster
2008-07-10  0:27 ` listings.sty Mohamed Bana
2008-07-10 12:29   ` listings.sty Aditya Mahajan
2008-07-10 18:26   ` listings.sty nico
2008-07-10 20:34     ` listings.sty Mohamed Bana
2008-07-10 22:02       ` listings.sty Aditya Mahajan
2008-07-10 21:31     ` listings.sty Hans Hagen
2008-07-11 21:51       ` listings.sty Mohamed Bana
2008-07-11 22:53         ` listings.sty Hans Hagen
2008-07-11 22:54         ` listings.sty Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).