After having a look at: https://www.oreilly.com/library/view/unix-text-processing/97... and a few man pages, I figured I could play with eqn like so:
eqn -Tpdf - <<eof | groff -me -T pdf > eqn.pdf
.EQ
sum from i=0 to infinity x sub i = pi over 2
.EN
eof
xdg-open eqn.pdf
I did not have much success trying to force it throug groff/troff and render pretty in a (wayland) terminal - with neither `--text` (as below) or `--tty`. But perhaps there is no such "magic" renderer? eqn -Troff -Tutf8 - <<eof | groffer --text |less -R
kEQ
sum from i=0 to infinity x sub i = pi over 2
.EN
eof