# Help talk:Displaying a formula

the Wikipedia Help Project
This page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the help menu or help directory. Or ask for help on your talk page and a volunteer will visit you there.
???  This page does not require a rating on the project's quality scale.
???  This page has not yet received a rating on the project's importance scale.

## 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 $a\dddot b$ gives Failed to parse (unknown function "\dddot"): 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 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 bug 45816. 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)

## 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.
 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 (talkcontribs) 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)

## mathop troubles

I'm trying to render the following formula,

$\mathop{\int\ldots\int}^{\rm all}_{\rm phases} P \, dp_1 \ldots dq_n = 1,$

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)

## 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)

## \mathrm, \mathsf don't always show

Hello

1. $\mathrm{B}$
2. $\frac{B}{C}$
3. $\frac{\mathrm{B}}{C}$
4. $\mathsf{B}$

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 [1], almost like $\begin{Bmatrix} q , p \\ r \end{Bmatrix}$, 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: $\left\{\begin{array}{l}q,p\\r\end{array}\right\}$ $\left\{\begin{array}{l}q,p\\r\end{array}\right\}$. I’m not sure I understand how the second one is supposed to look like: $\{p,\binom{a}{b}\}$? 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 [[2]] Tom Ruen (talk) 17:19, 25 October 2013 (UTC)
Ah, I see. The example in the book can be produced with $\left\{3,{3\atop4}\right\}$ $\left\{3,{3\atop4}\right\}$, you can use an array as above if justification is needed: $\left\{p,\begin{array}{l}q,r\\s\end{array}\right\}$ $\left\{p,\begin{array}{l}q,r\\s\end{array}\right\}$.—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?

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 ${\scriptstyle\text{foo bar}}$ which gives ${\scriptstyle\text{foo bar}}$. 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)

## MathJax as header

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)