Re: Equation style display
Re: Equation style display
- Subject: Re: Equation style display
- From: Dave DeLong <email@hidden>
- Date: Mon, 02 Jul 2012 11:59:59 -0700
Hi Jean,
In terms of parsing, I've written a library to help with that: https://github.com/davedelong/DDMathParser/ You'll probably want to do something like this:
NSString *equation = @"(9/10) * sin( $x/(2*$t) )"; // note that variables need a $ in front of them, for simplicity
NSError *error = nil;
DDExpression *expression = [DDExpression expressionFromString:equation error:&error];
Assuming parsing succeeds, it should be relatively straight-forward to recurse through the resulting expression object and build up the MathML string you need.
Feel free to contact me off-list if you have specific questions.
Cheers,
Dave
On Jul 2, 2012, at 10:19 AM, Jean Suisse wrote:
> Well, it seems that all paths leads towards Webkit and MathML… which unfortunately requires some parsing / rewriting, even for simple equations…
> Thank you Jens.
>
> Best regards,
> Jean
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden