Jump to content

Help talk:Displaying a formula/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2Archive 3

A new way to view formulas in browsers

Please, attention! If you are interesting to finish develop.

What is it a page?
– It is a page of project overview.
What is the project name?
– Formulas for us.
Who is an author of the project?
– Dmitry Zotov.
What is a purpose of the project?
– To develop a comfortable method for the visualization of different sort of formulas in the Internet browsers.
What stage is the project on?
– An effective solution was found and some features of other technologies used by him are tested.
What technologies is it possible to realize the prepared decision by?
– Java, JavaScript, MathML, CML, TeX, DOM, CSS, HTML, XML.
How does the decision provide for to use Java technology?
– As an applet. He demonstrates a formula.
If not to accent attention at internal work of applet, what information is he exchanged with other components of decision?
– He gets such information: size and color of font, character of background, style of reflections of formulas, language on which a formula and record of formula was written down in this language. He gives information about the sizes of the image of formula and displacement in relation to the baseline of line that he is inserted on.
What part in the decision does act by technology of JavaScript?
– She co-operates with technology of Java and Internet browser.
What concrete mechanisms can an exchange of information between the components of decision?
– The applet of Java can get information the call of the methods from JavaScript scenario, passing of parameters at an insertion in HTML, and by a local or remote file, the address of which can be passed of one of the first two methods. To return information he can by the object returned from a method. Passing to information of JavaScript to the Internet browser can take place by the known DOM technology.
How can there be a process of reflection of formula in the browser of the Internet?
– An user creates HTML document, containing the necessary JavaScript scenario. Inserts a necessary applet in this document. Adjusts him statically by parameters and additional files (including passes a line with the name of the language of record of formulas used by him and record of formula in this language). After, it is needed to start this document in the browser of the Internet. After the start, Java applet will reveal to JavaScript the scenario parameters of the dynamic tuning of insertion itself in a document, and JavaScript will execute this tuning by DOM/CSS. It will allow a formula correctly enough represented in a document. The JavaScript scenario can watch the changes of sizes and colors of font, character of background, scale and to retune a formula dynamically.
Will there be a project to develop farther?
– Yes.
What is it assumed to do in the near time?
– Trial page that evidently will show co-operation of technologies for the reflection of formulas in the browsers of the Internet.
Is there a reflection of formulas in the browsers of the Internet a problem?
– I ran into it. In the Internet also there is a lot of forums, where both this problem and possible decisions come into question. However, effective decision I did not find there. In one well-known Internet encyclopedia the pictures of formulas, created "on the fly, are used". However, their sizes and colors is impossible to change.
Is there a necessity in the use of browsers of the Internet for the reflection of formulas? Possibly, do the specialized programs befit for this purpose?
– Technologies, related to the Internet, have large distribution and formulas, represented on their base, do not require additional software. It befits for such genre of sites as scientific publications. In addition, Internet browsers are constantly perfected and, learning to work with them, users get comfortable access to the most various information. Including, before long, and to the comfortably represented formulas.
Are you going to do the variant of this idea prepared for the use with support of even one language or his subset?
– Possibly. However, as an acceptable enough decision is already found, I count on a help other people that can do its concrete realization.
Are there some stages developments that would require specific skills?
– Yes. One stage is related to the translation of record of formula in the working structure of formula. And other stage which is related to the correct reflection of this structure. However much it seems to me that the carefully thought out system of classes can considerably simplify motion of work. It is similarly needed to create the formats of styles of reflection of formulas (XML), those users could change on their taste.
Is it possible with you to associate for consultations, wishes, questions or additions?
– Yes. By e-mail. Address is sharp-witted@rambler.ru.
The above is out of context and references. Is it spam? I have an idea about a WP project on wikipedia based interactive calculation, plotting, animation and simulation. Is that what the above is about? I suggest that the section should be removed or archived. Mange01 14:51, 20 June 2007 (UTC)
Where are more information about your idea? And what a date of implementation? To user Mange01. —Preceding unsigned comment added by 82.207.99.2 (talk) 15:22, 28 April 2008 (UTC)

Why so large formulas?

Why is the default font size of the formulas much larger than the text? This is a problem especially in inline formulas. What can I do to overcome this problem? I have to choose a very large text size in my browser to make it harmonize with the formulas, but that should not be the way to go. I suggest that the default templates / .CSS files should be revised for smaller formula size. Mange01 15:03, 20 June 2007 (UTC)

On the other hand if the user wants to zoom in to a PNG formula — perhaps because they have poor eyesight and can't read some sub-subscripts — ...they cannot!
—DIV (128.250.80.15 (talk) 07:48, 5 December 2007 (UTC))

I set up a local wiki server with texvc, and I really want to have an option to change the default settings. Can I? Thanks. --Lanyijie 09:16, 15 May 2008 (UTC)

Suggestion: Wiki based interactive math

I have a vision of a wiki project on interactive web based math. From wikipedia articles, the user should find interactive free tools for web based calculation, visulization, simulation, modelling and symbolic math. A commercial software such as Maple, Matlab and MathCAD should not be required for running computer simulations.

Where is the appropriate place to discuss this? Viewpoints on the basic idea?

Application examples that I have in mind:

  • Web based unit conversion: When reading an article about for example Celcius, the user should be able to access a tool where he can enter a temperature in a field or using a slide control, and convert it between Fahrenheit, Kelvin, Celcius and Rankine.
  • Web based formula calculation: When reading any wikipedia article about a math formula, the user should be able to enter numerical values of the parameters and get numerical results. Sometimes a certain interactive tool page may be designed for the formula, where controls such as text boxes, radio buttons, slide bars, etc, can be found. There should also be a generic way to calculate any formula found in wikipedia, for example by accessing a tool from the background menu, or by copying the formula into some kind of mathematical sandbox or private notebook web page.
  • Web based interactive plots: In plots, the user should be able to elaborate with different parameter values and generate new plots.
  • Web based animation: Models of dynamic processes may be visualized by means of plots with an aditional time dimension, i.e. by animations. Examples are math formulas with a time dimension, but also electrical circuits, physical phenomena, etc. The animations may resemble Flash animations, and be two or three dimensional.
  • Web based stochastic simulation: It should be possible to visualize the behaviour of models of stochastic processes, for example queuing theory applications such as computer networks, that change their behaviour on a time-to-time scale.
  • Web based algorithm simulation: It should be possible to run algorithms documentet by flow charts, signal flow charts, or mathematical style pseudo code, in view to test it for certain values, and to visualize the behaviour.
  • Web-based component-based graphical programming and modelling: Users should be able to build complex system models by linking and interconnecting various wiki objects, for example math formulas, algorithms, scripts, lock-up tables, software components, electrical circuit models, plots, and interactive controls into their own wiki documents. Each entity may be graphically represented by a block in a flow chart, state-flow diagram, signal/data flow diagram, UML diagram, etc, and the user may copy and paste such blocks between models. AJAX style web service for web based graphical editing may be an option. In some cases, a commercial tool may be required to design a block, but not to utilize it in a model. The model may be published on a wiki server, publically or on a private note page. It may also be saved and run locally using some freeware software. This idea resembles the old mathCad/MathConnex commercial software, where OLE linking and embedding was used to interconnect various math blocks, for example mathcad formulas and pseudo code scripts, matlab functions, Excel scheats, spice models of electrial circuits, etc.
  • Web based simulation of dynamic systems. Similar to Simulink models.
  • Web based symbolic math: The user should be able to elaborate algebraically with formulas in for example wikipedia. See for example MathCAD.
  • Web based audio and video processing: The user should be able to apply various algorithms on his own recorded sound, video and documents.

The calculations should normally be carried out at the client side, to relieve the wiki web server from load. However, in some cases it might be interesting that the server generates a "cashed" version of a plot or an animation, for some common parameter cases.

In computer simulation, distributed computing is important, and sometimes we want to distribute the model over different machines. Different blocks and/oror different parameter cases, may be simulated on different machines. The distributed computing may be carried out by a local computer cluster, or by a worldwide peer-to-peer network of users sharing each others capacity. A web based user interface for controlling the distributed computing is also a vision.

To achieve efficient computer simulation, there should be means of controlling cashing, look-up tables, etc. Only changed values should be recalculated, as in a spread-sheet document or in MathCAD.

Related wiki topics:

Mange01 18:06, 20 June 2007 (UTC)

Recommend \displaystyle instead of \,?

Wouldn‘t it be easier to recommend \displaystyle if one wanted a formula to be rendered as png? The word has a meaning that is easy to remember, easier than the \, trick with a comment. Or don’t they have the same effect? H. (talk) 11:41, 12 August 2007 (UTC)

