wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> suggestions, help, and FAQ >> [ FAQ : (updated) how to write math symbols? ]
(Message started by: william wu on Oct 21st, 2002, 6:19pm)

Title: [ FAQ : (updated) how to write math symbols? ]
Post by william wu on Oct 21st, 2002, 6:19pm
FAQ: Writing Math Symbols


(Updated 1:58 AM 8/18/2003 to describe newly implemented methods based on juxtaposing lots of small symbol images. It's a bit verbose, but the point of this FAQ is to be as understandable as possible.)



Input Method 1: Click the Symbol Image

When constructing a message, you should see a small blue-rimmed box to the left of the message window. At the top of box there's a drop-down menu with names of frequently used math symbols in it. By default the "emptyset" should be selected. Below the menu is a picture of the "emptyset" symbol. If you change the menu selection, the picture will change accordingly. After selecting the symbol you want, simply point your mouse squarely on the symbol's picture, and click. A text code for your symbol will then be inserted into the message window. (You will not actually see the image in your message until you preview it or post it.)

Example: Clicking on the [pi] image for "pi" will result in the following codeword being inserted the message window:


Code:
[pi]




Input Method 2: Just Type The Symbol Codeword

Alternatively, instead of searching for the symbol you want, it can be faster to just type the codeword, if you know it already. All codewords are bracketed, and most have intuitive names. For example:

- Codewords for lower-case greek letters ([alpha],[beta],[gamma],...) are simply the names of the letters themselves, in brackets.
- [sum] is "sum" in brackets.
- [sup2] is "sup2" in brackets (sup stands for superscript).
- [sub0] is "sub0" in brackets (sub stands for subscript).
- [le] is "le" in brackets (Less than or Equal to).
- [infty] is "infty" in brackets.
- [bbz] is "bbz" in brackets (stands for blackboard z).

These codewords are taken from LaTeX, the definitive typesetting system used to publish most mathematical and scientific literature today. Thus if you already know LaTeX, this should all be easy. And if you don't, you will teach yourself a little bit about LaTeX by learning these codewords.

Only the common symbols which are shown in the drop-down menu can be inputted this way. More obscure symbols must be inputted differently. More about this in the next section.

(Sidenote: LaTeX is very useful. For those of you that are students, you can also use it to take fabulous real-time notes in your math/sci classes. More on how to learn this LaTeX at http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=news;action=display;num=1055119317).



Input Method 3: Relatively Obscure Symbols

The drop-down menu only contains symbols that I believe are most frequently used. To select from all available symbols, click on the "View All Symbols" link right under the picture page. This will bring up a pop window displaying the following symbols:

http://www.ocf.berkeley.edu/~wwu/images/symbol_chart.gif


Just click on the symbol you want.

Alternatively, if you already know the codeword of the symbol you want, type the following:


Code:
[smiley=foobar.gif]


where foobar is the codeword. This "smiley" code approach will work on any symbol, regardless of whether it is in the drop-down menu or not.

The full list of codewords and their corresponding images can be seen at http://us.metamath.org/symbols/symbols.html



Example Equations

"A good example is the best sermon."


[forall]r,s[in][bbr], [exists]t[in][bbq] min(r,s) < t < max(r,s)

[int]x[sup2]dx = (1/3)x[sup3] + C

[lnot](E[sub1][perp]E[sub2])[bigto] Pr([bigcap]i=1,2E[subi]) = Pr(E[sub1][cap]E[sub2]) [ne] Pr(E[sub1])Pr(E[sub2])

lim(n[to][infty]) { ([sum]i=1[supn] 1/i) - ln n } [to][gamma][approx].57721

(d/dx)[smiley=cgamma.gif]|x=1 = -[gamma]

x[n][oplus]y[n][bigto]X(z)R(z) ; x(t)[oplus]y(t)[bigleftrightarrow]X(f)Y(f)

[calf]-1[X(j[omega])] = x(t)= (2[pi])-1[int][subinfty][supinfty]x(t)e-jwtd[omega]

sin[theta]([partial]/[partial]r)(r[sup2]([partial]u/[partial]r)) + ([partial]/[partial][theta])([partial]u/[partial][theta]) = 0

[forall]u,v[in][bbc][supn] |[langle]u,v[rangle]|[le][parallel]u[parallel][cdot][parallel]v[parallel]

[wutang]: [forall]k[in]{m|m[in][bbz][wedge]m[ge]2[wedge]([forall]n[in][bbz]:m[ne]b[supn])} [nexists]q[in][bbq] (logbk = [pi][cdot]q)

Gelfond-Schneider Theorem: If [alpha] and [beta] are algebraic numbers with [alpha][ne]0, [alpha][ne]1, and [beta][notin][bbq], then [alpha][smiley=supbeta.gif] is transcendental.



Code:
[forall]r,s[in][bbr], [exists]t[in][bbq] min(r,s) < t < max(r,s)

[int]x[sup2]dx = (1/3)x[sup3] + C

[lnot](E[sub1][perp]E[sub2])[bigto] Pr([bigcap][sub]i=1,2[/sub]E[subi]) = Pr(E[sub1][cap]E[sub2]) [ne] Pr(E[sub1])Pr(E[sub2])

lim(n[to][infty]) { ([sum][sub]i=1[/sub][supn] 1/i) - ln n } [to][gamma][approx].57721

(d/dx)[smiley=cgamma.gif]|[sub]x=1[/sub] = -[gamma]

x[n][oplus]y[n][bigto]X(z)R(z) ; x(t)[oplus]y(t)[bigleftrightarrow]X(f)Y(f)

[calf][sup]-1[/sup][X(j[omega])] = x(t)= (2[pi])[sup]-1[/sup][int][subinfty][supinfty]x(t)e[sup]-jwt[/sup]d[omega]

sin[theta]([partial]/[partial]r)(r[sup2]([partial]u/[partial]r)) + ([partial]/[partial][theta])([partial]u/[partial][theta]) = 0

[forall]u,v[in][bbc][supn] |[langle]u,v[rangle]|[le][parallel]u[parallel][cdot][parallel]v[parallel]

[wutang]: [forall]k[in]{m|m[in][bbz][wedge]m[ge]2[wedge]([forall]n[in][bbz]:m[ne]b[supn])} [nexists]q[in][bbq] (log[sub]b[/sub]k = [pi][cdot]q)

[b]Gelfond-Schneider Theorem[/b]: If [alpha] and [beta] are algebraic numbers with [alpha][ne]0, [alpha][ne]1, and [beta][notin][bbq], then [alpha][smiley=supbeta.gif] is transcendental.




Input Method Method 4: towr's LaTeX2PNG generator

If you have some really hardcore LaTeX to write and the methods described above are insufficient (e.g. matrix equations or determinants), then use towr's formula generator at http://tcw2.ppsw.rug.nl/~towr/PHP/FORMULA/formula.php. This generates a PNG image of your LaTeX code. You can then reference the URL of that image by using the "img" tags in the message window. It is preferred that you only use this method if you have to, because those PNG images are not stored locally, and that remote database seems less reliable (since we apparently lost some data a while ago).


[square] end



Note 1: Feel free to add suggestions about improving this FAQ.

Note 2: The crossed-out text immediately below was written by me on October 21, 2002. It describes a different method to make mathematical operators, using HTML symbol font. However, you should not use it, because many browsers are unable to see it. Several of the subsequent posts in this thread are talking about issues concerning this method. After that, there is some talk about towr's formula generator.





\begin{FAQ for unsatisfactory HTML symbol input method}


http://www.hclrss.demon.co.uk/demos/symbol.html


Browse the page linked above until you find the symbol you want. You will notice there are several columns. Copy the symbol in the left-most column with your mouse, then paste it in between font symbol tags. When you paste them into the message window, you won't see the symbol you expected. However, when you preview your message or post it, YaBB will interpret it correctly thanks to the font symbol tags.

I should note that this cumbersome copy and paste technique is only required of symbols whose HTML codes require ampersands. Thus Greek letters do not require this technique, and you only need to enclose an alphabetical letter in between font symbol tags. For example, here are some of the most frequently used greek letters:

S = summation
P = product
Q = angle
q = angle
W = sample space
w = radial frequency
s = standard deviation

and here is the simple code:


Code:
[font=symbol]S[/font] = summation
[font=symbol]P[/font] = product
[font=symbol]Q[/font] = angle
[font=symbol]q[/font] = angle
[font=symbol]W[/font] = sample space
[font=symbol]w[/font] = radial frequency
[font=symbol]s[/font] = standard deviation


(Note: So why can't you just type the HTML code for symbols that require ampersands? Well, YaBB will always parse your ampersands as ASCII text for security reasons: & is often used in HTML, and HTML is a security risk on any board. The cutting and pasting technique gets around this. If anyone has a better method please let me know.)


=========================================================

Example requiring copy and paste technique:

"Everyone who is thinking about puzzles is not doing real work" is an ambiguous statement. Here's one possible meaning:

Let a(x) mean that person x is thinking about puzzles.
Let b(x) mean that person x is doing real work.

Here is one possible interpretation: "x (a(x) ® Ų b(x))


Code:
[font=symbol]"[/font]x (a(x) [font=symbol]®[/font] [font=symbol]Ų[/font] b(x))


What's the other interpretation?


=========================================================

P.S. Let me know if you see some gibberish characters in the above logic expression. To display the mathematical operators used HTML symbol font, which I believe is frowned upon by the w3c, and doesn't work with all browsers and OSes. But if there are no complaints I'll just keep doing this and encourage others to do the same, because it makes our analyses much easier to read.


\end{FAQ for unsatisfactory HTML symbol input method}



Title: Re: [ FAQ : how to display mathematical operators?
Post by TimMann on Oct 21st, 2002, 11:46pm
The symbol font characters are gibberish in Mozilla 1.0 and Galeon 1.2.6 for Linux. (Galeon is basically the Mozilla rendering engine with a simpler UI wrapped around it.)  In Konqueror, the characters are blank spaces.

On all three browsers, the characters on the demo web page that are properly specified as HTML entities instead of using the Symbol font are correctly displayed.


Title: Re: [ FAQ : how to display mathematical operators?
Post by william wu on Oct 22nd, 2002, 3:30am
Hmm OK, I guess I won't use these symbols too frequently then. Thanks for the info Tim.

Title: Re: [ FAQ : how to display mathematical operators?
Post by Icarus on Nov 26th, 2002, 8:02pm

Quote:
So why can't you just type the HTML code for symbols that require ampersands? Well, YaBB will always parse your ampersands as ASCII text for security reasons: & is often used in HTML, and HTML is a security risk on any board. The cutting and pasting technique gets around this. If anyone has a better method please let me know.


Since I read Tim's post, I have avoided using the symbol font, but I did use it to show the standard symbols for infinite numbers recently. When I did, I discovered that if you use the & code (for instance & #165 for ASCII character 165), and hit the preview button, it will of course display the characters & #165 in the preview. But at the same time, it converted the & #165 to the correct ASCII character („) in the text entry window (in fact the space between the & and # i have shown here is to keep YaBB from doing it). Hitting preview a second time displayed the appropriate character () in the preview, and the post.

I have tried this with extended Unicodes, and it converts in the text to the correct character, but unfortunately, hitting preview the second time converts it to a symbol with code <256. So it does not get around the need for the symbol font.

Title: Re: [ FAQ : how to display mathematical operators?
Post by TimMann on Nov 26th, 2002, 9:58pm
Actually, I don't see any reason why YaBB shouldn't let you put HTML character entities into posts by letting ampersands pass through. It would have to check for correct syntax (i.e., there has to be a semicolon to terminate the entity), but otherwise I don't see any danger to it. Or to avoid creating them where people don't want them, maybe the YaBB syntax should be something like [& #99], without the blank space.

By the way, the characters in Icarus's post don't show up as correct in my browser. One looks like a Y with one horizontal bar through it near the bottom, and one looks like a Y with two horizontal bars through it (that is, a Yen symbol). Sigh.

Title: Re: [ FAQ : how to display mathematical operators?
Post by Icarus on Nov 27th, 2002, 11:50am
The first one was the Y with horizontal bar. The second one is the same character in the symbol font, which should be the infinity symbol. I will continue to avoid the symbol font as a general rule. Even in the post I refered to, I only used it a few times to show the correct symbols to those whose browsers could handle it. I would definitely be interested if someone can figure out how to display symbols universally.

Title: Re: [ FAQ : how to display mathematical operators?
Post by william wu on Dec 15th, 2002, 12:31am
I'm not sure why ampersands are a hazard either, but that's what some supposed YaBB expert told me. Anyways, when finals are over and I've played a sufficient dosage of violent video games to relax my mind, I hope to implement an idea for a cute quasi-solution to this problem, along with solutions to a bunch of other problems I said I'd solve earlier this year. There's a board mod which allows adding more smiley faces. Rather than adding faces, I'll add GIFs of a few common math operators (e.g. Sigma for summations).

Title: Re: [ FAQ : how to display mathematical operators?
Post by Icarus on Dec 17th, 2002, 5:26pm
Excellent idea! I don't suppose you could change the code for the current smileys at the same time? The one I find particularly bothersome is 8), which keeps showing up when the poster meant 8 ) and did not preview before posting!

Other symbols I would like to see (It's Christmas, so here's my list ;)): Capital PI for Product, pi, integral, infinity, element of, intersection. Some other small greek letters might also be nice, particularly theta, phi and sigma.

Title: Re: [ FAQ : how to display mathematical operators?
Post by william wu on Dec 17th, 2002, 6:12pm
Thanks for the list of helpful suggestions. I will work on it over winter break. Feel free to any other symbols you think are essential.

Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Dec 18th, 2002, 11:23am
It'd be nice if there was a general formula-tag..
like if you could just do [formula=\frac{\sum_{i=0}^N a_i}{N}] and get
something like [edit2]http://tcw2.ppsw.rug.nl/~towr/PHP/formula.php?formula=%5Cfrac%7B%5Csum_%7Bi%3D0%7D%5EN+a_i%7D%7BN%7D[/edit2]

I should be able to make a small script that can at least give the image based on some arguments.. (Using a systemcall of latex2html and retrieving the image(s), and of course dumping the image in a database, cause it'd be just silly to recreate it every time..)

[edit] http://tcw2.ppsw.rug.nl/~towr/PHP/formula.php
if you want to try/use my newly develloped formula-generator.
http://tcw2.ppsw.rug.nl/~towr/PHP/showsource?file=formula.php if you want to make fun of my awfull programmingchoices..[/edit]



Title: Re: [ FAQ : how to display mathematical operators?
Post by william wu on Dec 31st, 2002, 10:36am
Cool! Coincidentally I was just thinking about this problem and musing over how nice it would be to have a fully LaTeX compatible forum, and behold, someone already thought of something like that. The formula generator works very nicely. I tested it with a bunch of stuff. The central limit theorem:


Code:
   $X_1,X_2,... $ are iid RVs with common mean $\mu$ and var. $\sigma^2$.
   $Z_n = [X_1 + ... + X_n - n\mu} \over {\sigma\sqrt{n]}$. CDF
   of $Z_n$ converges to standard normal CDF $\Phi(z) = {1 \over
   \sqrt{2\pi} } \int_{-\infty}^z e^{-x^2 \over 2} dx$, in the
   sense that $\lim_{n \rightarrow \infty} P(Z_n \leq z) =
   \phi(z)$.


http://www.ocf.berkeley.edu/~wwu/images/riddles/blah.png

Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Jan 1st, 2003, 7:08am
I should probably note that the script allready inserts \[ en \] for math display mode itself.
As a result tabular and such may not work well, of course latex2html wouldn't make an image of it anyway (since html has tables). I'm kind of surprised you got the central limit theory out of it; I wouldn't expect it to yield just one image, with the normal text and so..
Also every formula that's entered will automaticly be shown on the example page.

Title: Re: [ FAQ : how to display mathematical operators?
Post by SWF on Jan 15th, 2003, 6:51pm
Towr, that formula generator is fantastic!  Except I when I tried to post to the message board with it (on the Easy "Composite Numbers" thread).  I could get the equation to display, but was unable to get a link to the image.  The path listed in my browser was to a temporary internet file on my hard drive.  I am using fairly old versions of browsers:  IE 4.0 and Netscape 4.5 did similar things.

Is there any chance of having a version that displays black on white in a high resolution gif?  That would be very useful for making high quality equations to paste into documents without having to install LaTeX on my computer.  I'd rather work in LaTeX but the corporate world not only requires MS Word, but doesn't let us install LaTeX on a company machine.

Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Jan 15th, 2003, 11:46pm
Well, it should be possible to make.. I could probably add a few options.. The question is rather if I'm not too lazy to do it (and I have a lot of assignments this months)..
I don't know how to change the resolution though (I'm just using what latex2html spits out).

Title: Re: [ FAQ : how to display mathematical operators?
Post by william wu on Jan 21st, 2003, 12:37am
why would your company not let you install latex? that sounds so fascist.

Title: Re: [ FAQ : how to display mathematical operators?
Post by william wu on Jan 21st, 2003, 1:15am

on 12/17/02 at 17:26:04, Icarus wrote:
Excellent idea! I don't suppose you could change the code for the current smileys at the same time? The one I find particularly bothersome is 8), which keeps showing up when the poster meant 8 ) and did not preview before posting!

Other symbols I would like to see (It's Christmas, so here's my list ;)): Capital PI for Product, pi, integral, infinity, element of, intersection. Some other small greek letters might also be nice, particularly theta, phi and sigma.


I can easily change the 8) code, but then previous intended instances of the sunglasses-wearing dude will be damaged. I think I'll leave it as is for now.

I think the latex2html generator will be a better solution to our formula problems ...

Title: Re: [ FAQ : how to display mathematical operators?
Post by Icarus on Jan 23rd, 2003, 7:18pm
Towr - the generator is great, but when I used it, the first time I tried to generate the formula, I didn't have the syntax right, so the result was screwy. I corrected the syntax, and got a nice result, but to my chagrin, the mistaken formula is there on your examples page as well as the correct one!

Could you put in an "accept" button to be pressed only when the formula is ready (which would then preserve it for all eternity), rather than when it is just being previewed?

Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Jan 23rd, 2003, 11:29pm

on 01/23/03 at 19:18:46, Icarus wrote:
Could you put in an "accept" button to be pressed only when the formula is ready (which would then preserve it for all eternity), rather than when it is just being previewed?
Well, I usually clean up the database every now and then. But yes, an accept button would make life easier.. Of course I'm lazy and stuff ;)
There's some other stuff I want to change as well, like when you submit a formula you can actually see it. And long formulas won't work because there's a limit on the number of characters in an url (if I used post instead of get creating bigger formulas will work, but retrieving them will need something else, like an md5 of the formula. But I also want to keep it backwards compatible.)
In short I need to make a few changes to the program, and to the structure of the database itself (add an md5 identifier, perhaps time of creation etc).


Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Jan 27th, 2003, 5:26am
I've updated my formula generator, the old url will still work, and I've tried to keep all the valid formulas that are in use (but I might have missed some).

You can now retrieve images by formula, id or md5 of the formula, which also makes it possible to make larger formulas, since the latter two won't break the character limit of an url.

And when you generate an image you now have to save it before it gets entered in the database.

Title: Re: [ FAQ : how to display mathematical operators?
Post by SWF on Feb 24th, 2003, 5:31pm
Is there something wrong with towr's formula generator?  For the past few days equations have not been showing up.  That makes all old postings containing these formulas of little use.

Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Feb 24th, 2003, 11:47pm
well..
The database is currently not existing, everything went missing somehow.. I don't know what happened, and I hope our sysadmin can fix it (he's working on the server in question, I just don't know if he's fixing this problem as well).

If the database isn't up later today I'll remake it, unfortunately I don't have a complete backup. The only thing I do have as a cached version of the examples page, which shows 37 (-2 or so) formulas, which can be used to restore them. So unless I can get the last 5 or so formulas that where made since then, they're gone..

I'll try to make weekly backups once things are back..

(y'know, in a sense the old generator was better, since the first 17 formulas have their information in the url, and can be restored from what's here on the board, rather than relying on backups)

anyway, sorry for the inconvenience..

Title: Re: [ FAQ : how to display mathematical operators?
Post by towr on Feb 25th, 2003, 1:44am
everything upto februari 11th should be back now..
the rest is history I'm afraid..

Title: Re: [ FAQ : how to display mathematical operators?
Post by Icarus on Mar 17th, 2003, 6:36pm
As much as I like towr's formula generator, it would still be nice to have the "mathematical smileys".  Its a bit of a pain that if I want to make a quick reference to something (such as http://www.ai.rug.nl/~towr/PHP/FORMULA/formula.php?md5=3f9fc04bc88e9e74579a241229298411), I have to go through this whole elaborate process to do it.

The mathematical smileys would be easier for simple stuff, and we could still pull out the formula generator when something more complex is desired.

And since everything is at one site (which if it goes down, no one's going to be looking at the threads anyway), it should be faster to load, and less likely to have problems.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by william wu on Aug 18th, 2003, 4:14am
This FAQ has been updated to describe a newly implemented way to write math quickly and easily in this forum. See the newly modified post at the very top of this thread.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Aug 18th, 2003, 7:37am

on 10/21/02 at 18:19:22, william wu wrote:
Input Method Method 4: towr's LaTeX2PNG generator

If you have some really hardcore LaTeX to write and the methods described above are insufficient (e.g. matrix equations or determinants), then use towr's formula generator at http://tcw2.ppsw.rug.nl/~towr/PHP/FORMULA/formula.php. This generates a PNG image of your LaTeX code. You can then reference the URL of that image by using the "img" tags in the message window. It is preferred that you only use this method if you have to, because those PNG images are not stored locally, and that remote database seems less reliable (since we apparently lost some data a while ago).

That only happened once at the start of the year. And since then I occasionally actually create backups :p
Still, I found out there is another problem. Formulas that give really large images won't fit well in the (antiquated) database, at least I think that's the problem.

If you want you could have the source and try to run it on your own site. (Provided this server runs on unix or linux and has PHP)

Also, it should be possible to localize images when they're posted to this forum, but that would require some extra scripting.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on Aug 18th, 2003, 4:51pm
I've wondered about that too. It would be nice if there was a standard way to create images that are stored locally, rather than on someone's remote site. (I suppose we could e-mail them to you and request that you insert them in the appropriate posts, but this seems like a lot of hassle.)

Of course there are all sorts of abuse issues that would have to be dealt with. And I also hate to sound like I'm demanding more when you've just done a fantastic service for the denizens of your forum! Whatever happens, what you have done already is great!

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on Aug 18th, 2003, 7:31pm
I've noticed that whenever I place a symbol by clicking on its image in the window, I don't get just the symbol code itself, but also a leading space. This is has been annoying to me, as I usually have to go back and delete the space, having already supplied the spacing I wanted. (I've been "upgrading" some of my more symbol-heavy posts, so I have done a lot of this. I think it will make it easier reading for anyone brave enough to slog thru - though I mourn the loss of a reason to call w "omega in disguise". :'()

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Aug 19th, 2003, 2:49am

on 08/18/03 at 16:51:28, Icarus wrote:
Of course there are all sorts of abuse issues that would have to be dealt with.
The main problem would be to check if something is actually an image and/or make sure it can't be executed (neither serverside nor clientside). There are several ways to check the format so that shouldn't be to much of a problem.
A second problem would be people trying to use the forum as an imageserver and posting f.i. porn. This could be solved by only allowing the localized images to be refered to from this site (this can be done in a .htaccess file , if allowed).


Quote:
And I also hate to sound like I'm demanding more when you've just done a fantastic service for the denizens of your forum! Whatever happens, what you have done already is great!
*nods in agreement*

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by william wu on Aug 19th, 2003, 3:23pm

on 08/18/03 at 07:37:06, towr wrote:
If you want you could have the source and try to run it on your own site. (Provided this server runs on unix or linux and has PHP)

Also, it should be possible to localize images when they're posted to this forum, but that would require some extra scripting.


OK, perhaps I will try that when I get a chance. Thanks towr!

Icarus: Space problem noted. In the meantime, you might prefer to type out the codewords instead of using the image clicking method. And don't worry about demanding more at all -- I wouldn't have it any other way :) Besides, I have already felt for a long time that the site needs to be drastically improved ... there are lots of plans in my head that still need to be implemented. I hope to have some sort of image upload feature in the near future.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by william wu on Aug 21st, 2003, 11:53pm
file attachments are supported now. theoretically someone could still upload a disturbing image, and there's no program I can write to filter that out.

as a small precautionary measure, image attachments are not automatically displayed in their respective posts. rather, all you see is a link in the post header, right next to an image of a paper clip. to view the image you will have to click that link.

note that the img tags alone already provide sufficent opportunity for disastrous abuse, since one can reference images stored on other sites. so perhaps i should just allow automatic display of image attachments? except for two or three incidents, the forum atmosphere has always been surprisingly good-natured and mature, as noted in carl cox's study.

in any case, in the event that something unacceptable is attached, contact me and i will have the post removed, and the poster's IP banned.


edit 7:06 AM 8/23/2003: i decided to allow auto-display of image attachments

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by James Fingas on Aug 22nd, 2003, 6:50am
Is there a way to edit the attachment besides deleting your post and starting again? I didn't see anything on the Modify page.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Sir Col on Aug 22nd, 2003, 11:27am
I found myself writing sqr(2) in a post today. Any chance of a radical symbol?

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by william wu on Aug 23rd, 2003, 7:56am
Sir Col: Enclosing "sqrt" in brackets will now produce the square root symbol. Equivalently one can embrace the LaTeX keyword "surd" in brackets, but surd is a weird abbreviation that I can't make sense of, so I added sqrt as well.

1. [sqrt][pi]
2. [surd][gamma]
3. [smiley=surd.gif]2


Code:
1. [sqrt][pi]
2. [surd][gamma]
3. [smiley=surd.gif]2



JF: Currently there is no way to modify an attachment. There's also a bug that occurs when threads with attachments are moved. I will try to look into these issues later. Time for Saturday morning cartoons :)

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Sir Col on Aug 23rd, 2003, 8:18am
Much obliged, William. I may [sqrt] out some of my older posts to update them.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by TimMann on Oct 30th, 2003, 11:08pm

Quote:
surd is a weird abbreviation that I can't make sense of


Actually surd isn't an abbreviation; it's an old word for the root symbol or for an irrational number. Most references on the Web only give the "irrational number" definition, but see http://whatis.techtarget.com/definition/0,,sid9_gci870727,00.html for both.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by william wu on Oct 31st, 2003, 12:11am
I see. Incidentally, I found out a few weeks ago that when using Maple, you type surd to get the principal real root of a number.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by laura winebrinner on May 19th, 2004, 6:04pm
Can someone show me how to write the symbol for pi?

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by THUDandBLUNDER on May 19th, 2004, 6:56pm

on 05/19/04 at 18:04:43, laura winebrinner wrote:
Can someone show me how to write the symbol for pi?

Yes, it is simply 'the symbol for pi?'.   ;D

But seriously, after clicking the hyperlink 'Reply' (below) you can click on the hyperlink 'View All Symbols' on the left of the next page. This will bring up a box of mathematical symbols, arranged in alphabetical order by name.
Just place your cursor where in your post you want the symbol, and click on the symbol you want.

For [smiley=pi.gif] you can simply write the following code:

Code:
[pi]



Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on May 19th, 2004, 7:15pm
Of course, it is easier to click on the selection bar at the top if that side window, and scroll down until you see pi. Select it, and the pi symbol appears in the window. Click on the figure, and the code for [pi] appears in your text box.

And of course, an easier method yet is simply to type [pi] in your text. The others are needed only if you don't know the name for your symbol.

Another trick you might want to be aware of: Anytime you see someone do something that you would like to do yourself, you can see his or her secrets: Simply click on the QUOTE link, and his or her entire post in its raw form (other than quotes within it, Yabb refuses to nest quotes) will appear within your quote. Once you see what you need, back your browser up or go somewhere else: you can always leave without posting.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Lisa Gardner on May 9th, 2005, 5:52am
You can to write math symbols via mailer Scientific Letter (Scientific software (http://www.sciletter.com/) link). It mailer allows to create mail messages with math equations and send it in LaTeX notation  ;)

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on May 9th, 2005, 6:53am
I don't think an application for email messages is really helpfull on a forum.
Certainly we could do with something with a nice interface and such, but it would still at the end have to work online and on the forum.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on Dec 25th, 2005, 6:22pm
It is still possible to post symbols from the math symbolry that William added to the previous version of YaBB. The gifs are still there, but unfortunately, they are not recognized as smilies. Instead, you can post them using the [img] [/img] tags. Just place the full path to the appropriate symbol. The symbols are all located in

http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/

Which can be completed with any of the files listed in the directory (I am unable to view them directly, but they work okay when posted as an image).

For example,

Code:
[img]http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/infty.gif[/img]
displays http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/infty.gif.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by SMQ on Dec 26th, 2005, 8:25am
Based on Icarus' discovery above, for those of you using Firefox (http://www.mozilla.com/firefox/) with Greasemonkey (http://greasemonkey.mozdev.org/), I've written a user script (http://www.dwarfrune.com/~smq/wuforumssymboldisplay.user.js) to put all the math symbols back in the old posts when you're viewing them.  Just right-click on the words "user script" and select "Install User Script..." from the context menu.

Enjoy!

--SMQ

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Dec 26th, 2005, 10:07am
That's great :)

Too bad it doesn't work for those who don't have firefox though..

[e]It's just javascript right? So you could compress it to a one liner, and have it as a bookmark.[/e]

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Dec 27th, 2005, 12:58am
The script seems to try to make images from anything between square brackets. Which is a problem for array indices, and bad tag use like [hide][/hide].

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by SMQ on Dec 27th, 2005, 5:15am
Not anything, just anything which is a single word beginning with a lowercase letter and containing only lowercase letters and digits.  Unless somebody has a list of all and only the symbols William created shortcuts for (as opposed to the smiley= syntax), I don't see how to do any better...  recommendations are welcome!

[edit]OK, try reloading the script and see what you think: it now ignores single-character escapes (which should handle array indexes) and all standard YaBB escapes, along with 'hide', 'hideb', and the often-used 'edit'.  It also titles the images so if you hover over a broken image (or, for that matter, any replaced image) you can see the original code.[/edit]

--SMQ

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Dec 27th, 2005, 7:55am
Yep, this seems to work nicely.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by SMQ on Dec 27th, 2005, 8:16am
Actually, it needed one more tweek yet; it was leaving things like 'subi' unconverted because the check for 'sub' was erroniously matching.  Updated once again. :)

Also, there seems to be something called Trixie (http://www.bhelpuri.net/Trixie/Trixie.htm) which claimes to offer Greasemonkey functionality under IE, but I don't know anything about it...

--SMQ

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by THUDandBLUNDER on Jul 16th, 2006, 7:16am
And things have come to a pretty pass when Grimbal is reduced to using ordinary gifs for his avatars!     :o

Title: An update to posting mathsymbols
Post by towr on Jan 18th, 2007, 11:06am
A short summary/update

The list of symbol images available on this site can be found at http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/

If you have Firefox (http://www.mozilla.com/firefox/), and install the Greasemonkey (http://greasemonkey.mozdev.org/) extension, then you will be able to make use of the following userscripts.

SMQ's script (http://www.dwarfrune.com/~smq/wuforumssymboldisplay.user.js) will transform the symbol tags in old posts to their respective images.

My script (http://tcw2.ai.rug.nl/~towr/wwusym.user.js) will add a button on the post/modify page that will translate symbol names between $$ to image tags pointing to the url where that symbol supposedly is. So $int$ will be translated into [img]http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/int.gif[/img], which will show up as http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/int.gif
Do mind that it simply places the given name in the url, and doesn't check whether it's actually a symbol.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on Jan 27th, 2007, 10:43pm
Since towr's method for inserting symbols requires you to know the symbol's name, I've prepared a list of all the symbols available and their names (with the exception of int_backup.gif, which is a second copy of the int image). For the font characters, replace the "*" in the name of the font with the lowercase letter desired. For instance, the code for http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/scra.gif is $scra$. For lowercase italic letters, the letter is the entire name: $x$ gives you http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/x.gif. The same is true for the greek letters, except you need to give the full name of the letter: $pi$ for http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/pi.gif. There is no image for the greek letter omicron. Use http://www.ocf.berkeley.edu/~wwu/YaBBImages/symbols/o.gif ($o$) instead.

The symbols smiley_up and smiley_down at this time cannot be loaded using towr's script, as it does not currently recognize "_" as a valid name character. They can be obtained using the image tags directly, however.

[ edit ]I notice that there are two arrow codes without pictures: biglongdownarrow and biglonguparrow. This is because there are no such codes. Their inclusion was a mistake on my part.[ /edit ]

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by THUDandBLUNDER on Jan 28th, 2007, 2:05pm
Many thanks, Icarus.   :)

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by SWF on Feb 6th, 2007, 6:30pm
What about posts made with towr's old formula maker?  A couple I can recall working on have no indication of what the fromula is anymore, such as Abel's Wire Problem (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_hard;action=display;num=1061633861) and Elevator Paths (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_medium;action=display;num=1043611749).   After posting a solution I thow away any records of what was done, assuming I can always look it up here.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on Feb 6th, 2007, 7:01pm
The problem with those posts is that the images were stored on towr's site. For whatever reason, those images are no longer accessible. The same cause is why certain avatars never show up anymore.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Feb 7th, 2007, 12:35am

on 02/06/07 at 19:01:13, Icarus wrote:
For whatever reason, those images are no longer accessible.
My database has been out of order for a while. The few times I mentioned it to our systems administrator he forgot to do anything about it.
I suppose I could try and see if I can dig it out of one of the dumps of the database.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by towr on Feb 7th, 2007, 5:35am
I've restored the images from those two posts, if you can remember any others, just PM me.

Title: Re: [ FAQ : (updated) how to write math symbols? ]
Post by Icarus on Feb 16th, 2007, 4:17pm
Since this thread has so much stuff in it that no longer applies, I've removed it from "active" status, in favor of SMQ's new FAQ thread (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_suggestions;action=display;num=1171644142) detailing his excellent script. Please reply to that thread with any new comments.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board