W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Physical quantities: <var> or <i>?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 16 Apr 2011 15:57:17 +0300
Message-ID: <172D93ED6EC74255ADA2D5262080E98A@JukanPC>
Aryeh Gregor wrote:

>> So what markup should we use for E = mc?, given that by the
>> applicable standards, E, M, and c should appear in italics and the
>> other characters as normal (upright)?
>
> Those three characters are typeset, read, and otherwise presented
> identically to variables, so the correct tag is <var>.  Perhaps the
> spec could be clearer on this point.

So do yo mean that everything that is rendered identically to (some assumed 
rendering of) variables should be marked up as <var>? If you imply that 
variables are rendered in italics, then apparently ship names, scientific 
names of organisms, and gene symbols call for <var>, too, right?

Seriously speaking, if all that we can say about some notations is that they 
are, by convention, rendered in italics if possible, then surely <i> is 
correct, if the notation does not clearly fall into a category for which 
there is semantic markup element defined.

Besides, there is no implied uniform rendering for variables in the current 
broad meaning for <var>. In mathematics, variables are conventionally 
written in italics. But the HTML(5) notion of variable is wider: "The var 
element represents a variable. This could be an actual variable in a 
mathematical expression or programming context, or it could just be a term 
used as a placeholder in prose." A programming language variable is 
something that is _not_ conventionally rendered in italics. Rather, they are 
usually (though for no really good reason) rendered in a monospace font, 
like any other expressions in computer languages.

Too bad there's no example of <var> used in programming context. The current 
wording suggests that it would be normal, when discussing programming, to 
write, say, "Then we define the variable <var>myFoo</var> of type 
<code>fooType</code> with initial value <code>"Foo"</code> - -", which 
really makes no sense, even if we use both <var> and <code> for myFoo.

I suppose what the wording really _means_ is something like "This could be a 
variable in a mathematical expression or a placeholder as used especially in 
technical and scientific language." The HTML 4.01 mentions "program 
argument", but this could be misleading too, as it does not really refer to 
actual arguments (as in the program invocation "latex mydoc.tex") but to 
placeholders for them (as in the instruction "then process the document by 
issuing the command <code>latex <var>filename</var></code>). An example of 
using placeholders in humanities might be "The normal word order in this 
language is <var>subject</var> <var>object</var> <var>verb</var>."

Clarified that way, <var> would refer to notations that are normally 
rendered in italics - but it would of course not refer to _any_ notation 
that is normally rendered in italics.

In this perspective, my original question really boils down to the question 
whether symbols of physical quantities should be regarded as placeholders. I 
have no strong feelings in either direction. I'd just like to see the 
question settled one way or another, at least by giving an example of using 
<var> or, as the case may be, <i> for such a quantity.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Saturday, 16 April 2011 05:57:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT