Re: [whatwg] Physical quantities: var or i?

2012-01-21 Thread Jukka K. Korpela

2012-01-21 0:30, Ian Hickson wrote:


On Tue, 26 Jul 2011, Jukka K. Korpela wrote:

[...]

I don’t think you have clarified whether var  is suitable for
physical quantities, but I guess you meant to imply it—even though
there is not a single example about markup for physical quantities.


Given that the spec contains the exact example you gave (E=mc^2), and
given that the definition explicitly includes an identifier representing
a constant as one of the uses for the element, I have to disagree with
your assessment.


Now that you have added that example, the text implies that var is the 
suggested markup for symbols of physical quantities. It is still 
somewhat odd that this is expressed via an example only, and the basic 
prose says: “The var element represents a variable. This could be an 
actual variable in a mathematical expression or programming context, an 
identifier representing a constant, a function parameter, or just be a 
term used as a placeholder in prose.” None of the examples covers 
symbols of physical quantities, and yet they are probably more common 
texts in general (as opposite to mathematics and programming) than the 
examples given.



On the other hand, it seems that it doesn’t really matter. The var
element has now been defined to have such a wide and vague meaning that
it is pointless to use it. There is little reason to expect that any
software will ever pay attention to var markup on any semantic basis.


You seem to imply that there was reason to expect so before, which is
certainly news to me!


I have rather been optimistic about future developments for markup 
elements that have been defined exactly enough to warrant meaningful 
semantics-based processing. For example, most of the uses mentioned in 
current text imply that var element contents should be kept intact in 
automatic language translation.


 I would not really expect these elements to be used

for anything other than styling hooks.


That might be realistic, especially there is no significant semantic 
clarification in sight in general. This raises the question why we could 
not just return to the original design with some physical markup like 
i, b, and u together with span that was added later. What’s the 
idea of wasting time in wondering which markup to choose, among several 
vaguely described alternatives, when it all ends up with being 
comparable to arbitrary author-named styles in word processing?


The advantage of using i, b, and u is that they have defined 
default rendering (even in the absense of CSS) and universal support in 
browsers. Authors can still use classes if they like, and they can still 
change the rendering via CSS just as they can when some fancy markup 
is used.



So authors will use i  if they think italics is semantically essential,
and var  won’t be used much.


That seems to be the status quo.


So why not simply define i recommended and describe var, cite, 
em, and dfn as deprecated but supported alternatives? This would 
make authoring simpler without any real cost. There’s little reason to 
tell authors to use “semantic markup” if we don’t think it has real 
effect on anything.



However, some authors like the ease of maintenance that comes from using
elements as a general classification mechanism and classes to provide
fine-grained control, and it is mostly for them that HTML provides a
variety of more specific elements like var.


This implies a burden on learning, teaching, and using HTML. Anyone who 
seriously tries to understand HTML will ask, for example, which of 
var, cite, em, dfn, i, span, abbr he should use in 
particular situations.


Authors who wish to use classification may well do that with elements 
like i as well. Then they just need to decide on their own classification.



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


Why does it make no sense?


Because var does not imply that the contents is computer code. Yet a 
variable name in programming is surely code if a type name or a literal 
is. And using codevarmyFoo/var/code is clumsy, and it makes the 
text appear in italics by default, which is probably unsuitable 
(monospace italics doesn’t work well). Why would an author use markup 
that by default causes rendering that he does *not* want, when there’s 
the option of using span?



Because it implies that in default rendering, identifiers of variables
appear in italics whereas identifiers of types or classes do not. Why
would anyone use extra var  markup when it has no other implications
than requiring extra CSS code to remove (when possible) italics?


To enable easier maintenance of the markup and easy self-documenting
styling, same as pretty much all of HTML.

Re: [whatwg] Physical quantities: var or i?

2012-01-20 Thread Ian Hickson
On Tue, 26 Jul 2011, Jukka K. Korpela wrote:
 25.07.2011 22:02, Ian Hickson 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)?
  
  It sounds like you want to use these characters:
  
  U+1D438 MATHEMATICAL ITALIC CAPITAL E
  U+1D45A MATHEMATICAL ITALIC SMALL M
  U+1D450 MATHEMATICAL ITALIC SMALL C
 
 No, I don’t want to use them, since only about one person in a million 
 would see the expression. There are several reasons to that, including 
 the absence of those characters in fonts—the only commonly available 
 font that contained a reasonable collection of Plane 1 characters was 
 code2001, and it does not seem to be distributed by its author any more.

