I believe that for each and every different website there should be a different text editor that meets the user's needs.

So for chemistry I feel like there should be a button that does the following:

  1. Person clicks the item he wants to format.
  2. The button automatically does this: $\ce{"Person's text"}$.
  3. There are two types, one that does the inline formatting: $\ce{"text"}$ & one that does break-line: $$\ce{"text"}$$.

I know that this might be a lazy way of doing things but I believe that it will promote more users to format their posts more efficiently thereby improving the look of Chemistry StackExchange as a whole.

So should we do this?

  • 2
    $\begingroup$ Such a button has been created by @MannishEarth, see here. I use IE since I do a lot of VBA-web interaction from Excel and the button doesn't work in IE. You can use programs like AutoHotKey to create your own script and then everytime you click a certain keyboard key, you can insert the scripted text into your whatever you are working on. $\endgroup$
    – ron
    Commented Mar 29, 2015 at 17:34
  • $\begingroup$ I mean it should be actively enabled for everyone, can moderators edit text editors? $\endgroup$
    – Asker123
    Commented Mar 30, 2015 at 21:23
  • $\begingroup$ And as we talk about graduation, I expect it to be at least considered: meta.chemistry.stackexchange.com/q/493/4945 $\endgroup$ Commented Mar 31, 2015 at 11:22

1 Answer 1


I see your point and therefore didn't downvote the question, but I disagree with the suggestion.

The button solution, which only embeds a string in $\ce{ }$ isn't flexible enough!

When will the button work?

It only cover the most simple cases, such as $\ce{CCl4}$!

Btw, it is very unfortunate that $...$ ($\TeX$ shorthand) instead of the recommended $\LaTeX$ shorthand \(...\) is supported in MathJax for the inline math mode, while the display mode can be triggered using $$...$$ and \[...\]. Note that additional backslashes are apparently needed in MathJax!

When will it fail?

  1. In expressions where additional curly brackets are necessary, such as in $\ce{^{235}U}$ or $\ce{PO4^{3-}}$.

  2. In cases where alignment of several chemical equations is wanted. Usually, \cee{...} rather than \ce{...} is needed then.

\begin{align*} \cee{ A + B &<=> C + D}\\ \cee{ C &<=> E + F}\\ \cee{ A + F &<<=> G}\\ \end{align*} 3. In cases where text, greek symbols or chemical formula have to be typeset above or below reaction arrows.

\[\ce{(Ar)3C-CN <=>[h\nu][\Delta] (Ar)3C+ + CN-} \]

  1. In all cases where math mode without the mhchem options is needed. Think thermodynamics or physical chemistry in general.

\[\Delta 2\theta = \frac{K\lambda}{L\cos\theta_0}\]

You will find lots of examples of interesting questions and excellent answers from different people where a lot of well-written $\LaTeX$ was used. Here are just seven examples in which a button solution would not have helped:

In summary, I think that the simple button solution only caters (understandable) laziness but keeps users from experiencing the benefits of using $\LaTeX$ in scientific writing. (And I haven't even mentioned how good it works with version-control systems, such as svn or git in collaborative writing :D)

  • 2
    $\begingroup$ By the way, the expressions $\ce{^235U}$ (\$\ce{^235U}\$) and $\ce{PO4^3-}$ (\$\ce{PO4^3-}\$) do not need additional braces (curly brackets). In particular, in order to avoid a wrong space between $3$ and $-$, you even should not use additional braces for $\ce{PO4^3-}$. $\endgroup$
    – user7951
    Commented Jun 4, 2015 at 11:10
  • $\begingroup$ I'd also like to note that \cee does not work in MathJax-mhchem anymore (tested as of 29 Sept '16) and additionally has been deprecated since version 4.0 of $\TeX$-mhchem. Apparently one can now use \ce directly, although it does seem to have a minor spacing issue (the space before the arrow seems too small). $\endgroup$ Commented Sep 29, 2016 at 9:29

You must log in to answer this question.

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