[NTG-context] Verbatim line numbering: location intext/text, empty lines, wrapped lines

Stefan Müller warrence.stm at gmx.de
Tue Aug 3 14:50:22 CEST 2010

I found some issues with verbatim line numbering in MkIV. The appended 
examples is basically taken from the wiki. 
(The wiki uses MkII?)

When I want the line numbers to be displayed "intext", I have to use 
\setuplinenumbering[location=text], although 
http://wiki.contextgarden.net/Verbatim_text#Line_numbering and 
http://wiki.contextgarden.net/Reference/en/setuplinenumbering tell me to use 
"location=intext". Should this be changed in the wiki?

In case of "location=text" the lines are typeset over the right margin of the 
box. I think this is because the space used by the numbers is not subtracted 
from the available space considered by the word-wrapping algorithm.

In the example, line 2 is wrapped over three lines and gets 3 line numbers, 
while IMHO it only should get one (the wiki says the same).

Line 4 gets a number, which is what I would expect, but it is a different 
behavior as in the wiki (there, the empty line in the example gets no number). 
Is there an option to choose whether a blank line should be (a) numbered, (b) 
skipped or (c) get no number but the internal counter is still increased?



\defineframedtext[framedcode][strut=yes, offset=2mm, width=7cm, align=right]
\definetyping[code][numbering=line, before={\startframedcode}, 

This is the first line % line 1
This is a rather long line that is wrapped, so look how the line numbering is 
done % line 2
Another line % line 3
% line 4
Last line after an empty line % line 5


Thank you in advance for any hints,

More information about the ntg-context mailing list