Help talk:Displaying a formula/Archive 2
This is an archive of past discussions about Help:Displaying a formula. 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 | Archive 2 | Archive 3 |
November 2006
See m:Help_talk:Displaying_a_formula
Where is the group which is responsible for maintaining the TeX => PNG converter, since after the discussion on Talk:JPEG, it might be worth making a variation of the processor which replaces the font with \mathsf. — Phil alias Harry 12 Nov2006 (was unsigned, undated)
Please, let us have math notation that works on all browsers !!
I consistently see math notation that is rendered as garbage on my browser. We need to find a way that works everywhere, and enforce its use. Right now, everywhere I see such things, I always have to edit the Wikipage by changing < math > .... < / math > to < math > ... \ < / math > — Preceding unsigned comment added by 146.142.66.132 (talk • contribs) 13 Mar 2007
Bugs in relation to TeX <math>
Bug interference between TeX <math> and linking
- Indeed, I wanted to write this:
- [[1 E3|<math>10^{3}</math>]] or 1,000.
- and expected to see this, but with a link on the exponential term:
- or 1,000.
- but unfortunately, the actual result is:
- It appears that the pipe disrupts TeX completely so as to produce "UNIQ4dea438b3445795a-math-0000000A-QINU" or similar string, not even always the identical one for an identical expression between the brackets. This occurs as well with \, or \,\! at the beginning, about halfway or at the end between the math tags. Note that the link actually does point to 1 E3 in all cases, the above is in html:
- <a href="/wiki/1_E3" title="1 E3">UNIQ4dea438b3445795a-math-0000000A-QINU</a> or 1,000.
Bug or undocumented handling of links
- Curiously, without the pipe, a straightforward link is not attempted to be created:
- [[<math>10^{3}</math>]] or 1,000.
- is shown as:
- [[]] or 1,000.
- which is in html:
- [[103]] or 1,000.
- thus the brackets outside the math tags simply remain brackets, as if these were written as [[...]]
I assume it simply means that the wiki knows it cannot accept a TeX png as href destination within an anchor: <a href="(wherever)"><img src="(wherever)"></a>
Bug in mouseover preview
- I had wished to use this on the top line of articles like Kilo, because the mouseover preview (if installed by the reader) on a linked article name, which renders the first part of the article, makes 103 appear as 103 (the sup tag does not work). A math notation however, is reasonably properly shown upon mouseover (apparently only if the math is not within a link), e.g. when hovering over this: 1 E+9 m³, as "between 1 and 10 cubic kilometres (10^{9} m³ to 10^{10} cubic metres).", instead of without math ridiculously as "between 1 and 10 cubic kilometres (109 to 1010 cubic metres)."
- In short, I wanted to circumvent this one bug, only to find a more disturbing UNIQetc one.
- There now appears to be one way to solve the problem:
- [[1 E3|103]] or 1,000.
- is perfectly correctly rendered and linked:
- 103 or 1,000.
- But unfortunately (though very logically), the original goal is not attained: the mouseover preview shows this as 103 and not as 10^{3}.
— SomeHuman 5 Apr2007 21:45-6 Apr2007 10:23-21:37 (UTC)
Operator names force image render
While will render as text for those who prefer to see text whenever possible, fails to produce the same result. So, no other languages of Wikipedia that use native operator names will gain much advantage from this option. ᛭ LokiClock (talk) 12:44, 5 June 2011 (UTC)
Excellent help
Thanks to the people who produced this article - much appreciated.
Daryl Williams
PNG Rendered Images Scaled/Squashed
Hey Folks,
I'm running Firefox 3.5.8 on Ubuntu Karmic and when I look at a math page with PNGs rendered from embedded tex, the PNGs are all squashed. If I view them separately, outside of the page that contains them (right click view image), the PNGs look great. But within the page, they're getting scaled just a little tiny bit and that makes them all look horrible and annoying.
UPDATE: this appears to be a result of firefox's text zoom feature. it may or may not make sense to fix the image render sizes such that they're not affected when this feature is used.
Notation for arc
In LaTeX, it's possible to write \overarc {AB} to show the notation for arc. But in Wiki, \overarc just doesn't work currently. Strange. Missing package?
On the other hand, it's luckily possible to write \overset{\frown}{AB} as an alternative. I think it worths writing it inside this Math-help page. Subscripts, superscripts, integrals subsection should be a good place to put this. Is that OK for everyone? 石庭豐 (talk) 09:38, 16 June 2011 (UTC)
- I've just added it. 石庭豐 (talk) 07:37, 9 July 2011 (UTC)
Better currency symbol support needed
It'd be great if Wikipedia could allow or load packages that provide us with a means of incorporating currency symbols other than dollars and pounds. In working on an international finance article I found that I could not use any of the many workarounds spoken of across the web for inserting a euro symbol into my equation. I guess the necessary packages for those workarounds are not loaded. It's kind of frustrating, because it limits our capacity for examples and in higher level finance things can get really ugly if you have to use abbreviations and text in place of a simple symbol. Maybe there's a method I've not discovered yet, but I feel like I've exhausted all of the potential solutions I turned up via Google. Any other thoughts are welcome. John Shandy` • talk 00:57, 22 June 2011 (UTC)
- How about the Windows utility called "Character Map" (or equivalent thing in other O/S)? You could go to the range in Unicode for currency (cf http://unicode.org/charts/PDF/U20A0.pdf) and choose the right character, and then do a copy-n-paste.
- 81.64.224.95 (talk) 16:59, 26 June 2011 (UTC)
- The problem is not finding a representation of the character itself for copy/paste, or finding unicode or hex representations of the character. The problem is that LaTeX does not support any of these and cannot render the euro (not just the euro, but the majority of currency symbols other than the dollar), and instead returns a failure to parse error. John Shandy` • talk 17:21, 26 June 2011 (UTC)
- Do you have any examples of articles where this could be used? It certainly sounds like something that would be useful, but I like probably most of the editors who use LaTeX use it for mathematics, so don't know how much of a need for it there is. It's something that would be needed to be added to the MediaWiki software, which I think takes more effort/justification as it's not just something that can be enabled on en.WP.--JohnBlackburnewordsdeeds 18:37, 26 June 2011 (UTC)
- The problem is not finding a representation of the character itself for copy/paste, or finding unicode or hex representations of the character. The problem is that LaTeX does not support any of these and cannot render the euro (not just the euro, but the majority of currency symbols other than the dollar), and instead returns a failure to parse error. John Shandy` • talk 17:21, 26 June 2011 (UTC)
- Great question. I certainly understand why it might initially seem superfluous to support more currency symbols. International finance and international economics topics would use them extensively in formula notation and examples (just for a quick example which perhaps isn't the best, see forward exchange rate). At present, the international finance articles are rather weak and largely do not meet WP's core content policies (particularly WP:NOR and WP:V) and so I've been on somewhat of a personal mission to radically rewrite many of them, clean up existing mathematical notation, and add new examples. In doing so, I've realized the lack of supported currency symbols that would make notation clearer and examples easier to follow without having to use hypothetical currencies and stand-in variables that we must then define. I think there are some currency packages that can be loaded into LaTeX that create support for things like \euro \pound \yen, or \EUR \GBP \JPY, etc. Of course, I readily understand that this would require attention from someone who administrates the backend of Wikipedia or develops for MediaWiki. Beyond international finance and economics, I wouldn't see much use, but these branches of economics are rather enormous and extremely prominent in light of globalization and trade liberalization. For now, I think we're getting by, but as Wikipedia continues evolving and these topics keep undergoing improvements, it may call for gathering people from WikiProject Finance and WikiProject Economics to come and voice a consensus that they're needed. And actually, if there's a package that supports the rendering of unicode or hex specifications, then that'd do the trick not only for currencies but for most special symbols - however, pretty much all currency symbols are included in the unicode standard to my knowledge. I haven't read through the entirety of this help article, so if there's already a way to do so then I'm simply unaware of it. John Shandy` • talk 19:21, 26 June 2011 (UTC)
- OK, I see what you mean. Unfortunately, even though \text{€} works for simple HTML-rendered formulae, this doesn't work for PNG rendered formulae. But is it really necessary to put the correct currency symbol? I mean, I would use A, B, C, etc to represent any currency because your formulae is not specific to only one currency, ie US dollars in your situation. Or I would use USD, EUR, JPY in subscripts if there's no way round.
- Furthermore, I don't think there's any help that you ask your question here (in discussion page). IIRC, you have to file a bug (ie a wish) to Wikimedia. Otherwise, you could wait forever and nothing will be changed ;)
- Oh by the way, I'm not sure currency symbols other than \euro and \yen could be found in LaTeX official symbols. At least, I'm unable to find any complete list. 石庭豐 (talk) 16:52, 29 June 2011 (UTC)
- Yea, I'm thinking the best bet is actually to propose to LaTeX developers that these symbols be supported by default, then I should think that as time moves on, and people update LaTeX installations, the improvement would appear on Wikipedia without ever needing to have Wikipedia exert any effort. For the time being, we do often use stand-in variables like A, B, C, etc. They're not always intuitive or easy to follow though. Nevertheless, it's the solution used for now. I just thought I'd mention it here as a "it'd be nice if _____" kind of thing. Thanks for all the feedback though. John Shandy` • talk 18:09, 29 June 2011 (UTC)
Is it possible to simplify the display of mathematical formulas? Am I in the right place?
As for the first question: It may be too pretentious to ask this, but my request is: why doesn't somebody simplify the use of Latex* in Wikipedia? The current "<maht>" seems unnecessarily time-spending. Why not the simple dollar symbol $?. Of course the impulsive adoption of such easily-typeable symbol would cause a nightmare, since many people would have trouble trying to print the actual dollar symbol. However, the time mathematicians would save seems to be quite big (in my view). I have myself had some trouble trying to understand Wikipedia's system (but I concede that this may be my fault). Anyway, I think the number of bothered users is huge. This ultimately must lead to distortion of the proper mathematical style, causing the suppression of formulas for the sometimes more cumbersome verbal explanations. In conclusion, I ask the possibility of use the sign $ as a simple access to Latex in the mathematics portal.
As for the second question: I still do not see clearly whom I should contact. Bugzilla? I this classified as a "problem with the software"?
Thank you for the attention!
- Actually, I don't know whether I am talking about "Latex" or "Tex" (I don't understand much of computers). — Preceding unsigned comment added by 201.25.245.49 (talk) 20:41, 7 July 2011 (UTC)
- One can also use {{math}}. The reason { and < are used as symbols is exactly to avoid characters that people will use often. Not only will people find it cumbersome to type the dollar sign, but they will be confused - that $ should delimit code is an unexpected behavior outside of a programming language. It also adds complexity to the already inelegant coexistence of HTML, templates, and Wiki code (as in the link/image syntax). ᛭ LokiClock (talk) 21:31, 7 July 2011 (UTC)
- A possible walkaround to type this faster is text expansion such as autohotkeys http://www.autohotkey.com/ for Windows. With it you can type for example mth; (or whatever you define) and you get mathmath (or whatever you define) and the cursor goes to the middle. The readability of the resulting code is still bad though.Ciro.santilli (talk) 08:37, 24 January 2012 (UTC)
Found bug
Please help. I found bug that the math tag cannot render x^{2^k-1} : . (It occurs on x^{2^k} too.) This should be used in Exponentiation by squaring. I do not rely on HTML because some browsers cannot render double superscript. --Octra Bond (talk) 18:59, 26 July 2011 (UTC)
- They render for me. What's your platform (browser, OS)? ᛭ LokiClock (talk) 02:54, 27 July 2011 (UTC)
- Nevermind. I just see it renders at the moment. (Previously, it showed unexpected error.) --Octra Bond (talk) 06:49, 27 July 2011 (UTC)
- Okay. Well if you see it again, see if you can't keep it that way until you isolate it. ᛭ LokiClock (talk) 06:18, 29 July 2011 (UTC)
Something like \begin{cases} but for bracket on right-hand side?
Currently, to make a grouping brackets like in the example below:
we have to use two different syntaxes!
For the left grouping bracket (shown on the right hand side of the example above), we just need to use the predefined \begin{cases} .... \end{cases} syntax. However, for the right grouping bracket, we have to use a matrix embedded inside non-matching bracket: \left . \begin{matrix} ... \end{matrix} \right\}
Syntax difference is not the big problem. The big problem is that the rendered brackets are not symmetrical and that looks really ugly. Of course, we could use the embedded matrix inside non-matching bracket trick instead of \begin{cases} but this seems quite silly not to use the predefined syntax.
So, is there anything like \begin{cases} but produces right bracket? 石庭豐 (talk) 16:33, 2 August 2011 (UTC)
Bug with \sim
In non-PNG rendering, \sim is rendered as ~ or ∼ depending on whether it is preceded by a blank space (or a letter) or not.
- <math>\sim</math> gives
- <math> \sim</math> gives
There's an even blatant case but it seems to happen only in Chinese Wikipedia: <math>A/\sim</math> and <math>A/ \sim</math> gives different results. 石庭豐 (talk) 11:40, 4 August 2011 (UTC)
SVG Equations using Inkscape
There is a fairly simple but lengthly way to render latex equations as SVG.
0. If you don't already have inkscape, a simple but effective well-known vector graphics editor for SVG images, it can be downloaded here: http://inkscape.org/. This program is needed for the method.
1. Go to the site (codecogs LaTeX equation editor) at http://www.codecogs.com/latex/eqneditor.php
2. Create equation - either type or use the symbolic templates
3. Set the following parameters (below the editor window);
A. image render = SVG,
B. leave font = sans serif.
C. choose font size carefully; the size that fits best between the usual equation font size on wikipedia (for forced latex png rendering - not html) and when using the \scriptstyle{} function to make the equation appear smaller, is about 10pt[normal] (as close as it gets...).
NOTE: the equation will appear in exactly these sizes when all this is complete, so it's easier to set the correct font size now and not worry later. When I have tried changing the size aspect ratio using the command upright=??px (or others simalar to this), it wouldn't work - the image was not re-sized. An alternative and probably quicker way is to type a short collection of letters in the required size and scale the equation image to match.
D. Set any other desired options.
4. At this editor, the image will not appear when rendering is set to SVG [it will for most other formats like png, gif, emf (emf cannot be uploaded onto wikimedia commmons) but the needed one is SVG]. Don't panic, just click on download.
5. There are a couple of routes to take afer clicking download:
A. easier - click open, then save as (not just save) the required file name in an easy-to-access useful directory ect.
B. longer - click save to save it ect, then re-save as some other name in a easy-to-access useful directory ect.
In either case save the file type as plain SVG, NOT just inkscape SVG, otherwise it doesn't work.
6. Upload via wikimedia commons, at http://commons.wikimedia.org/wiki/Special:UploadWizard. Then link the image to the location. At the end of uploading, two links should appear, one for hmtl linking, one for wiki-linking. For the wiki-link syntax eliminate thumb (to eliminate the border and caption - unless wanted), to the required position left, right, centre etc, just change the image parameters to whatever is needed, then that should be it.
Hopefully this helps, this seems to be a long explaination but it is really simple if you can do it.
Here are samples I created, the equation is Ampere's law + Maxwell's correction (one of maxwell's equations of electromagnetism).
SVG Image, eliminate thumb | |
Normal forced latex png rendering: |
|
Normal forced latex png rendering with scriptstyle: |
Yours, Maschen (talk) 20:33, 11 August 2011 (UTC)
- You may want to check out this script. Nageh (talk) 21:33, 11 August 2011 (UTC)
A thank you note
A sincere thanks to all who contributed to this page. Makes one's editing life easier. Thank you. Ineuw talk page on English Wikisource 17:29, 25 August 2011 (UTC)
Guideline needed for punctuation on a line with an isolated formula
I note that punctuation is frequently included inside the <math> tags when a formula forms part of a sentence, but is displayed on its own line. Example:
Here the comma is included:
whereas here the period is excluded:
- .
Inclusion of the punctuation is semantically incorrect, but I guess people do it this way because the font size and placement of the punctuation (usually a trailing comma or period) is then less jarring. As the semantic content of a TeX formula seems to be emphasized in these guidelines, could we develop a guideline for this punctuation that respects appropriate the semantic content? I would prefer a guideline in which no punctuation appears on the same line as a formula that has been isolated to its own line, even at the expense of dropping the punctuation. Such a guideline should also extend to presentation of more than one mathematical statement on one line, e.g. by use of space only or appropriate mathematical connectives. Quondum (talk) 05:34, 6 October 2011 (UTC)
- Ouch. I take that back. There is such a guideline: WP:MOSMATH#PUNC. It isn't my preference, but I respect the guidelines above individual preferences... Quondum (talk) 16:04, 6 October 2011 (UTC)
Clickable Symbols Please
Wouldn't it be great if symbols could link to their article (e.g. ∈) It's just that, being neither clickable nor copyable it's hard to look up a symbol one doesn't understand.Trideceth12 (talk) 09:20, 26 October 2011 (UTC)
- Your link is clickable (just click on the "∈" above that you supplied: it takes you top the appropriate article). The only problem is that its clickability is invisible (until you hover the mouse over it, there's nothing to indicate that it is clickable). I suspect you will not get much response here; perhaps try Wikipedia:Help_desk. Quondum (talk) 09:53, 26 October 2011 (UTC)
- You need to point out a specific article where you'd want this to be the case. Because there is no point in making mathematical symbols generally clickable, especially when it comes to such elementary symbols already taught in school. Nageh (talk) 10:40, 26 October 2011 (UTC)
- I think this a bad idea for a number of reasons. First such symbols are often small so the link may be difficult to notice. Second the underlining (a user option) might make them look like something else: ⊂ might look like ⊆for example. Third if the symbol is created using <math> tags it might sometimes be text, sometimes an image, again depending on user settings. Fourth if a symbol is part of a formula it might be unclear if the link is for the symbol or for the whole formula or expression. So better if you mean to link a symbol to give it's name nearby and link that, e.g. "∈ (element)". If that can't be done because the symbol is part of some more complex expression then do it separately immediately before or after.--JohnBlackburnewordsdeeds 13:07, 26 October 2011 (UTC)
Help with line breaking, please
I tried to add line breaks to the article of differential diagnosis, but the result was that the formulas failed to parse [1]. Does anyone know how to do it right? Mikael Häggström (talk) 15:58, 29 October 2011 (UTC)
- Here's one way, with the first of your equations. Note the \begin{align}, \end{align} and the two ampersands which tell it where to line up
- Thanks a lot! Mikael Häggström (talk) 05:19, 30 October 2011 (UTC)
NON-IMPLEMENTED INTEGRALS \oiint + \oiiint
Hello. I have a workaround to propose for creating integrals requiring \oiint and \oiiint.
- Use these image (without the thumbnails), without chainging the size, in front of a the integrand expression.
- In the actual LaTeX syntax, type {\frac{}{}}_{REGION} at the very start, in which REGION can be replaced by any symbol representing the closed surface or volume of the region in question.
Here are some random examples where it might be used (if in the situation these are applied to, a closed volume is needed):
- No clue:
Just a suggestion.
--F=q(E+v^B) (talk) 14:02, 12 December 2011 (UTC)
- I'd say, be bold and add it as another solution to the article. It is certainly no worse than the current suggested workaround. Actually, for a better solution you should create templates for these, i.e., put the image into {{oiint}} or {{oiiint}}, such that they can be easily found and replaced at later times.
- Note that if you want other opinions, your best chance is to ask at the WikiProject Mathematics. Nageh (talk) 20:23, 12 December 2011 (UTC)
- Of course, will do. Thanks very much for your advice too. I never thought about templates - so obvious as well! --F=q(E+v^B) (talk) 20:36, 12 December 2011 (UTC)
- Much too complicated your solution! And the problem you see with multiple use of the template is because you are trying to stuff the image into a table. Have a look at {{oiint/sandbox}} for a very simple and flexible solution.
- PS: You misunderstood what Enforcing PNG/JPEG-images? is about. You really should move your text to the \oiint and \oiiint section. And please make your text less wordy. :) Nageh (talk) 10:34, 13 December 2011 (UTC)
Ok. The entry will be made less wordy, though I can't see why it can't be in the current section given that the solution deploys the mathod of using PNG/JPEG images. It doesn't matter - it'll be moved. I'll have a look at this template solution you provided. Thanks -F=q(E+v^B) (talk) 13:09, 13 December 2011 (UTC)
- Nageh: In the solutions you provide, you have basically repeated what I have done. I did try to nest templates in exactly the same way as you have, but it didn't work so the template {{Oiint+Oiiint}} is what it is now, though it can only be a mistake on my part. I'll try nesting templates again simalar to how you have done.--F=q(E+v^B) (talk) 13:38, 13 December 2011 (UTC)
- On second thought mabey there is something you have done that I have not. How have you made the 3rd template work (nested)? I tried replacing the template {{oiint/sandbox|... with {{oiint|... and that didn't function. I read the contents of Help:Template#Nesting templates and still don't understand what i'm doing wrong... If this nesting feature can be resolved then any number of these integrals can be linked by nesting them.--F=q(E+v^B) (talk) 14:10, 13 December 2011 (UTC)
- Huh? Use the source, [Luke]. As I said above, your template defines a table, which – as defined in the template – cannot be nested. There is really no need for a table, just take the [File:] link. Copy the sandbox template's source over to the main template, adapt it for oiiint, and you can get rid of oiint+oiiint. Nageh (talk) 14:57, 13 December 2011 (UTC)
- Copied over to the main templates now. If there is any functionality missing that you would like to see, just shout out. Nageh (talk) 15:07, 13 December 2011 (UTC)
Sorry, my fault, what was I thinking... now I know what you mean by a table defined in the template. (Admittedly I didn't properly understand how to create template pages so I looked at an example and typed a simalar wiki markup. It resulted in the inclusion of table formatting). It tried them out and they work splendidly - thanks to you again. As far as I can tell no additional features are required. The link {{Oiint+Oiiint}} in the article will be removed and the template itself can be nominated for deletion.--F=q(E+v^B) (talk) 17:28, 13 December 2011 (UTC)
- The template {{Oiint+Oiiint}} has been deleted a few minuites ago (at 17:36). Excellent!--F=q(E+v^B) (talk) 17:43, 13 December 2011 (UTC)
- That was me. I also took the liberty of creating proper transparent PNG images of your JPGs in true scale here and here and made the templates use those instead. — Edokter (talk) — 18:23, 13 December 2011 (UTC)
You beat me. I was just in the process of doing that. Anyway thanks for your help too!--F=q(E+v^B) (talk) 19:18, 13 December 2011 (UTC)
- I've created separate documentation pages for both of them so I could add categories, for future interwiki links etc. I noticed while doing so the alignment is a bit off: text to the right of all the oiiint examples is misaligned at least in part. The problem is the subscripted fraction . The TeX renderer positions it correctly but when rendering uses a bounding box around only the things that are visible. The top of the fraction is ignored. So the 'S', or the 'S' and the other text, gets centred. I don't even know if it's possible to work around this. One fix would be to integrate the subscript into the integral, as \oint_C does, which would also deal with the more subtle horizontal alignment problems. This would clearly work but I don't know how many images and templates it would require.
- And one other thing: the images really should be SVGs. This will mean they scale well to all sizes: right now it looks like they've been prescaled so are effectively fixed size. I'm not volunteering though as I've no experience of creating curves in e.g. Inkscape.--JohnBlackburnewordsdeeds 22:03, 13 December 2011 (UTC)
- Horizontal alignment: solved. Vertical positioning of operands: solved. :) Nageh (talk) 22:39, 13 December 2011 (UTC)
- Since TeX renders the surrounding PNGs as fixed size, I thought these images should do the same. There is no change that will ever change size. I even turned anti-aliasing down a bit as not to fall out of tone with the rest of the nice jagged-edge formula. :) — Edokter (talk) — 22:55, 13 December 2011 (UTC)
- Well... In fact, one functionality that I see still missing is the support for different font sizes using the TeX \xxxstyle commands (e.g., using a style parameter in the template). For this, it would be convenient if the images could be flawlessly scaled. Alternatively, of course, you could upload all the different PNG images. Nageh (talk) 23:01, 13 December 2011 (UTC)
- I tried the big image first, but it became way too blurry when scaled. TeX only has two sizes; normal and scriptstyle . I could add images for scriptstyle. — Edokter (talk) — 23:13, 13 December 2011 (UTC)
- . Three different sizes, effectively. Nageh (talk) 23:19, 13 December 2011 (UTC)
- (Changed examples to \iint.) Hmm, how likely are those to be used? — Edokter (talk) — 23:33, 13 December 2011 (UTC)
- That's not the point. And I actually really don't care whether we look up different (two or three) PNG images or scale one SVG image. Just saying. Nageh (talk) 23:39, 13 December 2011 (UTC)
- As an afterthought, it would also be nice if MathJax could scale the image to fit its own TeX font sizes. Do you think you could replace the PNG by a SVG version anyway? If it's no trouble after all. Thanks, Nageh (talk) 12:06, 14 December 2011 (UTC)
- (←) I'll see what I can do. Does MathJax not support \oiint and \oiiint either? Or does it still depend on TeX? — Edokter (talk) — 12:23, 14 December 2011 (UTC)
- MathJax could support these symbols, but alas they are not available in the fonts distributed. As long as we don't have MathJax hosted on Wikimedia servers there is no way to provide these symbols. Nageh (talk) 13:03, 14 December 2011 (UTC)
Excellent. Also:
- Thanks to JohnBlackburne for creating the documentation.
and probably:
There is no easy way to incorperate the symbol for the region into the integral image so that the user can choose any letter. Only one fixed symbol can be used if in the image itself. How could a variable character be incorperated using templates? Tables are out of the question. There is no way to type LaTeX into a template without typing the <math></math> code and positioning the symbol to exactly at the base of the integral (I'm not sure if it can even be done with LaTeX on wiki, if it can it would still be hard), by this I mean setting up all the maths syntax such that the user can enter the letter and its passed to the template, then output as LaTeX...Others have reccomended PNG and not SVG here. SVG has its obvious benefits over any other format but PNG matches with the LaTeX rendering.
Thanks to everyone who has assisted with this. I feel like such a jerk not doing any of these things myself.....
P.S. I typed the div. theorem wrong - this is a case where no circle should be on the volume integral, since the volume would have to close on itself (into the 4th dimension...). All thats needed is to integrate in each coord direction.
-- F = q(E + v × B) 22:53, 13 December 2011 (UTC)
- There is no easy way to incorperate the symbol...' You do read what I write, right? It's fixed, it's working now using CSS trickery. Nageh (talk) 22:58, 13 December 2011 (UTC)
I wrote that before you posted your recent comment, and blindly missed it then pasted it. I'll leave it for others to comment on this. And yes I do read what you write. Its worth it.-- F = q(E + v × B)
- Ok, never mind, it was just a moment of sigh. :) Also, don't mind about us doing all that recent work, this is how Wikipedia works! :) Nageh (talk) 23:07, 13 December 2011 (UTC)
- Don't underestimate the power of template coding :) Perhaps it is easy to incorporate the {\dfrac{}{}}_{region} part; you can shift any image—even TeX-generated ones—to any position in the template. Question is: how flexible is the region part? How many symbold can be theoretically included? — Edokter (talk) — 23:05, 13 December 2011 (UTC)
- I've tried fixing the subscript problem myself, with an additional parameter and so changes to the integrand one which seems to work, but all examples and any uses would need updating. It's at Template:Oiint/sandbox, the middle example in particular.--JohnBlackburnewordsdeeds 23:22, 13 December 2011 (UTC)
- I've gone ahead and updated them with the additional parameter, and updated the documentation of each to match, at the sametime rewriting them for clarity and to add some headings.--JohnBlackburnewordsdeeds 07:59, 17 December 2011 (UTC)
I thought it was a mismatch with MathJax font sizes but now I noticed that also in the PNG rendering the \oiint and \oiiint PNG images are slightly larger than their \int and \oint counterparts. Can these images be adjusted? Thanks. Nageh (talk) 10:57, 17 December 2011 (UTC)
"black on white (not transparent)" ?
This is from the start of the section Rendering:
- By default, the PNG images are black on white (not transparent)...
Surely it's the other way round, e.g. the background is transparent by default?--JohnBlackburnewordsdeeds 08:11, 17 December 2011 (UTC)
- My guess is that it is somewhere in between: a few pixels around the foreground (a sort of a shadow?) are not transparent, but most of the background is. This is most obvious when putting a formula onto a background coloured via HTML. When setting the background colour of the PNG, only these "shadow" pixels seem to be affected. The effect is not a very nice. — Quondumtc 09:35, 17 December 2011 (UTC)
- I was editing Template:Oiint earlier which has a green-tinted documentation section with math formulae and none have any white border, they just look like black on green. I don't know if the behaviour is different if you set the background of the PNG using LaTeX but I've never seen this used.--JohnBlackburnewordsdeeds 09:56, 17 December 2011 (UTC)
- AFAIR they changed the background rendering from white to transparent a year ago or so. As such the statement simply seems outdated. Nageh (talk) 10:55, 17 December 2011 (UTC)
- You're probably right about the change. However, take a look at the following (best is if you zoom in with your browser):
{| class=wikitable
|-
| <math>e^{i \pi} + 1 = 0\,\!</math>
| <math>\definecolor{red}{RGB}{255,0,0}\pagecolor{red}e^{i \pi} + 1 = 0\,\!</math></span>
| style="background-color:blue;" | <math>e^{i \pi} + 1 = 0\,\!</math>
| style="background-color:blue;" | <math>\definecolor{red}{RGB}{255,0,0}\pagecolor{red}e^{i \pi} + 1 = 0\,\!</math>
| style="background-color:blue;" | <math>\definecolor{blue}{RGB}{0,0,255}\pagecolor{blue}e^{i \pi} + 1 = 0\,\!</math>
|}
- The first and the last are clean colour transitions. The middle three have margins of red, white and red respectively. This does not seem to be happening on the green-tinted section mentioned; perhaps the PNG gets its background colour preset there? — Quondumtc 11:18, 17 December 2011 (UTC)
- OK, looking again at the examples at {{oiint}} and it's happening there: if I click and drag one of the PNGs over my darker desktop I can see some white fringing around the image. But it's still impossible to see it on the page even though I know it's there; the colour, #ECFCF4 according to my browser, is too close to white for it to be noticeable. As that's as dark as WP pages get it's effectively transparent, definitely not white as the statement suggests.--JohnBlackburnewordsdeeds 11:37, 17 December 2011 (UTC)
- So this is not a problem in the context of oiint etc., but something for adding to a "to fix" wishlist, if such exists. But on your original point, the text in Rendering clearly needs updating. — Quondumtc 12:02, 17 December 2011 (UTC)
- OK, looking again at the examples at {{oiint}} and it's happening there: if I click and drag one of the PNGs over my darker desktop I can see some white fringing around the image. But it's still impossible to see it on the page even though I know it's there; the colour, #ECFCF4 according to my browser, is too close to white for it to be noticeable. As that's as dark as WP pages get it's effectively transparent, definitely not white as the statement suggests.--JohnBlackburnewordsdeeds 11:37, 17 December 2011 (UTC)
- The first and the last are clean colour transitions. The middle three have margins of red, white and red respectively. This does not seem to be happening on the green-tinted section mentioned; perhaps the PNG gets its background colour preset there? — Quondumtc 11:18, 17 December 2011 (UTC)
HTML tables
Any particular reason this page uses HTML <table>s instead of wiki {| tables |}, like the version at Meta? - dcljr (talk) 09:43, 28 April 2012 (UTC)
\mathsf (sans serif)
I (and surely others?) was not aware of this feature for a long time and stumbled on it on this formula
that is
\mathsf{I}\cdot\mathbf{v} = \mathbf{v}</nowiki>
originally in curvilinear coordinates but now moved (by me) to tensors in curvilinear coordinates. (Never used it in LaTeX documents outside of WP either...) If people already knew this, why was there no inclusion in the fonts table? I added it.
If no-one minds I also re-ordered the fonts in the table slightly.
- Why is the italics section in the table? All the letters (not the numbers) should be deleted with a note in that section saying "italics are default for all latin letters/lowercase greek", with a section of italic capital greek.
- Same for numbers in roman typeface (upright), which are default, though not much point in deletion of those two lines...
- move the Hebrew higher up after the greek letters, near to the blackboard bold letters since Hebrew and blackboard bold are used for representing sets.
- The (very horrible and disturbing) fraktur font was moved right to the bottom, allowing the more pleasant, readable, and easier-to-use fonts above.
F = q(E+v×B) ⇄ ∑ici 10:48, 6 May 2012 (UTC)
- Why should it list every possible typeface? This page is not a LaTeX manual but a help page for maths on Wikipedia. It also does not include slanted typefaces, for example. I think the manual use of sans-serif typefaces should be deprecated, and thus removed from both this help page and the example cited above. Nageh (talk) 11:31, 6 May 2012 (UTC)
- Very well... F = q(E+v×B) ⇄ ∑ici 11:47, 6 May 2012 (UTC)
- I just reverted all the edits back to the initial version. The reason was that sans serif is used in the literature, and if we have mathcal and mathfrak etc why can't people use sans serif also? F = q(E+v×B) ⇄ ∑ici 11:50, 6 May 2012 (UTC)
- I undid your own reversion because your edits were constructive and helpful. Sans serif is indeed used in the literature (more than that atrocious fraktur), particularly in the description of matrices in linear algebra. The aim seems not to "list every possible typeface", it was only one extra allowance for some editors. Let’s see what others have to say... Maschen (talk) 12:13, 6 May 2012 (UTC)
- (edit conflict) Hrm... unfortunately that disturbing fraktur font is used in the literature quite frequently in analysis, but yes its certainly true that matrices use serif (alternative to boldface). You can't really say which is used more than the other, since there are trillions of textbooks and monographs out there, but that’s not the issue anyway.
- The point is, it can be used to help things stand out in some formulae (such as above) and give the reader the idea of which notations are used in the literature, which is important. As for this help page, I was not turning it into a LaTeX manual, but hoped to inform other editors of alternative fonts available (I can't imagine every editor would like to use script/blackboard bold/fraktur alternatives to Latin/Computer modern roman or whatever).
- One example (and Nageh - sorry) is the Navier–Stokes equations. Currently in that article:
- which could be written:
- to show the difference between a vector and tensor. How frequently is blackboard bold used for tensors? I haven’t seen this anywhere in the literature (at least in the books I have)... Sans serif is certainly used for tensors (easily cited: Gravitation MTW, Classical mechanics TW Kibble, although Penrose in Road to reality uses sans serif for various things, including charge, complex, parity and time reversal conjugations, and sans serif bold for vector spaces...). F = q(E+v×B) ⇄ ∑ici 12:40, 6 May 2012 (UTC)
- There was no need to revert everything, I was objecting to the use of sans-serif for reasons that should be obvious in above example. The letter "I" is not even discernible as such, it looks like a misplaced bar symbol. Most linear algebra sources, as far as I can tell, use bold face and not sans-serif letters. Anyway, I had already brought this up immediately following my previous post at Wikipedia_talk:Manual_of_Style/Mathematics#Sans-serif_maths_font. Nageh (talk) 12:21, 6 May 2012 (UTC)
- This does bring up the purpose of this page, is it a recommendation for what we should use or is it a documentation for what LaTeX is supported, i.e. the texvc documentation. Texvc does support \texttt, \textsf, \mathtt, \mathsf. The Help: namespace is a bit odd as in theory this material is copied to any new mediawiki install. Recomendation for style should really be in MOS:MATH.--Salix (talk): 12:37, 6 May 2012 (UTC)
- There was no need to revert everything, I was objecting to the use of sans-serif for reasons that should be obvious in above example. The letter "I" is not even discernible as such, it looks like a misplaced bar symbol. Most linear algebra sources, as far as I can tell, use bold face and not sans-serif letters. Anyway, I had already brought this up immediately following my previous post at Wikipedia_talk:Manual_of_Style/Mathematics#Sans-serif_maths_font. Nageh (talk) 12:21, 6 May 2012 (UTC)
- True, but my recent edits were only to add to the help page, not for reccomendations. As for I in sans serif, it can be made clear from the context which letter is which. F = q(E+v×B) ⇄ ∑ici 12:47, 6 May 2012 (UTC)
- (edit conflict)Salix alba's argument is a convincing one, and I accept the new material on that basis. My opposition to the practical use of a sans-serif typeface in maths is also based on the argument that some users seem to have a strong desire to have a (user-selectable) maths font that ideally matches that of the surrounding text, as appeared in a couple of discussions we had at Wikipedia talk:WikiProject Mathematics.
- I am not familiar with the preference of sans-serif fonts to denote tensors. So I must admit that I also can't tell how much sense it makes to discourage the use of sans-serif fonts in MOS:MATH. Nageh (talk) 12:53, 6 May 2012 (UTC)
- Continued on Wikipedia talk:Manual of Style/Mathematics, please take any "notation conventions on WP" issues there. F = q(E+v×B) ⇄ ∑ici 13:21, 6 May 2012 (UTC)
greek
hey i want to use math formula for write in greek but it's not work; i dont want to use \alpha but α (cause i want to paste for sentences for analysis). for example i want the sentence "ὦ ἄνδρες"
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/wiki.riteme.site/v1/":): {\displaystyle \overbrace{ὦ ἄνδρες}^{2}} .
.
thanks--84.110.181.237 (talk) 18:52, 19 May 2012 (UTC)
- If you want to use LaTeX - you need to use the coding \alpha, like this: , that is to type
<math>\alpha</math>
. It will not work any other way. For html (inline text), you just have to make to with α. F = q(E+v×B) ⇄ ∑ici 19:12, 19 May 2012 (UTC) - there is no easy way its will take years till i will write a sentence?maybe some program that will make it simply?--84.110.181.237 (talk) 19:15, 19 May 2012 (UTC)
- No - currently LaTeX is png rendered. If you would like that font for word processing, you can find and download from the web that font (its free): Euclid Symbol, from say here or here. F = q(E+v×B) ⇄ ∑ici 19:20, 19 May 2012 (UTC)
- Rendering using MathJax works fine and that should become how it is all done I'd guess before the end of the year. Personally I conside \alpha a symbol as opposed to the Greek letter α. Dmcq (talk) 00:41, 20 May 2012 (UTC)
\alpha, \beta, etc. are math mode symbols and not intended to be used for ordinary Greek text. For example, there is only one typeface for these symbols. In LaTeX, you could use the Greek babel setting with a Greek font. On Wikipedia, the current texvc rendering method does not support this. It is possible to use unicode letters in MathJax, but considering that the texvc setting will remain as an option even after MathJax is deployed as a default method you really shouldn't attempt to write Greek text using <math>. Use ordinary text instead. Nageh (talk) 01:17, 20 May 2012 (UTC)
- the problem is that i want to analysis the text so i need arrows ()-i hoped to find sοme easy way to make sentences clear.thanks, --93.172.230.204 (talk) 07:48, 20 May 2012 (UTC)
- There is no real solution to what you want because when the text is not part of the <math> then the TeX parser does not know to which length it should render the brace. I can think of two sort-a solutions, one using CSS and the other using CSS or HTML tables and the brace rendered as an image, but both are pretty hacky. For example:
- (further text)ὦ ἄνδρες2
- This could be formalized into a template if need. Nageh (talk) 13:28, 20 May 2012 (UTC)
New templates available
See section Oriented \oiint and \oiiint as PNG images. Not sure if these will be used much, but they are there nonetheless - should anyone like to use them.
Since the \oiint
and \oiiint
symbols using currently implemented symbols are redundant but relevant, they have been placed in show/hide boxes so readers will not be too distracted by the more superior templates. F = q(E+v×B) ⇄ ∑ici 22:18, 3 June 2012 (UTC)
This is an archive of past discussions about Help:Displaying a formula. 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 | Archive 2 | Archive 3 |
No MathJax on mobile?
Any technical reason why MathJax won't render all on mobile? I'm using Chrome on Android right now and only see unrendered LaTeX code. --bender235 (talk) 19:34, 30 July 2013 (UTC)
- I think its a feature yet to come. Its on the bug tracker at T47816. For now you might have to set the render back to texvc in your preferences when using mobile.--Salix (talk): 22:44, 30 July 2013 (UTC)
- MathJax works nicely on the desktop, so I'd like to reset the render only on mobile. Is that possible? --bender235 (talk) 08:40, 31 July 2013 (UTC)
- You could try adding the following to you Special:MyPage/skin.js. It switches your preference depending on whether you are on a mobile or non mobile. You may need to reload a page once to get it to work.--Salix (talk): 18:49, 31 July 2013 (UTC)
jQuery( document ).ready( function( $ ) {
var url = mw.util.wikiScript( 'api' );
var newmath = 0;
function setMath(val) {
console.log('setMath' + val);
newmath=val;
console.log(url);
$.ajax({
url: url,
data: { action: 'tokens', type: 'options', format: 'json' },
dataType: "json"
}).done(doneToken);
}
function doneToken(data) {
console.log(data);
var toks = data.tokens;
var opttok = toks.optionstoken;
console.log(opttok);
$.ajax({
url: url, type: 'POST',
data: { action: 'options', token: opttok, format: 'json' , change: 'math=' + newmath },
dataType: "text"
}).done(doneSet);
}
function doneSet(data) {
console.log(data);
}
var mobile = ( mw.config.get( 'wgServer' ) == 'en.m.wikipedia.org' );
var oldmath = mw.user.options.get('math');
console.log("Math type " + oldmath + ' mobile ' + mobile );
if( mobile && oldmath == 6) {
setMath(0);
}
if( !mobile && oldmath == 0) {
setMath(6);
}
} );
- Works very nicely. Thanks. --bender235 (talk) 20:15, 5 August 2013 (UTC)
dddot
I'd like to use macro dddot from the amsmath package -- any hints? thx. Fgnievinski (talk) 00:29, 21 July 2013 (UTC)
- It looks like it works
<math>a\dddot b</math>
gives Failed to parse (unknown function "\dddot"): {\displaystyle a\dddot b} .--Salix (talk): 05:21, 21 July 2013 (UTC)
- No it doesn't. 37.123.174.195 (talk) 20:25, 5 September 2013 (UTC)
- It works in MathJax, but not in the default PNG rendering.—Emil J. 21:09, 5 September 2013 (UTC)
- No it doesn't. 37.123.174.195 (talk) 20:25, 5 September 2013 (UTC)
Multiple Colors in Table Interfere
Is there some reason having several colors in math mode might cause problems? For instance, compare the various ways "OliveGreen" shows up at User:DukeEgr93/ColorProblems; the big table is basically the same as the one at Help:Displaying_a_formula#Color except the one on my page is all in one math environment and the one on the help page is 68 individual math environments. THere's something...strange...about that, especially if you look at the top examples on my page with the OliveGreens. DukeEGR93 02:24, 17 September 2013 (UTC)
- One possibility - if the dvipng command does not have --truecolor in it, there could be issues; could that be it? DukeEGR93 03:29, 17 September 2013 (UTC)
mathop troubles
I'm trying to render the following formula,
except with the superscript "all" and subscript "phases" located above and below the integral signs. With the LaTeX png renderer this doesn't work, though it does work with MathJax. The usage is actually over at WikiSource, transcribing a book by Gibbs, however I guess that nobody would notice my help request over there. You can see the result I am trying to obtain at this page. The code I use here
\mathop{\int\ldots\int}^{\rm all}_{\rm phases} P \, dp_1 \ldots dq_n = 1,
works just fine in my own LaTeX installation, so I'm not quite sure what I'm doing wrong. --Nanite (talk) 11:25, 31 August 2013 (UTC)
- The PNG renderer is broken by design: for unclear reasons it tries to parse the TeX input, and then output its own version of TeX which is actually passed to the TeX engine. This process is plagued by various miscomprehensions of TeX syntax, in particular, extra braces are output at all kinds of places where they don’t belong. One such place is around constructions such as \mathop{...}, \mathrel{...}, etc., where they tell TeX to make the expression a \mathord atom, undoing the explicit typecast. In other words, although \mathop, \mathrel, \mathbin and friends are syntactically recognized by the renderer, they have no effect.—Emil J. 14:44, 1 October 2013 (UTC)
\mathrm, \mathsf don't always show
Hello
The last two give me a parse error when I try to use them in this section. Can someone help please? Thanks. 219.73.120.132 (talk) 07:37, 20 September 2013 (UTC)
Interestingly, they work sometimes. It seems intermittent! 219.73.120.132 (talk) 07:39, 20 September 2013 (UTC)
- Someone else @Tardis: has also experienced intermittent faults recently here. I think its time to raise a bug.--User:Salix alba (talk): 08:31, 20 September 2013 (UTC)
- I am also plagued by these intermittent errors; they make editing pages with numerous equations problematic, since the likelihood of at least one being broken when saving is high.Anders Sandberg (talk) 13:24, 1 October 2013 (UTC)
- You could try switching to the MathJax renderer via your preferences. Everything renders fine with that. I don't now how it will affect the end user though.--User:Salix alba (talk): 14:59, 1 October 2013 (UTC)
Failed to parse (no error message)
I keep getting the above error when trying to edit the Cyclonic separation article. Strange thing is that I will not change anything and the error message either pops up on an edit preview or edit save, or it goes away. It happens on my XP computer and my Windows 7 64 bit computer in different versions of both Firefox and Internet explorer. It did not happen in another article, but I can see the error several times on this page, even before I edited it. Ywaz (talk) 12:35, 3 October 2013 (UTC)
Help on Schläfli symbols
I'm interested in supporting Coxeter's polytope notation for 4-dimensions, see at [2], almost like , but I need the r to be left-justified. The two row symbol applies for more indices, above/below, separated by commas, in each row, and always left-justified. I also need a symbol like {p,(a/b)}, where a and b are vertically positioned like a fraction WITHOUT a fraction bar, again with possibly a list of symbols above and below, separated by commas and possibly of unequal numbers. Is this possible? Tom Ruen (talk) 16:15, 25 October 2013 (UTC)
- Hmm, MathJax does not seem to accept
\genfrac\{\}{0pt}{}{q,p}{r\hfill}
, though it works in LaTeX. This way of coding it works: <math>\left\{\begin{array}{l}q,p\\r\end{array}\right\}</math> . I’m not sure I understand how the second one is supposed to look like: ? Anyway, if you need the a and b part left-justified, you can do it the same way as in the first example.—Emil J. 17:16, 25 October 2013 (UTC) - Almost right, but no (), see example at [[3]] Tom Ruen (talk) 17:19, 25 October 2013 (UTC)
- Ah, I see. The example in the book can be produced with <math>\left\{3,{3\atop4}\right\}</math> , you can use an array as above if justification is needed: <math>\left\{p,\begin{array}{l}q,r\\s\end{array}\right\}</math> .—Emil J. 17:34, 25 October 2013 (UTC)
- Excellent, could be a bit more compact, but works! Tom Ruen (talk) 18:08, 25 October 2013 (UTC)
Temporary problem with parsing equations?
See this page: https://wiki.riteme.site/wiki/Klein_bottle
It is filled with errors "Failed to parse(unknown function '\begin')". It seems the equations have been there for a long time (I checked recent history), and no one has complained about these errors before in the talk page. So it seems that the problem is with the mediawiki software and is temporary.
I will visit later to check if it got fixed. In the mean time please post if you have more clue on this error. - Subh83 (talk | contribs) 18:36, 7 February 2014 (UTC)
- Yes it is a new problem, not with the pages (many including this) so with the software. It's been reported here and here, so will hopefully soon be fixed or at least someone will start looking at it.--JohnBlackburnewordsdeeds 18:47, 7 February 2014 (UTC)
can Wikipedia math markup be "rendered" / exported as html / ASCII?
I guess math markup viewer understands this markup well enough to render it, or maybe generate png images. But is there a similar tool that, perhaps for some simple subset of the markup language, would "render" the formulas in html / ASCII? I mean, many of the formulas are simple enough and don't need any real pretty printing; but they sure look ugly in the underlying markup when images are not loaded in browser. 76.119.30.87 (talk) 22:19, 8 February 2014 (UTC)
- You can enable MathJax rendering in your preferences, which uses Javascript to generate HTML instead of PNG images. The HTML is often quite complex so I'm not sure it's what you are looking for.
- There's also a new discussion, Wikipedia talk:WikiProject Mathematics#How to display math with the next release, on what we'll see in the next version of the Math renderer. That might be a better place to raise this as if it's not in the current version it could be added in the next.--JohnBlackburnewordsdeeds 23:05, 8 February 2014 (UTC)
edit protection
Why is the page (fully) protected from editing?--Kmhkmh (talk) 22:01, 13 February 2014 (UTC)
Some problems
Is there something that I could use for smaller letters using LaTex, not the {{math}}, like \tfrac{2}{4} = 0.5
for small fractions? This could be helpful in the text. And is there some option to get non-English (and non-Greek, too) letters in formula? For example, I would want to put in this formula some text in Russian or whatever, where currently word "energy" is. --Edgars2007 (talk/contribs) 12:29, 28 March 2014 (UTC)
- You can use
<math>{\scriptstyle\text{foo bar}}</math>
which gives . Supscripts, superscripts, \overset, \underset also put the text in a smaller size.--Salix alba (talk): 15:07, 28 March 2014 (UTC)- Thanks! --Edgars2007 (talk/contribs) 15:19, 31 March 2014 (UTC)
higher resolution?
Is it possible to specify the resolution or the amount of detail used in the images produced by the math tag? The images have always been a little rough, but now that I'm using a new computer with a Retina display, the roughness is even more noticeable. Maybe even two images could be produced from these tags, one for the common resolution displays and one for higher definition displays. --Lance E Sloan (talk) 14:26, 30 August 2013 (UTC)
- Have you tried switching to MathJax?. The setting's at the end of Special:Preferences#mw-prefsection-rendering. It uses text rather than bitmaps to render text so should work better on a Retina display. Given that solution has been (recently) added I don't see anything being done to the bitmap rendering. Work on that seemed to come to a halt a while ago: even before Retina displays there were issues with rendering quality. What you describe is probably feasible but now MathJax is here I don't see anyone doing much with the older bitmap code.--JohnBlackburnewordsdeeds 15:46, 30 August 2013 (UTC)
- MathJax is unreadable compared to Latex. I'd very like too to see Latex renderred with 2x resolution. Sheerun (talk) 18:32, 12 January 2014 (UTC)
- I totally agree. It's like it was typeset in Word from the '90s. Ug! Of course, if it gets used, people will make it better, and it looks like their output is better; I don't know how to turn that on on Wikipedia. —Ben FrantzDale (talk) 13:49, 29 April 2014 (UTC)
- I really don't get this criticism. The MathJax rendering looks fine to me, and always superior to that from texvc.
- I totally agree. It's like it was typeset in Word from the '90s. Ug! Of course, if it gets used, people will make it better, and it looks like their output is better; I don't know how to turn that on on Wikipedia. —Ben FrantzDale (talk) 13:49, 29 April 2014 (UTC)
MathJax rendering of part of help formula using google chrome on a mac, some bluring of image due to upload process | TexVC rendering of help formula, google chrome on a mac |
- In the above side by side rendering there is not much difference. In the PNG rendering there are some aliasing effects on the brackets whilst the MathJax looks a lot smoother. The superscript on the b is a little higher in MathJax and the texvc font size is larger. I would say there is slightly too much space at the bottom of the brackets.
- Are you seeing these sort of renderings or does it look worse? It might be a browser/font issue as MathJax uses the fonts you have installed on the local machine.--Salix alba (talk): 14:56, 29 April 2014 (UTC)
- Actually, MathJax uses Computer Modern (TeX) webfonts by default, unless you have local STIX fonts installed. — Edokter (talk) — 20:36, 29 April 2014 (UTC)
- I suspect that users who are negative about MathJax, are Windows/IE users. Font and typesetting in IE quickly turns dreadful, especially if you have disabled anti aliasing/cleartype. —TheDJ (talk • contribs) 22:10, 29 April 2014 (UTC)
- While at a previous employer I worked on a solution converting LaTeX formulas into ultra-high-res PNGs (if I recall in the 1400-7200 DPI range) to be traced into SVGs for use in PDF documents generated by Apache FOP. The results we I got were beautiful even zoomed in beyond the original render resolution, and the SVGs weren't particularly large, but since FOP choked on large numbers of SVGs we discarded the solution. With Wikimedia's pervasive adoption of SVGs, I feel this would work very well here. Contact me if I can assist in implementing a similar strategy here. -Thanks — Loren Osborn (talk) — 18:16, 27 June 2014 (UTC)
MathJax as header
@Salix alba: The heading === MathJaX === creates an element with id MathJax this breaks mathjax see https://bugzilla.wikimedia.org/show_bug.cgi?id=63915 --Physikerwelt (talk) 06:57, 21 April 2014 (UTC)
- Including on this page.
-- [[User:Edokter]] {{talk}}
19:27, 27 June 2014 (UTC)
Hidden colors
I just undid myself, discovering that colors would show up when they were never programed too. This could be a bug, so I leave it to those more knowledgeable to post on Bugzilla.174.3.125.23 (talk) 22:11, 29 August 2014 (UTC)
Lots about TeX, but where do I learn about HTML?
I think I would like to use the HTML rendering in a new article I'm writing. This is the only article I can find on the topic of math on the wiki, at least using Google. Is there another article like this one about how to use the HTML rendering? Maury Markowitz (talk) 14:44, 8 November 2014 (UTC)
- Perhaps {{math}} will give some pointers. But other than that, there is no 'real' HTML math tutorial; it is only intended for very simple formulae that can be made with simple HTML.
-- [[User:Edokter]] {{talk}}
14:48, 8 November 2014 (UTC)- Its a bit messy there is Wikipedia:Manual of Style/Mathematics#Using HTML, Wikipedia:Rendering_math and List of mathematical symbols. --Salix alba (talk): 16:32, 8 November 2014 (UTC)
Using the \mathscr mathematical font on wikipedia
I'm not sure this is the right place to ask. If not, please point me where it is. Is there a way to use the \mathscr font on wikipedia (see e.g. here)? Ggf4t (talk) 14:50, 2 February 2015 (UTC)
- No, that font is not installed in our math renderers (TeX or MathJax). See § Alphabets and typefaces to see the available typefaces.
-- [[User:Edokter]] {{talk}}
16:20, 2 February 2015 (UTC)- Is that due to a lack of support by MathJax then? Or is there some particular reason this font has not been installed on wikipedia? Ggf4t (talk) 16:36, 2 February 2015 (UTC)
- It doens't seem to be part of the deafult font sets, Computer Modern or STIX Fonts.
-- [[User:Edokter]] {{talk}}
16:56, 2 February 2015 (UTC)
- It doens't seem to be part of the deafult font sets, Computer Modern or STIX Fonts.
- Is that due to a lack of support by MathJax then? Or is there some particular reason this font has not been installed on wikipedia? Ggf4t (talk) 16:36, 2 February 2015 (UTC)
Background-color
We have had a bit of a debate about colour here. But shouldn't we give the user access to the code as we do every where else. I am unhappy about including css so early into the article- but unhappy in not leaving the code for the reader. Background colour is on focus but we shouldn't be giving it undue. Code used in the rest of the article suggests that for consistency we should do this:
{| class="wikitable" style="float:right; margin:1em 0 1em 1em;" | <math>e^{i \pi} + 1 = 0\,\!</math> | style="background-color:olive;" | <math>e^{i \pi} + 1 = 0\,\!</math> | style="background-color:olive;" | <math>\definecolor{olive}{RGB}{128,128,0} \pagecolor{olive}e^{i \pi} + 1 = 0\,\!</math> |} |
|
But should the paragraph be move- stay here with this rewrite or may be be put in an efn. Comments please.-- Clem Rutter (talk) 13:35, 3 April 2015 (UTC)
Consistent format in this help page
I am looking at this page with critical eyes- which one can do as it is very good. I have discovered some unusual markup- it is the first time I have encountered
- =text= rather than ==text== for a section heading- can anyone explain?
- The lead did not follow MOS- being far too technical and not a summary of the contents. I have fixed that using
{{efn-s
- In the TEX example tables- (after the matrices examples) the text suddenly changes from black to red- is there some logic there, or a random bug, or should it all have been wrapped in
a source lang=Latex
tag?
I am using Firefox on Mint 17.1. -- Clem Rutter (talk) 14:09, 31 March 2015 (UTC)
- @ClemRutter: Um, about the strange section heading markup—didn't you do that here? CabbagePotato (talk) 04:26, 5 April 2015 (UTC)
- @ClemRutter: After looking over your edits again, I think I understand now what you were trying to do (the ordering looked correct in the TOC, but the last headers were still article-title-sized headers). I've edited the headers and they should be all right now, but you (or someone else) might want to double-check my edits to make sure I haven't messed up anything else in the process. (Hope I'm not annoying you with these multiple pings.) CabbagePotato (talk) 04:59, 5 April 2015 (UTC)
- @CabbagePotato: It seems to be working- and the markup is less surprising.-- Clem Rutter (talk) 06:45, 5 April 2015 (UTC)
- I seem to remember struggling with
<source lang="Latex">
in previous revisions of this page. It works most of the time but something it didn't work well at all. Something as simple as\frac{2}{4}
fails to get consistent colouring for the brackets. You can fake nice results by splitting it into two source tags.\frac{2}
{4}
--Salix alba (talk): 10:05, 5 April 2015 (UTC)
- I seem to remember struggling with
- Speaking of which... On reading the help page just now I couldn't help noticing that some of the table text is black, while some is in a variety of colours, sometimes changing back and forth within the same table. I came here to make a plea for consistency. (I was going to ask if there was a reason for the inconsistency, but if "struggling" is required to make it work, that may have answered my question...) Personally, I'm not sure the different colours are very helpful, especially if they don't always come out correctly - but someone else can decide that; I'm just a random IP editor who may never come back here. :) 78.146.215.183 (talk) 17:21, 28 April 2015 (UTC)
punctuation wraps
- Hello. A math formula enclosed in parentheses or followed by a period and one or more cites can cause the punctuation (and also following cites) to wrap across lines of article text, looking very distracting. I've been putting nowrap templates around these. What is preferred usage for this? Put the punctuation inside the <math></math>?• Lingzhi♦(talk) 15:03, 8 July 2015 (UTC)
What happened to MathJax?
Can anyone tell me why MathJax support was suddently removed? I was hoping to find an explanation here, but I didn't find one. QVVERTYVS (hm?) 15:34, 27 July 2015 (UTC)
- Count me in. - DVdm (talk) 15:35, 27 July 2015 (UTC)
- I would also like to know. It looks better than MathML in Firefox, and lets you right-click it to see the TeX source code (which is more useful to know than MathML markup). Rangi42 (talk) 21:42, 28 July 2015 (UTC)
- @Salix alba: since you announced the removal of client-side MathJax on this page, could you enlighten us? QVVERTYVS (hm?) 08:14, 29 July 2015 (UTC)
- There is discussion about this in the bug tracker [5]. There is also some discussion at Wikipedia talk:WikiProject Mathematics#Future of MathJax on wiki. --Salix alba (talk): 10:33, 29 July 2015 (UTC)
- Thanks! QVVERTYVS (hm?) 12:42, 29 July 2015 (UTC)
Substack
Is there a nice way to emulate the LaTeX substack command? In particular, I want to use it on the sum on Schubert polynomial in the formula for double Schubert. Paxinum (talk) 16:02, 19 August 2015 (UTC)
What happened to MathML?
Ok, so first you guys got rid of MathJax. Fine, I can live with that. It was working perfectly well, but whatever. Then you broke MathML. Now we're back to what things were like, ca 2005. What's going on? -- Hongooi (talk) 09:16, 17 August 2015 (UTC)
- MathML seems to work, but I suspect that the user math appearance preferences were somehow reset to PNG. I had to manually reset to MATHML. - DVdm (talk) 10:05, 17 August 2015 (UTC)
- MathML just displays blanks where the equations should be, in Chrome and MS Edge. -- Hongooi (talk) 14:44, 17 August 2015 (UTC)
- Yes, I also get blanks from Edge (on Win10) and from Internet Explorer 11 (both on Win8.1 and Win10). Firefox is perfect on both Win8.1 and Win10. Don't know about Chrome—never used it and never will. - DVdm (talk) 15:18, 17 August 2015 (UTC)
- Right, so MathML is broken. It was actually working just a couple of weeks ago, so they should have just let well enough alone. -- Hongooi (talk) 15:26, 17 August 2015 (UTC)
- There is a bug for this at [6]. Basically there was a silly mistake in the last update, this is now fixed and is scheduled to go live today. If things are not working in a day or two mention it hear and I'll make sure the bug is updated.--Salix alba (talk): 23:25, 17 August 2015 (UTC)
- To clarify the bug was with the SVG fallback mode. True MathML only works in firefox all other browsers use serverside SVG images in this mode. The SVG images were broken but the MathML was fine, which is why things worked in firefox.--Salix alba (talk): 23:29, 17 August 2015 (UTC)
- Right, so MathML is broken. It was actually working just a couple of weeks ago, so they should have just let well enough alone. -- Hongooi (talk) 15:26, 17 August 2015 (UTC)
- Yes, I also get blanks from Edge (on Win10) and from Internet Explorer 11 (both on Win8.1 and Win10). Firefox is perfect on both Win8.1 and Win10. Don't know about Chrome—never used it and never will. - DVdm (talk) 15:18, 17 August 2015 (UTC)
- MathML just displays blanks where the equations should be, in Chrome and MS Edge. -- Hongooi (talk) 14:44, 17 August 2015 (UTC)
- I'd hopped it would be fixed by today but according to mw:MediaWiki_1.26/Roadmap it should be thursday.--Salix alba (talk): 21:33, 18 August 2015 (UTC)
- should be working now.--Salix alba (talk): 09:51, 21 August 2015 (UTC)
- Is working indeed, including on the new ugly browsers. Thanks. - DVdm (talk) 11:00, 26 August 2015 (UTC)
Problem with Greek Letters in fractions and functions.
I'm trying to display a formula within the math structure that employs Greek letters and keep getting these error statements:
Failed to parse (lexing error): \frac {1} {σ} = 16.3 \frac{P} {T^2} \left ( 0.0342 + \frac {dT} {dh} \right ) \cos β ,
Failed to parse (syntax error): \frac {1} {σ} = 16.3 \frac{P} {T^2} \left ( 0.0342 + \frac {dT} {dh} \right ) \cos β ,
(note the second used the & s i g m a ; code, not the unicode Greek letters).
I tried a number of variations on parts of the formula and finally got the whole thing to work by substituting b for β and s for σ as follows:
It's a clumsy workaround since the source I'm citing uses Greek symbols and I'd like to follow it accurately. Does anyone have any idea of where I'm going wrong. --SteveMcCluskey (talk) 01:28, 4 May 2016 (UTC)
- LaTeX dates from before unicode. Rather than using the unicode character αβγδ etc you should use the latex commands \alpha, \beta, \gamma, \delta. So your formula should be
\frac {1} {\sigma} = 16.3 \frac{P} {T^2} \left ( 0.0342 + \frac {dT} {dh} \right ) \cos \beta,
which renders as . --Salix alba (talk): 07:29, 4 May 2016 (UTC)
- Thanks for the help. I pasted in your version and it worked perfectly. --SteveMcCluskey (talk) 14:17, 4 May 2016 (UTC)
How to display circumflex
Help:Displaying a formula#Special characters says:
But if I test that "can be entered" example:
<math>\# \$ \% \textasciicircum{} \& \_ \{ \} \~{} \textbackslash{}</math>
I get:
- Failed to parse (unknown function "\textasciicircum"): \# \$ \% \textasciicircum{} \& \_ \{ \} \~{} \textbackslash{}
What is the correct way to get "^"? DMacks (talk) 20:43, 21 December 2015 (UTC)
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/wiki.riteme.site/v1/":): {\displaystyle \# \$ \% \textasciicircum{} \& \_ \{ \} \~{} \textbackslash{}}
- This section was quite out of date and depended on the texvc renderer. To get all the characters to render you can use
math \# \$ \% ^\wedge \& \_ \{ \} \sim \backslash
giving . You can also use \hat
and \widehat
or \wedge
. --Salix alba (talk): 17:40, 6 June 2016 (UTC)
fractions
The only references to displaying fractions are part of very complex formulas that are used as examples of entirely different tags. Can someone add a section on the frac tags themselves? Because I can't get the damn things to work. Maury Markowitz (talk) 16:46, 31 July 2016 (UTC)
- There are some simple examples at the start of the Fractions, matrices, multilines section. Just use
\frac{a}{b}
for just make sure your brackets match. You can also use{a \over b}
giving . If you want fractions with numbers the {} can be omitted so\tfrac12
gives . If you post the formula you are struggling with here we might be able to help.--Salix alba (talk): 18:43, 31 July 2016 (UTC)- @Salix alba: You can also omit brackets for letters, not just for digits:
\frac xy
renders as . The rule is not 'for numbers' but 'for single symbols'. The\frac
command takes two simple subexpressions as parameters, which are either single symbols or bracketed subexpressions. By the way, your rule should read 'for single digits', not 'for numbers', because a chain of digits is not a simple subexpresion:\frac 12 7
renders as , and you need brackets to keep appropriate digits together:\frac{12}7
→ . --CiaPan (talk) 09:08, 16 August 2016 (UTC)
- @Salix alba: You can also omit brackets for letters, not just for digits:
- And the section Parenthesizing big expressions, brackets, bars explains how to put brackets around fractions. --Salix alba (talk): 02:19, 1 August 2016 (UTC)
How to overstrike (or specific "standard taper" symbol)
I'm trying to create the standard taper symbol for inline use. The symbol is an overstrike (superposition) of "S" and "T". I can't find a unicode character for it. Is there a generic way to overstrike in MathTeX or other Wikipedia layout modes? I'm currently using an SVG with hardcoded size to match one of WP's default fonts, so I can write "{{standard taper}} 14/20" to get "ST 14/20" that looks fine on one of the default skins, but that's not good if one uses a different fontsize. DMacks (talk) 21:03, 2 October 2016 (UTC)
- I thought you might try some number of 'negative spaces' to shift the current position back – but that doesn't seem to work for me;
three are not enough:\mathrm{S \!\!\! T}
renders as
four are too much:\mathrm{S \!\!\!\! T}
renders as
CiaPan (talk) 06:50, 3 October 2016 (UTC)
Its possible to use negative spaces in math mode none are particularly sucessful
Another methods is the use <span style="position:relative; left:-0.5em; top:-1px"> in CSS. So STor using an overline and bar S̅|.
Both methods seem a bit flaky to me and you image-based solution still looks best.--Salix alba (talk): 07:06, 3 October 2016 (UTC)
Chemistry decimal fractions
Hi. How can I write a decimal fraction in <ce>...</ce>
environment? All the latex tricks I found in the net do not work. Thank you. IKhitron (talk) 12:52, 1 November 2016 (UTC)
Some missing amsmath support
I'm not sure where I should bring this up, so I'm trying here first. I just "fixed" a formula that was using \operatorname* -- WP seems not to support the starred version, so the only thing I could really do was to remove the star. This improved the appearance, but it still falls short of the intended typesetting. Is there any way to add support for this feature? Where does one bring up this sort of request anyway? One other missing bit of support that seems crucial is for \genfrac. This is needed a lot, and the workaround(s) are usually less-than-desirable LaTeX. Deacon Vorbis (talk) 00:27, 25 January 2017 (UTC)
Equations broken on iphone
All equations now render as illegibly small on my iphone. Tried safari, chrome, mercury with lots of user agents. Recent within few days of 22 August 2016. 107.77.213.47 (talk) 05:23, 23 September 2016 (UTC)
Yes, this drives me nuts. Unless I happen to be sitting at work, I am usually reading Wikipedia on my iPhone in the Chrome browser—and I tend to consult a lot of math-intensive pages. Is this genuinely not a supported use case? It actually makes me feel unwelcome on Wikipedia. (If this works for other users and is an artifact of my sticking stubbornly to iOS 8, someone let me know and I will quit complaining.) Tracy Hall (talk) 16:31, 11 February 2017 (UTC)
Same happens to me on iPad iOS 8.4, but not on my new iphone with iOS 10. — Preceding unsigned comment added by 80.110.66.133 (talk) 18:28, 12 February 2017 (UTC)
I have the same problem on an iPad 3 with iOS 8.3. Although I have already spent several hours trying to find a solution, I can't seem to find any. — Preceding unsigned comment added by Ilirea (talk • contribs) 15:55, 9 March 2017 (UTC)
About chemical equations
If I have any grammar or spelling errors, please feel free to change.
On this page,the example of chemical equations like <chem>{A2}+B2->2AB</chem>;and for beautiful,I suggest changing them to like <chem>A2{+}B2->2AB</chem>.--脂肪酸钠 (talk) 09:00, 2 April 2017 (UTC)
- Not sure <chem>A2{+}B2->2AB</chem> () is bettern than <chem>{A2}+B2->2AB</chem> (). Looking in some text books there seems to be a large space around the plus sign. --Salix alba (talk): 10:45, 22 April 2017 (UTC)
Accented character
The accented character in <math>ń\left(D\right)</math> causes the tag to not render. Advice? Lfstevens (talk) 21:17, 4 July 2017 (UTC)
- Try
\acute{n}
. --Deacon Vorbis (talk) 22:04, 4 July 2017 (UTC)
How to start a new line?
It seems that \\ does not work. Golopotw (talk) 00:39, 23 July 2017 (UTC)
- It does within certain environments, like
align
(and related ones), but not otherwise. --Deacon Vorbis (talk) 00:44, 23 July 2017 (UTC)
MathML broken again?
This is probably the wrong place to ask this, feel free to direct me elsewhere.
I'm still getting fallback svg images in Firefox, even though I've got MathML in my prefs. It's been broken a long time for me, I'm not sure it ever worked after MathJax was removed. Should this work? Discussion above suggests it was fixed for everyone else in August 2015. Is there some way I can debug this? How is the fallback decision made? Kendall-K1 (talk) 15:28, 2 June 2016 (UTC)
- Unfortunately this became more complicated. While the user setting is no longer needed the native MathML plugin is required. See https://www.mediawiki.org/wiki/Extension:Math. The good news is, that there is also information on the font setup, so that really good looking MathML is produced in the end. --Physikerwelt (talk) 16:00, 2 June 2016 (UTC)
- (Edit conflict) The relates to T131177 which has changed the default renderer for all users. Part of that change is to was "As a result we reconsidered to decision to delver MathML as default for firefox users. Now they get SVG's as well and need to install a add on which provides really good MathML support."
- The discussion about dropping MathML for firefox was at Wikipedia talk:Special:Preferences
- You can reenable the MathML with a bit of CSS
.mwe-math-fallback-image-inline {
display: none !important;
}
.mwe-math-fallback-image-display {
display: none !important;
}
.mwe-math-mathml-a11y {
position: inherit;
clip:inherit;
width:inherit;
height:inherit;
opacity:inherit
}
- Add this to your Special:MyPage/vector.css and the MathML will reappear. --Salix alba (talk): 16:48, 2 June 2016 (UTC)
- Installing the FF plugins did it. Sorry if I missed it, but this really needs to be documented somewhere. Kendall-K1 (talk) 17:16, 2 June 2016 (UTC)
I am not sure if this is related to this section per se, but I see no option to create a new section while not logged in... Something that has been broken for a little while here (maybe a month or two? not sure) is the displayed size of formulae. The bounding box for the svg images is the correct size, but the images themselves appear microscopic. Opening the images in a new tab shows the formulae at the proper size, but this workaround still leaves formula-heavy pages nearly illegible. It also renders the point in the "benefits of TeX" section of the article about formula size being larger in TeX vs. HTML invalid. Regardless of whether user preferences can fix this anomaly, it should not be the case that one must log in before a page can approach legible (hence the intentional being not-logged-in for this comment). 169.235.228.254 (talk) 02:45, 7 July 2016 (UTC)
- Thank you Salix alba for the .css snippet - that fixes it. The discussion Wikipedia talk:Special:Preferences does not seem entirely relevant; it addresses the question of the default rendering and it's not clear why this should override user preferences. I had supposed that correct rendering had stopped due to some bug that would eventually be fixed if I was very patient - so thanks again, --catslash (talk) 01:52, 12 March 2017 (UTC)
- I've added a new rule to the above css to prevent the display maths produced with the <math display="block"> tag, which is how Visual Editor creates display maths. --Salix alba (talk): 16:29, 28 August 2017 (UTC)