check the last version (v5). I have changed things around, added comments, and added some formatting to make thing easier to read.
In v5 I have separated the two cases, so you should be able to adjust the latter case to make it come out the way you want it.NisusUser wrote: The marker \p can be mid-verse – not necessarily at the beginning of the verse or at the beginning of the line. If it's mid-verse, it does not start on a new line. Then there is no new \v marker until the next verse.
In v5 I have treated words in All-Caps of 3 letters or more as deity names. Again if you find a better rule you should be able to adjust it. Since those cases need to have their case change, dealing with them turned out be more complicated than a simple Find and Replace, but hopefully the way to deal with that should be clear enough from the code.NisusUser wrote: Re: \nd (names of diety). This is going to take some tweaking. That formatting should only be applied (best I can tell) if it is one isolated word in all caps. That's not foolproof, though, so I'll have to think this through. That's because in SS there is other text in all caps also – citations from the OT presented in the NT.
best
Philip