An iOS and iPadOS Shortcut for rapidly typing formatted scientific constants (in Unicode)

As a physics teacher I frequently refer to and calculate with scientific constants (like the speed of light and Planck’s constant). So when I am on my iPhone it is helpful to be able to type them easily as I refer to them in messages, notes and tweets. In a previous post I described how to use the Text Replacement feature of iOS to design brief unique phrases that automatically expand into scientific and mathematical symbols (such as μ ω ∫ σ and super and subscripts etc).

Even with these text replacement shortcuts typing scientific constants complete with scientific number formatting and correctly formatted units can be laborious. And after delving deeper into iOS Shortcuts this summer I designed a Shortcut that uses a simple iOS Note to define a whole table of scientific constants for rapid inputting into any text area on an iOS (or iPadOS) device. In addition to the nicely Unicode formatted text representations it can also output pure numbers for calculations (in calculators, spreadsheets or programming code).

Below is a video demonstration of the Shortcut in action. As I explain in the video the usage scenarios of this Shortcut are not limited to inputting scientific constants. It could be used for inputting engineering reference values, full chemical (stochiometric) equations, long mathematical equations etc. The Note is very customisable so feel free to experiment. Below the embedded video are further written instructions on the use of the Shortcut with links to the Shortcut and Note for you to download for free.

Get started with this Shortcut

Click the icon below to download the Shortcut

scientific constants shortcut widget icon

Next you need the Note which acts as the database for the Shortcut. Add the Note into your Notes app (Sorry that the link isn’t working currently, in the meantime please create a note with exactly the same layout as the one in the video, the table can be copied from this shared Evernote note). If you rename the Note remember to update the Note Title in the Shortcut.

When you add the Shortcut an import question is used to give you the option of renaming the Note Title should you wish to do so.

iOS Notes app icon

Instructions on use

These instructions are also included as a Comment block in the Shortcut itself.

The Scientific Constants Shortcut can be used in the Shortcuts widget and in Share Sheets. The shortcut prompts the user to select a scientific constant and to select whether a text representation of the value and unit or a numerical value is desired. The result is copied to the clipboard to be pasted where desired.

When used from the Widget it automatically prompts the user to pick a constant from a list.

In the Share sheet it accepts text as input. So if a symbol for a constant has already been typed into a document / note it can be selected, then run the shortcut from the Share menu and use it to get the constant for insertion into the document / note etc.

If Text output is selected the result will be a Unicode representation of the constant (with appropriate SI unit) that can be pasted into any text area / document.
If Number output is selected the result will be a number that can be used in calculators, spreadsheets etc for calculation. Numerical output can also be pasted into any text area / document if desired.

The constants are defined in a standard iOS Note which is available for copying alongside this Shortcut. The Note contains only a title (Scientific constants table) and a table, don’t add any other text outside the table. Within the table you are free to add new rows, delete rows and editing rows as you see fit.

Detailed installation instructions

Download the Shortcut to your device. (You need the Shortcuts app installed.)

2. Next add the Shortcut. When you add the Shortcut you should be prompted to set the title of the database note, if you are using my note you can leave the default text “Scientific constants table”.

3. In the shortcut settings make sure that the Widget and Share Sheet options are toggled on.

4. Add the database note to your iOS Notes app. iOS note sharing leaves much to be desired so I have as of yet been unable to create a publicly shared iOS note for download – if that changes I will add a download link here. Until then you will need to create your own copy of the database note. I have created a duplicate note in Evernote (available here) and you can copy the table from that note in a web browser and paste it into an iOS note. Create a new note, give it a title and paste the table from the Evernote webpage above (or add a three-columned table the first row of which needs to be a header row but you can customise the text of the header).

5. Now to use the shortcut from the share sheet. As you are typing type a symbol for a constant (e.g. “c” or “Nₐ” etc) and select it. The black contextual menu pops up. Swipe the menu to the left until you can see the “Share…” option. Tap that and then tap on the Shortcuts icon.

6. Scroll the list of Shortcuts until you find the Scientific Constants button and tap it.

7. The Shortcut is now running. If the symbol you selected is in your table the Shortcut will ask you if you want to look up that symbol. Tap “Yes”. You are then asked if you want to get “Text” or “Number” output. Choose one and the Shortcut will copy the result to your clipboard. Tap on OK and when you’ve returned to your document paste the result where you want it.

8. You can also call up the menu of constants to choose from by selecting any text (doesn’t have to be a symbol of a constant) and running the Shortcut from the Share sheet. (The Shortcut searches your database for whatever text you selected and if it isn’t found it will present the menu of options to choose from.)

9. To use the Shortcut from the widget. Simply swipe right on your lock screen or home screen to show the widgets screen. Scroll down if necessary to show the Scientific Constants Shortcut and tap on it. The menu of available constants is shown. Tap the constant you want. You are then asked if you want to get “Text” or “Number” output. Choose one and the Shortcut will copy the result to your clipboard. Paste the result where you want it.