Re: Superscripts (was Re: Roman Numerals (was Re: Improper grounds for rejection of proposal N2677))

From: Philippe Verdy (verdy_p@wanadoo.fr)
Date: Wed Nov 02 2005 - 12:11:12 CST

  • Next message: =?iso-8859-1?Q?Marc Brugui=E8res?=: "=?iso-8859-1?Q?Re: Another confusable security hole?="

    From: "Guy Steele" <Guy.Steele@sun.com>
    > On Nov 2, 2005, at 1:39 AM, Jukka K. Korpela wrote:
    >
    >> ... Incidentally, when exponentiation is to be expressed
    >> compactly in plain text, then I think UPWARDS ARROW U+2191 would
    >> be a better symbol than circumflex ^ (which was originally taken
    >> into use in exponential expressions since it can be imagined to be
    >> a simulation of an upwards arrow).
    >
    > Agreed. I note, however, that ASCII originally (1963) did have an
    > "upwards arrow"

    I did not say that my solution, using HTML markup, was ideal. It was just
    addressing the case where one wants to convert HTML using <sup> into
    plain-text for copy/paste operations, avoiding also the problem where some
    info is lost.

    It does not say that this alternative is the best, and one could as well use
    other characters. The main idea is that the original text uses markup, and
    using <sup> for that purpose is coherent with the choice made in ISO/IEC
    10646 to not encode all superscript characters, but only a few which have
    legacy uses in existing standard charsets, and their most frequent
    occurences as exponent numbers (in a form that is only acceptable with
    European digits, and not attested or exceptional for other localized
    digits).

    For this reason, there is good opportunity to allow "correct" conversion of
    superscripts made with markup into sequences of plain-text characters, even
    if this implies inserting other characters in the plain text. There will
    still remain cases where this does not work as expected.

    The trick I proposed was simple to write, easy to embed within a macro: you
    can easily substitute «<sup>» by «<sup><span style="display:none">^</span>»
    each time you need to write an exponent and put it into a parameteres
    macro/template like «{{exp|2}}» that transforms the number 2 into a correct
    exponent with all the necessary markup, the same way that you can use a
    parametered macro/template to write roman digits, like «{{rom|XIII|13}}»
    which would generate a correct visual representation of the Roman numeral
    with a toolip explaining that the numeral represents the european number 13
    (to help readers). There's lot you can do with markup languages (including
    HTML, Wikimedia templates, and others...)

    Of course you could use a CSS class instead of using «style="display:none"»
    (but there must exist a stylesheet somewhere else, so this does not work as
    a simple substitution). This does not change really the interpretation and
    use of the rendered text. There's a tradeoff to find between ease of
    composition, good rendering for readers, and reuse of the document for
    something else (including conversions of formats).



    This archive was generated by hypermail 2.1.5 : Wed Nov 02 2005 - 12:13:43 CST