# SubsuperscriptBox and SuperStar

I have a notational reason (using the Notations package) to have some symbols display as C*60 (with the 60 lined up under the *). Internally, this is represented in Mathematica as:

\!$$\*SubsuperscriptBox[\(C$$, $$60$$, $$*$$]\)


However, whenever I do something that executes this, it converts to (C60)*, which is internally represented as:

SuperStar[(Subscript[C, 60])]


I am needing to pass the original version, a SubsuperscriptBox, to a function and then convert it to:

SubsuperscriptBox["C", "60", "*"]


So that I can use it as the left-hand side of a Notation statement (within a ParsedBoxWrapper), but I cannot seem to get it there. I am happy passing either the original subsuperscript version or a string version of it. Are there any methods to do the conversion I am looking for? Thanks!

Edit to add requested specific detail:

<< Notation


I then introduce a bunch of custom notation that doesn't figure in to the problem I am experiencing (I am generating a notation system that allows me to represent and manipulate chemical reactions using Chemistry-standard notation). After I set up the reaction arrow notation and several other components, I wish to have a streamlined method to assign labels for chemical species to internal variable/function names. I can do this manually one at a time like this:

But because this is a package I want my students to be able to use, I would prefer for them to not have to use the palettes. I would like to define a function for them to pass a list of pairs to, like this:

Or perhaps like this:

I have successfully done something similar in cases where I don't have the starred-superscript, so in those cases I am confident that I can write the AssignLabels function. For a single assignment (with two parameters rather than a list of ordered pairs), it would look something like this:

The problem is that while I can enter the and have it interpreted exactly as I need it to, as

SubsuperscriptBox["C", "60", "*"]


when I directly put it into the Notation palette box, when I assign it to a variable or pass it to a function, it gets interpreted into

SuperStar[(Subscript[C, 60])]


And if I try to maintain the structure by making it a string, I cannot find a set of function calls that will convert it back to the desired target.

Does that help clarify my question?

• Could you provide more details of what you're doing? – Carl Woll Apr 5 '19 at 5:21
• Question edited to add more details. Let me know if it isn't sufficient. Thanks! – Kevin Ausman Apr 5 '19 at 22:28
• Hi Kevin, I hope you will make your package available for everyone in thè package repository when it is finished – magma Apr 6 '19 at 15:31
• Thanks for the suggestion, magma! Yes, I hope to disseminate my package, and the package repository is a great place to put it. I have a lot of chemical quantum mechanics materials as well that I hope to disseminate. Highest priority is publication in peer-reviewed journals, because I am a faculty member chasing tenure, but I definitely want this material available generally as well. – Kevin Ausman Apr 6 '19 at 18:44
• @magma: I have just uploaded my package to the package repository. Until it is approved, you can access it here: kevinausman.net/home/complex-symbols-package – Kevin Ausman Jun 23 '19 at 21:27

The simplest possibility is to just accept the fact that Mathematica parses SubsuperscriptBox["C", "60", "*"] as SuperStar[Subscript[C, 60]] and use:

AssignLabel[SuperStar[Subscript[b_, s_]], sym_Symbol] := Notation[
DoubleLongLeftRightArrow[
ParsedBoxWrapper @ SubsuperscriptBox[MakeBoxes[b], MakeBoxes[s], "*"],
ParsedBoxWrapper @ SymbolName[sym]
]
]


Other possibilities are to create an alias that has additional pieces that prevent it from being interpreted as SuperStar or Power`. I could provide an answer along those lines if you're interested.

• I am extremely interested in such a solution. Thanks! – Kevin Ausman Apr 6 '19 at 15:19