Get bounding box information of math equations in pdflatex

"[email protected]" <[email protected]> Sun, 8 Dec 2019 05:44:27 +0000
Newsgroups gmane.comp.tex.pdftex
Message-ID <MWHPR07MB3616A59278B618F9678458D689590@MWHPR07MB3616.namprd07.prod.outlook.com>
Hi pdflatex folks,

I just get this idea to build a math equation detector where I need data about the bounding box of the math equations, I'd like to use pdflatex to synthesize some data so what I'd like to do is to generate some random math equations mixed with random normal text, and I need to know the bounding box and location of the rendered equations, I have no idea how to achieve but since pdflatex is responsible for the rendering of those equations I guess it will probably have the information I need, can you guys shed some light on this question?

Thanks!
Xiangyu Guo