06-13-2013, 07:58 AM | #1 |
Guru
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? |
06-13-2013, 09:42 AM | #2 | |
Wizard
Posts: 1,604
Karma: 7999999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
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> Regards Rubén |
|
Advert | |
|
06-13-2013, 10:22 AM | #3 | |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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 |
|
06-13-2013, 12:23 PM | #4 |
Sigil developer
Posts: 1,274
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.
|
06-13-2013, 12:29 PM | #5 | |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
Advert | |
|
06-13-2013, 12:46 PM | #6 |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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 |
06-13-2013, 02:03 PM | #7 | |
Guru
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:
BobC |
|
06-13-2013, 02:04 PM | #8 | |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Quote:
Better to know it now than never.... |
|
06-13-2013, 03:18 PM | #9 |
Wizard
Posts: 1,604
Karma: 7999999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
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.
|
06-13-2013, 03:39 PM | #10 | |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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 |
|
06-13-2013, 03:50 PM | #11 | |
Sigil developer
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
|
|
06-13-2013, 07:26 PM | #12 | |
Wizard
Posts: 1,604
Karma: 7999999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
06-14-2013, 04:05 PM | #13 | |
Wizard
Posts: 1,604
Karma: 7999999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
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. |
|
06-14-2013, 04:17 PM | #14 |
Sigil developer
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
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.
|
06-14-2013, 06:20 PM | #15 | |
Well trained by Cats
Posts: 30,397
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Code:
<img alt="Foobird" class="foocvr" src="../Images/00002.jpeg" /> |
|
Thread Tools | Search this Thread |
|
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 |