Converting markdown to PDF problems

Recently I need to convert my markdown file to PDF. In the past I use pandoc to do so with the command “–pdf-engine=xelatex”. Find it does not work well when the markdown file contains tables written in markdown style. This is likely because the latex engine confuse the table define pattern with something else. Now I found a more stable way to do the converting.

One may simply export the markdown file as html and it is less likely to make a mistake. Then open the html in a browser and print it as PDF.

This steps seem to be a little complicated, but at least it works without problems. Wonder if there are better solutions. May update later.

And I also found a better PDF preview plugin for VSCode: markdown preview enhanced.See https://shd101wyy.github.io/markdown-preview-enhanced/#/ for more.