Convert to a standalone file with the appropriate headers/footers (for LaTeX, HTML, etc.)

pandoc

pandoc {{input.md}} -s -o {{output.tex}}

click the source code to copy install pandoc on any operating system with command-not-found.com