TITLE: Software to render formulas to ASCII art
QUESTION [21 upvotes]: I guess all computer algebra systems have command line interfaces which render formula as 2D monospace "ascii art". But the only standalone tool to render TeX to 2D I know is tex2mail (comes with PARI/GP).
Are there other standalone programs or libraries for that task, preferably making advantage of various Unicode symbols? Or maybe there is a CAS capable for that.
What I'm talking about:
FriCAS:
            ┌──┐
       x   \│%A
     ┌┐  %e
     │   ─────── d%A
    └┘       2
           %A

tex2mail:
         +-+                              
     ,- \|x   2                              
     | e    /x    dx                              
    -'                 

Maxima:
     /   sqrt(x)
     [ %e
     I --------- dx
     ]     2
     /    x

Those are meant to represent:
$$\int \frac{e^{\sqrt x}}{x^2} \, dx$$

REPLY [16 votes]: You can use this Web Application:
Diagon

No need to download anything
Supports ASCII and Unicode.
Supports other kind of ASCII art diagrams.

Examples:

sum(i^2, i=0, n) = n^3/2+n^2/2+n/6

output (Unicode)

  n                   
 ___        3    2    
 ╲     2   n    n    n
 ╱    i  = ── + ── + ─
 ‾‾‾        2    2   6
i = 0                 

output (ASCII): 

  n                   
 ===        3    2    
 \     2   n    n    n
 /    i  = -- + -- + -
 ===        2    2   6
i = 0                 



mult(i^2, i=1, n) = (mult(i, i=1, n))^2

                    2  
   n        ⎛  n    ⎞   
 ━┳┳━   2   ⎜━┳┳━   ⎟   
  ┃┃   i  = ⎜ ┃┃   i⎟   
 i = 1      ⎝i = 1  ⎠                         



sqrt(1 + sqrt(1 + x/2))

     _____________
    ╱        _____
   ╱        ╱    x
  ╱        ╱ 1 + ─
╲╱   1 + ╲╱      2



[1,2; 3,4] * [x; y] = [1*x+2*y; 3*x+4*y]

⎛1 2⎞   ⎛x⎞   ⎛1 ⋅ x + 2 ⋅ y⎞
⎜   ⎟ ⋅ ⎜ ⎟ = ⎜             ⎟
⎝3 4⎠   ⎝y⎠   ⎝3 ⋅ x + 4 ⋅ y⎠



int(x^2/2 * dx ,0 ,1) = n^3/6

1             
⌠  2         3
⎮ x         n 
⎮ ── ⋅ dx = ──
⌡  2         6
0             



phi = 1 + 1/(1+1/(1+1/(1+1/(1+...))))

                 1         
φ = 1 + ───────────────────
                   1       
        1 + ───────────────
                     1     
            1 + ───────────
                       1   
                1 + ───────
                    1 + ...

Disclaimer: I am the author.
It is an open source project under the MIT license.