|
|
#16 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,881
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Well, then the issue with Google Books is solved!
You only will use one value, the width (in %) and nothing more. And that by using only a class (I used class="svg" but of course, you can use any of your wish). So, you only work here is to think about how width will be your svg images (in percentage of the screen). Suppose you want three, four "width"; well that is easy because with only three/four clasees you'll have covered the universe.Quote:
Code:
<p class="center"><img class="svg" alt="Temp" src="../Images/Temp.svg"/></p> Code:
.center {
text-indent: 0;
text-align: center;
}
.svg {
font-size: 1em;
width: 33%; /*or the percentage of your wish*/
height: auto;
padding: 1em 0;
}
|
|
|
|
|
|
|
#17 | ||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,881
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Don't worry
![]() Quote:
Quote:
You need to work only with css2 so ereaders based on epub2/epub3 will be able to open the epub without problems.
|
||
|
|
|
|
|
#18 | |
|
Annabelle Viau
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
Quote:
In <svg> of the embedded SVG, it seems to be fully supported. If I remove it, the image is not displayed correctly, and when I insert it back, the image is fine. But inside the <img> of the linked SVG, it creates problems only if it is placed first, and it is fine when placed last (it is probably just ignored). Like, this isn’t displayed properly: Code:
<p class="credits"><img style="width: calc(20pt*73.275/17.408); height: 20pt;" src="../Images/canada.svg" alt=""/></p> Like, this isn’t displayed properly: Code:
<p class="credits"><img style="height: 20pt; width: calc(20pt*73.275/17.408); " src="../Images/canada.svg" alt=""/></p> |
|
|
|
|
|
|
#19 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,881
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() But try the following code: 1. In the .xhtml file: Code:
<p class="credits"><img class="measures" src="../Images/canada.svg" alt=""/></p> Code:
.measures {
height: 2em;
width: calc(2em*73.275/17.408);
}
Code:
.measures {
font-size: 1em;
height: auto;
width: 15em; /*or whatever*/
}
Last edited by RbnJrg; 01-29-2019 at 09:24 AM. |
|
|
|
|
|
|
#20 | |
|
Annabelle Viau
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
Quote:
Well the embedded SVG markup isn’t that bad as I can process it with regex, but yeah still... using calc seems risky.I guess there’s simply no good solution here, as I really need a single ePub that works on both Kobo and Google Books. I’ll test the code with calc more extensively, else I’ll just make the calculations all the time
|
|
|
|
|
|
|
#21 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,881
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
I still continue thinking that your best bet is to build two epubs. For Kobo you only need to set a measure (i.e. width: 30% or whatever) and just with a class. And for Google Books, to include the images with my second way of doing it. And so also to employ only one measure, the width, and also with a class.
|
|
|
|
|
|
|
#22 | |
|
Annabelle Viau
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 16664
Join Date: Jan 2015
Location: Rishikesh, India
Device: iPad, Kobo, Windows 10 (ADE, Azardi), Android (Google Books, Bluefire)
|
Quote:
|
|
|
|
|
|
|
#23 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,881
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
|
|
|
|
|
#24 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,957
Karma: 150249633
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
There is a problem making a separate file for Google Books. The problem is that some people do buy eBooks from Google to use outside of Google Books. I know I've bought some eBooks from Google and used them on my Kobo. So can you be sure that the Google Books specific version would only be used with the Google Books app and not another program where it won't work properly?
|
|
|
|
|
|
#25 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I agree with this. It's not like Apple where they lock it down to use only within iBooks. Google Books can be purchased and read on any device/app, just like your normal EPUB.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't add cover in Calibre -- get "svg-error" (the property 'svg' should be declared) | Just some guy | Editor | 7 | 04-11-2017 10:54 PM |
| If Google Books or B&N discounts my books, will Amazon chop their price too? | wannabee | General Discussions | 3 | 01-16-2012 02:15 PM |
| Google Books + Google Hosted Apps account | Mrs Late Bloomer | Library Management | 2 | 08-26-2011 02:31 PM |
| Sony, Google and Barnes & Noble To Partner For Sales of Google Books [April Fools] | NatCh | News | 73 | 04-07-2009 09:48 AM |
| Missing features: Gutenberg, Google Books, Google News, open RSS aggregator | Charbax | Amazon Kindle | 10 | 11-22-2007 09:22 PM |