-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Stuart Dootson Sent: 08 December 2014 14:46 To: boost@lists.boost.org Subject: Re: [boost] [documentation] Are SVG's in documentation viable now?
On 8 December 2014 at 14:38, Alex Perry
wrote: On 08 December 2014 12:52 John Maddock [mailto:boost.regex@virgin.net] wrote:-
Folks I need your opinions,
Since it's inception, Boost.Math has used PNG versions of equations and graphs even though scalable SVG versions have been available. Unfortunately, a variety of issues have prevented their use. Fortunately, the logjam now appears to have cleared, and use of SVG's appears viable.
So... I wonder if I can get folks to point their browsers at http://jzmaddock.github.io/doctest/html/svg_test/equations.html and let me know if there are any issues? One that I'm aware of, is that the equations reference Window's specific fonts, but so far in my tests this appears not to be an issue.
Just thought in the light of recent posts on bed-time reading on tablets with boost.book would try this on a mobile device.
On Android Kit-Kat default browser there is some clipping of these equations but I'm not quite sure how you are calculating the width and height for the svg elements since these are just given in your html.
I've attached a screen shot showing the clipping for airy_bi
If I adjust the sizes in the html to say <object type="image/svg+xml" data="equations/airy_bi.svg" width="300" height="125"></object> then no clipping occurs
<snip>
And in light of this reply, I tried it in Safari on my iPhone 5S, running iOS 8.1.1 - they appeared to display fine (as far as I could see, no clipping a la Android), and also loaded and zoomed a lot faster than in Chrome 40 on my Windows 7 workstation.
I've also compared http://jzmaddock.github.io/doctest/html/svg_test/equations.html on an iPad. Safari which renders a tiny bit better than Chrome (a few slight collisions between integral sign and limits). No clipping as seen on Android phone. But overall, SVG is definitely nicer. Paul PS The slow speed render is because this is such a monster test collection of *all* the equations in Boost.Math. Speed should not be a problem in real life usage. I believe that the equation font size can also be chosen to match the text.