13
$\begingroup$

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


Prior efforts: Searched Google and Detexify.

  1. Angstrom.

    Angstrom Symbol(The letter), (the diacritic mark).

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

    Angstrom identified by detexify.

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

    Obtained output (obtained output).


  1. Parts per notations.

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

    (Reference: Detexify) enter image description here

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

    Parts per thousand and parts per ten thousand.

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

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

    (image version)
    parts per notation output


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)?

$\endgroup$

3 Answers 3

12
$\begingroup$

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.

$\endgroup$
18
  • $\begingroup$ Great and very helpful answer. $\endgroup$
    – user36001
    Commented May 22, 2017 at 15:36
  • $\begingroup$ Could plz anyone add with it, what 'pu' stands for in $\pu{1.16\AA}$? (seemingly ce means chemistry) $\endgroup$
    – user36001
    Commented May 22, 2017 at 15:42
  • 2
    $\begingroup$ 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!) $\endgroup$
    – orthocresol Mod
    Commented May 22, 2017 at 15:44
  • $\begingroup$ Great! I was also looking for measurement units like Coulomb. Everything was getting italicized. And this is the mystery. Thanks very much. $\endgroup$
    – user36001
    Commented May 22, 2017 at 15:47
  • $\begingroup$ What does \pu mean? $\endgroup$ Commented May 22, 2017 at 16:11
  • 1
    $\begingroup$ @PrittBalagopal see link in my comment above $\endgroup$
    – orthocresol Mod
    Commented May 22, 2017 at 16:24
  • 1
    $\begingroup$ 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. :-/ $\endgroup$
    – hBy2Py
    Commented May 23, 2017 at 1:15
  • 4
    $\begingroup$ 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? $\endgroup$
    – mhchem
    Commented May 24, 2017 at 7:07
  • $\begingroup$ I don't understand the stuff going on here with so many packages and hacks. Why not use the basic HTML entity Å? (doesn't work in comments/only in posts) $\endgroup$ Commented Apr 26, 2018 at 2:07
  • $\begingroup$ @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 $\endgroup$
    – orthocresol Mod
    Commented Apr 26, 2018 at 7:28
  • $\begingroup$ @orthocresol Oh, ok, thanks! $\endgroup$ Commented Apr 26, 2018 at 12:41
  • 1
    $\begingroup$ @orthocresol : $\pu{1.5 \AA}$ did not work for $\pu{1.5 Å}$ for me. $\endgroup$ Commented Mar 27, 2021 at 22:00
  • $\begingroup$ @MathewMahindaratne Did you also use $\require{mediawiki-texvc}$? Does the example at the top of this post display correctly for you? $\endgroup$
    – orthocresol Mod
    Commented Mar 27, 2021 at 22:11
  • 1
    $\begingroup$ @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. $\endgroup$
    – orthocresol Mod
    Commented Mar 27, 2021 at 23:12
  • 1
    $\begingroup$ @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.... $\endgroup$
    – orthocresol Mod
    Commented Mar 27, 2021 at 23:16
7
$\begingroup$

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}}.$$

$\endgroup$
4
  • 2
    $\begingroup$ 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. $\endgroup$
    – orthocresol Mod
    Commented May 27, 2017 at 15:22
  • $\begingroup$ @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? $\endgroup$ Commented May 28, 2017 at 14:57
  • $\begingroup$ 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. $\endgroup$ Commented Sep 10, 2017 at 11:05
  • $\begingroup$ @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? $\endgroup$ Commented Sep 10, 2017 at 15:40
3
$\begingroup$

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.

$\endgroup$
1
  • 1
    $\begingroup$ 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. Å, ü, ç, ź $\endgroup$
    – orthocresol Mod
    Commented Sep 9, 2017 at 14:18

You must log in to answer this question.