Quote:
Originally Posted by stumped
thanks, but there are 485 .svg files in the book. I may do a few, one at a time, as a learning experience, but I ain't doing all 485 that way!
Meanwhile, I opened up a different maths text and saw that in that one, all the actual math is stored as .png, and all looks solidly black. That's a more mainstream approach ?
|
I wouldn't necessarily say "mainstream"...There are benefits to png...but svg is 'better' IMO...Mostly because it doesn't matter how large the image is it'll never get pixelated. If you try and zoom in too far on a png it can get all blurry and look like crap. Some publishers work around that by having very large resolution files...at the expense of having a VERY large ePub file size.
If the % thing is the actual cause, then it would be super easy to open the ePub in a different editor, such as notepad++, and you could easily regex all the svg files in one go.
The css/html files are easily edited in sigil with a couple regex.
Personally, I would only have a few svg 'classes':
1) for equations that are inline with the paragraph, such as:
span.inlineEQ img {height:1.2em}
2) for smaller equations on their own - like only a single line with numerator, denominator, exponents, etc, such as:
div.smallblockEQ {text-align:center; margin:1em 0}
div.smallblockEQ img {height:2em}
3) for larger equations on their own - like multi-line proofs, such as:
div.largeblockEQ {text-align:center; margin:1em 0}
div.largeblockEQ img {height:10em}
Then you would only need a specific class for the truly freaky equations.
edit:
Having said all that about svg being better....I think there are some, older, readers/devices that don't like svg within the body of the html...they only play well with an svg wrapped jpg/png/gif/etc as a cover image. Someone else around here could probably tell you which devices still struggle in that regard.