After a few more hacks I'm now able to render some LaTeX inside my terminal

paste.sr.ht/~yerinalexey/cbdc7