Hi again!

I'm writing a programming tutorial with ConTeXt. Therefore I have
programlistings that I want to reference in my text. My idea is to labels
together with verbatim text.

For instance:

\definelabel[programlisting][text=listing,
                             location=inmargin,
                             headstyle=small]

And in my text I write:

\listing\starttyping
/* first.c : my first C program */
#include <stdio.h>

int main()
{
  puts("Hello Everybody!");
  return 0;
}
\stoptyping

This all works fine, but I expected the label ("listing 1.1") to appear in
the margin AT THE SAME LINE as the first line of my programlisting (/*
first.c ... */). However, the label is somewhat above the actual verbatim
text.

Any tips on how to solve this are welcome!

thanks in advance,

Kris Hermans


Reply via email to