Mobileread
Sigil Problem with internal Image or Stylesheet Link
#1  qkiazd 02-13-2020, 09:42 AM
Up to version 0.99 the linking of stylesheets works correctly. From version 1.00 or now also with 1.01 the path to the stylesheet is not found anymore.

Oddly enough, it works for older epubs, but not when I want to create new epubs.

Der internal path: <link href="../Styles/stylesheet.css" rel="stylesheet" type="text/css"/> can no longer find the way to the \Book Browser\Styles\stylesheet.css

With the image pictures it is similar.
Deleting the configuration file brought no improvement.

Although I already have many ebooks myself I am at a loss.
What is the problem?
Reply 

#2  Notjohn 02-13-2020, 09:49 AM
I don't know what the problem is, or even if it is a problem, because I learned long ago never to buy a car in its first model year, or to download a software in its latest version. Thanks for posting this. I look forward to the answers.
Reply 

#3  qkiazd 02-13-2020, 09:56 AM
The dark mode was for me a good argument for an update, but I wonder why nobody has complained about it yet?
Reply 

#4  DiapDealer 02-13-2020, 10:11 AM
Quote qkiazd
but I wonder why nobody has complained about it yet?
Because linking css files and images works just fine in the latest version. The problem you're probably running into is that the latest Sigil no longer forces an epub's structure to comply with Sigil's historical structure. So the images you're trying to link are probably not IN OEBPS/Images, and the css you want to link to might not be in OEBPS/Styles.

Though the latter shouldn't matter if you use the right-click feature of Book View to link existing stylesheets, and the former shouldn't matter if you use the Insert File feature of Sigil. You'll only run into trouble if you manually insert traditional css and images link paths into html in an epub that doesn't actually HAVE those paths.

Use the "Tools->Restructure Epub to Sigil Norm" if you have no need to maintain an alternate epub structure.
Reply 

#5  KevinH 02-13-2020, 10:57 AM
or change your Appearance preferences to tell BookBrowser to show the full path to the files since the BookBrowser folders have been virtualized to hold files by type.

That way you can see the actual ebook root relative path to hand create your own links.
Reply 

#6  qkiazd 02-13-2020, 04:41 PM
Thx for all the tips, that helped.

Finally Sigil finds now without the leading path the correct shortcut link:

"../Styles/"
"../Images/"

The easiest thing to do is often the last one, especially since I also edit a lot manually.

Still, it remains strange that KevinH Tipp with the path fade-in is only shown when Sigil is opened without epub. With loaded epub the path disappears.

Furthermore I don't find it logical that if you manually set the complete shortcut \OEBPS\, which is not wrong, a shortcut error occurs anyway.

You can't right click in an xhtml and link or insert the stylesheet path, which would be the easiest way. If that should work - what am I doing wrong?
Reply 

#7  DiapDealer 02-13-2020, 04:55 PM
Quote qkiazd
Still, it remains strange that KevinH Tipp with the path fade-in is only shown when Sigil is opened without epub. With loaded epub the path disappears.
Huh. Paths don't disappear. If the preference setting is set to show full paths, the full path is shown. If a loaded epub shows "No path" when that setting is enabled, then you've just opened an epub that has no folders. The html is in the root of the archive.

Quote qkiazd
Furthermore I don't find it logical that if you manually set the complete shortcut \OEBPS\, which is not wrong, a shortcut error occurs anyway.
But it IS wrong if the epub has no OEBPS folder. Which is what it sounds like you've run into.

Quote qkiazd
You can't right click in an xhtml and link or insert the stylesheet path, which would be the easiest way. If that should work - what am I doing wrong?
I've no idea. Because I right-click on an xhtml file in Book Browser and link an existing stylesheet all the time.

Mainly, I think what you're doing wrong is thinking of the folders in Book View as a physical folder structure. They're not. They may mirror the physical structure of the epub, but the don't have to. The folder in Book View are virtual groupings of filetypes. And that's really always been the case. We've merely changed it so epubs are no longer forced to match that virtual structure physically.
Reply 

#8  KevinH 02-13-2020, 05:33 PM
FWIW the epub3 spec only recommends a folder but does not require one. So a valid epub3 may have all of its files in the root of the epub zip.

As DiapDealer recommended you may want to run"

"Tools->Restructure Epub to Sigil Norm"

after loading this epub, so it forces things to go where you probably expect them to (the places old Sigil forced them into).
Reply 

#9  qkiazd 02-13-2020, 11:39 PM
Perhaps for explanation.

First I scan the book with the Abby Fine Reader 15 (intentionally but still epub V 2.01 because of compatibility) and convert it into a very rough epub.
Then I edit it - ergo I can't consciously influence the origin of the epub.

Does anyone have any experience with the Abby Fine Reader epub conversion?
Reply 

#10  BeckyEbook 02-14-2020, 05:27 AM
Abbyy Fine Reader 15 create flat structure in epub (all files are in main folder + META-INF folder with containter.xml file).

Case A:
If you use the "Restructure Epub to Sigil Norm" command immediately after opening the EPUB file - everything will work the same as it did in older Sigil versions.

Case B:
If you do not want to do this, you must provide only file name.

Default file with styles created by Fine Reader is always "main.css":
Code
<link rel="stylesheet" href="main.css" type="text/css"/>
So if your file is named stylesheet.css, you should use:
Code
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
I don't understand anyway, why don't you use the internal option in Sigil to do this?

1. Add your stylesheet.css file.
2. Select all .xhtml files
3. Use "Link Stylesheets ..." from context menu.

Sigil will do it right, and you'll be able to see what you were doing wrong.
Reply 

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register