Name: anonymous coward 2012-04-18 20:44
No this isn't a joke, or a meme or a fad or whatever you think it is. It just a
regular programming problem.
I'm making a ASCII-art math generator. So you can input in your document
Maxima-notation math and get a corresponding representation. Example:
>Integrate(x^2,x,0,5)
5 __
/ 2
_/ x dx
0
While a got the AST right. When making the representation on ASCII-text I hit a
problem. The inner-term can change the structure of the outer ones, so this
isn't straight forward
>integrate(x,x,0,5)
>integrate(x+3/2,x,0,5)
5 __
/
_/ x dx
0
5 ______
/ 3
/x + - dx
_/ 2
0
Which is the simplest approach to this?
Pd: I am not telling in what I'm implementing it so it doesn't derail.
regular programming problem.
I'm making a ASCII-art math generator. So you can input in your document
Maxima-notation math and get a corresponding representation. Example:
>Integrate(x^2,x,0,5)
5 __
/ 2
_/ x dx
0
While a got the AST right. When making the representation on ASCII-text I hit a
problem. The inner-term can change the structure of the outer ones, so this
isn't straight forward
>integrate(x,x,0,5)
>integrate(x+3/2,x,0,5)
5 __
/
_/ x dx
0
5 ______
/ 3
/x + - dx
_/ 2
0
Which is the simplest approach to this?
Pd: I am not telling in what I'm implementing it so it doesn't derail.