Well, we are not LaTeX expert here, but I think $ has to be prefixed with \ to be printed (see https://tex.stackexchange.com/questions/351442/write-a-currency-symbol )
Otherwhile example like:
A->B : Hello $20
Maybe you can post a simple snipset (with math, if I understand right) so that we better understand the issue.
About your second question, in the command line, you can use -latex:nopreamble flag to remove some headers.
Is this what you are looking for ?