Hot answers tagged

18

Instead of \mathrm many people misused \ce, because it was shorter to type. Seeing this, the author of \ce added a little goodie into the mhchem extension. You can type $\pu{1.2E3 J//mol}$ $\pu{1.2E3 J//mol}$ From the documentation: Multiplication \pu{123 J s} $\pu{123 J s}$ \pu{123 J*s} $\pu{123 J*s}$ Division $\pu{123 kJ/mol}$ $\pu{123 kJ/mol}$ $...


13

CAVEAT: Due to the use of Unicode, the below may not render properly on all systems, especially mobile devices. (Thanks, Martin!) Green boxed checkmark \require{enclose} \enclose{box}[mathcolor="green"]{\unicode{x2714}} $ \require{enclose} \enclose{box}[mathcolor="green"]{\unicode{x2714}} $ Red boxed stylized 'X' \require{enclose} \enclose{box}[...


12

It can be rather problematic, and we ask that you do it only when the extended markup is really needed for the meaning of your question in the title. That might be quite often, depending on the questions you ask, we just ask that you consider it. Titles are a major part of how search engines index our content, so not only are the displayed results skewed ...


12

Update 2017-05-01 The MathJax CDN retired and the javascript-URL idea is not so easy any more, because of browser security. (Chrome stips away any leading javascript: when pasting into the URL line. SE modified the javascript: link so that it does not work.) So here is my take. I modified the script to load the new mhchem (v3), together with cancel (and ...


12

I personally prefer plain text titles only. For me this is a much more elaborate way of asking. Taking your example: Why does the transverse magnetization in Fourier Transform NMR consist of Ix+iIy ($\hat{I}_{\!x}+\mathrm{i}\hat{I}_{\!y}$)? I have no idea what $\hat{I}$ is. Even after reading the whole question I have no idea what it stands for. Currently ...


12

As described in the MathJax documentation, any of the core MathJax extensions can be loaded this way (though this can be restricted via the MathJax configuration).


12

Command Grouping Enable with: \require{begingroup} Environment: \begingroup ... \endgroup Quite a few things are possible with MathJax when you set your mind to it. For example you can define new commands with \newcommand{...}. In order to preserve default behaviour for the other posts, you might want enclose your post in a group with \require{begingroup}....


12

You can use the following for a green check mark since it is implemented in amssymb: $\Large\color{\green}{\checkmark}$ $\Large\color{\green}{\checkmark}$ $\Large\color{\green}{\unicode{10004}}$ $\Large\color{\green}{\unicode{10004}}$ (matches last entry from below) $\Large\color{\green}{\unicode{10003}}$ $\Large\color{\green}{\unicode{10003}}$ (should ...


12

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


11

It really is tricky to judge what is official and what is not. Here is my take on the several issues. This is not something that should be implemented in mhchem, as I think it is just sloppy typesetting. The used symbols are binary mathematical operators like “=” just as in $3<4$ and $\pi\approx3.14$. Therefore the correct typestting should ...


11

2-D Reaction Networks Enable with: \require{AMScd} Environment: \begin{CD} ... \end{CD} Construct two-dimensional grids connected with single-headed arrows. Double-headed and double-lined arrows appear not to be supported, unfortunately. mwchem (\ce{...}) is supported, but you have to apply it to each item in the grid, not the entire grid as a single ...


10

So, after failing to reproduce the problem in another browser, I have discovered my own answer. I want to leave this here for other folks who encounter this issue. The problem is in how you tell your browser to render MathJax. If you right-click on some maths, you will see the MathJax settings menu. Under Math Settings > Math Renderer you can change ...


10

A meta answer to a meta question, making it meta². Be careful with conventions like this. They are not as intuitive and universal as you might think. I've seen ✘ Artificial Flavours written on products in the UK, meaning "without artificial flavours". In Germany, for instance, this would be interpreted as the opposite. There, in votes, you do not tick ...


10

Yes and no. Yes - if the differences are cosmetic. One example of this is \dfrac vs. \frac, the latter of which is better supported on mobile. The difference here is cosmetic, and only noticeable when the fraction is inline. Compare \dfrac $\dfrac{1}{x^2}$ with \frac $\frac{1}{x^2}$. \dfrac $$\dfrac{1}{x^2}$$ \frac $$\frac{1}{x^2}$$ No - if the ...


10

\rm shouldn't be used at all as it's a deprecated command existing solely for the backward compatibility. Historically, the two-letter commands such as \it, \bf and \rm are the inheritance of the old $\mathrm{\LaTeX}$ 2.09 and AMS-$\mathrm{\LaTeX}$ 1.1 and are not the part of the current production-level $\mathrm{\LaTeX}2ε$ and probably will be dropped ...


10

This doesn't look right. $\mathrm{|{}^1H|}$ $\mathrm{|{}^1H|}$ and $\mathrm{|\ce{^1H}|}$ $\mathrm{|\ce{^1H}|}$ should give the same result. They don't. $\mathrm{|{}^1H|}$ $\mathrm{|\ce{^1H}|}$ I'll debug this further. Please don't use workarounds like \! because things will look weird after an update. (Hmm, StackExchange hasn't updated MathJax for 3 years.) ...


9

As a workaround, you could use $\ce{$0.5$\,H2O}$ to get $\ce{$0.5$\,H2O}$


9

Cancellation Lines Enable with: \require{cancel} Commands: \cancel{}, \bcancel{}, \xcancel{}, \cancelto{} Overstrike math content with: \cancel:     A diagonal line rising to the right \bcancel:   A diagonal line falling to the right \xcancel:   An 'X' \cancelto: A single-headed arrow rising to the right, with a ...


8

Based on the same principle, this little bookmarklet loads cancel in addition to mhchem: javascript:(function(){if(window.MathJax===undefined){var%20script%20=%20document.createElement(%22script%22);script.type%20=%20%22text/javascript%22;script.src%20=%20%22http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML%22;var%20config%20=%20%...


8

Or you can use $\ce{1/2\,H2O}$ to get $\ce{1/2\,H2O}$.


8

This bug was caused by /sites route in the stackexchange api not returning MHChemMathJax in markdown_extensions due to configuration changes for the mhchem 3.0 upgrade. The fix is already rolled out, so the apps should be rendering mhchem after a restart. However, the apps are using embedded mathjax & mhchem .js files. We'll need to update the apps in ...


8

You are mixing chemistry typeset with maths typeset; I don't think that the mhchem module is set up for this. There is probably much more wrong than what you consider a bug. Assuming $K$ is an equilibrium constant, it should be in italics (it is not with \ce) and the subscript should be in upright font (but get interpreted as variables within \ce). A similar ...


7

This issue has been solved since mid of 2016. $\ce{0.5H2O}$ renders as $\ce{0.5H2O}$. Short background: MathJax is NOT LaTeX. MathJax is a complete re-implementation of LaTeX using the same input syntax. Almost the same, with fine differences. The same applied to mhchem. The behavior of LaTeX/mhchem (written by me) was re-created for MathJax (by the ...


7

(4) Learning by example The MathJax and mhchem syntax in the left-hand side must be enclosed in single dollar signs $...$ for an inline (smaller) equation, or double dollar signs $$...$$ for a larger, centred, display-style equation. Type... To get... \ce{H2O} $$\ce{H2O}$$ \ce{Ca^2+(aq) + 2 OH-(aq) <=> Ca(OH)2(s)} $$\ce{Ca^2+(aq) + 2 OH-(aq) <=&...


7

Unfortunately the app uses a different version than the website. That does include the recent updates to mhchem, especially the \pu{...} command. While \dfrac can and should be avoided in general, that is not really true for the mhchem updates, as we would lose all the recent development discussed on meta. We'll have to see and wait how the developers ...


Only top voted, non community-wiki answers of a minimum length are eligible