![]() |
enlarge the math?
i have a textbook in epub - calculus in 5 hours
it is readable on my large PC monitor but on anything smaller- tablet, Kobo... I struggle to make out the equations. each is coded like so: <p class="formula_block"><img alt="formula" class="fs38" src="../Images/svgimg0379.svg"/></p> there are 485 .svg definitions in the epub , within images. but each appears in sigil as a long bunch of numbers so it does not look easy to mess with those there are 60 similar fs... classes, they all have different heights and have width auto. see examples below. I am wondering if there is any simple way to regex in a scaling factor which will blow up every .svg equation image by a set percent ? can i do that be changing only the formula block p class , or will anything there be overridden by the img class fs... code extracts: .formula_block { display: block; margin-bottom: 1em; margin-left: 0; margin-right: 0; margin-top: 1em; text-align: center; text-indent: 0 } .fs { display: inline; height: 1.25125em; vertical-align: -0.296888em; width: auto } .fs1 { display: inline; height: 1.02375em; vertical-align: 0; width: auto } .fs2 { display: inline; height: 1.1375em; vertical-align: -0.076213em; width: auto |
Quote:
Because all your images are .svg format they shouldn't become pixellated no matter how much you zoom. |
According to your .fs classes, your .svg images are intended to be displayed inline as text, so if you want to see them better, just increase the size of the font of your reading device.
|
thanks both- I was aware of the kepub zoom option but you need to see a sequence of equations to follow an explanaion. so blowing them up one at a time when there may be 20+ on a screen would be fiddly.
I did wonder if blowing up the base text font might help. I can try that quite easily with moon reader. I had tried rotating the tablet between landscape & portarit but that did not help much annoyingly, the equation images are more gray than black ( maybe how they were captured with) and that does not help with legibility yes the math does display inline, and making the images overlarge could wreck the page layout, as several may be intended to appear left to right on the same line I have no plans to write a maths text but I am curious as to how it is best done for e-readers and if there are any good PD examples. I think I am trying to read a fairly lazy conversion of a paper book design . |
Quote:
Code:
fill="somecolour" |
In your css for fs, fs1, fs2 replace the height: 1.xxxem; with a slightly larger em value (say 1.5 or 1.3).
Any svg element is scaled to match the height/width of the container it is provided with. In this case the css is setting the height using font height in "em" and width to auto. |
You will be lucky if thee SVG images work in Moon+. Moon+ likes to do it's own thing with the CSS.
|
Quote:
FWIW .svg images display OK in Android apps PocketBook and Bookari. |
Quote:
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 ? Code:
<?xml version='1.0' encoding='utf-8'?> |
Quote:
|
Quote:
is they an easy way to boost contrast/ make them all blacker though? they are fainter, greyer than the text. I see that also in sigil. testing and answering another suggestion, in Moon reader the image size does not change when i change the text font size. I can move it up/down from 19 but only the explanatory text changes, not the equations. as for epub apps that can't handle SVG- I just opened the book in ADE on my PC & all the equations are a.w.o.l. that's one way to simplify the math! i might look at how android bookari premium? aka paid, copes, but its not currently installed, will have to go re-install it |
Quote:
You may be thinking of SVG tags. Which are commonly used as wrappers around other binary raster-type images when creating ebook cover pages. An SVG image really IS text. Editable in a text editor if you know what you're doing, but more commonly edited with something like Inkscape, CorelDRAW, or Adobe Illustrator. |
1 Attachment(s)
I was playing around with this in Sigil and was able to change the equation size by changing the height of the image using css. I couldn't get the color of the stroke to change using the class because it is defined in the .svg file itself using the <g style="fill:rgb(0%,0%,0%);fill-opacity:1;"> tags at the bottom. You would need to change those individually (or with a regex). eg to make them all green replace rgb(0,0,0) with rgb(0,255,0), or black:rgb(0,0,0)
You might be able to increase the size by using CSS: .fs img {height: 1.2em} The light grey color you see may?? be caused by the '%' in the rgb(0%,0%,0%)...your reader may be hanging up on that...I'm certainly not an expert on SVG, but I haven't seen rgb described with percentages before...I just use a given value from 0-255. |
thats both.
yes my previous exposure to SVG was to simple wrap around tags light grey is an exaggeration but it looks grey, not black, even in Sigil. Unless my eyes interpret a very narrow black "brush stroke" as grey, when it really is black ? i will try to regex out the rgb % , if there's an way to point sigil find/replace at the svg definition, not at the xhtml files? |
A little research later:
Apparently % in rgb definitions ARE a thing... Quote:
You could still 'try' with rgb(0,0,0) just to see if your device/reader is choking on that point. Cheers, |
| All times are GMT -4. The time now is 10:52 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.