View Single Post
Old 02-19-2011, 03:31 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
remove indent from 1st line of chapter only

is there a quick way to do this without having to go to stylesheet & define a new class ?

every book I inspected has same tags for 1st line of chapter as for rest of chapter text.

as I was advised in another thread I can locate them with regex, by looking for the preceeding closing h2 tag - but is there anything I can to in a regex replace that will overwrite the default indent also

I tried to guess solutions e.g. byb adding text-indent directly afdter the class, but I get syntax errors.

I begin to think it's a lot of work to edit books for this one small visual change but if there is a slicker way....

so I can find

end of chapter title </h2> space <p class = whatever.>... start of 1st line

i want to to replace / edit the p class bit because my p has a default indent, and I want to overrule it just for this line.

can it be done ?

updates - this removes the initial indent, but can I combine it with the class = bit somehow

find (regex)
</h2>\s*<p class="calibre9"
replace
</h2> <p style "text-indent: 0"

otherwise it loses other attributes of the calibre9 class

something else untoward is happening with the above code
sigil is extracting that change & creating a new class definition
p.sgc-1 {text-indent:}

but it is losing the trailing zero in doing so & thus not working as intended. I can't figure out why it's losing that last zero - AHA - it cannot cope with embedded spaces - this replace is OK </h2> <p style "text-indent:0"

Last edited by cybmole; 02-19-2011 at 04:06 AM.
cybmole is offline   Reply With Quote