<< Chapter < Page Chapter >> Page >

3: Visit www.w3.org/Math/testsuite . It gives you vast array of MathML examples to work with. The website provides codes of hundreds of examples. At certain stage of this course, you may like to copy and paste the codes to your desktop to confirm results. Besides, it is a repository of about 900 entity references used to display symbols and implement mathematical ideas. On the testsuite web page, click the link named "testsuite.zip" to download the same in the desktop folder created for the course. Store the zip file for use in future.

The official documentation of mathML is available at W3C web site www.w3.org/TR/MathML2 .

Creating a mathml enabled document

Here, we present the steps to generate MathML codes in MS Word desktop editor. The idea right now is not to explain MathML codes, but to show the way to create a proper document with MathML codes and implement the same in the MathML enabled browser on your desktop.

As the codes need to be free from formatting details and other encoding, the file created is saved as plain text with Unicode(UTF-8) specification. As such, the file should be saved as plain text file with extension “xml” in order to view the implementation in the browser.

Once the document has been created, the same can be tested in MathML supported browser like Mozilla’s Firefox. When MathML codes display the output to the satisfaction, then block of codes starting with<m:math>tag and ending with</m:math>tag can be copied and pasted in the XML document for publication purposes or be saved for future use. Now, proceed with the steps given here to create a mathML enabled “xml” document.

1: Open MS Word. Open a new document. Write exactly or copy/paste the following markup lines in the new document :

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd" > <document xmlns:m="http://www.w3.org/1998/Math/MathML"> </document>

2: Write the next top most “xml” element of the document between “document” tags.

<content> </content>

Note that “document” and “content” are the only XML elements i.e. the pair of tags, used for practicing MathML code. All other code lines, as detailed below, shall be MathML codes.

3: Write “math” MathML element between “content tags” with an example coding to display mathematical construct : v = AB t .

4: For the time being, write exactly or copy / paste the code lines as given below and place them between “content” tags :

Displaying mathematical content

<content> <m:math display="block"> <m:mrow> <m:mi mathvariant="bold">v</m:mi> <m:mo>=</m:mo> <m:mfrac> <m:mi mathvariant="bold">AB</m:mi> <m:mi>t</m:mi> </m:mfrac> </m:mrow> </m:math> </content>

5: Click File from Word’s top menu and select “save as”. A dialog box appears. Look at the "Save as type" option. Select “Plain Text” option from the drop down menu. Give a name to the file such as “test.xml”. Ensure that you have provided “xml” extension. Click “Save” button available at the right hand corner (also visible in the figure below).

Questions & Answers

profit maximize for monopolistically?
Usman Reply
what kind of demand curve under monopoly?
Mik Reply
what is the difference between inflation and scarcity ?
Abdu Reply
What stops oligopolists from acting together as a monopolist and earning the highest possible level of profits?
Mik
why economics is difficult for 2nd school students.
Siraj Reply
what does mean opportunity cost?
Aster Reply
what is poetive effect of population growth
Solomon Reply
what is inflation
Nasir Reply
what is demand
Eleni
what is economics
IMLAN Reply
economics theory describes individual behavior as the result of a process of optimization under constraints the objective to be reached being determined by
Kalkidan
Economics is a branch of social science that deal with How to wise use of resource ,s
Kassie
need
WARKISA
Economic Needs: In economics, needs are goods or services that are necessary for maintaining a certain standard of living. This includes things like healthcare, education, and transportation.
Kalkidan
What is demand and supply
EMPEROR Reply
deman means?
Alex
what is supply?
Alex
ex play supply?
Alex
Money market is a branch or segment of financial market where short-term debt instruments are traded upon. The instruments in this market includes Treasury bills, Bonds, Commercial Papers, Call money among other.
murana Reply
good
Kayode
what is money market
umar Reply
Examine the distinction between theory of comparative cost Advantage and theory of factor proportion
Fatima Reply
What is inflation
Bright Reply
a general and ongoing rise in the level of prices in an economy
AI-Robot
What are the factors that affect demand for a commodity
Florence Reply
price
Kenu
differentiate between demand and supply giving examples
Lambiv Reply
differentiated between demand and supply using examples
Lambiv
what is labour ?
Lambiv
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, A primer in mathml. OpenStax CNX. Apr 19, 2006 Download for free at http://cnx.org/content/col10345/1.16
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'A primer in mathml' conversation and receive update notifications?

Ask