[whatwg] Can <var> possibly work?
Ozob the Great
ozob1337 at gmail.com
Fri Sep 19 15:41:42 PDT 2008
I am concerned about the existence of HTML5's <var>. This was brought to my
attention during a technical debate on Wikipedia which amounted to: Where is
use of <var> appropriate? The problem is that while <var> can be used to
distinguish variables from non-variables, there are many other mathematical
constructs which cannot properly be called variables. If variables are going
to be distinguished by the markup, then these other constructs ought be
distinguished by the markup. But they can't be put inside <var> because
they're not variables, and furthermore, they can't always said to be
constants, functions, spaces or any short list of allowable objects; the
number of different types of objects occurring in mathematics is tremendous,
and specifying all the allowable objects in HTML markup is undesirable.
Let me give an elementary example. Consider an equation for a line:
y = mx + b.
In this equation, only x and y are normally considered variables. m and b
are usually considered constants. So one could mark this up as
<var>y</var> = m<var>x</var> + b,
but then the markup doesn't signal what m and b are though they clearly have
some meaning. One could imagine extending the markup by introducing a
<var>y</var> = <const>m</const><var>x</var> + <const>b</const>.
There are two closely related things to note here. One is that this must be
done manually; an automated tool has no way to distinguish which symbols are
variables and which are constants. The second is that this markup may be
incorrect in some cases (thereby proving the previous point). If one wants
to consider the collection of all lines passing through the point (0, b),
then m becomes a variable, and the markup must change:
<var>y</var> = <var>m</var><var>x</var> + <const>b</const>.
Conceivably one could make this work for a lot of equations, but there's at
least one more obvious type of object one needs, namely functions. So one
might try to solve this problem by introducing a <funct> tag:
<funct>f</funct>(<var>x</var>) = <const>m</const><var>x</var> +
As long as one stays within the realm of elementary (precalculus)
mathematics, this might suffice. But modern mathematics has many things
which are not variables, constant numbers, or functions. Even if one
interprets "constant" broadly to mean "constant object" instead of "constant
number" (like it often means), there are still many other types of objects.
Content MathML gets around this by defining approximately 120 different
content elements. HTML 5 neither needs nor wants 120 different mathematical
content elements. The only solution I can see to this is to deprecate <var>:
Authors who wish to provide content markup should use MathML, because it is
designed for such things.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg