Automatic line numbering

Hi Billy–I don’t think there’s a good way to do it with lines as they exist inside of fluid paragraphs, as Ned noted. It could be done with <pre> blocks, though, I believe. See https://www.sylvaindurand.org/using-css-to-add-line-numbering/ for one example. You could do paragraph numbering though. See https://bl.ocks.org/trauber/5163440, or https://dev.opera.com/articles/automatic-numbering-with-css-counters/ and http://philarcher.org/diary/2013/headingnumbers/ for some other examples. One of my favorite online poetry magazines, Jacket, used to have numbered paragraph blocks which I loved when citing articles I read there: http://jacketmagazine.com/36/oppen-heller.shtml. I think they used div’s and extra elements, though. I’m sure I’ve seen a recent project that not only created numbered paragraphs automatically, but also created anchor links for paragraphs, but it’s slipping my mind. NYT was playing around with a very cool idea called “emphasis” a few years back that I think would be very interesting for Open Textbooks: https://open.blogs.nytimes.com/2011/01/11/emphasis-update-and-source/

2 Likes