Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2020, 10:05 AM   #31
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,042
Karma: 5604042
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by DiapDealer View Post
With EPUB3, they could have gone full-blown MathML to display the formulas. How did you do your EPUB3 to 2 "reduction"? .
i probably just did a calibre epub to epub convert to force epub2. or a simple edit and save in sigil ( those are the only 2 skills I have, for getting out of epub3 . i only knew my source is epub3 because sigil says so !

FYI, was poking inside of a different book that seemed to have a lot of hard to follow mathML stuff, but it all shows in green in sigil,as if it's commented out .
green means ignored?
stumped is offline   Reply With Quote
Old 09-19-2020, 11:48 AM   #32
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: 22,926
Karma: 131479326
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil supports MathML (with Mathjax javascript), so if the code is commented out, that's in the epub itself.
DiapDealer is offline   Reply With Quote
Old 09-19-2020, 01:26 PM   #33
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,177
Karma: 4062049
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by stumped View Post
my install is configured to be well behaved - easily done.

those SVG images display as intended in Moon +. no missing/empty boxes.

IF you actually read the whole thread and not just jump in to bitch about an android app you don't like, you would have seen that.


but they display at the authors' intended size and I'd like them about 20% bigger. that's what this thread was about

( they seem deliberately designed to appear inline as a bit smaller and greyer than the black text- no problem is, say, sigil book view on a 27 inch monitor but not ideal for my eyes on 10 inch or less devices.)
I have never seen svg defined like this though - where's the actual image ?
...
Well, after studying your .svg image, I can tell you the following:

1) Your .svg is an image made of "paths".
2) Your .svg is not a plain .svg, so it can produce issues with some ereaders.
3) Your .svg, even after converted as plain .svg, it has some instruccions not supported by ADE.

I attach an. epub with two .svg images: your original converted as plain .svg (test2.svg) and a new one made by me (test3.svg), also a plain one.

As you can see in the following screenshots, your image is not displayed under ADE but it looks ok under Sigil. So, that is a source of issues because if ADE has troubles to display your .svg, all ereaders based on RMSDK won't be able to show properly your formulas.

Click image for larger version

Name:	Image1.png
Views:	35
Size:	51.9 KB
ID:	182028Click image for larger version

Name:	Image2.png
Views:	33
Size:	141.9 KB
ID:	182029

Since you have so many .svg images, to correct them in order that ADE can display them is not an alternative. So your best bet IMHO is to convert them (batch conversion) as .pgn using a conversor like Irfanwiew or ImageMagick.

Regards
Rubén
Attached Files
File Type: epub SVG inline formula.epub (7.3 KB, 13 views)
RbnJrg is offline   Reply With Quote
Old 09-19-2020, 01:56 PM   #34
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,042
Karma: 5604042
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
I found a better workaround, see next para. But I am puzzled by the amount ofnwork that someone-the publisher? - has devoted to creating a huge set of not very compatible images, brus stroke by brush stroke.

The workaround. Checking Amazon Kindle store ,they offer the book cheaply. I grabbed the free sample into kindle for android on my same tablet. The kindle version has equations what scale up and down when you change text size, and are blacker and at the same size as the text.
And presumably, if I bought it and converted to epub I would have something that works on all my devices.
Will look at the kindle sample book code later.

Or
stumped is offline   Reply With Quote
Old 09-19-2020, 02:38 PM   #35
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,177
Karma: 4062049
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by stumped View Post
But I am puzzled by the amount of work that someone-the publisher? - has devoted to creating a huge set of not very compatible images, brus stroke by brush stroke.
No, no many work. If the original formulas were written -for example- in latex (a common task if the ebook is about cientific matter and also was printed as .pdf), to convert the formulas as .svg it doesn't take a lot by using -for example- a tool like dvisvgm.

