Dynamic line-number generation