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

前端 未结 14 1986
故里飘歌
故里飘歌 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

    If you are using pdflatex, you probably don't want to mess around with your package options to switch to latex to generate a DVI.

    Instead, take your pdf file and convert that instead. This worked for my CV/resume made with the Curve package:

    pdftotext  -layout MyResume.pdf
    

    Note the -layout flag.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题