|05-23-2012, 06:32 PM||#1|
Join Date: May 2012
Device: Sony PRS-T1
How to obtain a new page for every chapter in regular expression (search/replace)?
Hi, I am a beginner in Calibre. I convert .epub -> .epub in order to break to a new page for every chapter.
I have chapters' heads in the format: ". XX ." where XX is a number.
My question is if I can force a new page for the destination epub before every chapter, using regular expression? What will I put in Replacement Text to result in a new page?
Currently I have:
<p class="calibre2"><span>[\s]*(\. \d\d? \.)
<div class="mbp_pagebreak"/></div><p class="mojrozdz1"><span>\1
Generally the above search/replace reg.exp. fails in two ways:
Please help me to understand what is wrong in my procedure as regards aforementioned failures 1. and 2. ? Calibre 0.8.52
|05-24-2012, 01:55 AM||#2|
Join Date: Apr 2009
Device: PRS-650, iPhone
The pagebreak you're trying to insert is specific to mobi, not ePub. Try this:
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:
Last edited by ldolse; 05-24-2012 at 02:04 AM.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Help with regular expression search/replace||bfollowell||Sigil||12||06-20-2013 08:36 PM|
|Regular Expression: does not replace with spaces||murphycc||Conversion||3||02-11-2012 02:31 PM|
|Search & Replace - Regular expression||oldbwl||Calibre||2||01-09-2011 10:33 AM|
|Regular expression for chapter combining||bremler||Sigil||2||12-23-2010 10:06 AM|
|Find/Replace with regular expression||hydrolith||Sigil||6||03-01-2010 09:42 PM|