Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Add another example for <var>.
git-svn-id: http://svn.whatwg.org/webapps@2540 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 17, 2008
1 parent 430d84e commit f2564f2
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 14 deletions.
42 changes: 35 additions & 7 deletions index
Expand Up @@ -13489,6 +13489,34 @@ cream factory then I expect at &lt;em&gt;least&lt;/em&gt; &lt;var&gt;n&lt;/var&g
flavours of ice cream to be available for purchase!&lt;/p&gt;</pre>
</div>

<p>For mathematics, in particular for anything beyond the simplest
of expressions, MathML is more appropriate. However, the
<code><a href=#the-var-element>var</a></code> element can still be used to refer to specific
variables that are then mentioned in MathML expressions.</p>

<div class=example>

<p>In this example, Pythagoras' theorem is solved for the variable
<var title="">a</var>. The expression itself is marked up with
MathML, but the variable is mentioned in the figure's legend using
<code><a href=#the-var-element>var</a></code>.</p>

<pre>&lt;figure&gt;
&lt;math&gt;
&lt;mi&gt;a&lt;/mi&gt;
&lt;mo&gt;=&lt;/mo&gt;
&lt;msqrt&gt;
&lt;msup&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;
&lt;mi&gt;+&lt;/mi&gt;
&lt;msup&gt;&lt;mi&gt;c&lt;/mi&gt;&lt;mn&gt;2&lt;/mn&gt;&lt;/msup&gt;
&lt;/msqrt&gt;
&lt;/math&gt;
&lt;legend&gt; Pythagoras' theorem solved for &lt;var&gt;a&lt;/var&gt; &lt;/legend&gt;
&lt;/figure&gt;</pre>


</div>


<h4 id=the-samp-element><span class=secno>4.6.15 </span>The <dfn><code>samp</code></dfn> element</h4>

Expand Down Expand Up @@ -54576,13 +54604,13 @@ interface <dfn id=timeouthandler>TimeoutHandler</dfn> {
van der Blonk, Mihai &#350;ucan<!-- from ROBO Design -->, Mike
Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike
Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin, Neil Soiffer,
Olaf Hoffmann, Olav Junker Kj&aelig;r, Oliver Hunt, Peter Karlsson,
Peter Kasting, Philip J&auml;genstedt, Philip Taylor, Philip
TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka, Ralf
Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo, Richard
Ishida, Rimantas Liubertas, Robert Blaut, Robert O'Callahan, Robert
Sayre, Roman Ivanov, Ryan King, S. Mike Dierken, Sam Kuper, Sam
Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia
Olaf Hoffmann, Olav Junker Kj&aelig;r, Oliver Hunt, Ozob, Peter
Karlsson, Peter Kasting, Philip J&auml;genstedt, Philip Taylor,
Philip TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka,
Ralf Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo,
Richard Ishida, Rimantas Liubertas, Robert Blaut, Robert O'Callahan,
Robert Sayre, Roman Ivanov, Ryan King, S. Mike Dierken, Sam Kuper,
Sam Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia
Pfeiffer, Simon Pieters, Stefan Haustein, Steffen Meschkat, Stephen
Ma, Steve Faulkner, Steve Runyon, Steven Garrity, Stewart Brodie,
Stuart Parmenter, Sunava Dutta, Tantek &Ccedil;elik, Terrence Wood,
Expand Down
42 changes: 35 additions & 7 deletions source
Expand Up @@ -14413,6 +14413,34 @@ cream factory then I expect at &lt;em>least&lt;/em> &lt;var>n&lt;/var>
flavours of ice cream to be available for purchase!&lt;/p></pre>
</div>

<p>For mathematics, in particular for anything beyond the simplest
of expressions, MathML is more appropriate. However, the
<code>var</code> element can still be used to refer to specific
variables that are then mentioned in MathML expressions.</p>

<div class="example">

<p>In this example, Pythagoras' theorem is solved for the variable
<var title="">a</var>. The expression itself is marked up with
MathML, but the variable is mentioned in the figure's legend using
<code>var</code>.</p>

<pre>&lt;figure>
&lt;math>
&lt;mi>a&lt;/mi>
&lt;mo>=&lt;/mo>
&lt;msqrt>
&lt;msup>&lt;mi>b&lt;/mi>&lt;mn>2&lt;/mn>&lt;/msup>
&lt;mi>+&lt;/mi>
&lt;msup>&lt;mi>c&lt;/mi>&lt;mn>2&lt;/mn>&lt;/msup>
&lt;/msqrt>
&lt;/math>
&lt;legend> Pythagoras' theorem solved for &lt;var>a&lt;/var> &lt;/legend>
&lt;/figure></pre>


</div>


<h4>The <dfn><code>samp</code></dfn> element</h4>

Expand Down Expand Up @@ -59674,13 +59702,13 @@ interface <dfn>TimeoutHandler</dfn> {
van der Blonk, Mihai &#x015E;ucan<!-- from ROBO Design -->, Mike
Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike
Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin, Neil Soiffer,
Olaf Hoffmann, Olav Junker Kj&aelig;r, Oliver Hunt, Peter Karlsson,
Peter Kasting, Philip J&auml;genstedt, Philip Taylor, Philip
TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka, Ralf
Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo, Richard
Ishida, Rimantas Liubertas, Robert Blaut, Robert O'Callahan, Robert
Sayre, Roman Ivanov, Ryan King, S. Mike Dierken, Sam Kuper, Sam
Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia
Olaf Hoffmann, Olav Junker Kj&aelig;r, Oliver Hunt, Ozob, Peter
Karlsson, Peter Kasting, Philip J&auml;genstedt, Philip Taylor,
Philip TAYLOR<!-- a different one -->, Rachid Finge, Rajas Moonka,
Ralf Stoltze, Ralph Giles, Raphael Champeimont, Rene Saarsoo,
Richard Ishida, Rimantas Liubertas, Robert Blaut, Robert O'Callahan,
Robert Sayre, Roman Ivanov, Ryan King, S. Mike Dierken, Sam Kuper,
Sam Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman, Silvia
Pfeiffer, Simon Pieters, Stefan Haustein, Steffen Meschkat, Stephen
Ma, Steve Faulkner, Steve Runyon, Steven Garrity, Stewart Brodie,
Stuart Parmenter, Sunava Dutta, Tantek &Ccedil;elik, Terrence Wood,
Expand Down

0 comments on commit f2564f2

Please sign in to comment.