The Mathematica Journal
Departments
Download This Issue
Home
Feature Articles
Graphics Gallery
Tricks of the Trade
In and Out
Columns
The Mathematica Programmer
New Products
New Publications
Classifieds
Calendar
News Bulletins
Editor's Pick
Mailbox
Letters
Write Us
About the Journal
Staff and Contributors
Submissions
Subscriptions
Advertising
Back Issues

Chemical Notation

Q: Is there a neat general method for typesetting chemical isotopes such as [Graphics:../Images/index_gr_24.gif]?
A: P. J. Hinton (paulh@wolfram.com) writes: This requires a little trickery. There is a SubsuperscriptBox construct that can align the atomic and mass numbers as you wish, but you have to use an empty string as the "anchor" for the subscript and superscript. Evaluating the following expression demonstrates this idea.
[Graphics:../Images/index_gr_25.gif]
[Graphics:../Images/index_gr_26.gif]
Here is a Text cell which displays our isotope within an inline cell (see Edit [Graphics:../Images/index_gr_27.gif] Expression Input [Graphics:../Images/index_gr_28.gif] Start Inline Cell) in ChemicalFormula style:
The decay of the isotope [Graphics:../Images/index_gr_29.gif].
Inline cells use the setting for Default Inline Format Type under the Cell menu, which is TraditionalForm, meaning that the text will be set in whatever font is used by the style sheet for TraditionalForm (in this case Times).
The ChemicalFormula style contains some option settings which distinguish it from typical typeset math cells. If you examine any style sheet which includes the ChemicalFormula style (such as ArticleClassic, ArticleModern, Classic, Report, Textbook, TutorialBook, or this notebook), you will find the following style definition cell.
The style definitions of this cell can be inspected using Format [Graphics:../Images/index_gr_30.gif] Option Inspector... or by unformatting the cell (using Format [Graphics:../Images/index_gr_31.gif] Show Expression...) to display the cell formatting options.


Cell[StyleData["ChemicalFormula"],
  CellMargins->{{54, 25}, {2, 10}},
  DefaultFormatType->DefaultInputFormatType,
  AutoSpacing->False,
  ScriptLevel->1,
  ScriptBaselineShifts->{0.6, Automatic},
  SingleLetterItalics->False,
  ZeroWidthTimes->True]

In particular, SingleLetterItalics[Graphics:../Images/index_gr_32.gif]False means that single letter symbols for elements (e.g., H for hydrogen) will not be italicized.
Here is a button
[Graphics:../Images/index_gr_33.gif]
to speed entry of the box structure as inline cells in ChemicalFormula style. Here are instructions for using the button.
1. In a text cell, enter the element name, say Po.
2. Select the element name text with the mouse. Double-clicking over Po will do this.
3. Click on the button above.
4. Enter the subscript number.
5. Hit the [Graphics:../Images/index_gr_34.gif]key.
6. Enter the superscript number.
7. Hit [Graphics:../Images/index_gr_35.gif]k0l to exit the inline cell.
8. Continue typing the text.
After loading the Miscellaneous`ChemicalElements` package,
[Graphics:../Images/index_gr_36.gif]
we can look up the stable isotopes of any element.
[Graphics:../Images/index_gr_37.gif]
[Graphics:../Images/index_gr_38.gif]
Using our button we can write,
The stable isotopes of hydrogen are [Graphics:../Images/index_gr_39.gif] and [Graphics:../Images/index_gr_40.gif].
Note also that a Periodic Table palette, in which pressing an element pastes a description of its properties, is distributed with Mathematica.


Converted by Mathematica      September 29, 1999

[Prev Page][Next Page]