GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2007-09-27 21:57:40

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Mathematical Expressions

A cool new feature is now available on the forum for all you math junkies. Using the new [m] tag you can include sexy mathematical expressions in your posts. No more cruddy looking ASCII representations. No more hassle creating, uploading, and linking images. Just type it and go!

Enclose an expression in a pair of [m] tags like so:

Expand[m]{x}={-b{pm}sqrt{b^2-4ac}}/{2a}[/m]

... and get this:
[m]{x}={-b{pm}sqrt{b^2-4ac}}/{2a}[/m]

Nice, huh?

Check out this guide to crafting your own expressions. Have fun!

UPDATE:

[m][/m] tags are no longer supported.

LaTeX, however, is supported. Simply enclose your LaTeX code within [tex][/tex] tags. See this topic for more info.

Last edited by xot (2015-01-22 03:17:29)


Abusing forum power since 1986.

Offline

#2 2007-10-09 10:50:02

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: Mathematical Expressions

Most excellent.  I've been waiting to see a forum with this on it.  I was expecting LaTeX, but it looks like a variant of it.  Similar, but different (a distinct lack of backslashes).

Offline

#3 2007-10-09 11:54:58

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Mathematical Expressions

I thought you might like it. smile

I investigated LaTeX and found some forum solutions that use it. But I don't have the privileges to compile anything on this server and I didn't want to bug the people running it. I almost gave up and then I found this PHP solution that works nicely (although it doesn't look as nice as LaTeX; GD's TTF handling kind of stinks). It's called PhpMathPublisher.


Abusing forum power since 1986.

Offline

#4 2007-10-09 13:00:54

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: Mathematical Expressions

I didn't know you had to compile it at all.  Did you see this website?  Although, looking now, I don't see anything for PunBB, so it'd probably be a lot of work to implement (even if all the software required is already compiled).

Offline

#5 2007-10-09 13:13:48

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Mathematical Expressions

Yeah, that and most other solutions rely on mimeTeX or ImageMagick. I don't have permission to compile stuff or run arbitrary executables.


Abusing forum power since 1986.

Offline

#6 2007-10-09 13:15:46

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: Mathematical Expressions

Oh well, what you have here will do.  It seems pretty robust.

Offline

#7 2007-10-09 13:30:32

Grand-High Gamer
Member
Registered: 2007-10-09
Posts: 18

Re: Mathematical Expressions

This'll keep the maths buffs happy.

Last edited by Grand-High Gamer (2007-10-09 13:31:51)


sigimage1.png

Offline

#8 2007-10-09 20:33:53

leif902
Member
From: Georgia, USA
Registered: 2007-10-09
Posts: 24

Re: Mathematical Expressions

Yup, it made me happy biggrin


Leif902

Offline

#9 2007-10-19 14:08:06

paul23
Member
Registered: 2007-10-17
Posts: 110

Re: Mathematical Expressions

really nice I can finaly put all paper I scretch somewhere on the web tongue.

Just a few suggestions (I always like to critize everything tongue) - don't know if you can easily change things, but if you can you might want to add some of these:
instead of x<>y I think you should also allow "x!=y" which is easier to think about for "gml programmers".
also maybe add an mathimatical "or" sign, which is the upside down of the "wedge" (I believe).
Also maybe an "corner" sign is handy too..  ( a slight modification of < )
You might also want to add the posibility for the "dot/in" product (a dotted product) it's great for proving if vectors are perpendicular to each other. (inproduct = 0)

Well that's about all maths I've had, still testing it a bit out tongue.

a small test:
[m]{a + b + c}/{d+e+f}[/m]
[m]a+ (b+c)/(d + e )+ f[/m]
[m](a/b)*c[/m]
[m]x^{3/2}[/m]

why didn't it work??
EDIT just noticed the tags don't work for multilines smile

Last edited by paul23 (2007-10-19 14:14:05)

Offline

#10 2007-10-19 14:34:49

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Mathematical Expressions

Well, it's not all that easy to modify for me because so much of the (poorly written) code is in French, but those are good suggestions.

I'm really surprised that dot product and cross product are not in there.

I'll see about adding Boolean OR, I guess it is distinct from [m]union[/m] union.

!= is an interesting idea, I'll have to be careful that it doesn't get mixed up with factorial. For a guy like me who grew up programming BASIC, <> is almost second nature.