Well, any new feature will take time to get adopted. We live in the future 
here. That it doesn't work yet isn't a valid argument against it. :-)


 Comparing this with how well iE/i = im/iic/i² works, I 
 don't think anyone who understands the implications will give a second 
 though to using such Plane 1 characters in HTML documents.

If it works well, I think we're good. Problem solved.


  Alternatively, you can use MathML to mark up the equation.
 
 Or I could use LaTeX and get a presentation of acceptable quality. Or an 
 image, as people still widely use. The question was about markup of 
 physical quantities in HTML. Using other tools just to present a casual 
 equation in running text would be disproportionate.

MathML is merely one of several options available to HTML authors that I 
was enumerating. It is obviously not the only one. For more complicated 
cases, it may be the preferred option (e.g. if you have fractions, 
calculus, etc). For simpler cases, e.g. a single variable, it's obviously 
not simpler than just using var.



  Whether you want something in italics or not is more a matter for CSS 
  than a matter for HTML.
 
 In many contexts, by long traditions and conventions, the use of italics 
 is a matter of content, not casual presentation.

Well, kinda. The content is variable, or planck constant, or pi; the 
presentation as a set of pixels representing an italics /i/ vs an audio 
sample that says eye vs a set of raised dots in Nemeth Braille is the 
presentational aspect. As such I think it's fair to say that the italics 
is a mapping of the var semantic to display presentation via CSS.


   Should we consider the var element as covering physical quantities 
   too? After all, they can be regarded as variables in a broad sense, 
   as symbols that denote different values in different situations. 
   However, varc/var would be odd, wouldn't it, since the symbol 
   denotes a universal constant of nature.
  
  You can look at it as being a variable whose value is a constant of 
  nature. I've clarified the spec to indicate that this is fine.
 
 I don’t think you have clarified whether var is suitable for 
 physical quantities, but I guess you meant to imply it—even though 
 there is not a single example about markup for physical quantities.

Given that the spec contains the exact example you gave (E=mc^2), and 
given that the definition explicitly includes an identifier representing 
a constant as one of the uses for the element, I have to disagree with 
your assessment.


 On the other hand, it seems that it doesn’t really matter. The var 
 element has now been defined to have such a wide and vague meaning that 
 it is pointless to use it. There is little reason to expect that any 
 software will ever pay attention to var markup on any semantic basis.

You seem to imply that there was reason to expect so before, which is 
certainly news to me! I would not really expect these elements to be used 
for anything other than styling hooks.


 So authors will use i if they think italics is semantically essential, 
 and var won’t be used much.

That seems to be the status quo.


   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.
  
  Indeed. And vectors are usually bold.
 
 So why should authors be told to use markup that by default (and always 
 when CSS is off) results in programming language constructs to be 
 italicized? Flagging “placeholders” with italics (as in “issue the 
 command kbdrm ifilename/i/kbd to delete a file) is a widely used 
 and understood style, but programming language variables are a 
 completely different issue.

Well it's entirely up to the authors, of course; if they would rather only 
use divs and spans then there's not much we can do to stop them. 
However, some authors like the ease of maintenance that comes from using 
elements as a general classification mechanism and classes to provide 
fine-grained control, and it is mostly for them that HTML provides a 
variety 

Re: [whatwg] Physical quantities: var or i?

2011-07-26 Thread Jukka K. Korpela

25.07.2011 22:02, Ian Hickson 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)?


It sounds like you want to use these characters:

U+1D438 MATHEMATICAL ITALIC CAPITAL E
U+1D45A MATHEMATICAL ITALIC SMALL M
U+1D450 MATHEMATICAL ITALIC SMALL C


No, I don’t want to use them, since only about one person in a million 
would see the expression. There are several reasons to that, including 
the absence of those characters in fonts—the only commonly available 
font that contained a reasonable collection of Plane 1 characters was 
code2001, and it does not seem to be distributed by its author any more.


Characters not supported by any of the fonts installed in the user’s 
system don’t degrade well. The user sees a small box or the ”�” 
character (which may appear due to other problems, too).


Comparing this with how well iE/i = im/iic/i² works, I don’t 
think anyone who understands the implications will give a second though 
to using such Plane 1 characters in HTML documents.



Alternatively, you can use MathML to mark up the equation.


Or I could use LaTeX and get a presentation of acceptable quality. Or an 
image, as people still widely use. The question was about markup of 
physical quantities in HTML. Using other tools just to present a casual 
equation in running text would be disproportionate.



Whether you want something in italics or not is more a matter for CSS than
a matter for HTML.


