02-06-2011, 07:37 PM | #1 |
Harmless idiot
Posts: 3,411
Karma: 2154829
Join Date: Nov 2010
Location: Zuhause
Device: PB622, Nexus7, Sony PRS 350, Tolino und nur noch wenig toter Baum:(
|
Page numbers
Hi everybody,
I'm pretty new with editing ebooks, and just started with Sigil two days ago. So far everything is fine, but I've got some books which have page numbers and authors names in the text, where a pagebreak would occur in a pbook. Looks like this "1/The Writer" and the next page "The Writer/2" and so on. Is there any possibility to remove all these by a single action? I was quite succesful in removing these annoying commercials "Created with PDF..." with the "Find and Replace" feature, but AFAIK it will not work on the pagenumbers. Please answer in plain english and not some programmers language as this will only cause |
02-07-2011, 01:59 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
It is possible with some RegEx. Select that option in the replace window and select 'minimal matching'.
Search for: [0-9]/The Writer or The Writer/[0-9] Replace by: If there are more than 10 pages (which is quite usual...), you can either place more [0-9] or replace it by: \d{1,3}. The latter will take up to 999 pages. |
Advert | |
|
02-07-2011, 05:52 AM | #3 | ||
Harmless idiot
Posts: 3,411
Karma: 2154829
Join Date: Nov 2010
Location: Zuhause
Device: PB622, Nexus7, Sony PRS 350, Tolino und nur noch wenig toter Baum:(
|
Maybe I got it wrong, but can you please have a look at what I've done?
Original: Quote:
Quote:
In the "replace with" I simply inserted a blank Search results for this are 0 |
||
02-07-2011, 08:10 AM | #4 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Try the following:
Search: <p class="calibre1">[0-9]</p> Replace with: nothing!! Then add more [0-9] for the bigger numbers. The \d does not work as I thought... This will remove the complete line. Oh, if it is already changed with <p class="calibre1">\d{1,3}</p>, then just replace it with nothing in the normal search mode. |
02-07-2011, 11:14 AM | #5 |
Zealot
Posts: 114
Karma: 5246
Join Date: Jul 2010
Device: none
|
What exactly are you trying to remove? the <p class="calibre1">83</p> line or all of:
<p class="calibre1">CYBER LUflY</p> <p class="calibre1">\d{1,3}</p> <p class="calibre1">The (FWIW, you can just use \d+ it'll match any number of digits). |
Advert | |
|
02-07-2011, 02:21 PM | #6 | |
Harmless idiot
Posts: 3,411
Karma: 2154829
Join Date: Nov 2010
Location: Zuhause
Device: PB622, Nexus7, Sony PRS 350, Tolino und nur noch wenig toter Baum:(
|
Hi,
target is to replace everything that's coloured in red by a single blank Quote:
|
|
02-07-2011, 02:49 PM | #7 | ||
Guru
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
Try this...
Search for Quote:
Minimal matching, might be better to NOT match case (because of 'CYBER LUflY') The .'s are for the end of lines - if there's indentation in your lines, after each pair add a number of spaces to match your indentation. e.g. 2 spaces -> Quote:
Last edited by Perkin; 02-07-2011 at 02:53 PM. |
||
02-07-2011, 03:07 PM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Please keep in mind, that sometimes the end of a page is also the end of a paragraph. In that case you do not want to replace it with a space.
|
02-09-2011, 08:11 AM | #9 |
Harmless idiot
Posts: 3,411
Karma: 2154829
Join Date: Nov 2010
Location: Zuhause
Device: PB622, Nexus7, Sony PRS 350, Tolino und nur noch wenig toter Baum:(
|
THX, that's quite clear and I usually have two runs of replacement, one for the "in paragraph pagebreak" and one for "end paragraph pagebreak", but I didn't get it working on changing numbers.
|
02-21-2011, 02:41 AM | #10 | |
Wizard
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
Quote:
</p>\s*<p class="calibre1">CYBER LUflY</p>\s*<p class="calibre1">\d+</p>\s*<p class="calibre1"> i.e. you put all the red stuff on one line with \s* in the gaps ( deals with the whitespace) and replace the 83 with \d+ ( match 1 or more digits) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a hack for displaying page numbers rather than location numbers? | nesler | Kindle Developer's Corner | 16 | 02-15-2011 12:00 AM |
Page numbers | Fincary | Astak EZReader | 4 | 02-18-2010 03:06 PM |
page numbers | nenad | Amazon Kindle | 2 | 12-19-2009 09:01 AM |
Page numbers, AGAIN | orlincho | Bookeen | 92 | 08-19-2008 07:15 AM |
Page numbers (again) | Prospect | Workshop | 50 | 04-10-2008 02:19 AM |