3 Replies
Works great, thanks!
I think your latex detection method gets confused by the $ before some latex quotes.

I think you need to explicitly ask the model to use "$$" instead of "$" to write Latex, because the parser they use doesn't support inline Latex (with just one "$")