Wikipedia:Reference desk/Archives/Mathematics/2011 June 18
Mathematics desk | ||
---|---|---|
< June 17 | << May | June | Jul >> | June 19 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
June 18
editmathematical characters and algorithms
editHi, i don't know if it's the good place to do that, but some articles in computer sciences have (or had) some issues with people writing directly characters for "union" (\cup) , "intersection" (\cap), "is element of" (\in) and so on.
my questions : 1) how is laTex supported in wikipedia ? 2) is it supported in the "algorithm code text zone" like in this article DFA_minimization ?
in the previous mentionned articles i needed to print it, and i didn't saw any "is in set" character, so i changed them to "in", but i don't know if it's the standard way to do that here. and Latex would maybe be better.
thx 85.1.144.185 (talk) 10:02, 18 June 2011 (UTC)
- Hi again, i'm the author of the previous untitled question.
- Just adding this to make some title.
- thanks — Preceding unsigned comment added by 84.227.11.170 (talk) 10:43, 18 June 2011 (UTC)
- AFAIK any character that can be added in the 'Insert' drop down menu in the WP editing interface is fair game to use in an article as far as display is concerned, this includes a Math and Logic section so ∈, ∪, ∩ are acceptable. Depending on the audience, it might be a good idea to spell it out anyway so people can understand the article (see WP:MOSMATH). I would not recommend mixing pseudocode and LaTeX in Wikipedia, the fonts are very different and the rendering would not be pleasing to the eye:
Only word is LaTeX.
- --RDBury (talk) 11:06, 18 June 2011 (UTC)
- It's not just the rendering -- the <math>-mode parser does not recognize the pseudocode symbols, so you will get parse errors if you mix them in with LaTeX stuff. Looie496 (talk) 19:15, 18 June 2011 (UTC)
- the problem was that the symbols were just *not* printed on screen, on my computer at least, in the zone for the pseudo-code algorithm. thx for your answers. 84.226.189.222 (talk) 17:39, 20 June 2011 (UTC)
Math editor
editDoes wikipedia have a mathematical editor? — Preceding unsigned comment added by White Silver (talk • contribs) 18:55, 18 June 2011 (UTC)
- No. All the mathematical formulas you see on wikipedia are achieved using black magic. --72.179.51.84 (talk) 19:32, 18 June 2011 (UTC)
- Basically you can enter LaTeX syntax to get the symbols. For example <math> x^2 = 2 \iff x = \pm \sqrt{2}</math> gives
- Take a look at Help:Displaying a formula for more information. — Fly by Night (talk) 20:28, 18 June 2011 (UTC)
- Fly by Night, do you know why the usual $ $ doesn't work here? Just wondering in case you knew. Well it's a nuisance to retype the <math></math> many times.
- BTW, you can also type stuff in TeX and I prefer this over Fly by Night's answer. For example you could type ''x''<sub>1</sub> to get x1. This looks nice because it's inline unlike the LaTeX where the size increases considerably. — Preceding unsigned comment added by 180.216.50.57 (talk) 03:15, 19 June 2011 (UTC)
- Wikipedia documents are not written in either TeX or LaTeX, they are written in a special language of their own, resembling HTML but with some XML features. The <math> tag is handled by sending its contents to a LaTeX parser, but other parts of the page do not use LaTeX in any way. The handling of the <sub> also does not use TeX or LaTeX. Looie496 (talk) 03:54, 19 June 2011 (UTC)
- To 180.216.50.57, do you have a clue what you're talking about? My command was displayed in LaTeX output (as an image file). You'll find that many symbols do not exist in HTML that exist in LaTeX, and even if they did many browsers don't have the correct character sets installed to display the symbols. Even if a browser knows how to display an HTML symbol then it will appear differently in different browsers because of font preferences. Take a look at User:KSmrq/Chars. Scroll down and notice all the unrecognised symbols. As Looie said, the math and /math tags send the LaTeX syntax off to be converted into an image file; so any symbol LaTeX knows can be displayed. Did you bother to read the link I gave? The math and /math tags are used to tell Wikipedia that you want to wrote in LaTeX syntax. The $ symbols only work in LaTeX; Wikipedia is not LaTeX. — Fly by Night (talk) 19:24, 19 June 2011 (UTC)
- There is obviously some confusion going on here. FbN: Your LaTeX is not inline and it is bigger than standard text. 180: Your formatting is not TeX but is html - it is inline but it is very limited as to what can be done with it. Both have their place in the WP scheme of things. -- SGBailey (talk) 09:01, 21 June 2011 (UTC)
- If I type $x^2 = 2 \iff x = \pm \sqrt{2}$ into LaTeX then I get the above output. It's not HTML, if it were then x^2 = 2 \iff x = \pm \sqrt{2} would appear in symbols. Things like & alpha; & minus; & beta; (without the spaces after the &) is HTML. If you type <math> then it tells Wikipedia that you are about to enter LaTeX code. When you enter </math> it tells Wikipedia you've finished with LaTeX code. Then Wikipedia sends the LaTeX code off to be compiled into LaTeX output which is then sent back as an image file which is displayed in place of the <math>…</math> string. Maybe some of the technical words aren;t right, but the principal is. — Fly by Night (talk) 17:21, 21 June 2011 (UTC)
- There is obviously some confusion going on here. FbN: Your LaTeX is not inline and it is bigger than standard text. 180: Your formatting is not TeX but is html - it is inline but it is very limited as to what can be done with it. Both have their place in the WP scheme of things. -- SGBailey (talk) 09:01, 21 June 2011 (UTC)
Is it possible that the original poster meant a person who supervises the math articles? Traditionally the word "editor" means, after all, a person charged with certain duties. Michael Hardy (talk) 22:46, 20 June 2011 (UTC)
- Or possibly a graphical formula editor allowing a point and click style of entering a mathematical formula. Potentially one could be written, perhaps by modifying an existing editor to produce latex output. I'm not aware of any such program and mw:Category:Math extensions does not show anything suitable.--Salix (talk): 13:03, 21 June 2011 (UTC)
- Very true. — Fly by Night (talk) 17:26, 21 June 2011 (UTC)
- Sort of off topic but, I can heartily recomend User:Nageh/mathJax which uses MathJax instead of Texvc for rendering. This makes display maths formula look a lot nicer an removes the size problems. I've been using it for a few months now with few problems.--Salix (talk): 21:43, 21 June 2011 (UTC)