Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-20-2012, 03:37 PM   #1
bobb40
Member
bobb40 has a complete set of Star Wars action figures.bobb40 has a complete set of Star Wars action figures.bobb40 has a complete set of Star Wars action figures.
 
Posts: 24
Karma: 274
Join Date: Jul 2011
Device: Kindle3, Kindle4, KoboGlo
sigil "condensation" of nested <div>'s

I imported a large valid ebook xhtml file to Sigil (version 0.5.3), saved to epub, and found that all nested <div>'s had been "condensed"; e.g.,

xhtml file content...
<div class="outer">
<div class="middle">
<div class="inner">
<img src="example.jpg" alt="example">
</div>
</div>
</div>

appeared in the epub as:
<div class="outer middle inner">
<img src="example.jpg" alt="example">
</div>

I googled unsuccessfully for explanation, so tried the notation on good example code and found it didn't work.

Is there an explanation or workaround for this?
bobb40 is offline   Reply With Quote
Old 03-20-2012, 04:03 PM   #2
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 645
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD
Quote:
Originally Posted by bobb40 View Post
xhtml file content...
<div class="outer"><!-- nothing -->
<div class="middle"><!-- nothing -->
<div class="inner">
<img src="example.jpg" alt="example"/>
</div>
</div>
</div>
Change to include the two comments in red and close the img tag properly.

Will that do?
Perkin is offline   Reply With Quote
 
Advertisement
Old 03-20-2012, 04:14 PM   #3
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 980
Karma: 1300990
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by bobb40 View Post
Is there an explanation or workaround for this?
To answer your question for a workaround: adding a "&nbsp;" after the first two divs would prevent this behavior. But the blank may not be welcome ...

The explenation: i guess there should be not difference in behavior of the reader at all.

What makes it for you different ?

-------------------
Perkins workaround is much better than mine...
mmat1 is offline   Reply With Quote
Old 03-20-2012, 09:00 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,799
Karma: 18701452
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Run Sigil, turn off Tidy and then load your XML and see if it still changes your divs.
JSWolf is offline   Reply With Quote
Old 03-21-2012, 06:15 AM   #5
bobb40
Member
bobb40 has a complete set of Star Wars action figures.bobb40 has a complete set of Star Wars action figures.bobb40 has a complete set of Star Wars action figures.
 
Posts: 24
Karma: 274
Join Date: Jul 2011
Device: Kindle3, Kindle4, KoboGlo
Quote:
Originally Posted by JSWolf View Post
Run Sigil, turn off Tidy and then load your XML and see if it still changes your divs.
That made all the difference, thanks!! Now I'll always run with tidy off.

The workarounds might've worked, but they would've been a lot of trouble so I'm glad they're not required.

Thanks, all!
bobb40 is offline   Reply With Quote
Old 03-21-2012, 08:42 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,799
Karma: 18701452
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
So it seems Tidy is tidying more then just the full paragraph styles. Bah!
JSWolf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems creating "thin space" between nested quotes december Sigil 23 08-03-2012 02:28 PM
Changing or removing <div class="calibrenavbar"> ptsefton Recipes 3 05-28-2011 09:30 AM
Any way to apply calibre's "Series" (and number) meta-info from within Sigil...? Vintage Season Sigil 2 07-03-2010 12:35 AM
Line indents using "<div>" tags HarryT Kindle Formats 11 04-29-2009 11:18 PM


All times are GMT -4. The time now is 08:39 AM.


MobileRead.com is a privately owned, operated and funded community.