Sciencemadness Discussion Board
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Subscript
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 15-2-2011 at 14:39
Subscript


Would it be possible to have a subscript button added to the posting/editing form, for those of us who are unaware or incapable of the HTML markup for it? It might help the "kewls" to be less "kewl", and would make formulae easier to read for the rest of us. :)

For those who aren't familiar; typing H&lt;sub&gt;2&lt;/sub&gt;O will appear as H<sub>2</sub>O when posted.

[Edited on 2/15/11 by bfesser]
View user's profile View All Posts By User
Sedit
International Hazard
*****




Posts: 1934
Registered: 23-11-2008
Member Is Offline

Mood: Manic Expressive

[*] posted on 15-2-2011 at 15:15


Thanks Bfesser because on other forums I use command but it does not work here so I dont bother although I think it makes reading the formulas much simpler.




Knowledge is useless to useless people...

"I see a lot of patterns in our behavior as a nation that parallel a lot of other historical processes. The fall of Rome, the fall of Germany — the fall of the ruling country, the people who think they can do whatever they want without anybody else's consent. I've seen this story before."~Maynard James Keenan
View user's profile View All Posts By User
hissingnoise
International Hazard
*****




Posts: 3877
Registered: 26-12-2002
Member Is Offline

Mood: Pulverulescent!

[*] posted on 16-2-2011 at 03:43


H<sub>2</Sub>SO<sub>4</sub> ---It does work here but who can be bothered?
Then again . . .
It doesn't help on patents!


[Edited on 16-2-2011 by hissingnoise]
View user's profile View All Posts By User
Arthur Dent
International Hazard
*****




Posts: 534
Registered: 22-10-2010
Member Is Offline

Mood: entropic

[*] posted on 16-2-2011 at 17:21


@ bfesser: Hey thanks for the tip dude, didn't know that one!

Let's try this... C<sub>16</sub>H<sub>21</sub>NO<sub>3</sub>

Neat! :D

Robert


[Edited on 17-2-2011 by Arthur Dent]




--- Art is making something out of nothing and selling it. - Frank Zappa ---
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 28-2-2011 at 15:06


Polverone; any comment?
View user's profile View All Posts By User
mr.crow
International Hazard
*****




Posts: 884
Registered: 9-9-2009
Location: Canada
Member Is Offline

Mood: 0xFF

[*] posted on 11-3-2011 at 12:58


Any modern forum software would have a nice little Javascript text formatting editor. Basically you select some characters, press a button and it puts the SUB around your selection. Also makes it easier to add links and images



Double, double toil and trouble; Fire burn, and caldron bubble
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 26-2-2012 at 09:00
Relevant HTML


Quick code to remember:

&amp;rarr; produces &rarr;
&amp;uarr; produces &uarr;
&amp;darr; produces &darr;
&amp;deg; produces &deg;
&amp;micro; produces &micro;
&amp;middot; produces &middot; as in MgSO<sub>4</sub> &middot; <em>n</em>H<sub>2</sub>O
&lt;sub>subscript&lt;/sub> produces<sub>subscript</sub>
&lt;sup>superscript&lt;/sup> produces<sup>superscript</sup>

[used in this post]
&amp;amp; produces "&" without invoking it as markup, as in &amp;amp;
&amp;lt; produces "<" without invoking it as markup, as in &lt;sub>
Witout using these codes, your browser will try to interpret the code as markup. This can also be avoided by using the BB Code &#91;code]&#91;/code] available by hitting the <strong>#</strong> button above the primary text box in reply mode.

[Edited on 2/26/12 by bfesser]




View user's profile View All Posts By User
Neil
International Hazard
*****




Posts: 556
Registered: 19-3-2008
Member Is Offline

Mood: No Mood

[*] posted on 26-2-2012 at 09:09


Usefull post thank you.
View user's profile View All Posts By User
AirCowPeaCock
National Hazard
****




Posts: 311
Registered: 9-1-2012
Location: In your nation!
Member Is Offline

Mood: Hazardous

[*] posted on 26-2-2012 at 12:48


