Authoring Web Pages with Mathml for Cross-Browser Display
Total Page:16
File Type:pdf, Size:1020Kb
Authoring Web Pages with MathML for Cross-browser Display Presented by: Bob Mathews Design Science, Inc. AMATYC 2005 2 3 4 5 view: transformed source | original source same page viewed in Firefox 1.5 XHTML + MathML Sample Page This page demonstrates the new MathPlayer 2.0 support for XHTML + MathML pages. It renders properly in Internet Explorer 6 with MathPlayer 2.0, Netscape 7+, Mozilla 1.4+, and Firefox 1.0+. Here is a sample equation: 1 lim x→∞ x You can use this as a template for creating your own interoperable XHTML + MathML pages. <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11- f.dtd" [ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ]> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XHTML + MathML Sample Page</title> </head> <body> <h1>XHTML + MathML Sample Page</h1> <p>This page demonstrates the new MathPlayer 2.0 support for XHTML + MathML pages. It renders properly in Internet Explorer 6 with MathPlayer 2.0, Netscape 7+, and Mozilla 1.4+.</p> <p>Here is a sample equation:</p> <math display="block" xmlns="&mathml;"> <mi>g</mi> <mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow> <mo>=</mo> <mrow> <mfrac> <mi>α</mi> <mi>x</mi> </mfrac> <mo>+</mo> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> </math> <p>You can use this as a template for creating your own interoperable XHTML + MathML pages.</p> </body> </html> <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:m="http://www.w3.org/1998/Math/MathML"> <head> <OBJECT ID="mathplayer" CLASSID="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"> <!--comment required to prevent this becoming an empty tag--> </OBJECT> <?IMPORT NAMESPACE="m" IMPLEMENTATION="#mathplayer" ?> <title>XHTML + MathML Sample Page</title> When MathPlayer detects the proper DOCTYPE declaration, it automatically </head> adds the object tag, processing instruction, and namespace prefix. <body> It also changes the MIME type to XHTML + <h1>XHTML + MathML Sample Page</h1> XML. <p>This page demonstrates the new MathPlayer 2.0 support for XHTML + MathML pages. It renders properly in Internet Explorer 6 with MathPlayer 2.0, Netscape 7+, and Mozilla 1.4+.</p> <p>Here is a sample equation:</p> <m:math display="block" xmlns="&mathml;"> <m:mi>g</m:mi> <m:mrow><m:mo>(</m:mo><m:mi>x</m:mi><m:mo>)</m:mo></m:mrow> <m:mo>=</m:mo> <m:mrow> <m:mfrac> <m:mi>α</m:mi> <m:mi>x</m:mi> </m:mfrac> <m:mo>+</m:mo> <m:mfrac> <m:mn>1</m:mn> <m:mn>2</m:mn> </m:mfrac> </m:mrow> </m:math> <p>You can use this as a template for creating your own interoperable XHTML + MathML pages.</p> </body> </html> view: transformed source | original source XHTML + MathML Sample Page This page demonstrates the new MathPlayer 2.0 support for XHTML + MathML pages. It renders properly in Internet Explorer 6 with MathPlayer 2.0, Netscape 7+, Mozilla 1.4+, and Firefox 1.0+. Here is a sample equation: 1 lim x x → ∞ You can use this as a template for creating your own interoperable XHTML + MathML pages. <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> </html>.