Answers.Body: <p>You can download a free version of Dante's <em>Divine Comedy</em> from ReadBeyond (<a href="https://www.readbeyond.it/ebooks/f3b20d25.html" rel="nofollow noreferrer">Inferno</a>, <a href="https://www.readbeyond.it/ebooks/ad4e2201.html" rel="nofollow noreferrer">Purgatorio</a>, <a href="https://www.readbeyond.it/ebooks/06003b99.html" rel="nofollow noreferrer">Paradiso</a>), these are well formatted epubs that also have numbered lines. You may find useful to look inside them and check their structure, to see if you can replicate these CSS settings for your own needs.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-21T20:33:55.213Z
Answers.Text: A great answer! The book, indeed, is very well formatted, and also has comments and illustration, so I can lookup how to deal with these. Having an id for each sentence is also a good idea.
Answers.UserDisplayName: Roman Grazhdan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-20T10:29:12.917Z
Answers.LastActivityDate: 2017-02-01T12:45:41.677Z
Answers.LastEditDate: 2017-02-01T12:45:41.677Z
Answers.UserDisplayName: Sekhemty
Answers.Body: <p>I think currently there's no way to embed enumeration in paragraphs, but here's what seems to be recommended for poetry (and I think it applies to ancient philosophy as well): <a href="http://bencrowder.net/blog/2011/06/formatting-poetry-epub-kindle/" rel="nofollow">http://bencrowder.net/blog/2011/06/formatting-poetry-epub-kindle/</a></p>
  
  <p>TL:DR - numbers go to separate <code>span</code> of class <code>num</code> and have their own CSS definitions. I'll go with that and see how it renders in readers I use.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-09T19:31:22.997Z
Answers.Text: I'd suggest giving the `<span>`s an id in addition to a class; that would allow you to link to any particular line number later on with hyperlinks.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-11T21:57:24.613Z
Answers.Text: It's a good idea! Once the formatting is done, I'll feed the directory to a Perl script which would do it for me.
Answers.UserDisplayName: Roman Grazhdan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-11T21:58:36.447Z
Answers.Text: Should be able to do it with a simple RegEx, really; no need to do it with Perl.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-26T10:09:28.223Z
Answers.Text: I think having TT or erb template is a great idea anyway. It's reuseable, and you can pass some options to the script, etc. As a rule, whenever it's more than a simple substitution in one file, I reach for Perl or Ruby.
Answers.UserDisplayName: Roman Grazhdan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-26T15:39:47.507Z
Answers.Text: Sure; whatever works best for you is definitely the best way to go. For me, I like being able to just paste in a pre-written RegEx to the find and replace box, but that's just my preference.
Answers.UserDisplayName: Tom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-08T13:39:36.643Z
Answers.LastActivityDate: 2014-06-09T06:49:18.017Z
Answers.LastEditDate: 2014-06-09T06:49:18.017Z
Answers.UserDisplayName: Roman Grazhdan
Body: <p>In some books (namely, The Iliad, The Bible, Seneca's Letters) I've seen paragraphs, lines or sentences are numbered.</p>
  
  <p>There is a couple of books I'd like to have properly formatted, and they have just that enumeration. Unfortunately, I don't know the term for this and can't find out what's the correct way to do that in <code>epub</code>.</p>
  
  <p>Should these be just regular text or is there a tag for them?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-08T13:54:35.380Z
Comments.Text: One bodge that comes to mind is using a numbered list... but that would be horribly, horribly ugly.
Comments.UserDisplayName: evilsoup
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-08T15:40:55.660Z
Comments.Text: It is not semantically a list, it's prose, so paragraphs shoudln't be list elements.
Comments.UserDisplayName: Roman Grazhdan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-06-08T21:36:23.437Z
Comments.Text: Of course you're right (and that's why I put that as a comment rather than an answer), but it might do the job in a pinch. I'm sure there are better ways, though.
Comments.UserDisplayName: evilsoup
Tags: <epub><editing><formatting>
Title: Numbered paragraphs or lines in epub?
UserDisplayName: Roman Grazhdan
ThreadText: # Numbered paragraphs or lines in epub?
  
  (Asked by: username_0 on 2014-06-08)
  
  In some books (namely, The Iliad, The Bible, Seneca's Letters) I've seen paragraphs, lines or sentences are numbered.
  
  There is a couple of books I'd like to have properly formatted, and they have just that enumeration. Unfortunately, I don't know the term for this and can't find out what's the correct way to do that in `epub`.
  
  Should these be just regular text or is there a tag for them?
  
  **Tags:** epub, editing, formatting
  
  > **Comments:**
  > **username_1**: One bodge that comes to mind is using a numbered list... but that would be horribly, horribly ugly.  
  > **username_0**: It is not semantically a list, it's prose, so paragraphs shoudln't be list elements.  
  > **username_1**: Of course you're right (and that's why I put that as a comment rather than an answer), but it might do the job in a pinch. I'm sure there are better ways, though.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-06-20. Score: 6 | Accepted answer
  
  You can download a free version of Dante's *Divine Comedy* from ReadBeyond ([Inferno](https://www.readbeyond.it/ebooks/f3b20d25.html), [Purgatorio](https://www.readbeyond.it/ebooks/ad4e2201.html), [Paradiso](https://www.readbeyond.it/ebooks/06003b99.html)), these are well formatted epubs that also have numbered lines. You may find useful to look inside them and check their structure, to see if you can replicate these CSS settings for your own needs.
  
  > **Comments:**
  > **username_0**: A great answer! The book, indeed, is very well formatted, and also has comments and illustration, so I can lookup how to deal with these. Having an id for each sentence is also a good idea.  
  
  ---
  
  ### Answer by username_0 on 2014-06-08. Score: 0
  
  I think currently there's no way to embed enumeration in paragraphs, but here's what seems to be recommended for poetry (and I think it applies to ancient philosophy as well): <http://bencrowder.net/blog/2011/06/formatting-poetry-epub-kindle/>
  
  TL:DR - numbers go to separate `span` of class `num` and have their own CSS definitions. I'll go with that and see how it renders in readers I use.
  
  > **Comments:**
  > **username_3**: I'd suggest giving the `<span>`s an id in addition to a class; that would allow you to link to any particular line number later on with hyperlinks.  
  > **username_0**: It's a good idea! Once the formatting is done, I'll feed the directory to a Perl script which would do it for me.  
  > **username_3**: Should be able to do it with a simple RegEx, really; no need to do it with Perl.  
  > **username_0**: I think having TT or erb template is a great idea anyway. It's reuseable, and you can pass some options to the script, etc. As a rule, whenever it's more than a simple substitution in one file, I reach for Perl or Ruby.  
  > **username_3**: Sure; whatever works best for you is definitely the best way to go. For me, I like being able to just paste in a pre-written RegEx to the find and replace box, but that's just my preference.  
  
  ---
  
  