Thanks for the tips, Simon's solution seems to be the best. Thank you very much :-D .
@David Kastrup:
I didn't know \endSpanners. It's an interesting solution, but it adds a spanner line up to the next note in my case. At least here it does with lilypond 2.17.97. I read in the manual it should not though, or am I reading it wrong?
"The music function \endSpanners
terminates the spanner which starts on the immediately following note prematurely. It is terminated after exactly one note, or at the following bar line if to-barline
is true and a bar line occurs before the next note."
No barline before the next note here though.
It should show no spanner line at all, only the position number, so it will be Simon's solution I guess.
grtz,
Bart