Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-13-2013, 07:58 AM   #1
ghostyjack
Guru
ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.ghostyjack ought to be getting tired of karma fortunes by now.
 
ghostyjack's Avatar
 
Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
Adding an SVG Wrapper

I know you can add a blank SVG file to an epub by right-clicking the Images folder in the Book Browser (I'm not sure why you would want a blank SVG file, but there must be a reason), but is there anyway of inserting a regular image file (jpg, png, etc) with an SVG wrapper?

I can never seem to build it correctly when I want to insert one, so if there is a method already baked into Sigil?

Would this be an example where using the clips could resolve this?
ghostyjack is offline   Reply With Quote
Old 06-13-2013, 09:42 AM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by ghostyjack View Post
I know you can add a blank SVG file to an epub by right-clicking the Images folder in the Book Browser (I'm not sure why you would want a blank SVG file, but there must be a reason), but is there anyway of inserting a regular image file (jpg, png, etc) with an SVG wrapper?

I can never seem to build it correctly when I want to insert one, so if there is a method already baked into Sigil?

Would this be an example where using the clips could resolve this?
Last week I post a question about SVG wrappers in mobi files. Maybe that thread can be useful for you:

https://www.mobileread.com/forums/sho...d.php?t=215088

However, you can insert a SVG wrapper in Sigil by means of:

Code:
<div>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 573 850" width="100%">
      <image height="850" width="573" xlink:href="../images/v_execution.png" />
    </svg>
 </div>
Of course, instead of "850" and "573" you'll have to write here (in the viewbox and inside the <image /> tag) the size of your image and also modify the path to it. Finally you can play with the variable "preserveAspectRatio". Here you can use not only "xMidYMid" but any combination of xMin-xMid-xMax and yMin-yMid-yMax and also to use "meet" or "slice". Watch the following image:



Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 06-13-2013, 10:22 AM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by ghostyjack View Post
I know you can add a blank SVG file to an epub by right-clicking the Images folder in the Book Browser (I'm not sure why you would want a blank SVG file, but there must be a reason), but is there anyway of inserting a regular image file (jpg, png, etc) with an SVG wrapper?

I can never seem to build it correctly when I want to insert one, so if there is a method already baked into Sigil?

Would this be an example where using the clips could resolve this?
I am with you. Why!
I am guessing, there does need a way to make Sigil accept (incorporate) a SVG into the book.

I would have if they had ('borrowed' from the code used in Calibre for SVG covers) to Place "SVG Wrapped Image" (opposed to the current: place Image).
There are uses for both without having to learn SVG on top of the EPUB dialect of XHTML
theducks is online now   Reply With Quote
Old 06-13-2013, 12:23 PM   #4
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Sigil does have a Tools->Add Cover feature that will add an image using an SVG wrapper. It is designed to be used for a cover, so it will create/recreate a cover.html file and mark the file and the image as type cover. You can then copy the SVG wrapper to where you want it, and when everything is done you can re-add your original cover. Not a seemless Add Image using SVG wrapper feature, but it's an option. The SVG inserted is actually fully customizable using an ini file as described in the User Guide.
meme is offline   Reply With Quote
Old 06-13-2013, 12:29 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by meme View Post
Sigil does have a Tools->Add Cover feature that will add an image using an SVG wrapper. It is designed to be used for a cover, so it will create/recreate a cover.html file and mark the file and the image as type cover. You can then copy the SVG wrapper to where you want it, and when everything is done you can re-add your original cover. Not a seemless Add Image using SVG wrapper feature, but it's an option. The SVG inserted is actually fully customizable using an ini file as described in the User Guide.
How did I miss that one?
theducks is online now   Reply With Quote
Old 06-13-2013, 12:46 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by theducks View Post
How did I miss that one?
To answer my own question:
It was on Tools where I would not have expected it .

I was thinking that 'Cover' was just another image (with flags) and was doing it the hard way (even witout the SVG part).
1a) Add Image File
1b) Add cover semantics
2) Place Image
2b) Add cover page semantics
theducks is online now   Reply With Quote
Old 06-13-2013, 02:03 PM   #7
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
Quote:
Originally Posted by theducks View Post
To answer my own question:
It was on Tools where I would not have expected it .
Well it might be on yours but there's no way I can locate an "Insert Cover" item in the Tools or any other menu in my copy of Sigil (0.7.1 running under Windows XP SP3). Just noticed it's a new feature in 0.7.2 so must get a copy.