Quote:
The workaround. Checking Amazon Kindle store ,they offer the book cheaply. I grabbed the free sample into kindle for android on my same tablet. The kindle version has equations what scale up and down when you change text size, and are blacker and at the same size as the text.
And presumably, if I bought it and converted to epub I would have something that works on all my devices.
Will look at the kindle sample book code later.
Amazon utilzes a different render engine. For .azw3/.kf8, employs Webkit (the same engine as Sigil); for .KFX Amazon only supports partially .svg images and converts them as .jpg; and it doesn't have any support for the .kf7 format.

Your workaround (convert a Kindle ebook into an epub) won't work for all epub reader devices, especially if the Kindle ebook you are going to download is a .kf8 one because Amazon won't modify your .svg (maybe you are a lucky man and the downloaded ebook is in .KFX format -I doubt- and all your formulas were converted in .jpg). If you, now, without any change, open your epub with PocketBook, your formulas will display well. But that is because PocketBook has two render engines: RMSDK and WebKit. Another reader device not based in WebKit will have issues with your .svgs. Convert your .svg as .pgn (a better format than .jpg for formulas), it's your best bet.

Last edited by RbnJrg; 09-19-2020 at 02:52 PM.
RbnJrg is offline   Reply With Quote
Old 09-20-2020, 01:34 AM   #36
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,042
Karma: 5604042
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
in the kindle sample - there are no .svg at all. they have been replaced with .gifs
( that's looking at the sample downloaded to K for PC then moved into calibre and converted for examination )
seems someone at amazon , or the publisher, realised what a pain in he posterior those svg constructs are, and had them replaced before putting the book up for sale.
so I shall buy the full version from amazon and move on.
( it was an interesting lesson ( in SVG, not in calculus! )

https://smile.amazon.co.uk/Calculus-...al-text&sr=1-1
stumped is offline   Reply With Quote
Old 09-20-2020, 09:01 AM   #37
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,177
Karma: 4062049
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by stumped View Post
...seems someone at amazon , or the publisher, realised what a pain in he posterior those svg constructs are...
Well, .svg images are the best option for formulas (if you can't use MathML). The problem here is that the .svg images in your epub are not in the standart format (plain .svg) and so, many ereaders can't display them properly. But you must not be with the idea that .svg images are always a bad option.
RbnJrg is offline   Reply With Quote
Old 09-20-2020, 10:07 AM   #38
KevinH
Wizard
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: 4,582
Karma: 2707438
Join Date: Nov 2009
Device: many
FWIW, it is possible to use the command line and the stream editor "sed" to automate mass find replace upon any set of files (even 500 of them). So the option of fixing the svg is possible.
KevinH is offline   Reply With Quote
Old 09-21-2020, 04:21 PM   #39
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 684
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by KevinH View Post
FWIW, it is possible to use the command line and the stream editor "sed" to automate mass find replace upon any set of files (even 500 of them). So the option of fixing the svg is possible.
Aha! A 50+ year old solution to a modern problem! Somewhere, John Culliton is smiling:

Quote:
If you are running any version of linux and don't use the command line
then you are hopping on one leg.


Albert
st_albert is offline   Reply With Quote
Old 09-21-2020, 06:26 PM   #40
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 59,987
Karma: 56644595
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by RbnJrg View Post
Well, after studying your .svg image, I can tell you the following:

1) Your .svg is an image made of "paths".
2) Your .svg is not a plain .svg, so it can produce issues with some ereaders.
3) Your .svg, even after converted as plain .svg, it has some instruccions not supported by ADE.

I attach an. epub with two .svg images: your original converted as plain .svg (test2.svg) and a new one made by me (test3.svg), also a plain one.

As you can see in the following screenshots, your image is not displayed under ADE but it looks ok under Sigil. So, that is a source of issues because if ADE has troubles to display your .svg, all ereaders based on RMSDK won't be able to show properly your formulas.

Attachment 182028Attachment 182029

Since you have so many .svg images, to correct them in order that ADE can display them is not an alternative. So your best bet IMHO is to convert them (batch conversion) as .pgn using a conversor like Irfanwiew or ImageMagick.

