Help:Displaying a formula: Difference between revisions

Content deleted Content added
Line 110:
* [[wikipedia:Help:Displaying_a_formula |Help:Displaying_a_formula (Wikipedia) ]]
* [https://web.archive.org/web/20160305074303/https://www.math.upenn.edu/tex-stuff/cookbook.pdf {{TeX}} Cookbook], [[Media:Tex-cookbook.pdf | Local Copy]]
 
=={{TeX}}==
 
[[w:MediaWiki]] uses a subset of '''[[w:TeX|TeX]] markup''' for mathematical formulae. See [[meta:MediaWiki math markup]]
 
It generates either [[w:PNG|PNG]] images or simple [[w:HTML|HTML]] markup, depending on [[meta:Help:Preferences#Rendering_math|user preferences]] and the complexity of the expression. In the future, as more browsers are smarter, it will be able to generate enhanced HTML or even [[w:MathML|MathML]] in many cases.
 
(More precisely, [[w:MediaWiki]] filters the markup through [[w:Texvc|Texvc]], which in turn passes the commands to TeX for the actual rendering. Thus, only a limited part of the full [[w:TeX]] language is supported; see below for details.)
 
Math markup goes inside ''<nowiki><math> ... </math></nowiki>''. The [[meta:help:edit toolbar|edit toolbar]] has a button for this.
 
MediaWiki templates, variables and parameters cannot be used within math tags, see [[meta:Template talk:Demo of attempt to use parameters within TeX|Demo of attempt to use parameters within TeX]].
 
The PNG images are black on white (not transparent). These colors, as well as font sizes and types, are independent of browser settings or css. Font sizes and types will often deviate from what HTML renders. The [[meta:Help:User_style#CSS_selectors|css selector]] of the images is img.tex.
 
In the case of a non-white page background, the white background of the formula effectively highlights it, which can be an advantage or a disadvantage.
 
One may want to avoid using TeX markup as part of a line of regular text, as the formulae don't align properly and the font size, as said, usually does not match.
 
The alt attribute of the TeX images (the text that is displayed if your browser can't display images; Internet Explorer even shows it up in the hover box) is the wikitext that produced them, excluding the <nowiki><math> and </math></nowiki>.
 
Discussion, bug reports and feature requests should go to the [[meta:Mailing_list#Wikitech|Wikitech-l mailing list]]. These can also be filed on [http://bugzilla.wikipedia.org Mediazilla] under ''MediaWiki extensions''.
 
==General==