MathML: 두 판 사이의 차이

내용 삭제됨 내용 추가됨
편집 요약 없음
206번째 줄:
</apply>
</source>
 
==MathML을 HTML/XHTML 파일에 포함시키기==
 
MathML은 XML이므로 다른 XML 파일에 삽입될 수 있다. Firefox 3+나 Opera 9.6+(불완전하게 지원) 같은 최신 브라우저들은 XHTML에 포함된 표현 MathML을 화면에 표시할 수 있다.
 
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Example of MathML embedded in an XHTML file</title>
<meta name="description" content="Example of MathML embedded in an XHTML file"/>
</head>
<body>
<h1>Example of MathML embedded in an XHTML file</h1>
<p>
The area of a circle is
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>&#x03C0;<!-- π --></mi>
<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
<msup>
<mi>r</mi>
<mn>2</mn>
</msup>
</math>.
</p>
</body>
</html>
 
</source>
:[[File:MathMLxhtml.png|nofloat|435px|]]
:<small>A rending of the formula for a circle in mathml+xhtml using firefox 22 on Mac OSX</small>
{{clear}}
 
인라인 MathML 또한 [[HTML5]] 파일에서 지원된다. [[WebKit]] ([[Safari (web browser)|Safari]], [[Google Chrome|Chrome]]), [[Gecko (layout engine)|Gecko]] ([[Firefox]]). xhtml에서처럼 네임스페이스를 지정할 필요가 없다.
 
<source lang="html5">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of MathML embedded in an HTML5 file</title>
</head>
<body>
<h1>Example of MathML embedded in an HTML5 file</h1>
<p>
The area of a circle is
<math>
<mi>&pi;<!-- &#x03C0; π --></mi>
<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
<msup>
<mi>r</mi>
<mn>2</mn>
</msup>
</math>.
</p>
</body>
</html>
</source>
 
 
== 지원 소프트웨어 ==