Please add
Wikipedia:How_to_write_a_Wikipedia_article_on_Mathematics#Typesetting_of_mathematical_formulas
Wikipedia:Mathematical_symbols
as "See also" links to this article. Just an easy guide for those looking for help without crawling through paragraphs of stuff. Brews ohare (talk) 19:45, 29 November 2007 (UTC)

Non-italic text

The guide suggests either \mathrm{·} or \mbox{·} for rendering "text" non-italic (i.e. 'roman'). There are three serious problems:

  • \mathrm{·} will not operate on e.g. Greek letters!
compare and
(expected θ and θ)
  • nowhere is it made clear that \mbox{·} is simply a way of including 'verbatim' text, so that tokens signifying e.g. Greek letters (say, \theta) will not be parsed correctly (or in fact at all — wierd!!)
compare and Failed to parse (syntax error): {\displaystyle \,\!\mbox{\theta}}
(expected θ for both)
  • generally \mathrm{·} is preferable for rendering text like "max" as a subscript, because \mbox{·} doesn't shrink the text ...it displays the argument exactly as entered:
compare and
(expected tmax for both)
Given this it seems \mathrm{·} should always be preferred to \mbox{·}!?

—DIV (128.250.80.15 (talk) 08:01, 5 December 2007 (UTC)) Amended —DIV (128.250.80.15 (talk) 08:04, 5 December 2007 (UTC))

Italic variables

It is not apparent how to force uppercase Greek letters to render in italics. For example:

compare and
(expected Γ and Γ)

Note: a good reference for italicising formulæ is:
I. M. MILLS and W. V. METANOMSKI; On the use of italic and roman fonts for symbols in scientific text; IUPAC Interdivisional Committee on Nomenclature and Symbols; December 1999. (Accessed from http://www.iupac.org/standing/idcns/italic-roman_dec99.pdf, 2003–05–08.)

—DIV (128.250.80.15 (talk) 08:10, 5 December 2007 (UTC))

Hmm, no one seems to come here very often. If your still after an answer try <math>\,\!\mathit{\Gamma}</math> which will give you this; . SpinningSpark 18:52, 26 April 2008 (UTC)

Adding symbols to TeX

How does one go about adding symbols or commands to TeX? For instance, there is a section here in "Displaying a formula" for "Unsorted new stuff". How does one create "new stuff"——If it has to be approved, where does one submit it?  ~Kaimbridge~00:19, 12 December 2007 (UTC)

Numbered Equations?

Is there a way to number automatically equations in Wikipedia? Thanks--Geremia (talk) 06:41, 19 January 2008 (UTC)

Font used

Hi all, I have been curious about exactly which font is rendered into these pngs? I have acquired the font, "cmr10": Computer Modern Roman font, but it doesn't seem to match up. Any idea what the actual font is? Or better yet, link to a ttf? ॐ नमःशिवाय Śaiva Sujīt सुजीत ॐ 08:05, 25 February 2008 (UTC)

Hi, you already tried cmmi*? Computer Modern Math Italic? --Georg-Johann (talk) 14:42, 15 April 2008 (UTC)

Omicrons are missing from Greek alphabet

/omicron and /Omicron are not recognised. Why? Is this a bug? SpinningSpark 18:54, 26 April 2008 (UTC)

That's probably because Greek 'omicron', both lower and uppercase, are identical glyphs to Latin 'o'. See the Short Math Guide for LaTeX ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf par.3.4 page 5. --CiaPan (talk) 05:59, 13 June 2008 (UTC)

Hence

I was wondering if there a tag for a mathematical "therefore"? (I.e. the equivalent to the HTML "∴" tag: ∴) I didn't see it documented.—RJH (talk) 19:33, 12 May 2008 (UTC)

It is just \therefore, . JackSchmidt (talk) 19:39, 12 May 2008 (UTC)

I have Mediawiki installed. I want to display \gamma with a mouseover text description of :gamma. It fails and the culprit is "|" . Is there a solution to this? I don't want to manually update the page ( one of many under wikipedia dump). Please let me know if i am missing a mathml package. Thanks

[[gamma|<math>\gamma</math>]] - doesn't work but i want this to work as is. any thoughts?

[[<math>\gamma</math>]] - works fine — Preceding unsigned comment added by 131.107.0.73 (talk) 2008-05-13T21:56:24Z

On my mediawiki installation with texvc installed, it works just fine. On wikipedia it works just fine. If you need help with mediawiki software, you probably want to check out mw:Project:Help, or more specifically mw:Manual:Math for the texvc help. JackSchmidt (talk) 22:08, 13 May 2008 (UTC)

TeX Reference Card - Restricted Access

There is a reference on the bottom of the page for a reference card of TeX, offered under the URL "http://www.csit.fsu.edu/docs/tex/tex-refcard-letter.pdf". I can't get to the page because it says I do not have permission to. I'm not sure if the port is blocked by my personal firewall, or it the file has been restricted of public access. I hesitate to change the link to the Internet Archive link here because of this doubt. Is anybody having the same restricted access problem? Un Piton (talk) 14:52, 15 May 2008 (UTC)

I got it too. The error is coming from the server so I don't think it would be a personal firewall problem. SpinningSpark 20:50, 15 May 2008 (UTC)

Changing font size in Wikipedia

Hi! I noticed that Wikipedia isn't able to change font size in latex. For example code \tiny \frac{355}{113} results an error message, not tinier font size. And when I tried my code in a latex generator it produces just fine tinier font size. Is there any reason why changing font size is not allowed in Wikipedia? --QWerk (talk) 10:34, 12 June 2008 (UTC)

Only a small part of LaTeX is implemented on Wikipedia - just enough for the purposes of doing formulae. But for the example you quote \tfrac{355}{113} should work and renders as;
as opposed to for \frac{355}{113}
SpinningSpark 11:51, 12 June 2008 (UTC)
OK. Thanks for the advice. --QWerk (talk) 12:15, 12 June 2008 (UTC)
If you think that there is a need for a new feature you can always try suggesting it at Wikimedia Bugzilla. Usually only goes anywhere though if there is lots of people supporting it so discussing first at Wikipedia:Village pump (technical) would be a good idea. SpinningSpark 12:38, 12 June 2008 (UTC)

Dollar sign mania

The page says to most users

 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 ┃                                   │                                        │          How it looks rendered           ┃
 ┃              Feature              │                 Syntax                 ├───────────────────┬──────────────────────┨
 ┃                                   │                                        │       HTML        │         PNG          ┃
 ┠───────────────────────────────────┼────────────────────────────────────────┼───────────────────┼──────────────────────┨
 ┃ Superscript                       │ a^2                                    │ a^2               │ a^2 \,\!             ┃
 ┠───────────────────────────────────┼────────────────────────────────────────┼───────────────────┼──────────────────────┨
 ┃ Subscript                         │ a_2                                    │ a[2]              │ a_2 \,\!             ┃
 ┠───────────────────────────────────┼────────────────────────────────────────┼───────────────────┼──────────────────────┨

But if you have a certain preference set this is what you will see

 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
 ┃                                  │                                       │           How it looks rendered            ┃
 ┃             Feature              │                Syntax                 ├────────────────────┬───────────────────────┨
 ┃                                  │                                       │        HTML        │          PNG          ┃
 ┠──────────────────────────────────┼───────────────────────────────────────┼────────────────────┼───────────────────────┨
 ┃ Superscript                      │ a^2                                   │ $ a^2 $            │ $ a^2 \,\! $          ┃
 ┠──────────────────────────────────┼───────────────────────────────────────┼────────────────────┼───────────────────────┨
 ┃ Subscript                        │ a_2                                   │ $ a_2 $            │ $ a_2 \,\! $          ┃
 ┠──────────────────────────────────┼───────────────────────────────────────┼────────────────────┼───────────────────────┨

As the page is supposed to be showing what different users see, it itself should be a static and not appear different to different users! And those $'s look horrible at least in my text browser. You at least need an extra column to show what "dollar sign victims" see if you don't intend to fix it. Jidanni (talk) 02:40, 17 September 2008 (UTC)

Physics?

For physics, I would like to be able to write

  • bold italic latin symbols,
  • bold italic capital Greek symbols, and
  • bold roman small Greek symbols.

How to do it in Wikimath? Miraceti (talk) 17:29, 18 September 2008 (UTC)

Is MathML ever going to happen?

Really, these renderings in png are terribly fugly! With FF3's release, there is no excuse why the feature should not be made a top priority by the wikimedia devs. --Dragon695 (talk) 20:14, 8 July 2008 (UTC)

I really hope MathML does happen, there is a lot of bugs and errors when you try to do complex function like sigma notation, limits...etc and the characters is somewhat ugly and the fractions is making the entire formula look horrible, in fact it almost deteroriate the entire look of the formula because the fraction is humongously big. Wish some developers can make MathType a lightweight web open source markup. --Ramu50 (talk) 21:02, 21 October 2008 (UTC)

latex vs. html

The template doesn't exist anymore there, does it? LivingShadow (talk) 10:58, 13 October 2008 (UTC)

TeX will display in HTML by default, and only in PNG if the equation is sufficiently complex. Gary King (talk) 19:56, 26 October 2008 (UTC)

Conversion help

Can anyone please help convert Image:Pwi-formula.gif (used in Process Window Index — comment addded by CiaPan (talk)) to Latex? I found it too complicated to try. Thanks in advance. Zithan (talk) 18:49, 6 November 2008 (UTC)

Let's see... something like this?
Or maybe
CiaPan (talk) 14:49, 7 November 2008 (UTC)
The second one looks accurate. Gary King (talk) 17:18, 7 November 2008 (UTC)
Thank you. The second one looks better, but there is a problem. The denominator is divided by 2, not added. The dots on the division sign are two close to view with the naked eye. It's the average, therefore divide by 2. Zithan (talk) 12:48, 8 November 2008 (UTC)
Okay I fixed it in the equation above. Gary King (talk) 20:10, 8 November 2008 (UTC)
Thanks. Zithan (talk) 14:59, 9 November 2008 (UTC)
Quick question: Is it possible to use /2 instead of the traditional division symbol? Zithan (talk) 15:08, 12 November 2008 (UTC)
Just change "\div" to "/". Gary King (talk) 15:16, 12 November 2008 (UTC)
Thank you! :) Zithan (talk) 15:21, 12 November 2008 (UTC)

LaTeX symbols

Hello. I'd like to add an alternative layout for the LaTeX symbols. If you are interested, please visit the discussion page on meta. Thank you very much. Regards, --Julian (talk) 14:43, 13 November 2008 (UTC)

Why doesn't this one work?

What is wrong with this equation? Why doesn't it appear like an equation? (taken from previous version of Bohr equation)

Mikael Häggström (talk) 11:54, 13 November 2008 (UTC)

Use this:

Gary King (talk) 15:13, 13 November 2008 (UTC)

Thanks! Mikael Häggström (talk) 16:17, 13 November 2008 (UTC)
Wrong! That works, if you have chosen 'HTML if very simple or else PNG' in your Preferences page (Math tab). If your setting is 'HTML if possible or else PNG' (as is mine), then '\,' does not always do what you expect — and in this case both formulae, with and without a backslashed comma, are displayed with HTML.
You should better use '\,\!' as explicitly stated in the help page, section Forced PNG rendering. --CiaPan (talk) 07:14, 18 November 2008 (UTC)
Thanks! That really fixed the problem. Mikael Häggström (talk) 06:57, 19 November 2008 (UTC)

Passing in a class to <math>

Is it portable to pass in a class to the <math> tag? I writen a Mediawiki to LaTeX converter and have found that if I generate a formula like this:

<math class=eq>\int x^2 dx</math>

Then the HTML produced with have an image with class tex eq rather than class tex. My converter uses this to distinguish between inline math and math that should be in the equation environment (or displaymath). What I don't know is if this will continue in later versions of MediaWiki. Any ideas? Autopilot (talk) 17:19, 17 November 2008 (UTC)

About TeX

By the way who is responsible for the bug of TeX, is it Bugzilla Wikipedia or is it the TeX markup developers? --Ramu50 (talk) 21:04, 21 October 2008 (UTC)

I think it's TeX, as it's probably just a module that MediaWiki (the software that Wikipedia runs on) uses. Gary King (talk) 19:56, 26 October 2008 (UTC)
And if you have found a bug in TeX, you may have already won a prize in the form of a Knuth reward check. There are only 427 bugs listed after 26 years of use. Autopilot (talk) 17:45, 20 November 2008 (UTC)
You probably didn't find a bug in Tex, but in texvc, which we use here to render it and is not the program Knuth wrote. Much to our frustration. Ryan Reich (talk) 00:06, 14 January 2009 (UTC)

I want to change the instructions for converting LaTeX to SVG. Although the current ones are technically correct, they are excessively complicated, produce very poor results when there are diagonal lines, and anyway require either installing all of inkscape, which is unnecessary if all you want is to convert SVG's, or purchasing the commercial direct-to-SVG plugin for pstoedit, which is unacceptable. If no one objects, I will put in the procedure I discuss (with some attitude) on my user page:

pdflatex file.tex
pdfcrop --clip file.pdf tmp.pdf
pdf2svg tmp.pdf file.svg
(rm tmp.pdf)

The use of pdflatex is of course unnecessary; you could use dvipdfm to convert the output of ordinary latex to a PDF file. Ryan Reich (talk) 00:11, 14 January 2009 (UTC)

Using pstoedit directly is also an option, with GNU libplot to replace the proprietary driver: just replace the pdf2svg line with

pstoedit -f plot-svg -dt -ssp tmp.pdf file.svg

where hopefully your ghostscript program can handle PDFs (of course, this requires some rather opaque options that I do not fully understand). This method produces smaller file sizes but I do not know how either works internally so I cannot say whether it will always be of equal quality. Ryan Reich (talk) 21:07, 14 January 2009 (UTC)

The pstoedit invocation failed to produce an image with some of the pictures now at Cone (category theory), whereas pdf2svg worked, so I don't think I can really recommend pstoedit for anything at this point. Ryan Reich (talk) 04:22, 15 January 2009 (UTC)

Maybe also discuss how to get the math actually working??

Saying that one has to fiddle around in LocalSettings.php isn't clear enough, maybe be so good to mention the actual existence of the variable $wgUseTex in LocalSettings.php, or is that too much??

After putting this $wgUseTex to true, any subsequent errors might be worth mentioning also...

like this one: Failed to parse (Can't write to or create math temp directory) might at least get an indication of a solution. So, how does one resolve this problem?? Even chmodding everything to 777 doesn't work, so there is a directory missing. But again... which directory? Where in this wiki is this information???

The temp directory is the directory specified by the $wgTmpDirectory variable in your LocalSettings.php file —Preceding unsigned comment added by Simsong (talkcontribs) 19:01, 12 October 2007 (UTC)

I suspect that some kind of caching goes on---I got this error because the tmp/math directories as specified in LocalSettings didn't exist. I created and chmoded them, but reloading the test page still showed errors---however, other pages displayed formulas fine. I then 'edited' the page that was giving me trouble: didn't actually change anything but just saved after opening for editing, and the page redisplayed with glorious equations. Please check this and report if it worked for you. —Preceding unsigned comment added by 129.6.123.99 (talk) 12:09, 5 May 2009 (UTC)

Semantics with the aligning in normal flow

The article reads:

an inline expression like should look good.
If you need to align it otherwise, use <font style="vertical-align:-100%;"><math>...</math></font> and play with the vertical-align argument until you get it right; however, how it looks may depend on the browser and the browser settings.

Would it not, in the interest of semantic HTML, make more sense to use <span> instead of <font>? Font tags have long since died off. — metaprimer (talk) 04:18, 17 August 2007 (UTC)

A good example would be something like or Anyway the effect depends on the default font size in the user's browser and the font size in math PNG files, so the offset values are never guaranteed to work well for everybody. CiaPan (talk) 14:42, 5 May 2009 (UTC)

\xleftrightarrow

Is it possible to view an \xleftrightarrow with discriptions above and under the arrows shown here.--benutzer:Roland1952 (talk) 00:43, 21 January 2009 (UTC)

Try this:

       

It's not exactly what you need, but I don't know how to make arrows arbitrary long. --CiaPan (talk) 08:31, 21 January 2009 (UTC)

Transparent Background Rendering

The Rendering section says text is rendered black on white. It would be nice if there was a way to allow a transparent background color or at least a custom background color. For example, if we take a look at Sorting algorithm#List_of_sorting_algorithms we can see it doesn't look nice with a white background. —Preceding unsigned comment added by 70.68.146.60 (talk) 21:52, 13 October 2008 (UTC)

Just the same request here. Transparent pngs or at least backgroud colors for these seem to be possible - please look at [[1]]. If your browser has 'don't print background colors' on, do a print preview - you will see that some pngs have gray background and others are transparent. (Don't worry about the black shadows of the pngs) --Ernsts (talk) 15:54, 7 May 2009 (UTC)

Maxwell Stefen diffusion coefficient

Hello, I'm looking for the symbol vor the Maxwell Stefen diffusion coefficient which is a major D with a slash. In latex mathmode normally writen as \text{\sl\DH} but this is not working in wikipedia. Has someone a workaround for this symbol. Mgloede (talk) 13:40, 1 March 2009 (UTC)

If it's not part of a complicated formula, just write the letter directly: Đ. I don't know how to make it inside <math>…</math>. — Emil J. 12:06, 18 June 2009 (UTC)

Please clarify ...

I have no idea what this means:

  • "To have math rendered, you have to set $wgUseTeX = true; in LocalSettings.php."

