-
-
Save simonjtyler/611053 to your computer and use it in GitHub Desktop.
Cell expressions for different ways of writing text superscripts in Mathematica: http://stackoverflow.com/q/3860574/421225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cell[TextData[{ | |
"the chemical formula for hydronium is H", | |
Cell[BoxData[ | |
FormBox[ | |
SubscriptBox["\[Null]", "3"], TraditionalForm]], | |
FormatType->"TraditionalForm"], | |
"O", | |
Cell[BoxData[ | |
FormBox[ | |
SuperscriptBox["\[Null]", "+"], TraditionalForm]], | |
FormatType->"TraditionalForm"], | |
" \ncompare with the formating if the whole expression is in \ | |
mathmode: ", | |
Cell[BoxData[ | |
FormBox[ | |
RowBox[{ | |
SubscriptBox["H", "3"], | |
SuperscriptBox["O", "+"]}], TraditionalForm]], | |
FormatType->"TraditionalForm"], | |
"\nthis is in mathmode, but with italics removed and a negative \ | |
space: ", | |
Cell[BoxData[ | |
FormBox[ | |
RowBox[{ | |
SubscriptBox[ | |
StyleBox["H", | |
FontSlant->"Plain"], "3"], "\[NegativeVeryThinSpace]", | |
SuperscriptBox[ | |
StyleBox["O", | |
FontSlant->"Plain"], "+"]}], TraditionalForm]], | |
FormatType->"TraditionalForm"] | |
}], "Text"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment