Help talk:Displaying a formula

From Wikipedia, the free encyclopedia

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 Nov 2006 (was unsigned, undated)

Contents

[edit] 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)

[edit] 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 > — 146.142.66.132 13 Mar 2007 (was unsigned, undated)

[edit] Bugs in relation to TeX <math>

[edit] 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:
103 or 1,000.
but unfortunately, the actual result is:
103 or 1,000.
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.

[edit] 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:
[[103]] or 1,000.
which is in html:
[[<span class="texhtml">10<sup>3</sup></span>]] or 1,000.
thus the brackets outside the math tags simply remain brackets, as if these were written as <nowiki>[[</nowiki>...<nowiki>]]</nowiki>
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>

[edit] 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 10<sup>3</sup> 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:
<span class="texhtml">[[1 E3|10<sup>3</sup>]]</span> 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 Apr 2007 21:45-6 Apr 2007 10:23-21:37 (UTC)

[edit] Excellent help

Thanks to the people who produced this article - much appreciated.

Daryl Williams

[edit] 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)

[edit] 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)

[edit] 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)

[edit] 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)

[edit] Semantics with the aligning in normal flow

The article reads:

an inline expression like \int_{-N}^{N} e^x\, dx = 2 \sinh N 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)

[edit] Add useful links

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)

[edit] 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 \,\!\theta and \,\!\mathrm{\theta}
(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 \,\!\mathrm{\theta} and Failed to parse (lexing error): \,\!\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 \,\!t_\mathrm{max} and \,\!t_\mbox{max}
(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))

[edit] Italic variables

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

compare \,\!\Gamma and \,\!\mathrm{\Gamma}
(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; \,\!\mathit{\Gamma}. SpinningSpark 18:52, 26 April 2008 (UTC)

[edit] 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)

[edit] Numbered Equations?

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

[edit] 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)

[edit] 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)

[edit] Hence

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

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

[edit] Math tags as a link

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)

[edit] 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)

[edit] 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;
\tfrac{355}{113} as opposed to \frac{355}{113} 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)