Does this mean I need to a adjust a setting in the Wikimedia software I'm running? Or do I adjust this in my browser? Or is it a setting under "preferences" in wikipedia? How the heck do I find this setting? Could you please clarify the sentence on the help page? Agradman demands civility/makes occasional mistakes 06:13, 18 June 2009 (UTC)

It refers to the MediaWiki software. — Emil J. 11:49, 18 June 2009 (UTC)

What's the difference between this page: "http://en.wikipedia.org/wiki/Help:Displaying_a_formula" and this page: "http://meta.wikimedia.org/wiki/Help_talk:Displaying_a_formula"? They are almost identical. Ken6en (talk) 04:34, 13 May 2009 (UTC)

The page here is a copy of the page there on meta, so they are supposed to be identical, except that they are not really kept in sync and therefore diverge. I have no idea what's the rationale for keeping a local copy of the page here. — Emil J. 12:13, 18 June 2009 (UTC)
It's easier to have a page here rather than having to go to meta. I personally find this much more useful than having to travel to another Wikimedia project. —MC10|Sign here! 02:52, 19 June 2009 (UTC)
So, does it mean that you volunteer to keep the pages synchronized? — Emil J. 15:17, 22 June 2009 (UTC)

help a novice? ...

I'd like to make this equation look a bit prettier:

However I was told at Wikipedia:Help Desk that it's not possible to put wikilinks into TeX. Is there any other way to make this equation look less ugly? ThanX, Agradman appreciates civility/makes occasional mistakes 00:58, 20 June 2009 (UTC)


You might use HTML to get a proper layout with a table. For example:


  <table align="center" style="text-align:center;">
      <tr>
      <td> Payables period =         </td>
      <td> Avg.Acc.P  <hr />  [ .... ] </td>
      <td> × 365
    </tr>
  </table>


displays as:
Payables period = Avg.Acc.P
[ .... ]
× 365
Similar result with a wiki-table:

  {| align="center"
  || Payables period =
  | style="text-align:center;" | Avg.Acc.P   <hr />  [ ..... ] 
  || × 365
  |}

Payables period = Avg.Acc.P
[ ..... ]
× 365
CiaPan (talk) 06:46, 22 June 2009 (UTC)
Use <hr style="background-color:black" /> to make the rule black instead of grey:
Payables period = Avg.Acc.P
[ ..... ]
× 365
— Emil J. 15:15, 22 June 2009 (UTC)
Something went wrong. Are you sure your example works? It renders with exactly same line color on my computer — both your and my fraction line display in "#AAAAAA" gray. Seems to me you meant to use style="color:black", not background-color. --CiaPan (talk) 05:46, 24 June 2009 (UTC)
I just tried it in three different browsers (Firefox, Opera, Konqueror), and all of them display it black as I intended. On the other hand, with style="color:black" it displays as grey. I consider it highly unlikely that all three would mysteriously have the same bug in their CSS code, hence chances are that it is your browser (which one is that?) which is wrong. In any case, it should not do any harm to set both properties: <hr style="background-color:black;color:black" />. — Emil J. 10:45, 24 June 2009 (UTC)
It's MS IE 7.0 on WinXP Pro SP3.
BTW, MSDN Library (August 2006 version, which I have on my disc) does not mention neither 'color' nor 'background-color' STYLE property for HR. However it describes the 'color' property of HR item itself (that is
). --CiaPan (talk) 13:41, 24 June 2009 (UTC)
The color attribute of the hr element is not present in XHTML 1.0[2], HTML 4.01[3] or HTML 3.2[4] (I don't feel like searching older versions), and as such it is completely nonstandard (and thus gets removed by Wikipedia software, try it). The CSS color[5] and background-color[6] properties apply (in principle) to all elements, including hr.
A bit of googling revealed that cross-browser styling of hr elements is indeed a royal mess. For color, the recommended way is to set both background-color and color as above (and set nonzero height and null border because of Opera, but the default WP stylesheet already does that). For anything more complicated, the only reliable way seems to be to wrap the rule in a div, style the div, and make the hr invisible: <div style="..."><hr style="display:none" /></div>. — Emil J. 14:34, 24 June 2009 (UTC)

Subscript with several letters?

Is it possible to make a subscript with several letters in math, like Ptotal? Mikael Häggström (talk) 16:29, 13 November 2008 (UTC)

Here: Gary King (talk) 16:39, 13 November 2008 (UTC)
See the help page, section Subscripts, superscripts, integrals --CiaPan (talk) 07:01, 14 November 2008 (UTC)
I find having to wrap anything more than a single character subscript or superscript counter-intuitive, e.g. 2^{16} for but I guess that's a TeX limitation? --80.175.250.218 (talk) 19:33, 7 August 2009 (UTC)

Not a subset of ΤΕΧ

At present, the help article claims

MediaWiki uses a subset of TeX markup, including some extensions from LaTeX and AMS-LaTeX, for mathematical formulae.

LaΤΕΧ is not a subset (proper or improper) of ΤΕΧ; the claim is self-contradictory. An accurate claim would be

MediaWiki uses a subset of AMS-LaΤΕΧ markup, a superset of LaΤΕΧ markup which is in turn a superset of ΤΕΧ markup.

SlamDiego←T 10:05, 14 April 2009 (UTC)

I believe some of the tex markup is filtered out by texvc, so the assumption that MediaWiki use a subset of TeX is true, regardless if it also support a subset of some LaTeX extra stuff beside that. —Preceding unsigned comment added by 195.83.155.55 (talk) 17:37, 24 July 2009 (UTC)

only 20 columns in matrixes

Dear friends,

columns

<math>
\begin{bmatrix}
  1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11
\end{bmatrix}
</math>

generates:

This is today (18:21, 8 August 2009 (UTC)):
Failed to parse (PNG conversion failed; check for correct installation of latex, dvips, gs, and convert): \begin{bmatrix} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \end{bmatrix}

rows

<math>
\begin{bmatrix}
 1 \\
 2 \\
 3 \\
 4 \\
 5 \\
 6 \\
 7 \\
 8 \\
 9 \\
 10 \\
 11
\end{bmatrix}
</math>

generates:

problem

It makes not much sense to limit the number of columns to 10. Can anybody verify if this is a known problem / bug ? If so please report it to bugzilla: and / or kindly ask to update / reconfigure "math". Thanks in advance! Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 18:21, 8 August 2009 (UTC)

This arbitrary limit is imposed by TeX itself (more precisely, the amsmath package). It is controlled by the MaxMatrixCols counter. — Emil J. 10:35, 10 August 2009 (UTC)
Thanks for the answer! Is it possible to change it; for example to 36 or the same value as the one used for rows? Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 14:48, 10 August 2009 (UTC)
There is no limit on rows. In real TeX, you can change the column limit easily with \setcounter{MaxMatrixCols}{36}. This is not accepted by texvc, so on Wikipedia it would require a global change by a developer. You might try to petition for it on bugzilla, but don't hold your breath. Why do you need such a wide matrix, anyway? In any case, you can work around it by using array instead:
    \left[\begin{array}{ccccccccccc}1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\end{array}\right]
— Emil J. 15:12, 10 August 2009 (UTC)

Re.: "Why do you need such a wide matrix, anyway?"

Please see Most-perfect magic square#Examples (and fr:talk:Carré magique plus que parfait).
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 11:36, 11 August 2009 (UTC)
I actually think that the ASCII art is OK, for one thing it does not have accessibility issues like PNG-rendered TeX. However, if you absolutely want to rewrite it using TeX markup, array is your best bet: apart from the columns problem, it also lets you keep the entries right-aligned (matrix can only center them). — Emil J. 12:45, 11 August 2009 (UTC)

Dankon Brion!
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 15:51, 14 August 2009 (UTC)

scaling a formula

Dear friends, assume that you have the following text:

If is the order of a most-perfect magic square then . Assuming the prime decomposition of is
where for and
example:

Question: Is it possible to scale the rendering of the output for the example? Thanks for your help in advance! Best regards
‫·‏לערי ריינהארט‏·‏T‏·‏m‏:‏Th‏·‏T‏·‏email me‏·‏‬ 11:45, 11 August 2009 (UTC)

Depends on what do you mean by scaling. If you want to scale it down so that it matches the size of the text around, you can try to force \scriptstyle: , or you can simply rewrite it in HTML: 360 = 23·32·51. If you want to scale it up to make it more prominent, I don't think you can do it using <math> markup; however, you can write it in HTML as above, and adjust the size with appropriate CSS:
<span style="font-size:200%">360 = 2<sup>3</sup>·3<sup>2</sup>·5<sup>1</sup></span>
360 = 23·32·51
— Emil J. 12:57, 11 August 2009 (UTC)

Rendering of small z

When reading the article on the gamma function, I noticed that the when the letter z is set in a smaller-than-usual size, it looks very similar to "≈", as in this example:

Is there anything that can be done to improve that? I realize it's probably not a big problem, but I think anything that can be done to improve the clarity of math articles is a good thing. I'm generally struggling to understand something whenever I consult a math article, and any difficulty in recognizing the symbols being used is an unwelcome distraction.

John W (talk) 15:11, 15 October 2009 (UTC)

formulas should be composed by TeX. 129.132.225.144 (talk) 22:30, 28 October 2009 (UTC)

Phi and varphi and weird behaviour

What's up with the different phi and varphi symbols for the same code, \phi?:

It appears to me as when it has to load some libraries, it switches over to the usual TeX \phi, but when it needn't do it, we get TeX's \varphi!

  • and
  • and versus —Preceding unsigned comment added by 62.194.183.233 (talk) 11:32, 7 March 2010 (UTC)
, , and render in HTML, and your font happens to show the Unicode character φ (U+03C6 GREEK SMALL LETTER PHI) as \varphi (both are possible). The other formulas are rendered in PNG using TeX. You can force PNG rendering with \, as described in the help page.—Emil J. 12:11, 8 March 2010 (UTC)

Which fonts are used?

Which fonts does Wikipedia's LaTeX renderer use? SharkD  Talk  19:20, 2 April 2010 (UTC)

Slashing more than one symbol

Is there any way to slash more than one symbol?

Example: is fine, but is ugly. Albmont (talk) 14:02, 11 March 2010 (UTC)

. Also note the extra space in the superscript, so it doesn't look so much like a power. Nageh (talk) 09:08, 4 April 2010 (UTC)

Better math formatting support please! (cross-posted to MathML)

Ok, how can we get this to the right people in the wikipedia/media foundation? The current MathML support is non-existent, and the random formatting changes in expressions like (upright, standard font), (italic), (missing spaces around congruence sign) and (font much larger than rest of text) are embarrassing. For a start, it would be nice if the math tags could at least produce the same font in all cases. People agree? Nageh (talk) 08:46, 4 April 2010 (UTC)

Just found out that the first expression is rendered in upright, standard font only when you select MathML rendering in your preferences! Wow, we have MathML rendering! >:) Nageh (talk) 11:08, 4 April 2010 (UTC)

