# Issue with subscript numbers

The following input:

cell count:  98$$\%$$ viability. 3$$\cdot$$10^{15} cells added to six-well
plate (dilution via DMEM +/+, Incubation overnight at 37°C 5$$\%$$ CO_{2}


seems to completely mess with my output. Everything after 3*10^15 is written in cursive and with no space. This continues up to the next \item in my list. The Error message I get is:

!Missing $inserted. <inserted text>$
l.56 ... count:98$$\%$$ viability. 3$$\cdot$$10^{15} cells added to six-we...

?


Hope somebody could help me

Edit: If you need the code or output in a more orderly fashion I'll try to provide it, put I'm not that familiar with the website yet.

• You need math mode for ^ (and _), so $10^{15}$ or $$10^_15}$$. Edit: Actually, $$3\cdot 10^{15}$$. – Torbjørn T. Dec 9 '15 at 19:35
• superscripts indicated by ^ are, by definition, math, so they must be within a math string. here, you should probably just set the entire string $3 \cdot 10^(15)$ as math. (of course, $$...$$ can be used instead of dollar signs.) and the percent sign doesn't need to be marked as math. – barbara beeton Dec 9 '15 at 19:38
• And you don't need $$\%$$, just \% suffices. – egreg Dec 9 '15 at 20:21

You may want to look into using the \num{...} and \SI{...}{...} macros of the siunitx package to typeset scalar numbers and number/unit combinations. Doing so would allow you to type \num{3e15} instead of $$3\cdot 10^{15}$$, and \SI{37}{\celsius} instead of 37°C. The spacing rules employed by the siunitx package conform to international standards, unburdening you from having to learn and apply these spacing rules. You also won't have to remember which items need to be placed in TeX's math mode in order to get subscripts and superscripts processed correctly.

Similarly, for chemical formulas, do consider using the \ce macro of the mhchem package. That way, you could type \ce{CO2} instead of CO\{{}_2\).

Finally, as already noted by @egreg, there's no need to type $$\%$$ -- \% is just fine. \documentclass{article}
\usepackage{siunitx} % for "\num" and "\SI" macros
\sisetup{exponent-product=\cdot} % use \cdot rather than \times as product symbol

\usepackage{mhchem}  % for "\ce" macro
\begin{document}

\noindent
Cell count:  98\% viability. \num{3e15} cells added to six-well plate,
dilution via DMEM~+/+, Incubation overnight at \SI{37}{\celsius} 5\% \ce{CO2}
\end{document}

• And why not also \SI{98}{\%}? – Zarko Dec 9 '15 at 23:01
• @Zarko - \SI{98}{\%} insert a thinspace between "98" and "%", which wouldn't be right -- at least not in the typographic traditions I'm familiar with. Moreover, from a big-picture perspective, "%" is simply not a "unit" associated with the number "98"; using \SI{98}{\%} would thus be wrong on a conceptual basis as well. – Mico Dec 9 '15 at 23:21
• Interesting and good point, @Mico. However, manual for siunitx package define \percent regardless (as is stated in it) it is not an unit. And for their use doesn't make difference from real units. Personally I easier read numbers with small distance to following %. – Zarko Dec 9 '15 at 23:56
• @Zarko - Ah, I just discovered the example on p. 81 of the package's user guide. I must confess I'm not excited about the thinspace between 10 and %: in my view, there should either be no space at all or a regular interword space. I suppose I'd be OK with \num{10\percent} or \num{10\%}, but neither expression is valid syntactically at present -- at least not without going through some hoops, it seems. – Mico Dec 10 '15 at 0:06