Open
Description
Having a space at the beginning or at the end of an inline math (enclosed in $$) sometimes causes hard to trace errors.
For example, $ y = (y_1,\dots,y_n) \in \mathbb R^n$
causes the following
! LaTeX Error: \symbballowed only in math mode.
Error: LaTeX failed to compile _main.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See _main.log for more info.
Execution halted
Exited with status 1.
I have noticed it with space before the ending $ sign as well.