# How to render Angstrom and Parts-per notations in MathJax?

Summary: Angstrom, Parts per thousand, Parts per Ten-Thousand cannot be displayed.

Prior efforts: Searched Google and Detexify.

1. (The letter), (the diacritic mark).

The detexify (reference) tool successfully identified and gave a command for it.

.

But that command \AA did not work. Such as $\AA$ giving $\AA$

(obtained output).

1. Only the Percent works ($\%$) ($\%$).

(Reference: Detexify)

But none of Parts per Thousand and Parts per Ten-thousand worked.

.

Commands for Parts per thousand ($\textperthousand$ , $\permil$) and Parts per ten-thousand ($\textpertenthousand$) renders these respectively:

$\textperthousand$, $\permil$, $\textpertenthousand$.

(image version)

Now, my questions are;

1. Could I use them in MathJax? (By any other command?)

(Seems like the "text mode" is causing some trouble. Maybe they have some "math mode" counterpart?).

2. Could I use them by any means other than MathJax? (Say using Markdown and Basic HTML)?

For Angstroms, check out: What additional formatting features are available to MathJax (possibly via \require{})?

$\require{mediawiki-texvc}$
The $\ce{C-O}$ bond length in carbon dioxide is $\pu{1.16 \AA}$.


$\require{mediawiki-texvc}$ The $\ce{C-O}$ bond length in carbon dioxide is $\pu{1.16 \AA}$.

As for the others, I haven't experimented, but I wouldn't be too surprised if it's simply not possible. Detexify indicates that you need to load several more packages to access those symbols, and packages in MathJax $\neq$ packages in LaTeX.

If anybody knows more about it or has a more conclusive answer please feel free to edit my post.

Some workarounds:

1. You can copy-paste the relevant Unicode symbols (easiest way is to Google the name of the symbol):

‰ (Per mille)

‱ (Basis point)

Copy-pasting the symbol within MathJax works too:

$0.2\% = 2‰ = 20‱$

$0.2\% = 2‰ = 20‱$

2. Alternatively, MathJax is capable of displaying Unicode symbols (see this other answer on the meta post linked above):

$\unicode{x2030} \,\, \cdots \,\, \unicode{x2031}$

$\unicode{x2030} \,\, \cdots \,\, \unicode{x2031}$

As far as I can tell, though, this renders the exact same output as option 1.

• Could plz anyone add with it, what 'pu' stands for in $\pu{1.16\AA}$? (seemingly ce means chemistry) May 22 '17 at 15:42
• Seems to be "physical units": chemistry.meta.stackexchange.com/questions/3286/… If you have questions about mhchem, you can drop the author of the package a comment on any of his posts here. (Or ask a question, like what you've done here, of course!)
– orthocresol Mod
May 22 '17 at 15:44
• Great! I was also looking for measurement units like Coulomb. Everything was getting italicized. And this is the mystery. Thanks very much. May 22 '17 at 15:47
• What does \pu mean? May 22 '17 at 16:11
• @PrittBalagopal see link in my comment above
– orthocresol Mod
May 22 '17 at 16:24
• It would be nice if the font on \AA in the tekvc package were serif. The sans serif (Arial?) it puts in is really garishly out of place with the rest of the Jax. :-/ May 23 '17 at 1:15
• Maybe I could add a fake Å to \pu. It could look like this: $\mathrm{ \raise{-0.3ex}{\rlap{\stackrel{˚}{\phantom{A}}}}A \LARGE \raise{-0.3ex}{\rlap{\stackrel{˚}{\phantom{A}}}}A }$ What do you think? May 24 '17 at 7:07
• I don't understand the stuff going on here with so many packages and hacks. Why not use the basic HTML entity &Aring;? (doesn't work in comments/only in posts) Apr 26 '18 at 2:07
• @GaurangTandon (1) because the last two words of the question title (2) Unicode symbols (which work everywhere) have already been mentioned in both my answer and andselisk’s answer
– orthocresol Mod
Apr 26 '18 at 7:28
• @orthocresol Oh, ok, thanks! Apr 26 '18 at 12:41
• @orthocresol : $\pu{1.5 \AA}$ did not work for $\pu{1.5 Å}$ for me. Mar 27 at 22:00
• @MathewMahindaratne Did you also use $\require{mediawiki-texvc}$? Does the example at the top of this post display correctly for you?
– orthocresol Mod
Mar 27 at 22:11
• @MathewMahindaratne No, I won't remove this version, as it works just fine for me and for others (cf. first link in my answer). If you have the time to spare, I'd instead suggest making a separate post, so that we can figure out why it doesn't work on your end; and then I could add a disclaimer or something, once we understand the problem.
– orthocresol Mod
Mar 27 at 23:12
• @MathewMahindaratne However, I think I should probably add that we can just use the Unicode symbol. I'll do that when I manage to find some time....
– orthocresol Mod
Mar 27 at 23:16

