Jump to content

Q: How to make inline SVG scale in ePub?


Recommended Posts

First post here - I hope this is the appropriate forum 1. I created a LaTeX equation using Codecogs (http://www.codecogs.com/latex/eqneditor.php) and inserted it into a test epub using Calibre's editor2. When I use an eReader and scale the default size, the SVG file remains fix (not a surprise)3. Is there a way to change the SVG code or modify the CSS to allow the SVG to scale as the eReader's font size changes?4. I'm just using an <img> tag inserted by the editor

<p>Sed egestas, ante et vulputate volutpat, eros pede semper est, <img alt="Image" src="../images/Emc2.svg"/> vitae luctus metus libero eu augue. Morbi purus libero, faucibus adipiscing, commodo quis, gravida id, est. Sed lectus. Praesent elementum hendrerit tortor. Sed semper lorem at felis. Vestibulum volutpat, lacus a ultrices sagittis, mi neque euismod dui, eu pulvinar nunc sapien ornare nisl. Phasellus pede arcu, dapibus eu, fermentum et, dapibus sed, urna.</p>

and this seems to the newbie me to be the key part of the SVG as generated by Codecogs

<?xml version='1.0' encoding='utf-8'?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="11.3819pt" version="1.1" viewBox="0 0 50.4251 11.3819" width="50.4251pt">

I really only need to add a few simple 'real' equations to replace some very ugly scanned JPG files used in the current bookI tried to upload the ePub and SVG file, but I guess they were not allowedThanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...