Can someone tweak some formulas for me?

Every time I use the math tags I end up with different results. Can someone who understands how it works please patch up the headway article? I used the exact same syntax for three formulas in a row, and each one looks different. The first is in big text and appears to be an image? The next is sans-serif and indented, with huge whitespace on the division. The third goes back to a serif font (which I'd prefer) and is not indented. I can't figure out how to fix this. Help?! Maury Markowitz (talk) 12:38, 1 September 2009 (UTC)

Please see #Why doesn't this one work? section aboveat this history page. Hope this helps. --CiaPan (talk) 06:52, 2 September 2009 (UTC)
(New pointer to history page by kcylsnavS{screechharrass} 00:50, 25 May 2010 (UTC))

/textstyle

What does the /textstyle switch do? Document? kcylsnavS {screech} 14:34, 16 May 2010 (UTC)

You mean \textstyle, I suppose. It switches the formula (or the subformula where it appears) to text style, which implies that large operators (symbols of type \mathop) will not be that large as in display style (which is the default style for Wikipedia <math>...</math>), and numerators and denominators in fractions and fraction-like constructs will be in script style (whereas they would appear in text style if the fraction were in display style), which in particular makes them smaller. I'm not sure whether all this makes much sense without understanding the concept of TeX's math styles, see the TeXbook for a more detailed explanation.—Emil J. 12:30, 17 May 2010 (UTC)

OK. I thought maybe it just meant that fonts were used instead of images, which would be nice for signatures. kcylsnavS{screechharrass} 00:41, 19 May 2010 (UTC)

MS Word Equation Editor?

The MS Word Equation Editor is the easiest thing I have found to write complex equations. But, then, all I can do is take a screen shot for insertion into articles. Is that a good or a bad idea? I know I should learn TeX, but I have exhausted my brain on miscellaneous other syntax. Bridgetttttttebabblepoop 21:25, 15 September 2010 (UTC)

A screenshot isn't ideal, because it only provides an image (so people using screenreaders are out of luck, and it may be difficult to place your formula inline nicely) and that image is at a fixed resolution (so it may look ugly). OpenOffice has a similar equation editor, and it can export your documents to MediaWiki format (i.e. Wikipedia) using the Sun Wiki Publisher extension. I don't know how complex your formulae are, but it produced this one easily enough:
I also see MediaWiki has a Word2MediaWikiPlus extension. I don't know if it will handle formulae, but if you have many already set up, you might want to look into that. OpenOffice can read MS Word files, but I doubt it would read and export formulae created in MS Word/Equation Editor.
BTW, I don't really know my way around the formula syntax here either. :) --Avenue (talk) 02:23, 16 September 2010 (UTC)
Wow!, Avenue, THX. That's a lot to think about, but it looks like a good route. My planned equations are no more complicated than yours, but I do have some matrix algebrae. I'll check to see if that can be included. Let's stay in touch as we work through this. U R very helpful. Bridgetttttttebabblepoop 13:33, 16 September 2010 (UTC)
Sure, feel free to ask me questions as you go. --Avenue (talk) 23:24, 16 September 2010 (UTC)
Also, you can look up matrices in Planetmath and use their TeX source as a guide. e.g.: James470 (talk) 06:12, 19 September 2010 (UTC)

More package support?

I just wonder if Wikipedia can support more math packages, specifically, commath. I use this package a lot in my LaTeX documents because of its semantic notation of brackets \del{} \cbr{} \sbr{} instead of \left( \right) and special commands for differentiating operator \dif (=\mathrm{d}) and derivatives \od{}{} \pd{}{}--Netheril96 (talk) 08:06, 7 October 2010 (UTC)

Documenting equation-numbering templates

As already mentioned in the WP:MOS talk page, I would like to add documentation here about the equation-numbering templates {{NumBlk}}, {{EquationRef}}, and {{EquationNote}}. It would be nothing verbose, just a mention of them and links to their respective documentation pages. It took me days to find these; I had to search through article after article until I found someone else who already knew about them and used them. Does this sound like the right place to put brief links like this? It sure would help the next poor schmo like me who wants to number some equations!  :) CosineKitty (talk) 18:56, 24 February 2010 (UTC)

I went ahead and added a brief section on equation number templates. I did not follow the usual table pattern for the examples for a reason: I wanted to illustrate how the equation number shows up on the right margin. To make this look the way it really would in a real article, I left the "how it looks" as free-form outside any enclosing table. CosineKitty (talk) 22:13, 27 February 2010 (UTC)
A small comment: the extension Extension:MathJax (just put there by me) has automatic equation numbering and referencing using standard TeX constructions (\label{} and \eqref{}). Dirk Nuyens (talk) 21:23, 15 November 2010 (UTC)

\scriptstyle

The Dutch WP apparently has standard the \scriptstyle command. It works here too, but it's not mentioned on this page. What is this? Does it take arguments? Example:

The two are equivalent above, one is with and one is without the \scriptstyle declaration. -- 124.150.117.86 (talk) 13:24, 26 November 2010 (UTC)

The four maths styles in LaTeX are \displaystyle, \textstyle, \scriptstyle, and \scriptscriptstyle. Formulas set out on a single line are generally typeset in \displaystyle, with big symbols (sum, product, etc.) and parameters underneath and above. \textstyle is the default size for inline maths embedded in the text flow; parameters are sidewards. \scriptstyle is the size of symbols for first-order sub- and superscripts, such as in fractions. \scriptscriptstyle applies to second-order elements. HTH, Nageh (talk) 13:37, 26 November 2010 (UTC)
Why is it not listed I don't know, but one of the reasons may be that it has almost no legitimate uses. Abusing it to make the appearance smaller as you did results in a typographical disaster, and a discussion at WT:WPM decided against it.—Emil J. 13:44, 26 November 2010 (UTC)
The example above shows the main problem with it: it tends to make elements more similar sized, so reduce readability as the relative sizes of parts of a formulae are important in establishing the relationship between them. E.g.
, , ,
Meanwhile it does little to fix the problem of a mis-match between the surrounding text and inline formule, seen easily from the first two examples: and . So HTML is still preferred for inline text, meaning LaTeX should only be used for standalone formulae where there's no need to save space by using \scriptstyle at the expense of readability.--JohnBlackburnewordsdeeds 14:05, 26 November 2010 (UTC)

\framebox, \vspace, \hspace?

It appears that none of those three commands are available in <math> mode. All three would be very useful for making "LaTeX text art" by allowing us to place and scale symbols easily and precisely. I thought at least \vspace and \hspace didn't require any packages in LaTeX. What's up with that? Would these be easy to enable? —Ben FrantzDale (talk) 15:42, 9 February 2011 (UTC)

