To use $\LaTeX$ efficiently you should use raw-strings (r"$\LaTeX^2$") otherwise you need to escape the backslashes with backslashes.
To use $\LaTeX$ and format-strings you need to escape all curly braces with curly braces, e. g. r"{} $\textrm{{nah}}$".format("escaping").