Page 1 of 1

New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Wed Jun 17, 2020 2:18 pm
by Dave Keenan
You will see new SUB and SUP buttons in the post editor. These create subscripts and superscripts in the obvious manner.

This is considered preferable to using the unicode characters which are (or look like) superscripts or subscripts, which I have previously promoted using, via WinCompose sequences.

Re: New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Wed Jun 17, 2020 2:32 pm
by cmloegcmluin
Testing, testing, 123...

The WinCompose versions are still extremely nice to have in situations lacking super- and sub-script capacity, such as in the prime factored forms of Sagittal comma names in spreadsheet settings, so thanks again for turning me on to those. But on the forum I'll stick to these BBCodes.

By the way — I don't know about others, but I can't help but pronounce them "BBC Codes." I'm sorry, but if you stick two capital B's and a capital C in sequence together, you've got the BBC.

Re: New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Wed Jun 17, 2020 2:45 pm
by cmloegcmluin
You may be interested to know that searching by R² in the browser still turned up R2 as a hit. So they are treated as equivalent at least by that tool.

Re: New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Wed Jun 17, 2020 3:53 pm
by Dave Keenan
cmloegcmluin wrote: Wed Jun 17, 2020 2:45 pm You may be interested to know that searching by R² in the browser still turned up R2 as a hit. So they are treated as equivalent at least by that tool.
That's great. Thanks. Apparently, they are both treated as equivalent to "R2". But the search-term hilighting algorithm fails to find R² or R2.

Warning: Everything from here on, in this thread, is completely off-topic.


Your "BBC codes" thing brings up a whole spiel of mine on what constitute sensible rules for lowerCamelCase and UpperCamelCase/PascalCase. The result of which is that the above should be written "BbCodes". Oh wait, that looks like "B flat codes". So, better as "bbCodes". But hey, I don't get to decide that. Here's the spiel:

I (and many others) believe that :camel:-case identifiers should never contain two consecutive uppercase letters (unless they are part of a hexadecimal number that ends the identifier), so as to prevent ambiguity as to where the word breaks are. This requirement is met by applying the following rules:
  1. Acronyms and initialisms must be treated the same as ordinary words, by having at most their first letter capitalised.
  2. Single-letter words (including abbreviations, acronyms and initialisms) must not be used, except as the last letter of an identifier or as the first letter of a lower-camel-case identifier.
  3. Because decimal digits are tall like uppercase letters, but have no lowercase form, a string of digits may only appear at the end of an identifier. This includes hexadecimal digits which should be in uppercase only.

Re: New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Wed Jun 17, 2020 3:59 pm
by cmloegcmluin
You’ll be happy to learn then, that I am already following these good practices in the code:

https://github.com/cmloegcmluin/sagitta ... lysis/data

Note ‘asciiUnicode.js’ and ‘levelEdas.js’.

Re: New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Wed Jun 17, 2020 4:29 pm
by Dave Keenan
cmloegcmluin wrote: Wed Jun 17, 2020 3:59 pm You’ll be happy to learn then, that I am already following these good practices in the code:

https://github.com/cmloegcmluin/sagitta ... lysis/data

Note ‘asciiUnicode.js’ and ‘levelEdas.js’.
Excellent. And it's exciting to see that code!

I suppose you've seen the crazy Microsoft camel-case spec with its special case for 2-letter acronyms.
https://docs.microsoft.com/en-us/dotnet ... onventions

Re: New [sub]...[/sub] and [sup]...[/sup] BBCodes

Posted: Thu Jun 18, 2020 7:34 am
by cmloegcmluin
Dave Keenan wrote: Wed Jun 17, 2020 4:29 pm I suppose you've seen the crazy Microsoft camel-case spec with its special case for 2-letter acronyms.
https://docs.microsoft.com/en-us/dotnet ... onventions
Image