In many contexts, by long traditions and conventions, the use of italics 
is a matter of content, not casual presentation. When people know they 
cannot use italics, they are forced to simulating it (e.g., writing /a/ 
to denote italic “a”) or to avoiding the issue with clumsy methods like 
long prose explanations. Wouldn’t it be odd to pretend that in HTML, you 
are forced to something like that? After all, i has been with us since 
the dawn of HTML, and all browsers support it when they can use italics 
at all (and may use some special representation when not).



Should we consider the var element as covering physical quantities too?
After all, they can be regarded as variables in a broad sense, as
symbols that denote different values in different situations. However,
varc/var  would be odd, wouldn't it, since the symbol denotes a
universal constant of nature.


You can look at it as being a variable whose value is a constant of
nature. I've clarified the spec to indicate that this is fine.


I don’t think you have clarified whether var is suitable for physical 
quantities, but I guess you meant to imply it—even though there is not a 
single example about markup for physical quantities.


On the other hand, it seems that it doesn’t really matter. The var 
element has now been defined to have such a wide and vague meaning that 
it is pointless to use it. There is little reason to expect that any 
software will ever pay attention to var markup on any semantic basis.


So authors will use i if they think italics is semantically essential, 
and var won’t be used much.



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.


Indeed. And vectors are usually bold.


So why should authors be told to use markup that by default (and always 
when CSS is off) results in programming language constructs to be 
italicized? Flagging “placeholders” with italics (as in “issue the 
command kbdrm ifilename/i/kbd to delete a file) is a widely used 
and understood style, but programming language variables are a 
completely different issue.



Too bad there's no example ofvar  used in programming context. The
current wording suggests that it would be normal, when discussing
programming, to write, say, Then we define the variable
varmyFoo/var  of typecodefooType/code  with initial value
codeFoo/code  - -, which really makes no sense, even if we use
bothvar  andcode  for myFoo.


Why does it make no sense?


Because it implies that in default rendering, identifiers of variables 
appear in italics whereas identifiers of types or classes do not. Why 
would anyone use extra var markup when it has no other implications 
than requiring extra CSS code to remove (when possible) italics?


--
Yucca, http://www.cs.tut.fi/~jkorpela/


Re: [whatwg] Physical quantities: var or i?

2011-07-25 Thread Ian Hickson
On Thu, 14 Apr 2011, Jukka K. Korpela wrote:

 Looking at the nice summary (with examples) of text-level markup at 
 http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#usage-summary
  
 I started wondering why there is no example of markup for symbols of 
 physical quantities. The descriptions of individual elements or their 
 examples don't seem to say anything about this either.

The main reason is that most of these symbols have Unicode characters and 
don't need special markup.


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

It sounds like you want to use these characters:

   U+1D438 MATHEMATICAL ITALIC CAPITAL E
   U+1D45A MATHEMATICAL ITALIC SMALL M
   U+1D450 MATHEMATICAL ITALIC SMALL C

Alternatively, you can use MathML to mark up the equation.


 Physical quantities surely satisfy the requirement that typical 
 typographic presentation is italicized in the following, and they are 
 to be offset from the normal prose, but why aren't they mentioned in the 
 fairly long list of examples then:
 
 The i element represents a span of text in an alternate voice or mood, 
 or otherwise offset from the normal prose, such as a taxonomic 
 designation, a technical term, an idiomatic phrase from another 
 language, a thought, a ship name in Western texts, or some other prose 
 whose typical typographic presentation is italicized. 
 http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-i-element
 
 (As an aside, the wording a taxonomic designation is too broad, as by 
 biological nomenclature rules, genus and species names are to be 
 italiced but higher taxons, e.g. family names, like Canidae, must not. 
 Besides, e.g. an English name of a species is taxonomic too... So 
 scientific names of organisms would be a better formulation.)

Whether you want something in italics or not is more a matter for CSS than 
a matter for HTML.


 Should we consider the var element as covering physical quantities too? 
 After all, they can be regarded as variables in a broad sense, as 
 symbols that denote different values in different situations. However, 
 varc/var would be odd, wouldn't it, since the symbol denotes a 
 universal constant of nature.

You can look at it as being a variable whose value is a constant of 
nature. I've clarified the spec to indicate that this is fine.


On Thu, 14 Apr 2011, Bjartur Thorlacius wrote:

 Well, a constant isn't really variable any more, is it? I thought var 
 was meant to mark up text that couldn't simply be 'copypasted' without 
 filling in the unknowns (free variables). Defined variables (whether in 
 source code or formulae) do not conform to that definition.
 
 So, coderm -r var$path/var/code would conform (as a reply to the 
 question how does one remove a (potentially non-empty) directory on 
 *nix?) as $path is undefined, but codevari/var++/code would 
 not, as i isn't ment to be substituted.

