HighDots Forums  

superscript directly above subscript

alt.html.tags alt.html.tags


Discuss superscript directly above subscript in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott
 
Posts: n/a

Default superscript directly above subscript - 07-15-2003 , 02:17 AM






How do i use html code to place a superscript directly above a subscript
(needed for chemistry)



Reply With Quote
  #2  
Old   
Ernest Cline
 
Posts: n/a

Default Re: superscript directly above subscript - 07-15-2003 , 09:22 AM







"Scott" <sbpickering (AT) charter (DOT) net> wrote:
Quote:
How do i use html code to place a superscript directly above a subscript
(needed for chemistry)
Depends on what you mean by HTML code.
If you allow the use of CSS or SVG or MathML, there are any number of
solutions to your problem. If you mean just HTML, then the only thing I can
think of would be a kludge involving the use of <table>. For example:

<table>
<tr>
<td valign="middle" rowspan="2">O</td>
<td><small>-</small></td>
</tr><tr>
<td><small>3</small></td>
</tr>
</table>

would produce something similar to:
-
O
3
but it probably wouldn't look very good in most browsers, nor would it make
those who hate the use of <table> to manage display instead of to indicate a
real table very happy.



Reply With Quote
  #3  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: superscript directly above subscript - 07-15-2003 , 12:33 PM



On Mon, 14 Jul 2003 23:17:18 -0700, Scott wrote:

Quote:
How do i use html code to place a superscript directly above a subscript
(needed for chemistry)
If you are using XHTML, you should be able to achieve this with the Ruby
module, although I'm not sure which browsers support this yet:

http://www.w3.org/TR/xhtml11/doctype.html
http://www.w3.org/TR/ruby

Although the real solution would be to embed CML (chemical markup
language) into an XHTML document. Information on CML can be found here:

http://www.xml-cml.org/

However this will work in precisely 0 browsers.

--
Toby A Inkster BSc (Hons) ARCS | mailto:tobyink (AT) goddamn (DOT) co.uk | pgp:0x6A2A7D39
aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:tai (AT) jabber (DOT) linux.it
http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
playing://(nothing)


Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: superscript directly above subscript - 07-15-2003 , 01:19 PM



"Ernest Cline" <ernestcline (AT) mindspring (DOT) communism> wrote:

Quote:
"Scott" <sbpickering (AT) charter (DOT) net> wrote:
How do i use html code to place a superscript directly above a
subscript (needed for chemistry)

Depends on what you mean by HTML code.
Well, "HTML code" is a pretty well-defined concept, and the answer is
"no way".

Quote:
If you allow the use of CSS or SVG or MathML, there are any number
of solutions to your problem.
What the OP "allows" is irrelevant. It does not change the meaning of
"HTML code". But in CSS and in other non-HTML notations, there are
different ways of approaching the problem. The problem is essentially
presentational, so it is not a good idea to look for an HTML solution.

Quote:
If you mean just HTML, then the only
thing I can think of would be a kludge involving the use of
table>.
Well, instead of positioning a superscript, the kludge uses no
superscript whatsoever.

Considering a "formula" like
<span class="formula">O<sub>3</sub><sup>-</sup></span>
(i.e., letter O with subscript 3 and superscript -), if you would like
to make the superscript appear above the subscript, you could use

..formula { line-height: 1.8; }
..formula sup { margin-left: -0.7ex; }

in a stylesheet. The margin-left property effectively shifts the
superscript to the left, and the line-height property is useful for
defeating some IE bugs (and fairly natural, since you are using quite
some height here, more than we can expect to be available by default).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #5  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: superscript directly above subscript - 07-16-2003 , 06:40 PM



On Wed, 16 Jul 2003 20:30:25 +0100, Gazza wrote:

Quote:
Other than the W3C's Amaya browser though, there's very little support
for MathML.
Moz has native support. :-)

As of 0.99, I think.

--
Toby A Inkster BSc (Hons) ARCS | mailto:tobyink (AT) goddamn (DOT) co.uk | pgp:0x6A2A7D39
aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:tai (AT) jabber (DOT) linux.it
http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
playing://(nothing)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.