Pdflatex for windows

前端 未结 5 1966
难免孤独
难免孤独 2021-02-06 21:50

Does anyone know how to convert .tex files to .pdf in windows? I tried cygwin but it said the command \"pdflatex\" was not recognised

Thanks Philip

5条回答
  •  一个人的身影
    2021-02-06 22:00

    The following command worked for me, under cygwin. I installed pandoc 1.13.2 and MiKTeX 2.9.5105 64-bit. Then I ran:

    pandoc -s \
    --latex-engine='C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe'  \
    -f markdown_github -t latex \
    "my-file.md" -o "my-file.pdf"
    

    The key here is that I gave the full path for MiKText's pdflatex.exe in the --latex-engine key, in quotes, using the windows path (as the pandoc I installed is the windows pandoc, it requires windows-style paths to find resources).

    I used -f markdown_github because of the file format of my-file.md

    I used -t latext but that's optional AFAIK.

提交回复
热议问题