diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/mathml/element/math | |
parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip |
initial commit
Diffstat (limited to 'files/de/web/mathml/element/math')
-rw-r--r-- | files/de/web/mathml/element/math/index.html | 308 |
1 files changed, 308 insertions, 0 deletions
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: <math> +slug: Web/MathML/Element/math +tags: + - MathML + - 'MathML:Element' + - Referenz +translation_of: Web/MathML/Element/math +--- +<div>{{MathMLRef}}</div> + +<p class="summary"><code><math></code> ist das Wurzel-Element der MathML-Auszeichnungssprache . Jeder MathML-Kode, der gültig sein soll, muss in <code><math></code>-Tags eingeschlossen sein. Ein <code><math></code>-Element darf kein weiteres <code><math></code>-Element, aber beliebig viele andere (MathML-)Kind-Elemente enthalten.</p> + +<h2 id="Attribute">Attribute</h2> + +<p>Zusätzlich zu den folgenden Attributen akzeptiert das <code><math></code>-Element auch alle Attribute des {{ MathMLElement("mstyle") }}-Elements.</p> + +<dl> + <dt id="attr-class-id-style">class, id, style</dt> + <dd>Zur Einbindung von <a href="/de/docs/Web/CSS">CSS-Stylesheets</a> und zur direkten Anwendung von CSS-Angaben auf einzelne Elemente.</dd> + <dt id="attr-dir">dir</dt> + <dd>Allgemeine Schreibrichtung für die Formeln. Mögliche Werte sind <code>ltr</code> (left to right, von links nach rechts) und <code>rtl</code> (right to left, von rechts nach links).</dd> + <dt id="attr-href">href</dt> + <dd>Mit diesem Attribut kann ein Link gesetzt werden.</dd> + <dt id="attr-mathbackground">mathbackground</dt> + <dd>Die Hintergrundfarbe. Folgende Notationen sind erlaubt: <code><a href="/de/docs/Web/CSS/Farben#rgb()">#rgb</a></code>, <code><a href="/de/docs/Web/CSS/Farben#rgb()">#rrggbb</a></code> und <a href="/de/docs/Web/CSS/Farben#Werte">HTML-Farbnamen</a>.</dd> + <dt id="attr-mathcolor">mathcolor</dt> + <dd>Die Textfarbe. Folgende Notationen sind erlaubt: <code><a href="/de/docs/Web/CSS/Farben#rgb()">#rgb</a></code>, <code><a href="/de/docs/Web/CSS/Farben#rgb()">#rrggbb</a></code> und <a href="/de/docs/Web/CSS/Farben#Werte">HTML-Farbnamen</a>.</dd> + <dt id="attr-display"><a id="display" name="display">display</a></dt> + <dd>Dieses Attribut bestimmt, wie das MathML-Element dargestellt wird. Zwei Werte sind möglich: + <ul> + <li><code>block</code>, das Element wird auf der Seite als eigener Block dargestellt, kann weitgehend frei positioniert werden und ist mit dem Text inhaltlich nur lose verbunden.</li> + <li><code>inline</code>, 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. <code>inline</code> ist der Vorgabewert.</li> + </ul> + </dd> + <dt id="attr-mode">mode {{deprecated_inline}}</dt> + <dd>Veraltet und durch das <a href="/de/docs/MathML/Element/math#attr-display">{{anch("display")}}</a>-Attribut ersetzt. Mögliche Werte sind: <code>display</code> (hat den gleichen Effekt wie <code>display="block"</code>) und <code>inline</code>.</dd> + <dt id="attr-overflow">overflow</dt> + <dd>Bestimmt, wie sich der mathematische Ausdruck verhält, wenn er breiter ist als die erlaubte Breite des Elements. Mögliche Werte sind: <code>linebreak</code> (Standard), <code>scroll</code>, <code>elide</code>, <code>truncate</code>, <code>scale</code>.</dd> +</dl> + +<h2 id="Beispiele">Beispiele</h2> + +<p><img alt="Theorem of Pythagoras" src="/files/3157/math.jpg"></p> + +<h3 id="HTML5-Schreibweise">HTML5-Schreibweise</h3> + +<pre class="brush: html"><!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> +</pre> + +<h3 id="XHTML-Schreibweise">XHTML-Schreibweise</h3> + +<pre class="brush: 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"> +<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></pre> + +<p><strong>Hinweis</strong>: XHTML-Dokumente mit MathML müssen vom Server als <code>application/xhtml+xml</code> ausgliefert werden. Das kannst Du einfach erreichen, indem Du Deinen lokalen Dateien die Endung <code>.xhtml</code> gibst. Beim Apache-Webserver kannst Du entsprechend die<a class="external" href="http://httpd.apache.org/docs/current/mod/mod_mime.html#addtype" title="http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addtype"> <code>.htaccess-Datei konfigurieren</code></a>, 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.</p> + +<h2 id="Spezifikationen">Spezifikationen</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Standard</th> + <th scope="col">Status</th> + <th scope="col">Bemerkung</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('MathML3', 'chapter2.html#interf.toplevel', 'The Top-Level math Element') }}</td> + <td>{{ Spec2('MathML3') }}</td> + <td>Current specification</td> + </tr> + <tr> + <td>{{ SpecName('MathML2', 'chapter7.html#interf.toplevel', 'The Top-Level math Element') }}</td> + <td>{{ Spec2('MathML2') }}</td> + <td>Initial specification</td> + </tr> + </tbody> +</table> + +<h2 id="Browserkompatibilität">Browserkompatibilität</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Merkmal</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>XHTML notation</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoDesktop("1.0") }}</td> + <td>{{CompatNo}}</td> + <td>9.5</td> + <td>5.1</td> + </tr> + <tr> + <td>HTML5 notation</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoDesktop("2.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>5.1</td> + </tr> + <tr> + <td><code>dir</code></td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoDesktop("12.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + <tr> + <td><code>href</code></td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoDesktop("7.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}} [1]</td> + </tr> + <tr> + <td><code>mathbackground</code></td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoDesktop("2.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>5.1</td> + </tr> + <tr> + <td><code>mathcolor</code></td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoDesktop("2.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>5.1</td> + </tr> + <tr> + <td><code>overflow</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Merkmal</th> + <th>Android</th> + <th>Chrome for Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>XHTML notation</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoMobile("1.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + <tr> + <td>HTML5 notation</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoMobile("2.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + <tr> + <td><code>dir</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoMobile("12.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + <tr> + <td><code>href</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoMobile("7.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}} [1]</td> + </tr> + <tr> + <td><code>mathbackground</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoMobile("2.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + <tr> + <td><code>mathcolor</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{ CompatGeckoMobile("2.0") }}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + <tr> + <td><code>overflow</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<p>[1] Siehe <a href="https://bugs.webkit.org/show_bug.cgi?id=85733">bug 85733</a>.</p> + +<h2 id="Hinweise_zur_Gecko">Hinweise zur Gecko</h2> + +<p>Die Gecko Rendering Engine unterstützt seit Version 7.0 {{ geckoRelease("7.0") }} die Verwendung von MathML-Attributen auf das <code><math></code>-Element (und hat damit das gleiche Verhalten wie das {{ MathMLElement("mstyle") }}-Element). Das <code>displaystyle</code>-Attribute wurde allerdings erst in Gecko 8.0 {{ geckoRelease("8.0") }} ergänzt. <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=669719" title="https://bugzilla.mozilla.org/show_bug.cgi?id=669719">Siehe bug 669719</a>.</p> + +<p>Weder Alternativer Text (<code>alttext</code>) noch der Verweis auf eine alternative Grafik mit den Attributen <code>altimg</code>, <code>altimg-width</code>, <code>altimg-height</code> oder <code>altimg-valign</code> sind in Gecko gegenwärtig implemtiert.</p> + +<h2 id="Siehe_auch">Siehe auch</h2> + +<ul> + <li>HTML-Wurzelelement: {{ HTMLElement("html") }}</li> + <li>SVG-Wurzelelement: {{ SVGElement("svg") }}</li> + <li>MathML-Browsertest: For <a class="link-https" href="https://www.eyeasme.com/Joe/MathML/MathML_browser_test">XHTML</a> and <a class="link-https" href="https://eyeasme.com/Joe/MathML/HTML5_MathML_browser_test">HTML5</a></li> +</ul> |