View Single Post
Old 05-24-2012, 12:55 AM   #2
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
The pagebreak you're trying to insert is specific to mobi, not ePub. Try this:

Search Pattern:
Code:
<p[^>]*>\s*<span[^>]*>\s*(\.\s*\d+\s*\.)\s*</span>\s*</p>
Replacement:
Code:
<h2>\1</h2>
Then you need to go to Structure detection and change the chapter detection xpath to:
Code:
//h:h2

Calbre probably flattens the css in a way that mojrozdz1 disappears from your perspective (although it's also possible your regex was bad) - the correct way to do a custom style is to use extra css under Look and Feel. So take whatever you styles you want in mojrozdz1 and add them there for h2:
Code:
h2{text-align:center;}
When your doing these kinds of replacements it's good to enable debugging so you can see what the html looks like at each stage of the conversion. You want to look at html in the parsed and/or structure debug folders to see the results of your search and replace.

Last edited by ldolse; 05-24-2012 at 01:04 AM.
ldolse is offline   Reply With Quote