• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Equation style display
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Equation style display (From: Jean Suisse <email@hidden>)
 >Re: Equation style display (From: Jens Alfke <email@hidden>)
 >Re: Equation style display (From: Jean Suisse <email@hidden>)

  • Prev by Date: Re: [OT] Finite vs Infinite State Machines?
  • Next by Date: Re: Equation style display
  • Previous by thread: Re: Equation style display
  • Next by thread: Re: Equation style display
  • Index(es):
    • Date
    • Thread