10-19-2012, 01:35 PM | #1 |
Major ignoramus member
Posts: 3
Karma: 10
Join Date: Oct 2012
Location: Germany
Device: Bookeen Cybook Odyssey
|
'search & replace' - problem
Hello,
I want to replace 'no-break space' following </p> in an epub-document. It is possible to search for \s</p> to find this passage in the text with the assistent (Calibre-> search& replace). But it is not possible to replace \s</p> (the order will be ignored ). By the way it is not possible to search for 'no-break space' alone (Search: \s) ... How is it possible to replace them? Please |
10-20-2012, 03:57 PM | #2 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
I'd like to help but I'm struggling to understand the issue that you are having, so maybe if you could clarify then you would get some responses.
In regex \s matches ANY whitespace type characters, but you mention 'no-break spaces'. What do you mean by \s</p> cannot be replaced? Could you give some examples of the problem and what you are trying to achieve? Maybe some snippets from your source would help. |
Advert | |
|
10-21-2012, 09:06 AM | #3 | |||
Major ignoramus member
Posts: 3
Karma: 10
Join Date: Oct 2012
Location: Germany
Device: Bookeen Cybook Odyssey
|
Here is an example with an annoying line-break after "Ein Haufen":
At first the original (german) e-book: Quote:
Quote:
In Calibre it is not a problem to find the text position: Quote:
By the way, it is no problem to replace </p> or <p class ... without the |
|||
10-21-2012, 11:30 AM | #4 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
It would not be valid xml to remove the </p> since you would leave an unclosed paragraph in your document. This would cause problems with some reading systems, (I've caused such problems before in Adobe Digital Editions by using similar, badly formed xml.)
The calibre generated code looks as though it should faithfully display the text as shown in your original, (which appears to have a line break), so, on this basis perhaps your source needs a bit of a tidy up if you want to achieve a different result on conversion. What format is your original document in? (Plain text?). |
10-23-2012, 04:43 AM | #5 |
Major ignoramus member
Posts: 3
Karma: 10
Join Date: Oct 2012
Location: Germany
Device: Bookeen Cybook Odyssey
|
I think the source document was an pdf - but I deleted it by mistake.
Thereby I have got only the epub document. Is there any other way to eliminate this problem with calibre? |
Advert | |
|
10-23-2012, 09:26 AM | #6 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
You could use calibre's "Tweak Book" option available on the book's right-click menu, then do whatever you like to your book using your preferred text editor; or you could edit the ePub with Sigil.
I would suggest taking a backup of the book before any 'raw' editing, just in case things go wrong. I copy books to a separate calibre library, (Work In Progress), for just such purposes. When you're happy with the result you simply copy it back to your main library and delete from WIP. (Copy functions are also available on the right-click for a book.) For more details on "Tweak Book" see the Calibre for Beginners Guide* at: http://stu.wccnet.edu/~rprice/Eng218/CalibreHelp/ then go to: Other Fun Stuff > Editing an eBook with Tweak Books. *Courtesy of calibre user and mobileread member BeccaPrice Last edited by Agama; 10-23-2012 at 09:36 AM. Reason: Added * footnote |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search & Replace Problem | mapline | Calibre | 3 | 08-04-2012 07:18 PM |
A Search and Replace problem | AJ Starr | Library Management | 2 | 10-20-2011 11:06 PM |
Search and Replace Problem | FrozenInferno | Conversion | 11 | 08-13-2011 01:29 PM |
Search and Replace Problem | FrozenInferno | Calibre | 0 | 08-05-2011 08:47 PM |
Search and Replace problem | naro_c | Conversion | 5 | 02-25-2011 12:59 AM |