Hi @all,

I'm trying to put some codelistings into my ConTeXt file, but I don't get
line numbers. Im using a resend version of ConTeXt:

| ConTeXt  ver: 2012.09.06 23:03 MKIV  fmt: 2012.9.7  int: english/english

Here is the setup for my code environment:

| \definefloat [listing] [listings]
| \setupfloat  [listing] [topframe=on, bottomframe=on]
| \setupheadtext [listings=Quellcodelistings]
|
| \defineblank  [aroundcode] [medium]
| \definetyping [code]
| \setuptyping  [code]
|   [option=color, bodyfont=8.0pt, margin=yes,
|      before={\blank[aroundcode]\startlinenumbering},
|      after={\blank[aroundcode]\stoplinenumbering}]

And here is an example, how I use it. I place it into a floating environment
so I can have a nice Listion of my code sippets with \completelistoflistings.

| \placelisting [here] [lst:bb]
| {Beispiel eines bitbake Rezeptes (zlib_1.2.7.bb)}
| {\startcode
| SUMMARY = "Zlib Compression Library"
| DESCRIPTION = "Zlib is a general-purpose, patent-free, lossless data \
| compression library which is used by many different programs."
| HOMEPAGE = "http://zlib.net/";
| SECTION = "libs"
|
| LICENSE = "Zlib"
| LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=94d1b5a..."
|
| SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.bz2 \
|            file://remove.ldconfig.call.patch \
|            "
| SRC_URI[md5sum]    = "2ab442d1691..."
| SRC_URI[sha256sum] = "49e2e9658df..."
|
| do_configure (){
|     ./configure --prefix=${prefix} --shared --libdir=${libdir}
| }
|
| do_compile (){
|     oe_runmake
| }
|
| do_install() {
|     oe_runmake DESTDIR = ${D} install
| }
| \stopcode}

You can have a look at the result here:
https://dl.dropbox.com/u/2721576/code.pdf

Besides the lack of the linenumbers you may notice the slightly bigger
space between the top line and the code and the bottom line and the code.

At the moment I'm adding the line numbers by hand ...

Cheers, Markus
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to