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?
$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