Ampersands in \text?

Is there a bug in handling & inside \text{} or am I doing it wrong?

I have a text which uses "&c." a lot in the math. If I want to get, say, the equivalent of the HTML: "a1, a2, a3 &c.", and I try

<math>a_1, a_2, a_3 \text{\And c.}</math>

I get:

Failed to parse (syntax error): {\displaystyle a_1, a_2, a_3 \text{\And c.}}

... and the same happens if I replace the \And by a simple &. If I try

<math>a_1, a_2, a_3 \And\text{c.}</math>

it renders but the spacing is rubbish:

At the moment I am reduced to

<math>a_1, a_2, a_3\!</math> &c.

but it's not very satisfactory:

&c.

Any ideas?--Keith Edkins ( Talk ) 11:55, 18 February 2011 (UTC)

Why would you want to finish a sequence with an ampersand?
FYI, you can't use math commands in a text environment. Other than that, yeah, TeX rendering truly sucks on Wikipedia.
You can force spaces either using \,, which results in PNG rendering, or using \text{ }, which defaults to HTML rendering.
(And thank those responsible for the horrible and buggy TeX rendering that we have on Wikipedia.) Nageh (talk) 12:33, 18 February 2011 (UTC)
It's not ampersand by itself, it's "&c.", abbreviation for "et cetera". I'm trying to port the article "Dynamics" from the 1911 Encyclopædia Britannica into Wikisource, and it's full of this abbreviation. I take your second point that \text{\And c.} wouldn't be expected to work, but \text{&c.} surely should, and it doesn't:
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/en.wikipedia.org/v1/":): {\displaystyle a_1, a_2, a_3 \text{ &c.}}
--Keith Edkins ( Talk ) 13:09, 18 February 2011 (UTC)
What about ? —Ben FrantzDale (talk) 16:05, 18 February 2011 (UTC)
I was trying to avoid that! But it's the only offer and gives a reasonable appearance, so thanks, I'll try it.--Keith Edkins ( Talk ) 10:32, 19 February 2011 (UTC)

Formulas as SVG?

Are there any plans to make formulas render as SVG, rather than PNG? 131.107.0.80 (talk) 00:06, 3 November 2009 (UTC)

Or better : Are there any plans to move to jsMath ? Bunder (talk) 19:30, 17 February 2010 (UTC)

Even better: MathJax, the successor of jsMath. Writing a plugin to support it should be trivial. For DokuWiki, such a plugin exists and is maintained by the author of this comment. Is anyone interested to collaborate with me on implementing jsMath and MathJax support for wikipedia? Where are such issues discussed? ylloh (talk) 00:28, 16 March 2010 (UTC)

This looks very promising! In fact, I was playing around a bit in making a quick and dirty port to wiki. If anybody is curious, you can plug the importScript('User:Nageh/mathJax.js'); line into your local layout script file (monobook.js, vector.js, ...). Also, you need to set math rendering to "Leave it as TeX" in your preferences. And you need the required TeX fonts from the MathJax homepage in your computer's font directory. It's an incomplete port, and in fact also MathJax has rather incomplete TeX support for now, but it's nice for a preview. Hope we can have real support for this some day! Nageh (talk) 20:32, 5 April 2010 (UTC)
Great! This is a very elegant solution! It looks really nice already, but I am going to test it thoroughly. ylloh (talk) 10:37, 8 April 2010 (UTC)
1.0 of MathJax is now out ! It might be the time to include it in wikipedia Xmlizer (talk) 06:01, 5 August 2010 (UTC)
It is over time. I am waiting for months now to get the wmf branch of wikimedia updated, but it never happens. Without the relevant bugs fixed, it does not make sense to use above MathJax plugin. I'll keep you updated. Nageh (talk) 09:01, 5 August 2010 (UTC)
Good news! Thanks to a MediaWiki developer I could convince in updating the WMF branch we finally have some workable inline LaTeX support on Wikipedia! (Though still in some kind of beta phase.) Instructions for testing as above. Have fun! Nageh (talk) 17:59, 6 November 2010 (UTC)
It is really working now! but with lots of problems. It hasn't implemented all LaTeX features as supported by Texvc now. Besides, it is not fully compatible with the special situation of Wikipedia. It cannot distinguish the display math from inline math for Texvc distinguishes them by a colon. And Mathjax won't load in preview. Still a long way to go before it can be deployed on Wikipedia. But thanks anyway.--Netheril96 (talk) 01:51, 7 November 2010 (UTC)
Hey, thanks for testing! Yeah, MathJax doesn't support the complete set of texvc commands, which even allows HTML in addition to AMS! But most pages render just fine. I've fixed another bug and included custom macros for the popular \infin and \bold parameters, and all the articles referenced on your user page display fine as well now!
Regarding your statements that MathJax is not fully compatible with the special situation of Wikipedia, I do not understand exactly what you mean. For example, while MathJax can it is MediaWiki's fault that we cannot distinguish between inline math and display math! (If really desirable it could be possible to implement it as a hack, such as when there is an empty line before and after the math statement.) Hm, why do you say that MathJax won't load in preview? It works for me.
Just should out on my talk page if you'd like something specific to be supported and I'll see what I can do. Nageh (talk) 11:16, 7 November 2010 (UTC)
I have come across an inofficial list of texvc commands. Turns out most of them are just alternate spellings of existing LaTeX/AMS commands. I have included almost all of them now; what is missing from the list are \subsetneq, \supsetneq, \textvisiblespace, and \weierp. Nageh (talk) 14:20, 7 November 2010 (UTC) All of them should be supported now. Let me know if you come across a command not supported by this plugin.
What needs to be done now is add better font support. But for the moment it will do. Nageh (talk) 14:37, 7 November 2010 (UTC)
It does not seem to support the optional argument of \\, see WP:RDMA#Calculus.—Emil J. 19:30, 1 December 2010 (UTC)
Wow, I didn't know it takes an option! Thanks, I will look into this. Nageh (talk) 19:51, 1 December 2010 (UTC)
\color does not work: only colors the "a", and does not render at all.—Emil J. 17:53, 13 January 2011 (UTC)
Thanks, that's a bug. It is behaving like \textcolor, which it shouldn't. Btw, future bug reports should go to this page. Nageh (talk) 19:14, 13 January 2011 (UTC)
OK, thanks.—Emil J. 19:25, 13 January 2011 (UTC)

I've just been looking at this, seeing how it works. I like it, but find it's too slow for everyday use, at least with my setup (Safari, OSX). But I've just found some TeX it does not understand, at Bivector#Projective geometry. It looks like the problems with the logical operators, \or and \and, and looking at Help:Displaying a formula they seem to be synonyms for \vee and \wedge which are probably more appropriate anyway (wedge is used elsewhere in the article).--JohnBlackburnewordsdeeds 15:03, 7 November 2010 (UTC)

