From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/mathml/element/math/index.html | 163 ++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 files/ja/web/mathml/element/math/index.html (limited to 'files/ja/web/mathml/element/math/index.html') diff --git a/files/ja/web/mathml/element/math/index.html b/files/ja/web/mathml/element/math/index.html new file mode 100644 index 0000000000..cdd20dbf90 --- /dev/null +++ b/files/ja/web/mathml/element/math/index.html @@ -0,0 +1,163 @@ +--- +title: +slug: Web/MathML/Element/math +tags: + - MathML + - MathML Reference + - 'MathML:Element' + - 'MathML:要素' +translation_of: Web/MathML/Element/math +--- +
{{MathMLRef}}
+ +

MathML における最上位の要素は <math> です。有効な MathML のインスタンスはすべて <math> タグに囲まれています。加えて、 <math> 要素を入れ子状に配置してはなりませんが、中にその他の子要素をいくつでも持つことができます。

+ +

属性

+ +

以下に示す属性に加え、 <math> 要素は {{ MathMLElement("mstyle") }} 要素のすべての属性を受け入れます。

+ +
+
class, id, style
+
スタイルシートと一緒に使用するために提供されます。
+
dir
+
数式全体の書字方向。値として ltr (左書き) と rtl (右書き) が指定可能です。
+
href
+
指定された URI へのハイパーリンクの設定に使用されます。
+
mathbackground
+
背景色。 #rgb, #rrggbb, HTML 色名が使用できます。
+
mathcolor
+
文字色。 #rgb, #rrggbb, HTML 色名が使用できます。
+
display
+
この列挙属性は、囲まれた MathML マークアップをレンダリングする方法を指定します。これは、次のいずれかの値を持つことができます。 +
    +
  • block は、この要素が現在のテキストの区間の外に、テキストの意味を変えることなく任意の場所に配置することができるブロックとして表示されることを意味します。
  • +
  • inline は、この要素が現在のテキストの区間の内側に表示され、そのテキストの意味を変えることなくその区間の外に移動することができないことを意味します。
  • +
+ +

存在しない場合、既定値は inline です。

+
+
mode {{deprecated_inline}}
+
非推奨であり、 display 属性で置き換えられました。
+ 取りうる値は display (これは display="block" と同じ効果を持ちます) および inline です。
+
overflow
+
許可された幅に収まらないほど長い場合に、式がどのように動作するかを指定します。
+ 取りうる値は linebreak (既定値), scroll, elide, truncate, scale です。
+
+ +

+ +

Theorem of Pythagoras

+ +

HTML5 表記

+ +
<!DOCTYPE html>
+<html>
+  <head>
+    <title>MathML in HTML5</title>
+  </head>
+  <body>
+
+  <math>
+    <mrow>
+      <mrow>
+        <msup>
+          <mi>a</mi>
+          <mn>2</mn>
+        </msup>
+        <mo>+</mo>
+        <msup>
+          <mi>b</mi>
+          <mn>2</mn>
+        </msup>
+      </mrow>
+      <mo>=</mo>
+      <msup>
+        <mi>c</mi>
+        <mn>2</mn>
+      </msup>
+    </mrow>
+  </math>
+
+  </body>
+</html>
+
+ +

XHTML 表記

+ +
<?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">
+<head>
+ <title>MathML in XHTML</title>
+</head>
+<body>
+
+  <math xmlns="http://www.w3.org/1998/Math/MathML">
+    <mrow>
+      <mrow>
+        <msup>
+          <mi>a</mi>
+          <mn>2</mn>
+        </msup>
+        <mo>+</mo>
+        <msup>
+          <mi>b</mi>
+          <mn>2</mn>
+        </msup>
+      </mrow>
+      <mo>=</mo>
+      <msup>
+        <mi>c</mi>
+        <mn>2</mn>
+      </msup>
+    </mrow>
+  </math>
+
+</body>
+</html>
+ +

メモ: MathML をもつ XHTML 文書は application/xhtml+xml として配信しなければなりません。これは、ローカルファイルに .xhtml 拡張子を追加することで、簡単に達成できます。 Apache サーバーの場合は、 .htaccess ファイルを設定することで拡張子を正しい MIME タイプに対応付けることができます。 XML 文書で MathML を表記するので、整形式の XML 文書を必ず記述してください。

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{ SpecName('MathML3', 'chapter2.html#interf.toplevel', 'The Top-Level math Element') }}{{ Spec2('MathML3') }}現在の仕様
{{ SpecName('MathML2', 'chapter7.html#interf.toplevel', 'The Top-Level math Element') }}{{ Spec2('MathML2') }}初期の仕様
+ +

ブラウザーの互換性

+ + + +

{{Compat("mathml.elements.math")}}

+ +

Firefox 固有のメモ

+ +

Firefox 7 では、最上位の math 要素がすべての MathML 属性を受け入れる対応を導入しました (すなわち {{ MathMLElement("mstyle") }} 要素と同じ動作)。しかし、 displaystyle 属性が含まれておらず、 Firefox 8 で追加されました

+ +

テキストの代替 (alttext) または altimg, altimg-width, altimg-height, altimg-valign の各属性を使用する代替画像の参照は、現在は Firefox に実装されていません。

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf