4 ms·
After having a look at: https://www.oreilly.com/library/view/unix-text-processing/9780810462915/Chapter09.html https://www.oreilly.com/library/view/unix-text-pr
by e12e 5y ago
After having a look at: https://www.oreilly.com/library/view/unix-text-processing/9780810462915/Chapter09.html 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
- smorrebrod 5y agoI am not aware of a powerful tty renderer. Groff looks like it's aimed at paper outputs first. Also eqn can be called with `groff -e` (other preprocessors also have their flag) and inf (instead of infinity) produces a correct infinity glyph.