From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/de/web/mathml/element/math/index.html | 308 ++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 files/de/web/mathml/element/math/index.html (limited to 'files/de/web/mathml/element/math') diff --git a/files/de/web/mathml/element/math/index.html b/files/de/web/mathml/element/math/index.html new file mode 100644 index 0000000000..6a8b357097 --- /dev/null +++ b/files/de/web/mathml/element/math/index.html @@ -0,0 +1,308 @@ +--- +title: +slug: Web/MathML/Element/math +tags: + - MathML + - 'MathML:Element' + - Referenz +translation_of: Web/MathML/Element/math +--- +
{{MathMLRef}}
+ +

<math> ist das Wurzel-Element der MathML-Auszeichnungssprache . Jeder MathML-Kode, der gültig sein soll, muss in <math>-Tags eingeschlossen sein. Ein <math>-Element darf kein weiteres <math>-Element, aber beliebig viele andere (MathML-)Kind-Elemente enthalten.

+ +

Attribute

+ +

Zusätzlich zu den folgenden Attributen akzeptiert das  <math>-Element auch alle Attribute des {{ MathMLElement("mstyle") }}-Elements.

+ +
+
class, id, style
+
Zur Einbindung von CSS-Stylesheets und zur direkten Anwendung von CSS-Angaben auf einzelne Elemente.
+
dir
+
Allgemeine Schreibrichtung für die Formeln. Mögliche Werte sind ltr (left to right, von links nach rechts) und rtl (right to left, von rechts nach links).
+
href
+
Mit diesem Attribut kann ein Link gesetzt werden.
+
mathbackground
+
Die Hintergrundfarbe. Folgende Notationen sind erlaubt: #rgb, #rrggbb und HTML-Farbnamen.
+
mathcolor
+
Die Textfarbe. Folgende Notationen sind erlaubt: #rgb, #rrggbb und HTML-Farbnamen.
+
display
+
Dieses Attribut bestimmt, wie das MathML-Element dargestellt wird. Zwei Werte sind möglich: +
    +
  • block, das Element wird auf der Seite als eigener Block dargestellt, kann weitgehend frei positioniert werden und ist mit dem Text inhaltlich nur lose verbunden.
  • +
  • inline, das Element wird innerhalb des laufenden Textes dargestellt. Es ist eng mit dem Text verknüpft und kann nicht herausgelöst werden ohne die Bedeutung des Textes zu verändern. inline ist der Vorgabewert.
  • +
+
+
mode {{deprecated_inline}}
+
Veraltet und durch das {{anch("display")}}-Attribut ersetzt. Mögliche Werte sind: display (hat den gleichen Effekt wie display="block") und inline.
+
overflow
+
Bestimmt, wie sich der mathematische Ausdruck verhält, wenn er breiter ist als die erlaubte Breite des Elements. Mögliche Werte sind: linebreak (Standard), scroll, elide, truncate, scale.
+
+ +

Beispiele

+ +

Theorem of Pythagoras

+ +

HTML5-Schreibweise

+ +
<!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-Schreibweise

+ +
<?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>
+ +

Hinweis: XHTML-Dokumente mit MathML müssen vom Server als application/xhtml+xml ausgliefert werden. Das kannst Du einfach erreichen, indem Du Deinen lokalen Dateien die Endung .xhtml gibst. Beim Apache-Webserver kannst Du entsprechend die .htaccess-Datei konfigurieren, so dass die Dateiendung dem korrekten Mime type zugeordnet wird. Achte in diesem Fall auch darauf, dass die XML-Datei wohlgeformt ist, d.h. den grundsätzlichen Anforderungen an die Formatierung einer XML-Datei genügt.

+ +

Spezifikationen

+ + + + + + + + + + + + + + + + + + + + + +
StandardStatusBemerkung
{{ SpecName('MathML3', 'chapter2.html#interf.toplevel', 'The Top-Level math Element') }}{{ Spec2('MathML3') }}Current specification
{{ SpecName('MathML2', 'chapter7.html#interf.toplevel', 'The Top-Level math Element') }}{{ Spec2('MathML2') }}Initial specification
+ +

Browserkompatibilität

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MerkmalChromeFirefox (Gecko)Internet ExplorerOperaSafari
XHTML notation{{CompatNo}}{{ CompatGeckoDesktop("1.0") }}{{CompatNo}}9.55.1
HTML5 notation{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
dir{{CompatNo}}{{ CompatGeckoDesktop("12.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{ CompatGeckoDesktop("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}} [1]
mathbackground{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
mathcolor{{CompatNo}}{{ CompatGeckoDesktop("2.0") }}{{CompatNo}}{{CompatNo}}5.1
overflow{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MerkmalAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
XHTML notation{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("1.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
HTML5 notation{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
dir{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("12.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
href{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("7.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}} [1]
mathbackground{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
mathcolor{{CompatNo}}{{CompatNo}}{{ CompatGeckoMobile("2.0") }}{{CompatNo}}{{CompatNo}}{{CompatNo}}
overflow{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}{{CompatNo}}
+
+ +

[1] Siehe bug 85733.

+ +

Hinweise zur Gecko

+ +

Die Gecko Rendering Engine unterstützt seit Version 7.0 {{ geckoRelease("7.0") }} die Verwendung von MathML-Attributen auf das <math>-Element (und hat damit das gleiche Verhalten wie das {{ MathMLElement("mstyle") }}-Element). Das displaystyle-Attribute wurde allerdings erst in Gecko 8.0 {{ geckoRelease("8.0") }} ergänzt. Siehe bug 669719.

+ +

Weder Alternativer Text (alttext) noch der Verweis auf eine alternative Grafik mit den Attributen altimg, altimg-width, altimg-height oder altimg-valign sind in Gecko gegenwärtig implemtiert.

+ +

Siehe auch

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