\documentclass{article}
\title{Testing Simple Math Parsing}
\begin{document}
Inline math $a + b$.

$$ a + b + 123$$
$$ a + b + f(123)$$

$$ f_D f(a+b)$$
$$ f_1(a+b)$$
$$ \hat{f} a $$

\section{Restricted}\label{sec:restricted}
$$ a(x) + b(x) + 123$$

\end{document}
