Displaying maths equations
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 5
- Joined: Sun Mar 27, 2016 6:30 pm
Displaying maths equations
I need to show simple maths equations in my current project. It will be used by maths students.
The equations and expressions are randomly generated and I would like to display them correctly.
What is the best approach?
Regards
Steve
The equations and expressions are randomly generated and I would like to display them correctly.
What is the best approach?
Regards
Steve
-
- VIP Livecode Opensource Backer
- Posts: 9751
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Displaying maths equations
Hi.
Not sure how you want to structure this, but there are several ways to assemble strings of characters according to rules that you determine. Try this stack, which is only partly silly.
Then write back with what you really want.
Craig
Not sure how you want to structure this, but there are several ways to assemble strings of characters according to rules that you determine. Try this stack, which is only partly silly.
Then write back with what you really want.
Craig
-
- Posts: 5
- Joined: Sun Mar 27, 2016 6:30 pm
Re: Displaying maths equations
Thanks Craig
This is what I want to display. But like equation In Word. So like your file, I would like to generate equations or statements and then display them using mathematical symbols. See the attachment,
This is what I want to display. But like equation In Word. So like your file, I would like to generate equations or statements and then display them using mathematical symbols. See the attachment,
-
- VIP Livecode Opensource Backer
- Posts: 9751
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Displaying maths equations
So the same concept would apply, to select certain characters, as well as random characters, and build them into a format of some kind. LC cannot, within a field, build a wide division line like you have in your examples. But a graphic can be placed properly to do that job.
In fact, I wonder if it would not be better, instead of building the contents of a field char by char and graphic by graphic, to build a superstructure or two (or twenty?) that can contain several fields and graphics in fixed locations. If you do not need a lot of different ones that might be much simpler. In your two examples, you would have two "templates", and just fill in the blanks.
I don't know how many you want, or how different these might be.
Craig
In fact, I wonder if it would not be better, instead of building the contents of a field char by char and graphic by graphic, to build a superstructure or two (or twenty?) that can contain several fields and graphics in fixed locations. If you do not need a lot of different ones that might be much simpler. In your two examples, you would have two "templates", and just fill in the blanks.
I don't know how many you want, or how different these might be.
Craig
Re: Displaying maths equations
I really don't know if this is viable, but perhaps you could use a browser widget to display the equations with a javascript engine like MathJax? (https://www.mathjax.org)
Re: Displaying maths equations
I don't know, haven't tried and don't really have a clue about what's involved but this looks like the sort of formula rendering that LaTex is renowned for and might be possible to leverage either by shell call to a Tex flavour app, which outputs to rtf??? Or within a browser control as suggested above.
-
- VIP Livecode Opensource Backer
- Posts: 7258
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Displaying maths equations
There are math fonts designed for this purpose. You could try one of those. I've never needed one but the basic idea is that you translate the formula into letter equivalents and set the font to the math one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com