Am 19.10.2009 um 00:50 schrieb Wolfgang Schuster:


Am 18.10.2009 um 12:02 schrieb Andreas Harder:

Before I help you provide us with more information, e.g. should the text in the buffer
appear also in the complete text or do you it only in the snippet?

Sorry, that I did not make myself clear. The real setup is: I've a lot of line numbered text in the appendix of the document. In the body I'd like to cite out of it (with the same line numbers as in the source/appendix). The appendix should stay unchanged.

For the beginning you can play with this code, it has to be changed
in a few parts (e.g. make \setuplines local) but it's what I can read
from your description above and the code you showed in the previous message.

Thank you very much for your help! 

I adapted your solution and it works as intended. 

There is an inherent "problem" as one can see in the attachment, but since mostly I cite a whole paragraph it's not a real problem. I think therefore you used the lines-environment?