「MathML」の版間の差分
提供: MacWiki
(→MathMLソース例) |
|||
行42: | 行42: | ||
*\sum_{i=1}^n n=\frac{n(n+1)}{2} | *\sum_{i=1}^n n=\frac{n(n+1)}{2} | ||
− | + | <pre> | |
− | + | <?xml version="1.0" encoding="utf-8"?> | |
− | + | <!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 mmlns "http://www.w3.org/1998/Math/MathML">]> | |
− | + | <math display='block' xmlns='&mmlns;'> | |
− | + | <munderover><mo>∑</mo> | |
− | + | <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover> | |
− | + | <mi>n</mi><mo>=</mo><mfrac><mrow><mo>(</mo><mi>n</mi><mo>+</mo> | |
+ | <mn>1</mn><mo>)</mo><mi>n</mi></mrow><mrow><mn>2</mn></mrow></mfrac></math> | ||
+ | </pre> | ||
== Wiki内の関連ページ == | == Wiki内の関連ページ == |
2007年4月28日 (土) 00:53時点における版
MathML とは?
MathML は数学表記用のマークアップ記述言語仕様です。詳しくは Wikipedia:Mathematical_Markup_Language などを参照して下さい。
閲覧方法
Mac OS X 環境では、下記のツールをインストールすれば、MathML コンテンツを見ることができます。
- Mozilla系のWebブラウザ
- Firefox 1.5 (2005.11.30) では、MathML 関係がほぼ正常になりました。
- Caminoは1.0rc1からMathMLをサポートしています。
- 指定された数学記号用フォント(MathematicaFonts)
- 他の閲覧方法には、W3Cが配布しているWebエディタ/ブラウザAmayaがあります。こちらは数学記号用フォントの追加インストールは不要です。ただし、付属のフォントでは漢字が表示できません。
説明・紹介の情報は
- http://www.mozilla.org/projects/mathml/fonts/
- https://bugzilla.mozilla.org/show_bug.cgi?id=134849#c10
- http://www.mathmlcentral.com/
- http://www.w3c.org/math
コンテンツ作成
- 英語 LaTeX で書かれたソースを変換し、MathML を利用した xml ファイルを出力作成できます。
- mzlatex というスクリプトを動かすそうです。日本語対応はあまり簡単ではなさそうです。
- これは tex4ht を利用した仕組みのようです。
- mzlatex というスクリプトを動かすそうです。日本語対応はあまり簡単ではなさそうです。
http://www.math.sci.hokudai.ac.jp/~nami/MathML/JTeX2MOZ/
- Ruby ライブラリ(TeXの数式表記を与えてMathMLに変換)
http://www.hinet.mydns.jp/~hiraku/hiki/mathml.rb.html
- 他にも、MathematicaがMathMLを利用した xml ファイルを出力できるようです。
- 上記のamayaには数式入力機能があります。
MathMLソース例
- \sum_{i=1}^n n=\frac{n(n+1)}{2}
<?xml version="1.0" encoding="utf-8"?> <!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 mmlns "http://www.w3.org/1998/Math/MathML">]> <math display='block' xmlns='&mmlns;'> <munderover><mo>∑</mo> <mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover> <mi>n</mi><mo>=</mo><mfrac><mrow><mo>(</mo><mi>n</mi><mo>+</mo> <mn>1</mn><mo>)</mo><mi>n</mi></mrow><mrow><mn>2</mn></mrow></mfrac></math>