Would it be possible to represent both a subscript and superscript directly above and bellow eachother. It would only be marginally useful on this forum, but still...



BOLD

View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 26-2-2012 at 18:32


Yes, but it requires CSS. I'm a little tired tonight, but tomorrow morning--if I remember--I'll revise this post with the necessary code.



View user's profile View All Posts By User
Bot0nist
International Hazard
*****




Posts: 1559
Registered: 15-2-2011
Location: Right behind you.
Member Is Offline

Mood: Streching my cotyledons.

[*] posted on 26-2-2012 at 19:35


Thanks bfesser. My HTML was a bit rusty. I always used sup and sub, but the rest were very helpful.



U.T.F.S.E. and learn the joys of autodidacticism!


Don't judge each day only by the harvest you reap, but also by the seeds you sow.
View user's profile View All Posts By User
bfesser
Resident Wikipedian
*****




Posts: 2114
Registered: 29-1-2008
Member Is Offline

Mood: No Mood

[*] posted on 8-3-2012 at 21:04


Quote: Originally posted by AirCowPeaCock  
Would it be possible to represent both a subscript and superscript directly above and bellow eachother. It would only be marginally useful on this forum, but still...


I haven't forgotten about this question. I took some time to think about it, and came up with the answer that there is no clean way to do it without resorting to a monospace font. Then I did some quick research online, and the consensus appears to be that there is no good way to do it. Sorry.

You could use an HTML table&mdash;which is a big webdesign no-no for something like this.
Or, you could use relative positioning with CSS, but it gets ugly with font variations and the horizontal positioning. Think monospace font.
Or, you could resort to <a href="http://tex.stackexchange.com/questions/8255/superscript-and-subscript-together" target="_blank">LaTeX</a>.
Finally, you could use <a href="http://www.xml-cml.org/" target="_blank">CML</a>, which, so far as I'm aware, will work for no-one.

[Edited on 3/9/12 by bfesser]




View user's profile View All Posts By User
Hexavalent
International Hazard
*****




Posts: 1554
Registered: 29-12-2011
Location: Wales, UK
Member Is Offline

Mood: Silylated

[*] posted on 20-6-2012 at 08:04


Test some of these out...

&micro
&deg
&middot

Very nice, would it be possible to have this list next to our 'Quick Reply' box next to, e.g. the smileys?

I can't seem to get the arrow ones to work though...?


[Edited on 20-6-2012 by Hexavalent]




"Success is going from failure to failure without loss of enthusiasm." Winston Churchill
View user's profile View All Posts By User
watson.fawkes
International Hazard
*****




Posts: 2793
Registered: 16-8-2008
Member Is Offline

Mood: No Mood

[*] posted on 20-6-2012 at 08:19


Quote: Originally posted by Hexavalent  
I can't seem to get the arrow ones to work though...?
As a rule, HTML entities (the lingo for these abbreviations) require a semicolon at the end. That is, use "&amp;micro;" rather than just "&amp;micro" for "&micro;".

The problem with these for arrows is that entities are just single characters, which have glyphs that are about the width of a single character. Proper arrows are wider than that. A BBCode tag for "rightarrow" could be implemented that puts the requisite number of characters in place, but that would require new code, and new code on a legacy codebase that's planned to be scrapped. You can, however, use "&amp;rarr;" to generate "&rarr;", which looks awful to me; the shaft is not long enough and the head is too small.
View user's profile View All Posts By User
Hexavalent
International Hazard
*****




Posts: 1554
Registered: 29-12-2011
Location: Wales, UK
Member Is Offline

Mood: Silylated

[*] posted on 20-6-2012 at 13:49


I guess so, but for most, general purposes &rarr; should be sufficient to demonstrate that a reaction is taking place and to differentiate between reactants and products; IMO, it still looks better than ---->.

For a reaction where more detail needs to be given, e.g. you're showing an organic reaction and want to include notes about reaction temp., catalysis etc. above the arrow then it can always be made in free programs such as ChemSketch (an excellent program for organic work BTW).




"Success is going from failure to failure without loss of enthusiasm." Winston Churchill
View user's profile View All Posts By User

  Go To Top