I think you still have the old script versions cached. Try forcing a reload bypassing the cache (Shift-Ctrl-R in Mozilla, don't know for Safari).
Yeah, it's a bit slow on maths heavy pages. The MathJax developers have packed their scripts somehow, I'll need to confer with them to see what can be done to improve the speed. Nageh (talk) 15:28, 7 November 2010 (UTC)
I tried reloading (not normally needed with Safari, it usually picks up changes right away) and it made no difference. I'm including it like so:
importScript('User:Nageh/mathJax.js');
Is there any way to check which version I'm using?--JohnBlackburnewordsdeeds 15:58, 7 November 2010 (UTC)
The problem is that dynamically loaded subscripts are not affected by a page reload. Try opening this page and force a reload there (you may search for textvisiblespace to make sure it's the latest version), then try again. Sorry, no other way for checking the version. Nageh (talk) 16:09, 7 November 2010 (UTC)
Still not working even after trying the above, and we've already done much than should be needed. Meanwhile I've noticed a rendering issue in another article, at Maxwell's equations#Table of 'in vacuum' equations: this rather odd formatting
is meant to be a loop over a double integral, but the loop is offset with MathJax enabled. The TeX is pretty odd though.--JohnBlackburnewordsdeeds 16:41, 7 November 2010 (UTC)
I always have to manually reload the script files when I edit them because the old ones keep staying in the cache otherwise. Maybe it's yet another file cached on your setup, as there is everything rightly displayed on my computer for the one page you gave.
Regarding Maxwell's equations#Table of 'in vacuum' equations, that's actually due to a bug in MediaWiki. See here. Nageh (talk) 17:19, 7 November 2010 (UTC)

=> There has been some interest on using MathJax by using user JavaScript. I have just put an extension up with MathJax support: Extension:MathJax. This extension is of course installed on the server and so all fonts are there as well. The extension does a little bit more than just render math tags by MathJax:

  • it allows you to use the usual TeX math environments ($...$ and $$...$$) for writing math,
  • as MathJax supports the \tag{} construct, you can number formulas in the usual way (i.e., towards the right margin),
  • Extension:MathJax implements automatic numbering of formulas using \label{} and lets you reference them by the usual \eqref{} macro.

If any body is interested in improving this code: please contact me! Dirk Nuyens (talk) 21:18, 15 November 2010 (UTC)

So awesome, but when will Wikipedia install this extension?--Netheril96 (talk) 05:51, 16 November 2010 (UTC)
That is the reason why I started this user extension. For what it's worth, Dirk has inspired me how to support display math as well, which I just implemented. Of course everything else is supported as well. I really don't care whether MathJax is supported officially (so I scrap my code) or not (so I can contribute if necessary), but it is worth having some way or the other to use MathJax. And the MathJax devs are constantly looking to improve the speed. Nageh (talk) 07:51, 16 November 2010 (UTC)
Nice work!! But still Mathjax won't load in my preview. WikEd is active.--Netheril96 (talk) 12:39, 16 November 2010 (UTC)
Ah, now I understand which preview you mean! Your problem is not so easy to solve because MathJax doesn't know that another script has dynamically added new elements into the DOM, so there is no typesetting. The problem is that standard event HTML handling does not support notifications that would be required. I'd have to look into DOM level 2 event handling, but this is rather new and not really cross-browser compatible (thanks to IE). Anyway, this will take some time, so for the moment this doesn't work. Btw, it will also not work with a Wikipedia supported extension unless specific support is added. Nageh (talk) 19:31, 19 November 2010 (UTC)
Maybe it is not too difficult to solve. For example, the ajaxPreview script has an workaround to this problem as explained in this section of it's documentation. Maybe something similar could be made with WikEd. Helder 23:26, 22 November 2010 (UTC)
Now it is probably me who is missing something, but I'm also using WikEd, and MathJax works in preview just fine.—Emil J. 11:06, 23 November 2010 (UTC)
Netheril96 was referring to the wikEd preview below the edit box, not the standard preview. Anyway, it is working now, thanks to Cacycle who was kind enough to implement a callback hook in wikEd, making the solution rather easy. Nageh (talk) 16:39, 2 December 2010 (UTC)
Ah, I see, thanks. Somehow I never noticed this feature.—Emil J. 17:51, 2 December 2010 (UTC)

For those interested, I have updated MathJax to version 1.1. At the same time the frontend was updated and should now be working with wikEd and ajaxPreview. Other changes include suppression of loading on pages without maths and combined script files for faster loading. Mainly due to MathJax 1.1 maths rendering is a lot faster now. Instructions here, feedback there. Thanks, and cheers, Nageh (talk) 23:15, 20 March 2011 (UTC)

Basic LaTeX syntax

This article is more of a reference for those who occasionally forget a particular symbol than a introduction of LaTeX formula writing. I think we should dedicate a section to the basic understanding of LaTeX pertinent to math formulas. --Netheril96 (talk) 09:56, 25 March 2011 (UTC)

Archive 1Archive 2Archive 3

The & symbol not translating correctly in the rendering of matrices using MathJax

I expect that someone has picked this problem up somwhere already, but I wonder whether a solution has been found to the problem of the & symbol not translating correctly in the rendering of matrices in Wikipedia articles using MathJax. From what I have seen since MathJax has been made available to use for mathematical equations in Wikipedia, it works really well, other than for matrices. With matrices it keeps coming up as amp; instead of playing its role as a tab key equivalent to line up the elements inside a matrix. Can someone help on this problem, please? --Chewings72 (talk) 09:56, 12 June 2012 (UTC)

Ampersand & is not the only affected symbol. Less than < and greater than > are also not translating correctly. While one may use \lt and \gt to work around, users who choose "Always render PNG" would see the red error message, "Failed to parse (unknown function\lt): \lt". There is no way to display correctly for both settings. --Quest for Truth (talk) 12:07, 17 June 2012 (UTC)
Yes the version of MathJax in the system is broken. See User:Nageh/mathJax about getting a working one. Dmcq (talk) 12:11, 17 June 2012 (UTC)

By default, the PNG images are rendered black on white, with a transparent background.

By default, the PNG images are rendered black on white, with a transparent background. Why the transparent background? Virtually all math formulas I see on wikipedia look horrible, just because I use a light-on-dark theme. As far as I can tell, there's nothing I can do do change this, short of not using such a theme, or getting this changed in general. See User:Elvey/sandbox.--Elvey (talk) 17:04, 9 July 2012 (UTC)

Wikipedia equations look terrible, why is there no antialiasing?

Wikipedia equations have always looked horrible since they seem to be rendered without any form of antialiasing. Compare WP's equations to those on this web site for example: http://mathworld.wolfram.com/CorrelationCoefficient.html Since the equations are rendered to PNG images, it should be an easy thing to render them with antialiasing enabled. I suppose the backend is using latex. I use latex to write papers all the time and I expect that there are no inherent issues in latex preventing antialiasing. If this is not the right place to raise this issue, then where would be a good place? I think the user experience could be improved greatly if equations looked better. — Preceding unsigned comment added by Jtnystrom (talkcontribs) 03:49, 22 November 2012 (UTC)

(On closer inspection, I've noticed that there may be some form of antialiasing, but it seems to be very poor and doesn't improve the overall appearance much at all.) — Preceding unsigned comment added by Jtnystrom (talkcontribs) 03:53, 22 November 2012 (UTC)

Try switching to the MathJax renderer, which is much better than the standard one. You can switch to this by selecting MathJax in you in the appearance tab of your preferences.--Salix (talk): 07:55, 22 November 2012 (UTC)
That's a dramatic improvement. Thank you! (But it still raises the question why those PNG images have to be of such poor quality, since they are the default.) --Jtnystrom (talk) 08:00, 22 November 2012 (UTC)
The question should perhaps also be raised why MathJax uses a font that appears not to allow anti-aliasing either. This becomes most obvious when the browser is used to zoom out, when the normal browser fonts remain far more readable than the MathJax font. — Quondum 13:04, 22 November 2012 (UTC)
Font rendering is dependent on your browser and your operating system. The Chrome browser has an annoying web font rendering bug since version 18, which may result in quite jagged and overly bold letters. The default TeX font used by MathJax certainly does support anti-aliasing, but it is also not the best-designed font in this regard. Unfortunately, it is the only web font supported by MathJax. If you want a nicer appearance try locally installing STIX fonts. Nageh (talk) 16:25, 22 November 2012 (UTC)
Cool, have done local instalation of STIX, seems improved: anti-aliasing now seems on par with other fonts. — Quondum 05:47, 23 November 2012 (UTC)
I’m surprised the default rendering still uses PNG images rather than SVG. Isn’t this sort of thing perfect for SVG? —Frungi (talk) 03:06, 26 November 2012 (UTC)
I suspect the reasons for the low quality of the default equations go deeper than just the image format. For example, if I render latex to PDF on my computer, and then take a screenshot of the resulting equations, and save it as PNG, I'm pretty sure I'd get higher quality than what is there currently, even with PNGs of equal pixel size. Probably, a low DPI resolution is assumed at some intermediate stage in the rendering chain that is being used. That's not to dispute the potential usefulness of SVG though, but I suspect (I'm not sure) it might be hard to render latex into that format. — Preceding unsigned comment added by Jtnystrom (talkcontribs) 03:36, 26 November 2012 (UTC)
Experimental MW code to render into SVG exists, but I assume the reason why PNG has stuck was out of concerns for SVG browser support. While that may not be an actual issue anymore I would guess that no WMF developer could be bothered to implement SVG rendering now that there exists MathJax (which supports SVG output as well). @Frungi: SVG is certainly better than PNG rendering, but it is not perfect because it does not support hinting. Nageh (talk) 11:26, 26 November 2012 (UTC)
I guess its quite historical as well. The use of Texvc goes back to at least 2003 at the time no browsers supported SVG. Rewriting the maths backend is a major undertaking, and until MathJax no software was mature enough to replace the code.--Salix (talk): 11:54, 26 November 2012 (UTC)

something went wrong

Hello, I could not understand what went wrong here. Failed to parse (unknown function "\begin{align}"): {\displaystyle \begin{align} \frac{2+\sqrt{2}}{\sqrt{2}+1} & = \frac{\sqrt{2}\left (\sqrt{2}+1\right )}{\sqrt{2}+1} \\ & = \frac{\sqrt{2}\cancel{\left (\sqrt{2}+1\right )\}}{\cancel{\sqrt{2}+1}} \\ & = \sqrt{2} \\ \end{align}}

You had a \} rather than a } this works

--Salix (talk): 05:37, 5 December 2012 (UTC)

