ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Re: listings.sty
Date: Mon, 28 Jun 2004 16:39:35 +0200	[thread overview]
Message-ID: <40E02DA7.7090605@wxs.nl> (raw)
In-Reply-To: <Pine.LNX.4.58.0406281045200.21477@gaston.free.fr>

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

  reply	other threads:[~2004-06-28 14:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40E02DA7.7090605@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).