Please add subscript/superscript formatting to the attribute table

07-18-2018 02:53 PM
Status: Open
Labels (1)
New Contributor III

ESRI ESRI, Could you please allow for attribute tables to retain subscript/superscript formatting? As right now any chemical formulas convert to plain text and this is not of sufficient enough to present for industry standards.


Currently I have to add this formatted text manually via copy/paste from Microsoft. However this method will not allow for, or retain a mask/glow; and without the mask the labels are not very legible when placed on a map or over a satellite image.


IF it is not possible to allow the attribute table to retain formatting:

At the very least could you add a text box which has the capabilities to format sub/superscript (and retain a mask)? As using insert>object>wordDoc also does not allow for special effect text (such as a mask/glow).


Currently (in 10.6) any text that supports a mask/glow will not support subscripts/superscripts. *With exception of html script but this is not realistic for my quantity of my data* 


Michael Huber‌ it seems like the driving requirement is labeling?

You should be able to control superscript and subscript in labels through formatting tags:

Formatting tags available in ArcMap—Help | ArcGIS Desktop 

Here is a quick example in ArcGIS Pro (don't ask why I'm using county name to the power of state fips code! [but if you do ask, it's the data I had at hand])

Now I'm trying to picture what data you might have and how it is structured in your attribute table.  You say chemical formulas, so you might have something like KMnO4

But the table is storing this as KMnO4, correct?

You could still probably get the label formatting to work with formatting tags, but it might require a little data manipulation to parse out the text from numbers.  Anyway, just wanted to share this as a possibility.


Hey Kory,

Thanks so much for giving my problem a thought! I am aware of the formatting tags; however, I am not sure if they can help me. My attribute table is full of values like KMnO4-2, you are correct the table stores it as plain text KMnO4-2 (which is not sufficient for our scientists).

I am having an issue figuring out how to make this work, as not every number will be a subscript, so I can’t just code an advanced expression to subscript all numerical characters. The only way I can see formatting tags helping is if I split up the Chemical formulas, so each element has their own attribute, and each element will have a separate attribute for both number of elements and charge. Then I could write an expression like the example you have given me, but I would need to implode these formulas manually into their own attributes as they aren’t even all the same length (so I can’t use string functions to implode). By the time I would have everything split up into attributes I could have probably just done them manually using VBA/Python (both would be insane with my quantity of data).

Any further suggestions or thoughts are greatly appreciated though!


Michael Huber


Hmm, yes, unfortunately that is what I was thinking by "data manipulation to parse out the numbers" - that they'd have to be split out into their own fields in order to use my example above.

Just some other crazy thoughts, but might still require more work than you'd like...

Create a "library" of the chemical formula images and enable attachments on the feature class.  For each record that has a specific chemical formula, attach the image of the formula.  Then in pop-ups you would get something like this:

Something similar could actually be done for labeling, again, would depend on having that library of formula images.  Those could be added to a style and then used in labeling.  I haven't taken (don't have) any time to experiment with resolution, etc. but you could end up with something like this:

Again, would have to experiment with resolution and scaling depending on what you need in a final product.  This would also require having a separate label class for each formula which would also entail a lot of set up work.  So between these two hare-brained ideas, I would personally choose to enable attachments and use popups.  That obviously won't work for a printed paper map though.

I hope this helps.


For anyone else who may have this issue, I landed on labeling through a dictionary which contains all the formatting tags. Snips from my code are available here: labeling - Using Python Dictionary to label subscript formatting ArcMap 10.6 - Geographic Informatio...