I'm trying to insert some inline mathematical expressions inside a sentence. I've read that in-order to do that you should do:
$$expression$$
I've also read it's not recommended but as for the explanations I've read I'm not sure I fully understand them, so if someone could elaborate. I've also encountered that sometimes using $$expression$$ is causing the text that comes afterwards in the sentence not to have any space between words, and by changing it to \(expression\) everything gets solved. I've tried to read about this \(expression\) but I couldn't find it's name so if someone could explain the difference and what it actually do.
I'm sure this question was probably answered over 100000 times on the internet, but I just couldn't find the explanation for the \(expression\) expression as I was not sure what to look up for besides LaTex \(\) expression.
\(<inline math>\)is the LaTeX equivalent of$<inline math>$, and\[<display math>\]is the equivalent of$$<display math>$$– Phelype Oleinik Oct 26 '20 at 22:30$$and not\(\)– Jorayen Oct 26 '20 at 22:32\(...\)is mostly equivalent to$...$(it adds some error checking, though),\[...\]is not equivalent to$$...$$, because the latter construction should never be used in a LaTeX document (with just a few exceptions, but definitely not for common usage). – egreg Oct 26 '20 at 22:38$$<math>$$should make a display math setting on a line of its own (and not make following text italic if properly matched). If you use\[<math>\]you should get proper errors if you have an unmatched delimiter somewhere. As egreg says they are not the same (with equivalent I meant that if in plain you'd use$$...$$, in LaTeX you should use\[...\]). – Phelype Oleinik Oct 26 '20 at 22:45\[...\]is not exactly the same as$$...$$even ignoring the math mode checks. There's also a small subtle difference in what happens with spacing if there's a blank line before the display math in the two modes. LaTeX inserts a smaller amount of space above the displayed math than plain TeX does. This was built into LaTeX 2.09 but it is not explained (or even acknowledged) in the meager internal comments of the oldlatex.tex. – Don Hosek Oct 27 '20 at 02:25