1

I guess I saw a suggestion somewhere that standard latex does not use $$ notation for math equation, but I am not sure.

This is the default template provided by the online compiler.

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{insert_dollar} \author{mhaonlp } \date{September 2019}

\begin{document}

\maketitle

\section{Introduction}

\end{document}

and got this error

Missing $ inserted.

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}.

The whole thing above is 100% reproducible here

So, should I use $ notation to deal with math expressions in latex?

whnlp
  • 321
  • 3
    It's not that it's not used. It's not supported. However $ and $$ still start math environments as in plain TeX. You just should not use them in LaTeX. The error message happens because you used a math symbol (_ means a math subscript) outside of math mode. If you want to print an underscore you should escape it: insert\_dollar. – Phelype Oleinik Sep 18 '19 at 12:37
  • Duplicate of https://tex.stackexchange.com/questions/510/are-and-preferable-to-dollar-signs-for-math-mode or https://tex.stackexchange.com/questions/40492/what-are-the-differences-between-align-equation-and-displaymath !? – hpekristiansen Sep 18 '19 at 12:39
  • @PhelypeOleinik Thanks a lot! Please move your comments to answer, I'll accept it. – whnlp Sep 18 '19 at 12:44

0 Answers0