From: Kenneth Whistler [kenw@sybase.com] Sent: Tuesday, August 22, 2000 10:01 PM To: Multiple Recipients of Unicore Cc: kenw@sybase.com; bnb@ams.org; ion@ams.org Subject: Math alphanumerics and MathML: A challenge Unicadetti, In thinking over Kent's claims regarding the inappropriateness of using the math alphanumeric characters in MathML (or other markup), I did a little poking around in publications. Most pure math, including lots of math published in computer science publications, is presented in the traditional forms, with single-letter variables, mixed with the occasional use of function names like "sin", "max", and so on. However, the real presentation and markup problems I see are where traditional math hits computer science algorithm and pseudo-algorithm style. The computer scientists freely build functions or algorithms that look like program text, with multiple-character keywords and function names, and then drop in traditional math expressions in the middle of those algorithm or function definitions. I suspect that this is the kind of text that Kent mostly has in the front of his mind when he argues about false dichotomies for identifiers and tries to get us to talk about "glucamola" instead. Rather than argue based on contrived short identifier examples taken out of context, I would like to challenge the two sides of this debate to actually attempt a full MathML presentation-style markup of two short but significant and problematical examples taken from actual, recent computer science texts. The examples are cited below, using an ad hoc markup style that should convey to everyone what the printed examples actually look like. Now the question is: how would each of these be represented in MathML? Proponents of math alphanumerics feel free to substitute &mathbolditalx; for x, and so on. Things to note and account for in Example 1: This example defines a complicated function. In the body text that precedes this definition, the author defines "FFT" as a radix-2 fast Fourier transform, distinguished from "DFT" discrete Fourier transform. When "FFT" is discussed in text, it uses regular, upright Roman, except for the first instance, where it and its definition are italicized, using body-italic. It is italicized in the function definition, where it is used in a "FFT(x,n)" construction. Unlike example 2 below, this function definition *bolds* all the keywords, but otherwise uses expected normal math conventions. Question: Is the "FFT" in the function definition math-italic or body-italic? If it is body-italic, is there any reason to distinguish it from the math-italic used for the variables? Things to note and account for in Example 2: This example introduces a math expression in body text, using all the conventions one would expect of traditional math: single letter variables in math-italic, a single letter variable in math-bold-italic, upright parentheses next to italic variables, a math-centerline ellipsis, and so on. Then the math expression is dropped into a CS-style function definition, appearing identical there. But notably, all the keywords, loop counter variables, and return values are also italic. Constant limit checks are not italic, nor are punctuation or operators. Questions: Is the loop counter j math-italic or body-italic? Is it the same italic as the subscript j in the math expression itself? Are the return value digits math-italic digits or regular digits in body-italic? Is this presentation best dealt with by formal embedding of multiple math expression pieces into a text framework using other conventions, or is this just one continuous piece of text appropriate for expression in MathML? You may open your notebooks and proceed to Example 1 now. --Ken P.S. Justify your answers. ;-) ==================================================================== Example 1 Excerpted from: Gene Golub and Charles Van Loan, Matrix Computations, 3rd. ed., Johns Hopkins University Press, 1996. p. 190. function y = FFT(x,n) if n = 1 y = x else m = n/2; ω = e-2πi/n (( etc., the remainder of the function definition is not relevant )) end ==================================================================== Example 2 Excerpted from: Baoding Liu, Uncertain Programming, John Wiley and Sons, 1999. p. 22. For example, we can make a subfunction to the constraints gj(x) ≤ 0, j = 1, 2,&ellipsis;, p as follows, for j = 1 to p do if (gj(x) > 0) return 0; endfor return 1.