Wikipedia talk:TeX markup/Archive 1
This is an archive of past discussions about Wikipedia:TeX markup. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
Background color
how about we get the background color of pngs to match wikipedia's -- user_talk:hfastedge
- or transparent backgrounds - Omegatron 15:47, Jul 13, 2004 (UTC)
- i'd really appreciate being able to use transparent pngs to match the background. even 1bit alpha would be fine if we had to keep IE6 compatibility.--Krackpipe 22:03, 1 December 2005 (UTC)
TeX caching error
Moved from Wikipedia:Village pump
I get a 404 on the TeX images in Wilson's theorem. In all other pages it seems to work fine. This is on the new server. -- Arvindn 07:12 16 May 2003 (UTC)
I've gone ahead and cleared the tex cache table, so it'll regenerate those that were on the old server but not the new one. Should be fine now. --Brion 07:17 16 May 2003 (UTC)
- For how long does the cache last? I used Wikipedia:Sandbox 6 months ago and created http://en.wikipedia.org/math/0/c/6/0c608b71826422e03d7715e209f22c00.png and 6 other test formulae png's which remain as png files on server. richardc020 02:31, 6 May 2006 (UTC)
I've gotten into TeX (through LyX) quite a bit lately, and have decided to add math markup to some of the math pages on Wikipedia. I am somewhat concerned about doing this just for the sake of having it look pretty (and be ready for MathML, when the rest of the world is ready for it) - since most of it gets turned into images, which can result in a pretty long load time for big articles (for example, Trigonometric function). I was quite pleasantly surprised to see that the formula images do have "alt" tags for the image-deprived, though! Anyhow, are there any particular guidelines to follow for when it's appropriate to add the TeX-ish math markup, and when it's better to just use standard HTML constructs? Or is it okay to just mark up all of it? -- Wapcaplet 01:41 19 May 2003 (UTC)
There's some discussion of this at Wikipedia:WikiProject Mathematics. (My basic ground rule is that TeX should only be used when there is no other way to write the formula clearly.
But others there may give you other opinions.) -- Toby 11:20 19 May 2003 (UTC)
That's probably a good guideline to follow. One situation I've found is the usage of the square root. It's quite possible to write some square root formulas with normal HTML:
- |a| = √(a12 + a22 + a32)
But it looks much better, and is considerably more clear with TeX:
The former does accurately represent the formula, but it's harder to visually parse (especially since the radical does not extend above the parenthesized expression). Another situation is when there are several fractions, which must be enclosed in parentheses if done in HTML. For large expressions with lots of fractions, it could be parentheses overload! -- Wapcaplet 11:36 19 May 2003 (UTC)
Yes, those are reasonable situations to use LaTeX. Although I might even write:
The magnitude |a| is defined to be the square root of
- a12 + a22 + a32.
or at least
The magnitude |a| is defined by
that is, |a| is the square root of a12 + a22 + a32.
-- Toby Bartels 03:05 20 May 2003 (UTC)
How do I make a TeX line break?
- Looks like it's a "\\" double backslash, see the Case distinctions and Multiline equations examples. -- John Owens 23:19 22 May 2003 (UTC)
- I believe that line breaks (at least in the context of mathematical expression) necessarily generate a multi-line equation, which (someone correct me if I'm wrong, since I'm new at this) is currently unsupported with Wikipedia's TeX interpreter. I suppose the easiest workaround is to make two separate equations; barring that, you could put them into an N-by-1 matrix to get things onto separate lines. John is probably right also, I haven't tried it. -- Wapcaplet 23:23 22 May 2003 (UTC)
- P.S. - Oh! Multiline equations are supported? I thought they weren't, for some reason... Silly me :) -- Wapcaplet 23:25 22 May 2003 (UTC)
- OK, based on the recent experiment in the Wikipedia:Sandbox, it looks like the double backslash doesn't work outside a matrix, which would be a bit of a kludge. I'll experiment a bit more.... -- John Owens 23:34 22 May 2003 (UTC)
Hello! I try to color the statement of math theorems or conjectures in order to improve readability. However, I have discovered that the image generated by <math>
-tag is not transparent and so the effect turns out to be ugly: see Riemann hypothesis. Could anyone give me a helping hand? -- Wshun
Hi Wshun, I don't think there is any good way to assign background colors to formulas. Even if the white areas were transparent, the anti-aliasing effects around the symbols would still cause problems.
I do like the idea, though! I see what you're going for. Since coloring the background of the DIV is not an option, perhaps a colored border would work. Using some padding may also help set the formula out from the surrounding text:
The Riemann zeta function ζ(s) is defined for all complex numbers s≠1. It has certain so-called "trivial" zeros for s = -2, s = -4, s = -6, ... The Riemann hypothesis is concerned with the non-trivial zeros, and states that:
- The real part of any non-trivial zero of the Riemann zeta function is 1/2.
Thus the non-trivial zeros should lie on the so-called critical line 1/2 + it with t a real number and i the imaginary unit.
This traditional formulation obscures somewhat the true importance of the conjecture. The zeta function has a deep connection to the distribution of prime numbers and Helge von Koch proved in 1901 that the Riemann hypothesis is equivalent to the following considerable strengthening of the prime number theorem:
where, π(x) is the prime-counting function, ln(x) is the natural logarithm of x, and the O-notation is the Landau symbol.
The zeros of the Riemann zeta function and the prime numbers satisfy a certain duality property, known as the explicit formulae which show that in the language of Fourier analysis the zeros of the zeta function can be regarded as the harmonic frequencies in the distribution of primes.
Though, this might be the kind of thing that is of interest to other authors working on formulas. Some sort of standard practice would have to be agreed upon. Anyone else have ideas on this? Has something like this been proposed before? It seems to be a great way to highlight math markup that is especially important, just like they do in math textbooks.
-- Wapcaplet 02:37 17 Jun 2003 (UTC)
- I've tried a couple other colors above; orange and purple (the blue that was there before seemed too similar to the blue link color). Anyone have a preference? Also, the border could be solid, dashed, thinner or thicker... this thickness (2 pixels) seemed like a good amount, but we could try other stuff too. Comments? -- Wapcaplet 00:23 18 Jun 2003 (UTC)
Texvc / Math Markup problem
I'm new user of mediawiki package and I have problem with writing math formulas. I have tried to use mediawiki 1.15.1 on local server under win xp, so I must compile texvc. It seemed that everything works fine until I tried to write an equation containing square (for example f(x)=x^2). Ouptup png picture didn't contain square, but f(x)=x2. Please could someone advise me? —Preceding unsigned comment added by 62.84.154.56 (talk) 12:26, 12 August 2009 (UTC)
integrals over curves
doesn't look quite right -- the C should be below the integral sign rather than look like a footnote. Is this possible? -- Tarquin 23:14 Jan 8, 2003 (UTC)
In TeX, this should to the trick, only texvc doesn't recognise it as proper:
Ap Sun Jan 19 02:30:11 UTC 2003 shilajit benefits — Preceding unsigned comment added by 121team (talk • contribs) 01:30, 13 August 2016 (UTC)
Suggestion: where possible, should be rendered inline as (a1,b1] × (a2,b2], rather than expanded to a graphic.
The result of <math> tags is ugly. The pictures are too big, and the ALT text shows the awful-looking raw markup when people move their mouse over it in most browsers. Any hope of some more user preferences in this area, hopefully with sensible defaults? -- Tim Starling
- I tend to agree on the size; font sizes can be manually bumped up on equations that really need it. (But the PNGs are limited to fixed pixel sizes, which does not have a guaranteed relation to a readable font size for any given user.) What other improvements would you suggest? I'm afraid "not ugly" and "more sensible" aren't things we can code. ;) Eventually output as inline MathML is hoped for, but few browsers currently support it and we would need to beef up our wiki->HTML translator to produce proper XHTML. --Brion 06:42 Jan 9, 2003 (UTC)
- Ten years later(!) and still ugly.
- Can't we make the PNGs smaller to
- of
- the text surrounding it? This way,
- mathematical texts will be neater
- and easier to read.
- --Masalih (talk) 14:37, 31 December 2012 (UTC)
- Ten years later(!) and still ugly.
\left and \right should force output as PNG. If you don't believe me, change your user prefs to HTML whenever possible and look at the last item in each of the tables on this issue. The first table makes a reasonable case, but the second is the killer. It's rendered completely wrong! -- Toby 09:09 Mar 8, 2003 (UTC)
JohnOwens' latest edit has the work-around, but the original was correct LaTeX. -- Toby 10:44 May 13, 2003 (UTC)
How do you do θ in TeX? Please respond on my page LittleDan
Garbled Text
Moved from Wikipedia:Village pump
Laplace transform has the 37-character string "4LIQ9nXtiYFPCSfitVwDw7EYwQlL4GeeQ7qSO", which looks suspiciously like an MD5 string, appearing in several places where it seems there should be something more intelligible. Looking through the edit history, nearly every previous revision of the article is similarly garbled. I can't imagine this has been the case and nobody has noticed for months, leading me to believe something caused both the current version and previous revisions to get garbled recently. Perhaps some problem with the LaTeX rendering? --Delirium 22:40, Jul 29, 2003 (UTC)
- It's not actually a MD5 string, it's $unique2, a string used internally to temporarily replace math sections. Quoting it in articles like that will cause weird things to happen, e.g. <math>ha\ ha\ I\ stole\ your\ string</math> -> . Note that the source wikitext is not garbled, it just happens when it's rendered. It's clearly a bug, well spotted. -- Tim Starling 23:11, Jul 29, 2003 (UTC)
- The problem is <math> sections inside headings. As a workaround I've removed them from that article for now. -- Tim Starling 23:16, Jul 29, 2003 (UTC)
- Math sections should not occur within headings. They can't be properly displayed in the TOC (PNG images are the wrong size, non-transparent etc.)—Eloquence 06:28, Jul 30, 2003 (UTC)
- I think it would be better if <math> tags in headings were escaped, rather than producing the confusing output described above. -- Tim Starling 07:31, Jul 30, 2003 (UTC)
- Sure, go for it. Leave me a message as soon as it's committed (preferably to stable as well), and it'll go in with the next bunch of minor updates.—Eloquence 07:47, Jul 30, 2003 (UTC)
Why doesn't WikiTeX support \rtimes? How are we ever going to write down semidirect products then? Phys
- Same thing for \slashed. Phys
- and \propto - Omegatron
ask on mediazilla. i got propto implemented. - Omegatron 14:28, Sep 1, 2004 (UTC)
I am not sure if this is the right place, but Japanese Wikipedians have been having a problem with TeX. Japanese scripts are in 2byte-letters, and they get the error message "Failed to parse (lexing error)" whenever they try to use Japanese letters.
When they use alphabets, it goes well. And so far, they have been trying to avoid using any Japanese letters with TeX. But for certain things, it makes more sense to use Japanese, they say.
I believe the same applies to Chinese & Korean, and probably some other languages.
Could anyone fix the problem for us? Or would you tell me where to ask this help? (Sourceforge, Wikitech-l, Wikipedia:WikiProject Mathematics?)
regards,
Tomos 16:39, 27 Aug 2003 (UTC) (I don't use TeX myself, but I'm just speaking onbehalf of others I know.)
It seems that I am getting no response, so I posted another message at Wikipedia:TeX requests. Tomos 18:47, 7 Sep 2003 (UTC)
Plan to move this page to meta soon
We need one place to develop MediaWiki documentation so I'm starting a project-neutral MediaWiki User's Guide in meta and think it would be a good idea to cross wiki redirect this page to meta:MediaWiki User's Guide: Editing mathematical formulae as soon as I'm done with the conversion (before that I will change each link to this page to a direct one to meta so that it appears correctly as an external link). --mav 00:55, 7 Sep 2003 (UTC)
I just tried to take some stuff from http://planetmath.org :
(stuff deleted by MrJones 19:40, 19 Oct 2003 (UTC))
Is this the right way to use TEX in Wikipedia? I notice this doesn't work here. I assume this is something further up the page, as I can't see anything wrong.
MrJones 20:04, 18 Oct 2003 (UTC)
- Could you please not use inline TeX markup. TeX markup is best reserved for display formulae. See Wikipedia:WikiProject_Mathematics for general guidelines for mathematics articles. --Zundark 20:16, 18 Oct 2003 (UTC)
- Sure. (Later...) Very helpful, particularly section seven. I'm not convinced by the arguments against using TeX, though. What proportion of hits to the wikipedia do text browsers constitute? Formulas add 300b-800b in most cases of trivial usage, assuming they are all different (if not, nothing is added save an img tag). And HTML may be adequate, but TeX may be easier. I'm glad it's available at all, but are the reasons given the only ones?
MrJones 19:40, 19 Oct 2003 (UTC)
I can't think of other reasons at the moment. It's the first reason that I'm most concerned with: the images don't fit very well with the text, so it looks rather ugly. PlanetMath has the same problem, but does at least have a "page images" mode where everything renders nicely. --Zundark 20:19, 19 Oct 2003 (UTC)
TeX / Math markup rendering problems
I'm currently having a problem with Trimagic square article: it contains some embedded math markup that is not rendered correctly (in fact, not rendered at all) despite having no apparent errors. Can anyone help with this? Thanks. -- Schnee 19:40, 19 Nov 2003 (UTC)
- It appears TeX just dies when you try to use more than 10 columns:
- I don't know why. -- Tim Starling 00:14, Nov 20, 2003 (UTC)
- From the AMS-L TeX manual (PDF): "The maximum number of columns in a matrix is determined by the counter MaxMatrixCols (normal value = 10), which you can change if necessary using LaTeX's \setcounter or \addtocounter commands." Unfortunately, \setcounter and \addtocounter can't be used within the Wikipedia math mode, so either wide matrices have to be avoided, or the counter will have to be increased on the backend (which may slightly increase rendering cost in time and/or memory—how much so I have no idea). --Delirium 10:04, Nov 20, 2003 (UTC)
- Given that the TeX renderings are cached (they are... aren't they?), this shouldn't be much of a problem. -- Schnee 16:16, 20 Nov 2003 (UTC)
- Just an editorial comment regarding complexity of math in some of these articles: please remember this is an encyclopedia and not a post-graduate mathematics textbook. Daniel Quinlan 01:17, Nov 20, 2003 (UTC)
- Your general point may have so validity... but trimagic square and its prerequisite magic square require no mathematics beyond that taught to a youngish schoolchild (the age of the schoolchild depends on the country you are in). Now if you were to pick on Weierstrass preparation theorem on the other hand... Pete 08:59, 20 Nov 2003 (UTC)
- Regarding "complexity of math" ... surely an article is not to be considered inappropriate simply because it handles complex issues, provided always that it presents them with clarity ? We are told that there are no size limits. There are guidelines for writing a clear mathematics article at WikiProject Mathematics and most of the mathematics articles that I have seen here are very clearly written. Incidentally, I thought Schnee's contributions on magic squares and magic cubes were completely fascinating. -- Gandalf61 13:14, Nov 20, 2003 (UTC)
- I don't see any problem at all with presenting even the most complex mathematical topics in Wikipedia. The articles should be written in a way that does not assume that the reader is already intimately familiar with the subject that is being talked about, of course, and thus will probably be written in a less compressed way than a mathematical textbook, but limiting what can have an entry in Wikipedia because it might not be understandable outright and without further reading to a typical person would be silly. -- Schnee 16:16, 20 Nov 2003 (UTC)
- Yes, that was sort of my point. I was speaking of the level of mathematics knowledge required and complexity of formulas used with no introduction, not the advanced level of topics. Daniel Quinlan 10:20, Nov 21, 2003 (UTC)
why do I see square boxes in math formula?
Often a square box appears in math formulas where I would expect a character. I guess this means my browser can't render the charachter. How can I fix this or get around the problem to find out what charachter should be in the place of the square box?
Thanks
- If you log in, then you will be able to set the formula rendering style in your user preferences. It sounds like the "always render PNG" option would be best for you. -- Tim Starling 23:25, Dec 2, 2003 (UTC)
- FWIW, this is one reason to prefer always using TeX markup, even for relatively short formulas, rather than ∫ and other such HTML entities. Another reason is ease of future conversion to other (non-HTML) formats. --Delirium 04:32, Dec 4, 2003 (UTC)
- Setting preferences doesn't help if the markup is html to begin with. Perhaps someone could run a script to convert all html entities unsupported by the major browsers to TeX? Also, the definition of "simple math" in preferences should be based on what is supported by browsers--Voodoo 12:37, 9 Apr 2004 (UTC)
How do I make semidirect products?
Does anybody know how to render semidirect products? For example a formula like this: HXK.
--User:sander123 22 Dec 2003
You can type that in Math mode as follows $H \rtimes K$
Deprecated
If the page is deprecated, why does it exist? Why not move the contents to the new page? There must be something like 4 or 5 different pages about the wiki TeX markup. --Voodoo 15:54, 9 Apr 2004 (UTC)
- I'm in favor of redirecting it. People edit this page and it doesn't get updated in the official version. - Omegatron 15:47, Jul 13, 2004 (UTC)
^ symbol?
I want to know how to add a caret (^) over a character, as for unit vectors in physics formulas. --Smack 04:28, 12 Apr 2004 (UTC)
\hat a b \widehat {abcd}
someone should add that to the description
- Omegatron 04:54, Apr 12, 2004 (UTC)
LaTeX rasterizer
On Lp space, the first three displayed LaTeX forumlae keep on looking different to me -- sometimes some forumlas come out "thinner" than others (look at the rendering of the variable x in particular -- sometimes it's really thin) but sometimes when I refresh I get thicker versions. Lately the second forumla's too thin and the first and third look OK. How can I get the thin forumlas regenerated with the thicker rasterizer? Lupin 09:19, 1 Jul 2004 (UTC)
- I want "thick" back too, but I'm pretty sure you can't control which is rendered as which. TeX images are cached - you are probably viewing the images created using "thick", and the newer images are created with the newer "thin". Dysprosia 04:09, 3 Jul 2004 (UTC)
Is there any reason this page has not been turned into a redirect?
Around a year ago, it was suggested that this page be turned into a redirect to the copy at meta. Is there any reason this has not happened yet? If I get no objections, I'll do it. JesseW 10:51, 22 Nov 2004 (UTC)