What do you base this interpretation on?


On Sat, 16 Apr 2011, Jukka K. Korpela wrote:
 
 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.

Indeed. And vectors are usually bold. This is the kind of thing I would 
expect to see handled using classes, e.g.:

   var class=vectora/var #x2A2F; var class=vectorb/var =
   vara/var varb/var sin vartheta;/var var class=vectorn/var


 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 
 varmyFoo/var of type codefooType/code with initial value 
 codeFoo/code - -, which really makes no sense, even if we use 
 both var and code for myFoo.

Why does it make no sense?

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Re: [whatwg] Physical quantities: var or i?

2011-04-16 Thread Jukka K. Korpela

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 varmyFoo/var of type 
codefooType/code with initial value codeFoo/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 codelatex varfilename/var/code). An example of 
using placeholders in humanities might be The normal word order in this 
language is varsubject/var varobject/var varverb/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/ 



Re: [whatwg] Physical quantities: var or i?

2011-04-15 Thread Aryeh Gregor
On Thu, Apr 14, 2011 at 10:02 AM, Jukka K. Korpela jkorp...@cs.tut.fi wrote:
 Looking at the nice summary (with examples) of text-level markup at
 http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#usage-summary
 I started wondering why there is no example of markup for symbols of
 physical quantities. The descriptions of individual elements or their
 examples don't seem to say anything about this either.

 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.


[whatwg] Physical quantities: var or i?

2011-04-14 Thread Jukka K. Korpela

Looking at the nice summary (with examples) of text-level markup at
http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#usage-summary
I started wondering why there is no example of markup for symbols of 
physical quantities. The descriptions of individual elements or their 
examples don't seem to say anything about this either.


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


Physical quantities surely satisfy the requirement that typical typographic 
presentation is italicized in the following, and they are to be offset from 
the normal prose, but why aren't they mentioned in the fairly long list of 
examples then:


The i element represents a span of text in an alternate voice or mood, or 
otherwise offset from the normal prose, such as a taxonomic designation, a 
technical term, an idiomatic phrase from another language, a thought, a ship 
name in Western texts, or some other prose whose typical typographic 
presentation is italicized.

http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-i-element

(As an aside, the wording a taxonomic designation is too broad, as by 
biological nomenclature rules, genus and species names are to be italiced 
but higher taxons, e.g. family names, like Canidae, must not. Besides, e.g. 
an English name of a species is taxonomic too... So scientific names of 
organisms would be a better formulation.)


But the i element should obviously be used in the absence of a more semantic 
element; e.g., not for expressions that fall into the scope of use of the 
cite element.


Should we consider the var element as covering physical quantities too? 
After all, they can be regarded as variables in a broad sense, as symbols 
that denote different values in different situations. However, varc/var 
would be odd, wouldn't it, since the symbol denotes a universal constant of 
nature.


So I would guess that iE/i = im/iic/i² is the way to go.

I think an example like this, or the addition of physical quantities into 
the list of examples, or both, would be the semantics and intended use of 
elements somewhat clearer.


--
Yucca, http://www.cs.tut.fi/~jkorpela/ 



Re: [whatwg] Physical quantities: var or i?

2011-04-14 Thread Christoph Päper
Jukka K. Korpela:

 varc/var would be odd, wouldn't it, since the symbol denotes a universal 
 constant of nature.

It would not, ‘c’ is merely a variable with constant value.

  varE/var = varm/var·varc/varsup2/sup

Or math, eventually.

Re: [whatwg] Physical quantities: var or i?

2011-04-14 Thread Bjartur Thorlacius
On 4/14/11, Christoph Päper christoph.pae...@crissov.de wrote:
 Jukka K. Korpela:

 varc/var would be odd, wouldn't it, since the symbol denotes a
 universal constant of nature.

 It would not, ‘c’ is merely a variable with constant value.

Well, a constant isn't really variable any more, is it? I thought
var was meant to mark up text that couldn't simply be 'copypasted'
without filling in the unknowns (free variables). Defined variables
(whether in source code or formulae) do not conform to that
definition.

So, coderm -r var$path/var/code would conform (as a reply to
the question how does one remove a (potentially non-empty) directory
on *nix?) as $path is undefined, but codevari/var++/code
would not, as i isn't ment to be substituted.

   varE/var = varm/var·varc/varsup2/sup

 Or math, eventually.
Or, in the meantime, code (IMHO, at least). It's not source code for
a computer program, but for all purposes and intentions I can think
of, source code and formulae can be treated equivalently. The spec
formally requires 'computer code,' i.e. sth understood by a computer,
making my suggested usage non-conformant.