MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Workshop (https://www.mobileread.com/forums/forumdisplay.php?f=178)
-   -   svg image inside span tag in mobi file not display numbers (https://www.mobileread.com/forums/showthread.php?t=188689)

Hala Aly 08-22-2012 05:38 AM

svg image inside span tag in mobi file not display numbers
 
when put svg image inside span tag like

Code:

<span>
<svg:svg xmlns="http://www.w3.org/1998/Math/MathML" xmlns:svg="http://www.w3.org/2000/svg" xmlns:svgmath="http://www.grigoriev.ru/svgmath" height="15.405117pt" width="14.613340pt" viewBox="0 -11.686934 14.613340 15.405117"><svg:metadata><svgmath:metrics top="15.4051171875" axis="7.70255859375" baseline="3.71818359375" bottom="0.0" /></svg:metadata><svg:g transform="translate(0.000000, -3.984375)"><svg:g transform="translate(5.066426, -1.599609)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="2.240244" font-family="Times New Roman" fill="black">1</svg:text></svg:g><svg:g transform="translate(0.585938, 7.702559)"><svg:text font-size="8.520000" text-anchor="middle" y="0.000000" x="6.720732" font-family="Times New Roman" fill="black">100</svg:text></svg:g><svg:line stroke-width="0.585938" x1="0.000000" x2="14.613340" stroke="black" stroke-linecap="butt" stroke-dasharray="none" y1="0.000000" y2="0.000000" fill="none" /></svg:g></svg:svg>
</span>

the svg displayed correctly from xhtml but when generate mobi file using amazon kindle generator the fraction numbers does not appear but when use div instead of span it shown correctly. How can I display correct svg inside span????

PageLab 09-01-2012 12:24 PM

Hi Hala, do you really need SVG to do this? This would be easier/shorter:

Code:

  <p><sup>1</sup>&frasl;<sub>100</sub></p>

Hala Aly 09-12-2012 03:24 AM

Thanks PageLab for replay, but this simple svg is just for example I have more complicated svg's.
And I found a work around solution is to put svg in object tag and it just worked fine but I cannot resize the image.

Toxaris 09-12-2012 09:00 AM

Create a SVG and treat it like an image. Put it in an image tag.


All times are GMT -4. The time now is 08:02 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.