I'll echo other comments and say that using pandoc to convert from markdown to latex is the best solution I've found.
Actually I've written myself a wrapper over it that extends markdown with asciimath (which lets you input math the way you would in a calculator) and improves support for embedding latex directly.
The project: https://github.com/corollari/caoutchouc
Documentation & Rationale: https://caoutchouc.io/