What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Can there be support for superscripting in SO chat? Possibly with a syntax such as:

^^text^^

For example:

My birthday is On the 27^^th^^ of February

or

Teh Internetz^^TM^^

It will be quite awesome. Thanks.

share|improve this question
3  
Or just <sup> and </sup>. ^^ is a well-known smiley. –  rightføld Feb 24 '12 at 11:40
    
The syntax doesn't matter much, all i'm asking is support for superscripts in chat. –  ApprenticeHacker Feb 24 '12 at 11:55
3  
Can you tell why "27th" or "Teh Internetz(tm)" (or ™ if you really have to) isn't enough? You're chatting, not creating a typographic poster. –  balpha Feb 24 '12 at 11:55
    
@balpha it doesn't do any harm. –  ApprenticeHacker Feb 24 '12 at 11:57
8  
"It doesn't do any harm" is somewhat lacking as an argument for spending developer time and for making formatting rules more complicated. –  balpha Feb 24 '12 at 12:10
    
@balpha Complicated formatting rules seem to run up against do-what-I-mean-ness too easily. For example, you only detect straight quotes not curly ones in conjunction with italic or bold formatting rules, because you are looking for literals instead of things that have the Unicode Quotation_Mark property. Sometimes it’s nice to be able to use Unicode curly quotes, but the markdown smarts... well, isn’t. –  tchrist Feb 24 '12 at 12:33
2  
@balpha In response to why someone might care to employ properly typeset text “even when they’re chatting”, that’s like asking why when chatting one would ever bother with the Shift key to produce Mixed Case Text, or your font’s curly apostrophe or “quotes”, or careful spelling when chatting, or spelling words like Ævar Arnfjörð Bjarmason or Françoise Dorléac or crème brûlée correctly, or using bold or italics or monospace. Chat isn’t just an ancient 40-glyph unicameral Morse-code system set in a constant-width font, and it impoverishes our expressivity to so restrict it. ☺ –  tchrist Feb 24 '12 at 12:45
2  
@tchrist: That doesn't even begin to parse. Are you seriously suggesting that being able to use a superscript "th" in "July 4th" is on the same level as being able to use uppercase letters? Nobody is preventing anyone from using the corresponding unicode characters (hey guess what -- you listed them in your answer!) in chat. This is about chreating another MarkdownMini syntax extension (with all the issues that entails) for a use case that hardly exists. –  balpha Feb 24 '12 at 12:53
    
@balpha You’re right: I’m sending a mixed message; sorry. I’m saying that using the Unicode superscript set is easier than complicating the Markdown parser, because I’m always funning afoul of Markdown’s algorithms getting in the way of what I’m doing. I just think it is reasonable people should want to have superscripts, but feel that Unicode is good enough for that. My position is controverial, I realize, because the Unicode superscripts weren’t designed for this, and so on occasion something will be missing, such as accented characters and almost all symbols. –  tchrist Feb 24 '12 at 13:02
    
@balpha Today I had cause to type in a simple mathematical equation into chat, which I attempted as 2<sup>n</sup> - 1. The fact that it didn't work led me here. I'm shocked that this hasn't come up more frequently elsewhere on SE, since this was.. in Server Fault chat! –  Michael Hampton Apr 30 '13 at 2:43

1 Answer 1

up vote 6 down vote accepted

Just use the well-known Unicode transforms:

tr[+−=()0123456789AaÆᴂɐɑɒBbcɕDdðEeƎəɛɜɜfGgɡɣhHɦIiɪɨᵻɩjJʝɟKklLʟᶅɭMmɱNnɴɲɳŋOoɔᴖᴗɵȢPpɸrRɹɻʁsʂʃTtƫUuᴜᴝʉɥɯɰʊvVʋʌwWxyzʐʑʒꝯᴥβγδθφχнნʕⵡ]
  [⁺⁻⁼⁽⁾⁰¹²³⁴⁵⁶⁷⁸⁹ᴬᵃᴭᵆᵄᵅᶛᴮᵇᶜᶝᴰᵈᶞᴱᵉᴲᵊᵋᶟᵌᶠᴳᵍᶢˠʰᴴʱᴵⁱᶦᶤᶧᶥʲᴶᶨᶡᴷᵏˡᴸᶫᶪᶩᴹᵐᶬᴺⁿᶰᶮᶯᵑᴼᵒᵓᵔᵕᶱᴽᴾᵖᶲʳᴿʴʵʶˢᶳᶴᵀᵗᶵᵁᵘᶸᵙᶶᶣᵚᶭᶷᵛⱽᶹᶺʷᵂˣʸᶻᶼᶽᶾꝰᵜᵝᵞᵟᶿᵠᵡᵸჼˤⵯ];

That way you can have 1ˢᵗ 2ⁿᵈ 3ʳᵈ 4ᵗʰ without needing HTML’s clumsy 1st 2nd 3rd 4th.

Wouldn’t you rather enter 1ˢᵗ 2ⁿᵈ 3ʳᵈ 4ᵗʰ than 1<sup>st</sup> 2<sup>nd</sup> 3<sup>rd</sup> 4<sup>th</sup>? I know I sure would. Even my eyes hurt looking at all the typing needed for the HTML tag-in tag-out sequences.

Plus the font’s superiors always look better than the HTML jiggery. HTML superscripts usually screw up the linespacing, but the font’s superiors are guaranteed to never do that.

share|improve this answer
    
Besides the fact that some people don't display unicode well, chat couldn't just use those transforms automatically when you type 1^{st} or whatever? –  Michael Mrozek Feb 24 '12 at 16:03
    
-1 Actually the HTML rendering looks better, and the Unicode transforms are at best a kludge to work around the current (broken) behavior. –  Michael Hampton Apr 30 '13 at 2:42
    
@MichaelHampton This actually depends entirely on the font you are using, and for all I know, maybe also the browser. Your font must lack the right forms. The precise placement of the raised letters differs quite a bit between the two forms, and probably should not. With the Unicode superscript-compat characters, they fit inside the cell used by uppercase letters, but the HTML versions do not, which not only looks worse but also changes the leading on the line above it, which is totally unacceptable. Maybe it is just cruddy browser tech; real typesetting would never put up with that bug. –  tchrist Apr 30 '13 at 2:49
    
Funny, my browser (Chrome on Linux) renders it exactly the opposite way: the HTML is positioned correctly, while the Unicode transforms are far out of alignment, even with each other. They look a lot like the "English" text commonly seen in spam originating from Chinese computers. So it seems that someone loses either way. –  Michael Hampton Apr 30 '13 at 2:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .