line 41: Missing $ inserted. ... of a single electron is -1.6 $\times$ 10^
line 41: Overfull \hbox (155.52795pt too wide) in paragraph
这些是显示的错误消息,但我不知道为什么。这些是什么意思?
答案1
替代方案:不要担心这些事情或冒着遇到此类错误的风险,只需让软件包siunitx
为您完成即可:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
the charge of a single electron is \SI{-1.6e-19}{\coulomb}
\end{document}
编辑:有了这么多投票,我觉得这个答案需要更有创意的东西才能值得投票。下面是一个例子,说明灵活性有多强siunitx
:
\documentclass{article}
\usepackage{siunitx}
\usepackage{phaistos}
\usepackage{starfont}
\usepackage{wasysym}
\DeclareSIUnit{\water}{\text{\Aquarius}}
\DeclareSIUnit{\duck}{\text{\PHdove}}
\DeclareSIUnit{\cookie}{\text{\PHshield}}
\DeclareSIUnit{\happy}{\smiley}
\begin{document}
A duck with cookies and water is happy:
\[
\SI{1}{\duck} + \SI{3}{\cookie} + \si{\water} = \SI[parse-numbers=false]{\infty}{\happy}
\]
\end{document}
答案2
字符$
切换数学模式的打开和关闭,并且必须在数学模式下^
输入10^
:
of a single electron is $-1.6 \times 10^x$
(或者无论您的指数是多少。)