Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-26-2016, 12:10 PM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,492
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by DNSB View Post
I haven't found this issue with well-formed epubs. This is an issue I see with epubs that are not well-formed often created with older software -- the type of epub that I use Sigil to drag into compliance.
That's expected behavior. If links to a file don't match that file's manifested href (case-sensitive), or the file is UNmanifested, then Sigil won't be able to automatically update/fix those links. And any time you decline to let Sigil fix detected errors upon opening, there's a good chance that links won't get properly updated.

Best to generate a Report after opening a dodgy epub. It can identify the broken links/missing targets, etc... that result from not-well-formed epubs being run through Sigil's normalization process.

Hopefully there will be a version of Sigil someday that will allow you to keep the original internal structure of an epub intact (eliminating the need to update links upon opening). But we're not there yet.
DiapDealer is offline   Reply With Quote
Old 07-26-2016, 12:16 PM   #17
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,583
Karma: 5703586
Join Date: Nov 2009
Device: many
Unfortunately, Sigil can*not auto fix all broken epubs on import. For those cases, you may want to run a Report and then fix any broken links and things manually. Followed by either FC or epubcheck to verify other epub structures.

In many cases, broken links exist because the underlying file system is not case sensitive and so the urls appear to work for the user on those systems when in fact they are broken. Linux is a nice testing ground for these types of path case issues because it defaults to a case-sensitive file system which makes these types of errors easier to find and fix by a quick visual scan of images in the epub.

Last edited by KevinH; 07-26-2016 at 12:17 PM. Reason: DiapDealer beat me to it!
KevinH is offline   Reply With Quote
Old 07-26-2016, 03:59 PM   #18
david_f1
Junior Member
david_f1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Nook
So I'm struggling to get this to work no matter what I try.

My last attempt was to recreate the epub anew with a new file name, unzip it, create a new 'Images' folder in there and place 'gold-aureus.jpg' in there. The CSS is amended to point to 'Images/gold-aureus.jpg' and the opf file has this line added to it too:

Code:
<item id="gold-aureus.jpg" href="Images/gold-aureus.jpg" media-type="image/jpeg"/>
I re-zip the file and change the extension back to epub.

When I open it in Sigil, the image is now in the Images section (left-hand panel), but the image still doesn't appear.

Mend xhtml source on open and save are both checked in the preferences.
david_f1 is offline   Reply With Quote
Old 07-26-2016, 04:07 PM   #19
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,492
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm assuming the css has been amended to:
Code:
h1:before {
    background-image: url('../Images/gold-aureus.jpg');
    display: block;
}
DiapDealer is offline   Reply With Quote
Old 07-26-2016, 04:08 PM   #20
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,583
Karma: 5703586
Join Date: Nov 2009
Device: many
I am not sure what you are seeing or why.

What does epubcheck say about the original epub you are trying to work with?

Is this a public domain epub that I can test with? If so, would you point me at it.
If not, would you please *privately* post it someplace and pm either DiapDealer or myself (KevinH) with the url so as not to violate the rights of the holder.

Also, what happens if you simply open the original epub in Sigil? If an image is missing, you can use Sigil's Add Existing menu to add back that image from an unzipped copy of the epub. What does Report say? Is it only that one image missing?

KevinH
KevinH is offline   Reply With Quote
Old 07-31-2016, 05:22 PM   #21
david_f1
Junior Member
david_f1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Nook
Quote:
Originally Posted by DiapDealer View Post
I'm assuming the css has been amended to:
Code:
h1:before {
    background-image: url('../Images/gold-aureus.jpg');
    display: block;
}
I've tried it with both
Code:
background-image: url('../Images/gold-aureus.jpg');
and
Code:
background-image: url('../Images/gold-aureus.jpg');
Quote:
Originally Posted by KevinH View Post
I am not sure what you are seeing or why.

What does epubcheck say about the original epub you are trying to work with?

Is this a public domain epub that I can test with? If so, would you point me at it.
If not, would you please *privately* post it someplace and pm either DiapDealer or myself (KevinH) with the url so as not to violate the rights of the holder.

Also, what happens if you simply open the original epub in Sigil? If an image is missing, you can use Sigil's Add Existing menu to add back that image from an unzipped copy of the epub. What does Report say? Is it only that one image missing?

KevinH
No problems are reported with the epub check and the image is listed in the report when I do the amendments described in my post from a few days ago.

I'll PM a link shortly
david_f1 is offline   Reply With Quote
Old 07-31-2016, 09:30 PM   #22
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,492
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
You wouldn't happen to be opening this epub using the calibre Open With plugin would you? I only ask because jpeg images aren't showing up at all for me when opening epubs from calibre with Sigil with the Open With plugin (I'm sure I'm using an older version though).

PNGs show up just fine (and the jpegs show up just fine when opening the epub through the "usual" methods). It's only when using the Open With plugin on Windows that Sigil thinks all jpegs are 0x0 bytes.
DiapDealer is offline   Reply With Quote
Old 08-01-2016, 02:45 PM   #23
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,583
Karma: 5703586
Join Date: Nov 2009
Device: many
Tried your updated bug epub and the url is properly updated.
That said, your css is simply wrong:

Pseudo-Elements are done as follows:

Code:
selector::pseudo-element {
    property:value;
}
Note the double colons before the pseudo-element.

Also the pseudo-element "::before" does not exist or validate in CSS 2.1 but does validate for epub3.

Also as anything *before* the initial heading element in your example has no vertical size, no background image is displayed (as the image height would be 0).

So changing that css to something along these lines is what I think you want:

Code:
h1::before {
    content: url('../Images/gold-aureus.jpg');
    display: block;
}
This shows the image you want nicely before every h1 in the document.

So there is no bug here that I can see.

KevinH
KevinH is offline   Reply With Quote
Old 08-01-2016, 03:40 PM   #24
david_f1
Junior Member
david_f1 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Nook
OK, I had to do a few other changes but I managed to get this to work. The CSS amendments that you suggested seemed to be the key ones.

Thanks for your help
David
david_f1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FBReader Pro Default temp files folder OldLincoln Android Devices 2 04-24-2016 10:28 AM
temp file rylee Library Management 4 08-22-2014 07:41 AM
Aura "REWFY.exe" file in my temp folder bawldiggle Kobo Reader 3 08-17-2014 09:31 AM
Conversion and Temp folder issues OscarWilde Calibre 7 11-16-2013 07:45 PM
Calibre files left in Temp folder itimpi Calibre 8 05-06-2009 06:15 AM


All times are GMT -4. The time now is 07:44 AM.


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