I’m wanting to get more precise about how I position the elements created by tex2svg. For this purpose, I’d like to be able to get the width and height of any bit of math inserted by tex2svg.
I’ve been banging my head against this for a couple of hours, and haven’t been able to find a solution. My approach has been to try to use d3’s getBBox(). But that function returns 0 width and 0 height when applied to all the elements produced when I use tex2svg. Here’s a notebook demonstrating my failed attempts:
Note that you’ll need to use developer tools to see the failures that notebook generates. Each cell does a console.log() to show what’s returned from getBBox().