I’m applying for a job, which requires me to submit a plain text version of my resumé. As I maintain my CV as a latex document, I wanted to find a simple way to convert it to Markdown format so that it will look good when cut/paste into the web browser.
I use pandoc all the time for document conversion, but I found that because of some heavy layout tweaks to make my CV look good (I’m not using a style file), the markdown produced using
pandoc cv.tex -o cv.md
is pretty gross.
After a bit of googling, I found out about the
htlatex utility (found here, and it’s included with TexLive), and which does a fantastic job at converting Latex to HTML:
htlatex cv.tex "xhtml, mathml, charset=utf-8" " -cunihtf -utf8"
Then, use pandoc to convert from HTML to Markdown with:
pandoc cv.html -o cv.md
This leaves a few small things to clean up with further scripting (such as stray
/s), but altogether a nice looking Markdown file.