Hacker News new | past | comments | ask | show | jobs | submit login

Super/sub scripts are markup, not characters. There shouldn't be any in Unicode.



I beg to disagree. In science subscripts are part of the symbols, just like diacritics.

Superscripts, on the other hand, are part of math notation, like fractions and square roots.


I disagree. In math there can be super-super-superscripts, as with tetration representations https://en.wikipedia.org/wiki/Tetration . Does each get its own character, and when does it end?

In science, consider an isotope like

   180m
       Ta
    73
This cannot be represented as a sequence of symbols because that would give:

      180m           180m
          Ta   -or-        Ta
    73                   73
Markup is how Wikipedia represents it correct, as:

    <span style="display:inline-block;margin-bottom:-0.3em;
    vertical-align:-0.4em;line-height:1.0em;font-size:80%;text-align:right">180m<br>
    73</span>
How would you do it without markup?

In addition, pretty much anything can go in superscripts, including 2^א and integral equations. The most general solution is to have a "start superscript" and "end superscript" marker, with the ability to embed superscripts, but that still doesn't solve the isotope representation problem.


> The most general solution is to have a "start superscript" and "end superscript" marker, with the ability to embed superscripts, but that still doesn't solve the isotope representation problem.

Couldn't one have something like a "start zero-width superscript" marker, so that the following subscript would not be offset?


> Couldn't one have something like a "start zero-width superscript" marker, so that the following subscript would not be offset?

Well, the problem is that the subscript and superscript are both aligned with the following regular text, so you really need (for the isotope representation) a "start right-aligned zero-width superscript" marker, a "start right-aligned zero-width subscript" marker (though zero-width isn't exactly right, since they should have width, its just that only the wider of the super- and sub-script in a pair should be used in spacing the text) -- there might be other notation that also needs left-aligned versions of -- plus generic start/end superscript markers that have normal width flow, plus appropriate end markers.


It's not surprising that an offhand suggestion doesn't magically solve all problems, but I appreciate your taking the time carefully to explain what's missing. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: