11
$\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$
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$
  • $\begingroup$ Great and very helpful answer. $\endgroup$ – Always Confused May 22 '17 at 15:36
  • $\begingroup$ Could plz anyone add with it, what 'pu' stands for in $\pu{1.16\AA}$? (seemingly ce means chemistry) $\endgroup$ – Always Confused May 22 '17 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 May 22 '17 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$ – Always Confused May 22 '17 at 15:47
  • $\begingroup$ What does \pu mean? $\endgroup$ – Pritt Balagopal May 22 '17 at 16:11
  • 1
    $\begingroup$ @PrittBalagopal see link in my comment above $\endgroup$ – orthocresol May 22 '17 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 May 23 '17 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 May 24 '17 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$ – Gaurang Tandon Apr 26 '18 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 Apr 26 '18 at 7:28
  • $\begingroup$ @orthocresol Oh, ok, thanks! $\endgroup$ – Gaurang Tandon Apr 26 '18 at 12:41
5
$\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$
  • 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 May 27 '17 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$ – Linear Christmas May 28 '17 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$ – Martin - マーチン Sep 10 '17 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$ – Linear Christmas Sep 10 '17 at 15:40
2
$\begingroup$

Eventually I gave up on trying to use $\LaTeX$'y compliant 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 Windows, I can recommend to use a free program called WinCompose to quickly insert practically any special character one can think of (of course, if the font has its symbol implemented). This works in every text field where Unicode is supported, with MathJax too.

Basically the program 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 an Alt key, by default right Alt); 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 = ␣
etc.

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

$\endgroup$
  • 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 Sep 9 '17 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .