Main Page: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
No edit summary
No edit summary
 
(376 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:eqn}}
This is a preview for the new '''MathML rendering mode''' (with SVG fallback), which is availble in production for registered users.
Part of the [[troff]] suite of [[Unix]] document layout tools, '''eqn''' is a [[preprocessor]] that formats equations for printing.  A similar program, '''neqn''', accepted the same input as eqn, but produced output tuned to look better in [[nroff]]. The eqn program was created in 1974 by [[Brian Kernighan]] and [[Lorinda Cherry]].


The input language used by eqn allows the user to write mathematical expressions in much the same way as they would be spoken aloud.  The language is defined by a [[context free grammar]], together with [[operator precedence]] and [[operator associativity]] rules. The eqn language is similar to the mathematical component of [[TeX]], which appeared several years later, but is simpler and less complete.
If you would like use the '''MathML''' rendering mode, you need a wikipedia user account that can be registered here [[https://en.wikipedia.org/wiki/Special:UserLogin/signup]]
* Only registered users will be able to execute this rendering mode.
* Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.


An independent compatible implementation of the eqn preprocessor has been developed by [[GNU]] as part of [[groff (software)|groff]], the GNU version of troff.  The GNU implementation extends the original language by adding a number of new [[keyword (computer programming)|keywords]] such as ''smallover'' and ''accent''. [[mandoc]], a specialised compiler for UNIX [[man pages]], also contains a standalone eqn parser/formatter.
Registered users will be able to choose between the following three rendering modes:


== Syntax examples ==
'''MathML'''
:<math forcemathmode="mathml">E=mc^2</math>


Here is how some examples<ref>http://meta.wikimedia.org/wiki/Help:Formula</ref> would be written in eqn (with equivalents in TeX for comparison):
<!--'''PNG'''  (currently default in production)
{| class="wikitable"
:<math forcemathmode="png">E=mc^2</math>
|-
!TeX
!eqn
!formula
|-
|{{code|lang=latex|$ a^2 $}}
|<tt>a sup 2</tt>
|<math>a^2</math>
|-
|{{code|lang=latex|1=$ \sum_{k=1}^N k^2 $}}
|<tt>sum from { k = 1 } to N { k sup 2 }</tt>
|<math>\sum_{k=1}^N k^2</math>
|-
|<source lang="latex" enclose="none">$ x = {-b \pm \sqrt{b^2 - 4ac} \over 2a} $</source>
|<tt>x={-b +- sqrt{b sup 2 – 4ac}} over 2a</tt>
|<math>x= {-b \pm \sqrt{b^2 - 4ac} \over 2a}</math>
|}


Spaces are important in eqn; [[lexical analysis#Token|tokens]] are delimited by [[whitespace character]]s, tildes ~, braces {} and double-quotes "" only. Thus <tt>f(pi&nbsp;r&nbsp;sup&nbsp;2)<tt> results in <math>\scriptstyle{f(pi r^{2)}}</math> whereas <tt>f(&nbsp;pi&nbsp;r&nbsp;sup&nbsp;2&nbsp;)<tt> is needed to give the intended <math>\scriptstyle{f(\pi r^2)}</math>.
'''source'''
:<math forcemathmode="source">E=mc^2</math> -->


== See also ==
<span style="color: red">Follow this [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering link] to change your Math rendering settings.</span> You can also add a [https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-rendering-skin Custom CSS] to force the MathML/SVG rendering or select different font families. See [https://www.mediawiki.org/wiki/Extension:Math#CSS_for_the_MathML_with_SVG_fallback_mode these examples].
*[[troff]]


==Notes==
==Demos==
<references/>


== References ==
Here are some [https://commons.wikimedia.org/w/index.php?title=Special:ListFiles/Frederic.wang demos]:
*{{cite journal|year=1975|title=A System for Typesetting Mathematics|journal=[[Communications of the ACM]]|issue=18|pages=151–157 |first1=Brian W. |last1=Kernighan |first2=Lorinda L. |last2=Cherry}}


== External links ==
*[http://www.kohala.com/start/troff/v7man/eqn/eqn2e.ps Typesetting Mathematics, User's Guide (Second Edition)]
*[http://www.uwm.edu/cgi-bin/IMT/wwwman?topic=neqn(1)&msection= UNIX man page for neqn(1)]


[[Category:Troff|eqn]]
* accessibility:
** Safari + VoiceOver: [https://commons.wikimedia.org/wiki/File:VoiceOver-Mac-Safari.ogv video only], [[File:Voiceover-mathml-example-1.wav|thumb|Voiceover-mathml-example-1]], [[File:Voiceover-mathml-example-2.wav|thumb|Voiceover-mathml-example-2]], [[File:Voiceover-mathml-example-3.wav|thumb|Voiceover-mathml-example-3]], [[File:Voiceover-mathml-example-4.wav|thumb|Voiceover-mathml-example-4]], [[File:Voiceover-mathml-example-5.wav|thumb|Voiceover-mathml-example-5]], [[File:Voiceover-mathml-example-6.wav|thumb|Voiceover-mathml-example-6]], [[File:Voiceover-mathml-example-7.wav|thumb|Voiceover-mathml-example-7]]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Audio-Windows7-InternetExplorer.ogg Internet Explorer + MathPlayer (audio)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-SynchronizedHighlighting-WIndows7-InternetExplorer.png Internet Explorer + MathPlayer (synchronized highlighting)]
** [https://commons.wikimedia.org/wiki/File:MathPlayer-Braille-Windows7-InternetExplorer.png Internet Explorer + MathPlayer (braille)]
** NVDA+MathPlayer: [[File:Nvda-mathml-example-1.wav|thumb|Nvda-mathml-example-1]], [[File:Nvda-mathml-example-2.wav|thumb|Nvda-mathml-example-2]], [[File:Nvda-mathml-example-3.wav|thumb|Nvda-mathml-example-3]], [[File:Nvda-mathml-example-4.wav|thumb|Nvda-mathml-example-4]], [[File:Nvda-mathml-example-5.wav|thumb|Nvda-mathml-example-5]], [[File:Nvda-mathml-example-6.wav|thumb|Nvda-mathml-example-6]], [[File:Nvda-mathml-example-7.wav|thumb|Nvda-mathml-example-7]].
** Orca: There is ongoing work, but no support at all at the moment [[File:Orca-mathml-example-1.wav|thumb|Orca-mathml-example-1]], [[File:Orca-mathml-example-2.wav|thumb|Orca-mathml-example-2]], [[File:Orca-mathml-example-3.wav|thumb|Orca-mathml-example-3]], [[File:Orca-mathml-example-4.wav|thumb|Orca-mathml-example-4]], [[File:Orca-mathml-example-5.wav|thumb|Orca-mathml-example-5]], [[File:Orca-mathml-example-6.wav|thumb|Orca-mathml-example-6]], [[File:Orca-mathml-example-7.wav|thumb|Orca-mathml-example-7]].
** From our testing, ChromeVox and JAWS are not able to read the formulas generated by the MathML mode.


==Test pages ==


{{Unix-stub}}
To test the '''MathML''', '''PNG''', and '''source''' rendering modes, please go to one of the following test pages:
*[[Displaystyle]]
*[[MathAxisAlignment]]
*[[Styling]]
*[[Linebreaking]]
*[[Unique Ids]]
*[[Help:Formula]]
 
*[[Inputtypes|Inputtypes (private Wikis only)]]
*[[Url2Image|Url2Image (private Wikis only)]]
==Bug reporting==
If you find any bugs, please report them at [https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=Math&version=master&short_desc=Math-preview%20rendering%20problem Bugzilla], or write an email to math_bugs (at) ckurs (dot) de .

Latest revision as of 22:52, 15 September 2019

This is a preview for the new MathML rendering mode (with SVG fallback), which is availble in production for registered users.

If you would like use the MathML rendering mode, you need a wikipedia user account that can be registered here [[1]]

  • Only registered users will be able to execute this rendering mode.
  • Note: you need not enter a email address (nor any other private information). Please do not use a password that you use elsewhere.

Registered users will be able to choose between the following three rendering modes:

MathML

E=mc2


Follow this link to change your Math rendering settings. You can also add a Custom CSS to force the MathML/SVG rendering or select different font families. See these examples.

Demos

Here are some demos:


Test pages

To test the MathML, PNG, and source rendering modes, please go to one of the following test pages:

Bug reporting

If you find any bugs, please report them at Bugzilla, or write an email to math_bugs (at) ckurs (dot) de .