How do I convert LaTeX to plain-text (ASCII)?

前端 未结 14 1989
故里飘歌
故里飘歌 2020-12-07 13:17

Scenario:
I have a document I created using LaTeX (my resume in this case), it\'s compiling in pdflatex correctly and outputting exactly what I\'

14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 13:49

    The solution that works best for me is the following. Assuming you have the latex document name (without extension) stored in ${BASENAME} you apply these 3 steps:

    htlatex ${BASENAME}.tex

    iconv -f iso-8859-1 -t utf-8 ${BASENAME}.html > ${BASENAME}-utf8.html

    html2markdown ${BASENAME}-utf8.html > ${BASENAME}.txt

    Apparently, you need to have tex4ht and python-html2text installed.

提交回复
热议问题