View Single Post
Old 10-12-2018, 05:58 PM   #4
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 195
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
"Line" does not seem to have a practical definition for an e-book except as a paragraph. If that is what you mean, then there are 2 fairly simple ways to produce a number before every paragraph which will also be visible printed:

1) Edit the Calibre regex-function "Auto-Number." I have tested this and it works fine and is best if you want the numbering to go from 1 to the very last paragraph.

2) The easiest is to use the auto-numbering capabilities of CSS. This will do the numbering by chapter, which is how it is usually done. The other advantage is that the number can be styled to stand out. Add to your stylesheet:

Code:
body {
  counter-reset: para; /* Set a counter named 'para' */
}

p::before {
  counter-increment: para;  /* Increment value by 1 */
  content: counter(para) " ";  /* Display value with space */
  font-weight: bold;
}
Brett Merkey is offline   Reply With Quote