BobC
BobC is offline   Reply With Quote
Old 06-13-2013, 02:04 PM   #8
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by meme View Post
Sigil does have a Tools->Add Cover feature that will add an image using an SVG wrapper. It is designed to be used for a cover, so it will create/recreate a cover.html file and mark the file and the image as type cover. You can then copy the SVG wrapper to where you want it, and when everything is done you can re-add your original cover. Not a seemless Add Image using SVG wrapper feature, but it's an option. The SVG inserted is actually fully customizable using an ini file as described in the User Guide.


Better to know it now than never....
roger64 is offline   Reply With Quote
Old 06-13-2013, 03:18 PM   #9
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by theducks View Post
How did I miss that one?
Not only you, me too But that is a new feature of Sigil 0.7.2 (I'm using Sigil 0.7.1). Well, there is a very good reason to update my Sigil However, new versions of Sigil should have a dialog where to config the SVG wrapper/container. Sigil will use in preserveAspectRatio="xMidyMid meet" and maybe that is not the best option ever for SVG images.
RbnJrg is offline   Reply With Quote
Old 06-13-2013, 03:39 PM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by RbnJrg View Post
Not only you, me too But that is a new feature of Sigil 0.7.2 (I'm using Sigil 0.7.1). Well, there is a very good reason to update my Sigil However, new versions of Sigil should have a dialog where to config the SVG wrapper/container. Sigil will use in preserveAspectRatio="xMidyMid meet" and maybe that is not the best option ever for SVG images.
I tried the feature. Besides doing proper SVG code, it saves 2 of the steps listed above

I have a clip set to that to replace: preserveAspectRatio="none" that I find (or not used) in other books.

I HATE STRETCH-O-VISION. Be it TV or book covers
theducks is online now   Reply With Quote
Old 06-13-2013, 03:50 PM   #11
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by RbnJrg View Post
However, new versions of Sigil should have a dialog where to config the SVG wrapper/container. Sigil will use in preserveAspectRatio="xMidyMid meet" and maybe that is not the best option ever for SVG images.
There isn't a dialog - but you can edit a file to put the svg code you want to use instead of the default into a file: http://web.sigil.googlecode.com/git/...add_cover.html
meme is offline   Reply With Quote
Old 06-13-2013, 07:26 PM   #12
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by meme View Post
There isn't a dialog - but you can edit a file to put the svg code you want to use instead of the default into a file: http://web.sigil.googlecode.com/git/...add_cover.html
Many thanks meme!
RbnJrg is offline   Reply With Quote
Old 06-14-2013, 04:05 PM   #13
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by meme View Post
There isn't a dialog - but you can edit a file to put the svg code you want to use instead of the default into a file: http://web.sigil.googlecode.com/git/...add_cover.html
Hi meme;

The "Add Cover" feature works fine but if I have enabled "Tidy", the <image /> tag is changed to <image>...</image> and that is not correct. Could it be possible in next versions of Sigil to fix that bug?

Many thanks in advance.
RbnJrg is offline   Reply With Quote
Old 06-14-2013, 04:17 PM   #14
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Quote:
Originally Posted by RbnJrg View Post
Hi meme;

The "Add Cover" feature works fine but if I have enabled "Tidy", the <image /> tag is changed to <image>...</image> and that is not correct. Could it be possible in next versions of Sigil to fix that bug?
Just don't use HTML Tidy. Seriously, just use Pretty Print Tidy to format your code. You don't need all the changes that HTML Tidy might make.
meme is offline   Reply With Quote
Old 06-14-2013, 06:20 PM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,779
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by RbnJrg View Post
Hi meme;

The "Add Cover" feature works fine but if I have enabled "Tidy", the <image /> tag is changed to <image>...</image> and that is not correct. Could it be possible in next versions of Sigil to fix that bug?

Many thanks in advance.
a simple (no source) img as a self closing tag is nonsense.

Code:
<img alt="Foobird" class="foocvr" src="../Images/00002.jpeg" />
would be OK
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript Wrapper Application for Kindlegen pdurrant Kindle Formats 50 02-18-2020 01:16 AM
Kindlestrip Python script and AppleScript wrapper pdurrant Kindle Formats 137 08-15-2017 01:16 AM
An Issue about a SVG wrapper RbnJrg Kindle Formats 29 06-10-2013 08:11 PM
KindleCover: AppleScript wrapper and Python script application pdurrant Amazon Kindle 6 12-02-2012 07:14 AM
.PDB Encrytpion tool/"F-Format Wrapper Package"/Published Data arvinder Workshop 0 08-20-2007 04:17 AM


All times are GMT -4. The time now is 02:59 AM.


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