Solve the problem of export latex code in Markdown as pdf
First, download VSCode and the Markdown All in One extension.
Second, Ctrl + Shift + P and input Print current document to HTML.
A html file is already created and with well-displayed latex equation.