I'm formatting an ebook that uses line numbers. The only problem is the numbers have not been provided, so I would have to enter them all myself.

How can I add these line numbers, maybe using PERL (I have a very cursory knowledge of it myself). I think I basically need to append a number to the end of each paragraph, incrementing by 1.

  • 1
    I cleaned up your question, assuming you don't want to know if someone knows how to do what you want (which is a yes/no answerable question). The main problem is that your question is still ambiguous as you write about line numbers (hard as a line depends on device/font settings etc) and give an example of having paragraphs numbered (actually relatively easy), what is it you want?
    – Anthon
    Commented Jul 27, 2014 at 7:06
  • In addition to Anthon's question, what file format are the documents you're working with? MS Word documents, HTML, an XML format, PDF, InDesign?
    – thinkulum
    Commented Jul 31, 2014 at 13:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.