Regards
Rubén
There is a new problem. The sample formula is not the same once it's converted.
JSWolf is offline   Reply With Quote
Old 09-24-2020, 07:38 PM   #41
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,633
Karma: 7451779
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
FWIW, it is possible to use the command line and the stream editor "sed" to automate mass find replace upon any set of files (even 500 of them). So the option of fixing the svg is possible.
Or Notepad++ has a "Find in Files", where you are able to Find/Replace over entire folders + filters.

So what I would do to handle the "gray maths issue":

1. Unzip the EPUB.

2. Notepad++ (or similar) to replace all rgb(0%,0%,0%) with rgb(0,0,0).

3. Repack EPUB. (Manually, or just open/save the EPUB in Calibre/Sigil.)

Quote:
Originally Posted by RbnJrg View Post
Well, after studying your .svg image, I can tell you the following:

1) Your .svg is an image made of "paths".
2) Your .svg is not a plain .svg, so it can produce issues with some ereaders.
3) Your .svg, even after converted as plain .svg, it has some instruccions not supported by ADE.

[...]

So your best bet IMHO is to convert them (batch conversion) as .pgn using a conversor like Irfanwiew or ImageMagick.
Agreed.

IF you want to stick with SVG, I know many times over the years we've discussed "Plain SVG" output from Inkscape.

Or you could convert to PNG formulas, while not as nice/crisp, at least it'll display in horrible non-standards-compliant readers such as Moon+ Reader.

All depends on what you're trying to accomplish, and what your source material is.

Last edited by Tex2002ans; 09-24-2020 at 07:44 PM.
Tex2002ans is offline   Reply With Quote
Old 10-19-2020, 09:35 AM   #42
AlanHK
Fanatic
AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.AlanHK can talk all four legs off a donkey... then persuade it to go for a walk.
 
AlanHK's Avatar
 
Posts: 543
Karma: 124816
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by stumped View Post
I found a better workaround, see next para. But I am puzzled by the amount ofnwork that someone-the publisher? - has devoted to creating a huge set of not very compatible images, brus stroke by brush stroke.
Unlikely anyone ever looked at or edited the SVG code.

The printed book probably used Postscript/EPS/PDF graphics, and that was then exported automatically to SVG, which theoretically should give the same result.
In practice, not guaranteed. Many publishers just use the most primitive and also most compatible format, and convert to images (usually JPEG). That however balloons the size to get decent resolution.

As for the size of inline images (e.g. Chinese characters, symbols, etc.), of any kind, I make a class for these image with "height=1em" for a start and if that looks too small, bump it up a bit. Maybe some more complex ones need 2em, or even more.


Quote:
Originally Posted by Tex2002ans View Post
Or you could convert to PNG formulas, while not as nice/crisp, at least it'll display in horrible non-standards-compliant readers such as Moon+ Reader.
I generally use Kindle, and kindlegen converts PNG to either GIF or JPEG, enlarging it and usually degrading it. So for linework, I convert to GIF directly, which passes through Kindlegen.
I use Irfanview, usually reduce the number of colours to 4 (or 8 or 16 if there are greys), then adjust the palette so black is actually (0,0,0). Gives me very compact and sharp files.

Last edited by AlanHK; 10-19-2020 at 09:46 AM.
AlanHK is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura ONE Any way to enlarge titles font in My books list view? kim1406 Kobo Developer's Corner 2 08-16-2020 02:32 PM
Libra Enlarge image Valkrider Kobo Reader 10 03-10-2020 08:12 AM
Hacks kindle 3.4 Font size enlarge dawniefitzgerald Amazon Kindle 0 10-05-2012 04:59 PM
KindleGen - Enlarge pictures in lanscape orientation? _Abahd_ Kindle Formats 0 09-17-2012 05:22 AM
How to enlarge font size of mobi dictionary redmayfair General Discussions 3 07-14-2012 05:07 AM


All times are GMT -4. The time now is 03:53 AM.


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