davgross / william-wollaston-the-religion-of-nature-delineated

Standard Ebooks candidate
0 stars 0 forks source link

Simplify IDs on <p> tags #12

Closed acabal closed 7 years ago

acabal commented 7 years ago

It's common to need to put IDs on <p> tags, so that we can link notes to them. But a quick glance suggests the IDs should be simplified. Generally we just use a scheme like <p id="p-12">. Looking at section-5.xhtml I see one called <p id="s5p19n3"> and another called <p id="v1">. Can we simplify those to match our existing scheme?

See https://github.com/standardebooks/marcus-aurelius_meditations_george-long for a live example

davgross commented 7 years ago

s5p19n3 denotes "section 5, proposition 19, number 3" in Wollaston's somewhat baroque numbering scheme. That more complicated syntax made it easier for me to know which id I was referring to, while just using the number of the paragraph would have been more opaque (and would have made me have to go through and count paragraphs... When I put IDs on paragraphs, rather than on notes, this was usually to support internal hyperlinks: in this case, where, in section 8, Wollaston writes "(according to Section V, proposition XIX, no. 3)".

acabal commented 7 years ago

I figured, but consistency is key across all of these books. A lot of our books already use the id="p-#" scheme, so if we're hooking to a whole paragraph we should just stick to that scheme.