Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-20-2012, 02:37 PM   #1
bobb40
Enthusiast
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: 28
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, 03: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: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
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
Old 03-20-2012, 03:14 PM   #3
mmat1
Berti
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: 1,197
Karma: 4985964
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, 08: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: 79,023
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
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, 05:15 AM   #5
bobb40
Enthusiast
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: 28
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, 07: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: 79,023
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
So it seems Tidy is tidying more then just the full paragraph styles. Bah!
JSWolf is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 01:47 PM.


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