12-28-2013, 10:12 PM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Dec 2013
Location: Sydney, Australia
Device: Kindle
|
Spaces being altered by Book View in 0.7.4
I realise this topic has been covered in another thread, but my experience is slightly different, and i thought it worth posting because I suspect many others will discover this the hard way.
I was forced to upgrade from 0.7.1 to 0.7.4 because I had installed Maverick 10.9.1 on my MacBook. I immediately found that making any edits in Book View caused to be replaced initially by Code:
$#160; where $ is & I took the advice given in the other thread to add to my css so that I could create the spaces I needed by adding a class to those elements where a space was needed either above, or below. So I am no longer bothered that this behaviour occurs, although I did have to put in a few hours to recode over 20,000 lines. But I feel sorry for any folks creating books in French. I have found Sigil a very useful tool, and so I am glad I have a work around. thanks Geoff Last edited by Geoff_C8; 12-28-2013 at 10:23 PM. Reason: trying to retain code element |
12-29-2013, 08:10 AM | #2 |
Member
Posts: 20
Karma: 10
Join Date: Dec 2013
Device: Pocketbook touch lux (623)
|
Hi Geoff,
great that you are sharing information / solutions. But: it still would be greater resp. more helpful (at least for me as newbie) if you would have put a link to the thread where you found the hint for the css-file. I'd like to modify my stylesheet but don't know how. Please be so kind and post the link. Thanks a lot, Peter |
Advert | |
|
12-29-2013, 11:47 AM | #3 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Just add a margin-bottom or margin-top for a paragraph style and apply that style.
|
12-29-2013, 07:52 PM | #4 |
Member
Posts: 13
Karma: 10
Join Date: Dec 2013
Location: Sydney, Australia
Device: Kindle
|
Hi Peter,
As already indicated, a margin top or margin bottom setting is required. This is the code I used, to create two classes that can be used: Code:
.spacetop { margin-top: 3em; text-indent: 0 } .spacebot { margin-bottom: 3em; text-indent: 0 } Code:
<p class="spacetop"> or <h4 class="spacebot"> and so on Last edited by Geoff_C8; 12-29-2013 at 07:55 PM. |
12-30-2013, 12:26 PM | #5 |
Member
Posts: 20
Karma: 10
Join Date: Dec 2013
Device: Pocketbook touch lux (623)
|
Thanks to both of you.
Sorry, but that was a misunderstanding because I thought that you had found a solution for the replacement of nbsp by #160.... But thanks again! Peter |
Advert | |
|
12-30-2013, 12:35 PM | #6 | |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
The only way to stop non-breaking spaces (either the character or the named entity) from ever being converted to its decimal entity equivalent (#160) is to revert to Sigil v0.7.3 (or earlier), or to alter the source for v0.7.4 and compile your own custom version. Last edited by DiapDealer; 12-30-2013 at 12:40 PM. |
|
12-31-2013, 02:00 AM | #7 | |
Member
Posts: 13
Karma: 10
Join Date: Dec 2013
Location: Sydney, Australia
Device: Kindle
|
Quote:
The forum thread I first found this discussed was here: http://www.mobileread.mobi/forums/sh...d.php?t=212681 Geoff Last edited by Geoff_C8; 12-31-2013 at 02:09 AM. |
|
12-31-2013, 03:54 AM | #8 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Sorry, I've never experienced the issue of the numeric entity being changed to a normal space in 0.7.4 before. I DO remember there being an issue with previous incarnations of Sigil where the nbsp named entity was being converted to a normal space, though. The thread you linked to was a problem where the unicode non-breaking space character was being converted to a normal space. That was a whole different ball of wax (and since fixed).
The exact steps to duplicate the problem would be helpful if you can nail it down. Last edited by DiapDealer; 12-31-2013 at 04:01 AM. |
12-31-2013, 11:38 PM | #9 | |
Member
Posts: 13
Karma: 10
Join Date: Dec 2013
Location: Sydney, Australia
Device: Kindle
|
Quote:
I have certainly seen them disappear to text space at least twice, but it was not at all clear how, or even when it happened. It does not seem to happen "frequently" whatever that means. LOL. I will repost if I figure it. I am going to have to revisit a number of older epubs so its possible I might figure it. VERY SHORTLY THEREAFTER Lol and behold. Thinking out loud helped a lot. I don't create the TOC frequently. I just recreated it, and it took my example # 160 and made it into a text space. But it did not touch the &nsbp; in that file. So it looks like a two stage process. Edit in Book View gives you the numeric space, and building the TOC trashes those to text space. BUT, there is something else. Because when I then added a couple of test # 160s and redid the TOC (but there were no new headers) nothing changed. I will come back when I have some more headers in my file and complete this. Geoff Last edited by Geoff_C8; 12-31-2013 at 11:48 PM. Reason: found the answer |
|
01-01-2014, 12:00 AM | #10 |
Member
Posts: 13
Karma: 10
Join Date: Dec 2013
Location: Sydney, Australia
Device: Kindle
|
Yes that is it. Editing in Book View turns into the numeric # 160 equivalent, and creating a TOC with at least one new heading turns those into text space.
Geoff Last edited by Geoff_C8; 01-01-2014 at 12:02 AM. |
01-01-2014, 12:42 AM | #11 |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'll see what I can see. For what it's worth, the nbsp being changed to #160 when editing in book view is the expected behavior of 0.7.4. The decision to convert non-breaking space characters and named entities to the #160 numeric entity was just about the sole reason for releasing 0.7.4, in fact.
Obviously, the conversion of those #160s to normal spaces when creating a TOC (under certain circumstances) is an unintended side effect. I assume you mean generating the ncx toc rather than an html toc? |
01-01-2014, 01:17 AM | #12 | |
Well trained by Cats
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
It does not justify. Not all devices support line wrapping of the NCX TOC so a newline/break is not expected |
|
01-01-2014, 01:34 AM | #13 | |
Grand Sorcerer
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It's my understanding that the conversions from nbsp to #160 to normal spaces is happening in the html files, not the NCX file. The #160 to normal space substitution is purported to be happening when (re)generating the NCX (and only in those html files where there are new headings to be parsed for the ncx). I haven't had the opportunity to see if I can duplicate the behavior yet. |
|
01-01-2014, 04:54 AM | #14 | |
Member
Posts: 13
Karma: 10
Join Date: Dec 2013
Location: Sydney, Australia
Device: Kindle
|
Quote:
Geoff Last edited by Geoff_C8; 01-01-2014 at 05:01 AM. |
|
01-01-2014, 05:04 AM | #15 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The fact that "not all devices" support NCX linewrapping is not a reason not no add a nbsp to prevent linewraps in devices that do (if any), is it?
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Enter text in Book View or Code View | ronaldl | Sigil | 5 | 10-29-2012 04:12 PM |
replace in book view changes view to code view | cybmole | Sigil | 4 | 10-28-2012 02:20 PM |
Sigil highlight Book View No Longer Shows in Code View | Themus | Sigil | 4 | 10-04-2012 08:54 PM |
quotes differences book view & code view | cybmole | Sigil | 13 | 03-29-2011 02:53 AM |
lock book view & code view windows into synch | cybmole | Sigil | 5 | 01-19-2011 11:30 PM |