Quote:
Originally Posted by AlanHK
Was wondering how to do that in Sigil. Thanks.
|
Quote:
Originally Posted by AlanHK
I have considered this style, but the only time I think it would be useful is with very long lines so it can soft wrap with an indent as conventional. So far have not had anything that made the hassle worth it.
|
One advantage is that you can allow yourself access to more complicated CSS selectors in the future. For example, here is RbnJrg showing off every 5th line being numbered:
https://www.mobileread.com/forums/sh...18#post3027118
I would also think it would be easier to control multiple levels of indentation like this:
Spoiler:
Code:
<p class="poem1">Test</p>
<p class="poem1">One</p>
<p class="poem2">Two</p>
<p class="poem3">Three</p>
CSS:
Code:
.poem1 {
text-indent: -2em;
margin-left: 2em;
}
.poem2 {
text-indent: -2em;
margin-left: 4em;
}
.poem3 {
text-indent: -2em;
margin-left: 6em;
}
instead of trying to hack together multiple or   at the beginning of lines.
Then two simple Saved Clips:
Code:
<div class="poem">\1</div>
<div class="stanza">\1</div>
would let you wrap individual poems/stanzas (if needed).
I typically use this CSS:
Easy peasy consistent coding. And thing of all the headaches you would save your future self.
Quote:
Originally Posted by AlanHK
Also, all my source text is derived from a DTP program that styles by paragraph, but does not have the concept of containers like <div>. I have macros that convert the formatting codes to HTML para by para. In the DTP the poems also use stanza = para, linebreaks, not para endings.
|
Hmmm... could probably come up with a Search/Replace to spot and replace each line with a <p class="poem">:
Search: ^\s+(.+?)<br />
Replace: <p class="poem">\1</p>
That would get you most of the way, then you would just need some manual adjustment for those final lines (or create another Regex to handle THAT situation). :P Hard to judge ahead of time without seeing the code, but a group of regexes could probably be pieced together.