我的个人博客:zhang0peter的个人博客
今天晚上在用Latex写文章,编译时报错:
Missing $ inserted.
<inserted text>
我尝试在overleaf上编译,报错为:
Check that your $'s match around math expressions. If they do, then you've probably used a symbol in normal text that needs to be in math mode. Symbols such as subscripts ( _ ), integrals ( \int ), Greek letters ( \alpha, \beta, \delta ), and modifiers (\vec{x}, \tilde{x} ) must be written in math mode. See the full list here.If you intended to use mathematics mode, then use $ … $ for 'inline math mode', $$ … $$ for 'display math mode' or alternatively \begin{math} … \end{math}.
我仔细看了后发现是因为我原文中用到了下划线,也就是_,我原文中写的是min_df,但是下划线在latex中是有特殊含义的,所以如果想使用下划线只能这样用:
\underline{\space}
还有一种解决方案就是使用
\_
替代_