Page 1 of 2

Math Markup

Posted: Fri Apr 02, 2010 6:35 pm
by BenTC
About math. If there are any code monkeys around. The way to modify this forum to support math is:
a) write a plugin to catch the [math][/math] tags.
b) fetch an image from texify.com and store it locally
c) replace the [math][/math] with the link to the locally stored image.
Following on from discussion about better display of math equations, I thought I'd have a go. I've been wanting to play with phpBB for a while but had no pressing need to drive this. It helps having a task to troubleshoot, so this was a good opportunity.

I've installed it for the first time a few hours ago. After experimenting with a few ideas, I propose using ASCIIMath. I've set it up for trial at http://ben.coman.com.au/bb using the samples from http://www1.chapman.edu/~jipsen/mathml/asciimath.html . Password is 'polywell'. The advantage od this method is that it won't rely on any external servers. Its all client browser based.

Once you've come to some conclusions from testing, please comment back here.

Note: This works out of the box for Firefox, but not for Internet Explorer, who will just see the source ASCII string. However an alert advises IE users to install the required MathPlayer. It also probably works fine with Opera but I don't have that installed to test with.

[Edit: Fixed link. Noted password, thanks Betruger]

Posted: Fri Apr 02, 2010 7:20 pm
by Betruger
Password required for the test forum. I guess it's 'polywell'
There's a period at the end of the chapman.edu link, that breaks clicking it.

Posted: Fri Apr 02, 2010 7:51 pm
by Giorgio
Just a warning, you need to use " ` " symbol in the test forum to encase the formula, and not " ' ".
The only problem I have is that I do not have the " ` " on my keyboard, and I need to cut and paste it, apart from this personal issue it works like a charm.

Posted: Fri Apr 02, 2010 8:37 pm
by Giorgio
Love this ASCIIMath application.
Wouldn't be cool if in the post windows we could have a side box like this where to create the formula before posting in the forum?


Image

BenTC, any idea if something like this is even possible?

Posted: Fri Apr 02, 2010 9:50 pm
by Indrek
That's no good. Scientists use only one thing for math: latex. I don't think oldies like Art would enjoy the experience of learning new things.

Also not all browsers support mathml. And not all browsers support it consistently.

So in general. It's a bad idea.

Posted: Fri Apr 02, 2010 10:08 pm
by Giorgio
ASCIImath supports also latex syntax.
I tested it and it works fine.

As for browser support it might be an issue as ASCIIMath support Internet Explorer 6+ only, so older versions user will not have access to it. Anyway I am not sure what is the percentage of user that still use such an old version of IE.

Posted: Fri Apr 02, 2010 10:15 pm
by MSimon
When you guys get it sorted I will post it as a sticky.

Posted: Fri Apr 02, 2010 11:34 pm
by BenTC
Betruger wrote:Password required for the test forum. I guess it's 'polywell'
There's a period at the end of the chapman.edu link, that breaks clicking it.
very good guess. I set the password to allow annoymous posting, to avoid needing a new account for everyone. In later testing it no longer asked for the password, even after restarting the browser. I thought my n00bish phpBB status had turned it off somehow. It must have cached my session across restarting the browser. Not what I would have expected.

Posted: Sat Apr 03, 2010 12:44 am
by BenTC
Indrek wrote:That's no good. Scientists use only one thing for math: latex. I don't think oldies like Art would enjoy the experience of learning new things.
It apparently supports latex. Could you try that out?
Also not all browsers support mathml. And not all browsers support it consistently.
Always an issue with the web - but how much of a problem would it be. There would be two cases: 1. regular members, who sort things out once; and 2. flybys, who might need to expend some effort to participate. Does your web browser in particular have a problem that can't be sorted out?

Posted: Sat Apr 03, 2010 1:02 am
by BenTC
Giorgio wrote:Love this ASCIIMath application.
Wouldn't be cool if in the post windows we could have a side box like this where to create the formula before posting in the forum?

BenTC, any idea if something like this is even possible?
Probably possible but need some more severe hacking of the talk-polywell.org phpBB templates, with more uncertainty amongst user configurations. Probably not worth the effort for now. I got lucky. ASCIIMath is a fairly simple hack - just one line in one config file.

Posted: Sat Apr 03, 2010 1:57 am
by Indrek
All right. This might be good enough. Maybe times have changed. You know I worked for 5 years as html/perl/php/javascript/dhtml monkey. But haven't touched any of that stuff in 5 years now. Just include the latex2mathml js in the forum headers and you're set. Peaches. But poor Simon will be hard pressed. He's prolly running something built in the 1950-s. Time for that upgrade huh.
BenTC wrote:
Indrek wrote:That's no good. Scientists use only one thing for math: latex. I don't think oldies like Art would enjoy the experience of learning new things.
It apparently supports latex. Could you try that out?
Also not all browsers support mathml. And not all browsers support it consistently.
Always an issue with the web - but how much of a problem would it be. There would be two cases: 1. regular members, who sort things out once; and 2. flybys, who might need to expend some effort to participate. Does your web browser in particular have a problem that can't be sorted out?

Posted: Sat Apr 03, 2010 6:32 am
by MSimon
But poor Simon will be hard pressed. He's prolly running something built in the 1950-s. Time for that upgrade huh.


Actually my machine is a 2 week old Gateway with 6 GB of RAM and a 1 TB HD.

The processor is a Dual Core Intel job and the cores are dual threaded. Clocks at just short of 3 GHz.

And I am planning on using it to run Z-80 code. Go figure.

Posted: Sat Apr 03, 2010 7:09 am
by DeltaV
There's nothing like an adequate factor of safety for mission-critical applications.

Posted: Sat Apr 03, 2010 7:48 am
by MSimon
DeltaV wrote:There's nothing like an adequate factor of safety for mission-critical applications.
ROTFLMAO!!!11!!!11!!!

Posted: Sat Apr 03, 2010 12:54 pm
by BenTC
Indrek wrote:Just include the latex2mathml js in the forum headers and you're set.
I assume you mean this: http://www.maths.nottingham.ac.uk/personal
which acknowledges ACIIMath as its source. The ACIIMath Changes File indicates that the LaTeXMathML.js has been incoporated back into it.
Acknowledgement. This JavaScript program has been created by modifying Peter Jipsen's ASCIIMathML.js script. He deserves full credit for the original implementation; any bugs have probably been introduced by me.
Warning. I am not now maintaining this program. I am now officially retired, and I do not know how long this web site will continue to exist—I hope it will remain for a long time, but that may not be within my control. Alternative (and more developed) versions of LaTeXMathML will hopefully continue to be available from within Peter Jipsen's ASCIIMathML