There are other possible solutions. Whether they are simpler, I leave for the reader to decide. To write angstrom, you may use \overset{\circ}{\mathrm {A}} which yields

$$\overset{\circ}{\mathrm {A}}$$

almost as desired. Modify this slightly, \overset{\lower.5em\circ}{\mathrm{A}}, to achieve

$$\overset{\lower.5em\circ}{\mathrm{A}}.$$

For permille, or similar quantities, ^0/_{000} gives $$^0/_{000}.$$

Remove the extraneous spacing by adding backspaces and exclamation marks via ^0\!\!/\!_{000}; its output is $$^{0}\!\!/\!_{000}.$$

Make the zeros small to finish it off, ^{\small{0}}\!\!/\!_{\small{000}}:

$$^{\small{0}}\!\!/\!_{\small{000}}.$$

• I like the effort. The only caveat with these, as I've learnt, is that mathjax renders ever so slightly differently on different platforms. So, while it looks very nice on the two systems I'm using (Chrome/Win10 and iOS app), there's no guarantee it looks the same on someone else's.
– orthocresol Mod
May 27 '17 at 15:22
• @orthocresol Thanks. The other thing might be that small updates ever so slightly change spacing parameters. From my end, I can confirm it works on Android (app and browser) + Win8.1/Mozilla. Are other platforms even welcome on ChemSE? May 28 '17 at 14:57
• I have Chrome and Xubuntu, and it doesn't look bad, but it also doesn't really look nice (especially the permille without spacing). MathJax has serious limitations, and while I recommend to switch to SI units in any case, it would certainly make these typesetting issues obsolete, too. Sep 10 '17 at 11:05
• @Martin-マーチン Thanks for the comment, and I agree. Would you be willing to share a screenshot of the way per ten thousand sign looks like on Xubuntu/Chrome? Sep 10 '17 at 15:40

Eventually I gave up on trying to use $$\mathrm\LaTeX$$ escape sequences for every non-ASCII character, and decided to solely switch to XeLaTeX for scientific writing with a set of fonts which support as many characters as possible (UTF-8 only documents).

That's said, if you are on a desktop computer, I'd recommend to invest some time in getting to know a compose key to quickly insert practically any special character one can think of (of course, if the current font includes this glyph). This works in every text editor with Unicode support and with MathJax in browser, too. Most Linux DEs and macOS offer this functionality out of the box. For Windows users there is WinCompose (free).

Basically, this adds an extra layer for the user allowing to use intuitive keys combinations instead of dull Unicode codes which are hard to remember. Pressing a Meta key initiates the input, and if it matches a program defined macros, a corresponding symbol will be inserted (Meta is typically the Alt key, by default right Alt aka AltGr); here are few examples which I personally cannot live without (I use US keyboard layout):

Meta o A = Å
Meta % o = ‰
Meta % % = ‱

Meta " a = ä
Meta s s = ß

Meta * l = λ
Meta * L = Λ

Meta / = = ≠
Meta + - = ±
Meta Meta o i i i n t = ∰

Meta o o = °
Meta E = = €
Meta o R = ®

Meta < - > = ↔
Meta \ SPC = ␣

and so on. You can also tweak sequences in ~/.XCompose file and add your own ones; I only add a couple to struggle less when typing standard states and molecular geometry:

<Multi_key> <minus> <0> <minus>: "⦵"  U29B5  # PLIMSOLL
<Multi_key> <a> <n> <g> <l> <e>: "∠"  U2220  # ANGLE


This is by no means a complete substituent, but rather a nice tool which makes work with special characters less miserable and calling for a Character Map less frequent.

• On MacOS there are some keyboard shortcuts for some of these. The ones I personally use most are Option+Shift+8 (°, degree symbol); Option+= (≠, not equal to symbol); Option+Shift+= (±, plus minus symbol); Option+- (–, en dash); Option+Shift+- (—, em dash); Option+Space (non-breaking space). Alphabet with diacritical marks can be accessed by pressing + holding the relevant letter on the keyboard, which summons a popup: e.g. Å, ü, ç, ź
– orthocresol Mod
Sep 9 '17 at 14:18