Stretching matrices

Is there a way to make matrices with lots of fractions like this look better?

In LaTeX, I usually just type \renewcommand\arraystretch{1.2}, and that fixes it.. but that doesn't seem to work here. Any other ideas? Thanks, Mark M (talk) 08:41, 25 December 2012 (UTC)

Like this?:--JohnBlackburnewordsdeeds 09:43, 25 December 2012 (UTC)

Ah, yes, that would work too, thanks. Do I take it that we don't have a way to stretch the matrices, if so desired? Mark M (talk) 09:55, 26 December 2012 (UTC)
The original matrix does look a lot better when using MathJax renderer. See Help:Displaying a formula#MathJax.--Salix (talk): 10:32, 26 December 2012 (UTC)

Use the option parameter of the LaTeX newline command to add some extra line spacing, e.g., \\[3pt]. Nageh (talk) 13:10, 26 December 2012 (UTC)

Great, that works too. Thanks a lot! Mark M (talk) 18:02, 28 December 2012 (UTC)
Removed spurious whitespace. Nageh (talk) 19:54, 29 December 2012 (UTC)

Btw, just in case you prefer smaller fractions you can use \tfrac instead:

Nageh (talk) 19:54, 29 December 2012 (UTC)

Rendering of unicode

I've cut the following from the rendering section which seems a little off topic for a help page being more of an extensive test/bug report. Preserved here for posterity.--Salix (talk): 22:38, 7 March 2013 (UTC)

This does not work for special characters, they are ignored unless the whole <math> expression is rendered in HTML:

  • <math>\begin{align} \text{ AaȦȧÄäÁáÀàĀāÂâǍǎĂăÃãÅåẠạ } & \text{ ÆæǼǽ BbḂḃḄḅḆḇ CcĊċĆćĈĉČč Çç DdḊḋĎďḎḏḌḍ Ḑḑ } \\ \text{ EeĖėËëÉéÈèĒēÊêĚěĔĕẼẽẸẹ Ȩȩ } & \text{ FfḞḟ GgĠġḠḡĜĝǦǧĞğ HhḢḣḦḧĤĥȞȟḤḥẖḪḫ Ḩḩ } \\ \text{ IıİiÏïÍíÌìĪīÎîǏǐĬĭĨĩỊị } & \text{ JjĴĵ KkḰḱǨǩḲḳḴḵ Ķķ LlĹ弾ḶḷḺḻ ĻļŁł } \\ & \text{ MmṀṁḾḿṂṃ NnṄṅŃńŇňÑñṆṇṈṉ Ņņ} \\ \text{ OoȮȯÖöÓóÒòŌōÔôǑǒŎŏÕõỌọ } & \text{ ØøǾǿ Œœ PpṖṗṔṕ Qq RrṘṙŔŕŘřṚṛṞṟ Ŗŗ } \\ & \text{ SsṠṡŚśŜŝŠšṢṣ Şş ß TtṪṫẗŤťṬṭṮṯȚț Ţţ } \\ \text{ UuÜüÚúŰűÙùŪūÛûǓǔŬŭŨũŮůỤụ } & \text{ VvṼṽṾṿ WwẆẇẄẅẂẃẀẁŴŵẈẉẘ XxẊẋẌẍ } \\ \text{ YyẎẏŸÿÝýỲỳȲȳŶŷỸỹẙỴỵ } & \text{ ZzŻżŹźẐẑŽžẒẓẔẕ ·×÷ } \\ \end{align}</math>

gives:

See bug 798 for details. Nevertheless, using \mbox instead of \text, more characters may have been supported in the past, but today both operators are supporting the same characters set. For example,

  • <math>\begin{align} \mbox{ AaȦȧÄäÁáÀàĀāÂâǍǎĂăÃãÅåẠạ } & \text{ ÆæǼǽ BbḂḃḄḅḆḇ CcĊċĆćĈĉČč Çç DdḊḋĎďḎḏḌḍ Ḑḑ } \\ \mbox{ EeĖėËëÉéÈèĒēÊêĚěĔĕẼẽẸẹ Ȩȩ } & \text{ FfḞḟ GgĠġḠḡĜĝǦǧĞğ HhḢḣḦḧĤĥȞȟḤḥẖḪḫ Ḩḩ } \\ \mbox{ IıİiÏïÍíÌìĪīÎîǏǐĬĭĨĩỊị } & \text{ JjĴĵ KkḰḱǨǩḲḳḴḵ Ķķ LlĹ弾ḶḷḺḻ ĻļŁł } \\ & \text{ MmṀṁḾḿṂṃ NnṄṅŃńŇňÑñṆṇṈṉ Ņņ } \\ \mbox{ OoȮȯÖöÓóÒòŌōÔôǑǒŎŏÕõỌọ } & \text{ ØøǾǿ Œœ PpṖṗṔṕ Qq RrṘṙŔŕŘřṚṛṞṟ Ŗŗ } \\ & \text{ SsṠṡŚśŜŝŠšṢṣ Şş ß TtṪṫẗŤťṬṭṮṯȚț Ţţ } \\ \mbox{ UuÜüÚúŰűÙùŪūÛûǓǔŬŭŨũŮůỤụ } & \text{ VvṼṽṾṿ WwẆẇẄẅẂẃẀẁŴŵẈẉẘ XxẊẋẌẍ } \\ \text{ YyẎẏŸÿÝýỲỳȲȳŶŷỸỹẙỴỵ } & \text{ ZzŻżŹźẐẑŽžẒẓẔẕ ·×÷ } \\ \end{align}</math>

gives:

But some Latin letters are not supported, including those that include multiple diacritics (e.g. with Latin letters used in Vietnamese) or that cannot be precomposed into a single character (such as the uppercase Latin letter W with ring, even though the lowercase letter is supported as it is encoded as a precomposed character), or that use other diacritics (like the ogonek or the double grave accent, used in Central European languages like Polish, or the horn attached above some vowels in Vietnamese), or other modified letter forms (used in IPA notations, or African languages, or in medieval texts), some digram ligatures (like IJ in Dutch), or Latin letters borrowed from Greek, or small capitals, as well as superscripts abd subscript letters. For example \text{ð} or \mbox{ð}, and \mbox{þ} or \mbox{þ} (used in Icelandic) will give an error:

  • ,
  • ,

Can I make a representation of four characters in a box?

I'm trying to build a template that will allow a user to enter four hexadecimal digits and will output a representation of those digits as if they were a unicode character that failed to render due to lack of font support. I'm thinking that using <math>...</math> tags would be the easiest way for me to do this, but am open to doing it with CSS if possible. The problem I was having with using just CSS is not knowing how to stack the sets of numbers on top of each other. User:Technical 13   ( C • M • Click to learn how to view this signature as intended ) 18:20, 28 March 2013 (UTC)

The main problem with <math> in English Wikipedia is its persistent usage for miscellaneous formatting which has nothing to do with formulae. It (in MathJax mode) causes a browser to waste a lot of resources. Drop this evil thought – use HTML. Incnis Mrsi (talk) 20:12, 28 March 2013 (UTC)
Can you make it smaller to more accurately represent the little "failed unicode character" boxes. I have a working sandbox for the project at: User:Technical_13/Template:UniBox which gives User:Technical 13/Template:UniBox. However, this is still too big... How can I get it smaller? User:Technical 13   ( C • M • Click to learn how to view this signature as intended ) 22:37, 28 March 2013 (UTC)

The symbol # not translating correctly in GmailTex and codecogs LaTeX Equation editor

\# produces a dollar sign '$' instead of a pound sign. Seems to be an "off by 1" error. Suggested work-around: use \pound for this symbol since it might cause problems when embedded in html which treats the pound symbol as as special character as well! Alancarre (talk) 15:44, 20 April 2013 (UTC)

Png rendering of math mode

I'm trying to add examples in the article String_operations. In MathJax, everything rendered file. However, when I tried Png rendering, I got lexing errors at double quotes in math mode (e.g. Failed to parse (syntax error): {\displaystyle "Hello," \cdot "world" = "Hello,world"} ). After tediously replacing them all by ugly langle/rangle symbols (e.g. ), I got lexing errors at ß (HTML: szlig ß) in math mode (e.g. Failed to parse (syntax error): {\displaystyle \langle Straße \rangle} ). When looking for advice on these issues, I found that in section Help:Displaying_a_formula#Pros_of_TeX, the link at the end of item 2 ("It is more a reason to help improve the situation.") leads to a nonexisting section "Bug_reports". Therefor, I try to find help on this talk page. Jochen Burghardt (talk) 19:06, 25 May 2013 (UTC)

Section arrows

need examples. Im with difficulties trying to display an equation using \downarrow linking to another under the first one.(Thepalerider2012 (talk) 03:45, 31 May 2013 (UTC))