# Dimensional analysis with chemistry equations on stack exchange?

I know we use Mathjax/mhchem.

What I would like to know, is if its possible to cross out units as part of dimensional analysis.

Here is an example of the desirable effect:

$$\require{cancel}y=\frac{(x+1)\cancel{(x+2)}}{3\cancel{(x+2)}}$$ $$\require{cancel}y=\frac{(x+1)\cancel{(x+2)}}{3\cancel{(x+2)}}$$
$$\require{cancel}m=n\cdot M=2.50\ \mathrm{mol}\times60.05\ \mathrm{g/mol}=150\ \frac{\mathrm{\cancel{mol}\ g}}{\cancel{\mathrm{mol}}}=150\ \mathrm{g}$$ $$\require{cancel}m=n\cdot M=2.50\ \mathrm{mol}\times60.05\ \mathrm{g/mol}=150\ \frac{\mathrm{\cancel{mol}\ g}}{\cancel{\mathrm{mol}}}=150\ \mathrm{g}$$