3
$\begingroup$

When I want to take chemistry notes and write down a formula such as H_2O or C_2H_5OH it enters "Math mode" which changes the font size and italicizes the letters. Is there an easy way to properly enter chemical formulas and equations in text?

I'm new to Mathematica 10 and I'm really boggled by all the styles and how to change them so please keep it simple.

$\endgroup$
  • $\begingroup$ I would use Latex. tex.stackexchange.com/questions/142865/… . Use the right tool for the right job. $\endgroup$ – Nasser Jul 20 '14 at 20:12
  • $\begingroup$ Perhaps this Scientific American article is of interest. If you do want fast note taking, I would recommend LyX. $\endgroup$ – Jens Jul 20 '14 at 22:43
  • $\begingroup$ @Nasser I would also but I would definitely not call latex input form simpler then Mathematica's $\endgroup$ – William Sep 17 '18 at 3:03
2
$\begingroup$

The shrinking of the "2" in $\rm{H_2O}$ is governed by the option ScriptSizeMultipliers which is set to 0.71. Setting this to 1 leaves its size unchanged. You can set it as an option to Style, or in the Option Inspector (Format menu or Ctrl+Shft+O) click through to Formatting Options > Expression Formatting > Display Options > ScriptSizeMultipliers and set it at the level you want (Selection/Selected Notebook/Global Preferences).

Another option is to edit your notebook's style sheet. Under the Format menu, click Edit Stylesheet.... In the sheet that opens click on the link "Default.nb". In the sheet that opens next click on the link "Core.nb". In this sheet, open the "FormatType styles" cell and copy the "TraditionalForm" cell. Paste this in the first style sheet. Select the cell, and press Ctrl+Shft+E (Show Expression). Add these two options:

 SingleLetterItalics->False,
 ScriptSizeMultipliers->1

press Ctrl+Shft+E again, and from now on $\rm{H_2O}$ in an inline equation should display in this notebook as you want:

Mathematica graphics.

Perhaps the spacing could be improved somewhat, but that's another question.

$\endgroup$
  • $\begingroup$ I don't doubt that this will work, but I'd always thought one can't permanently modify system stylesheet (Core.nb, Default.nb), so I was surprised that you could do that to Core.nb. $\endgroup$ – seismatica Jul 20 '14 at 19:34
  • $\begingroup$ @seismatica You can edit those Style Sheets but I recommend against it. Instead I suggest that you do as Sjoerd suggests here and copy sections you wish to edit into a private Style Sheet. You can also create a Style Sheet (say myStyle.nb) and set it to the default. $\endgroup$ – Mr.Wizard Jul 21 '14 at 7:01
  • $\begingroup$ ah ok. I just reread his answer and I agree with his approach (I thought he was modifying the Core.nb stylesheet directly). $\endgroup$ – seismatica Jul 21 '14 at 7:03
  • $\begingroup$ @Sjoerd C. de Vries This might be made without changing the StyleSheet, just for a certain cell. The advantage is that the text may contain not only chemical symbols, but also usual mathematical expressions that should be italic with smaller sub- and superscripts. This is clear. The problem arises, however, if one wants to type a chemical formula inside an inline cell that is embedded into a text cell. This is very often the case that I meet. I tried to put into this cell Ctrl+Shft+E/ SingleLetterItalics->False and ScriptSizeMultipliers->1 /Ctrl+Shft+E. $\endgroup$ – Alexei Boulbitch Jul 21 '14 at 10:12
  • $\begingroup$ @Sjoerd C. de Vries, continuation. It makes 2 in H2O indeed the full size, but H and O are still Italic. Have you a solution for that? $\endgroup$ – Alexei Boulbitch Jul 21 '14 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.