I don't know what a "corner" sign is, can you show me an example and tell me what it is used for? Do you mean ¬x, Boolean not?


Abusing forum power since 1986.

Offline

#11 2007-10-19 18:23:33

Quimp
Member
Registered: 2007-10-09
Posts: 15

Re: Mathematical Expressions

If you need help with some of the French to figure out how things work, I'll be glad to help you out. I installed the application on my server (for personal use) and I agree that it's poorly written.

In any case, thanks for sharing your finding.

Last edited by Quimp (2007-10-19 18:23:52)

Offline

#12 2007-10-19 19:58:20

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Mathematical Expressions

Thanks for the offer, I may take you up on it. I'm still considering switching to LaTeX, that would solve all of the problems.


Abusing forum power since 1986.

Offline

#13 2007-10-19 20:26:45

Yourself
Member
Registered: 2007-10-09
Posts: 48

Re: Mathematical Expressions

It'd also be prettier.  Looking at the above post the expressions there look kind of ugly.

Offline

#14 2007-10-19 21:08:57

EyeGuy
Member
Registered: 2007-10-18
Posts: 19

Re: Mathematical Expressions

Seems pretty robust.  Not a lot of the specific notations, but a lot of that you can create out of what they do have.  As mentioned, it's not nearly as pretty as LaTeX, as I noticed whenever I created a bracketted set with subscripts.  If installing LaTeX is really too much of a pain, this system really does work probably for everything it'll ever be used for.

Testing (ignore whatever it is it ended up saying):
1)[m]{A_{n}}=delim{lbrace}{a_{0}} , cdots,{a_{n}}{rbrace} backslash delim{lbrace}{a_{n+1}} , cdots,{a_{infty}}{rbrace}[/m]
[m]{a_{n}}in{A_{n}} forall {n} doubleleftright {a_{i}}<>{a_{j}} forall {j}<>{i}[/m]

2)[m]{overline{lim}}under{{n}right{+infty}}{a_{n}} = {c},~{c}in bbR~doubleright lim{{n}right{+infty}}{a_{n}} <= {c}[/m] (if the limit exists)

3)[m]delim{[}{matrix{3}{3}{1 0 0 0 1 0 0 0 1}}{]}*delim{A} = {A}[/m]

Seems to get the point across.  Not the best spacing, though maybe that's partially my responsibility.  Not sure why my first commas aren't showing up, though.

Offline

#15 2007-10-19 23:57:29

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Mathematical Expressions

For best results, you have to make sure you put spaces between every symbol, or put them inside { curly braces }.


Abusing forum power since 1986.

Offline

#16 2007-10-20 07:41:28

paul23
Member
Registered: 2007-10-17
Posts: 110

Re: Mathematical Expressions

in FRENCH? o.O - what kind of crazy people made that code >< (JK, but still, of all languages...)

anyway with the corner sign I mean this:
cornernl4.pngsee the first sign of the line, that's what I ment tongue.. usefull when describing geometry problems.

ow and maybe add an "up" and "down" arrow for upper and down limits (Had to learn those at calculus but are they EVER usefull?)

Offline

#17 2007-10-20 15:07:16

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Mathematical Expressions

Ahhh, OK, that indicates an angle. That's another surprising oversight.


OK, I've added the following and updated the BBCode help file:

[m]{angle}ABC[/m] {angle}ABC

[m]a{dot}b[/m] a{dot}b
[m]a{cross}b[/m] a{cross}b (same as a*b)
[m]x!=y[/m] x!=y (same as x<>y)

[m]{NOT}p[/m] {NOT} p
[m]p {OR} q[/m] p {OR} q
[m]p {AND} q[/m] p {AND} q
[m]p {XOR} q[/m] p {XOR} q
[m]p {NAND} q[/m] p {NAND} q

[m]up[/m] up
[m]down[/m] down
[m]updown[/m] updown
[m]doubleup[/m] doubleup
[m]doubledown[/m] doubledown
[m]doubleupdown[/m] doubleupdown

The changes turned out to be very simple thanks to the completeness of one of the fonts used.


Abusing forum power since 1986.

Offline

#18 2007-10-20 16:21:52

IamCalle
Member
Registered: 2007-10-20
Posts: 23

Re: Mathematical Expressions

I have never seen this in a forum before! Nice. =D
This will come in handy for most of us I suppose.

Offline

Board footer

Powered by FluxBB