tennis
tennis

Reputation: 181

Pandoc for Windows: pdflatex not found

I receive the error: pdflatex not found when I try to convert a .tex or .md file to .pdf. I have downloaded MikTex and have the associated LaTex packages. These don't seem to include pdflatex, although I do see pdftex. Are these not interchangeable? Can anyone guide me in figuring this out? Thank you.

Upvotes: 15

Views: 23916

Answers (1)

boardtc
boardtc

Reputation: 1538

I was getting the same error, this is how I solved it:

  1. Install MiKTeX
  2. Relogin/restart to reset the PATH for MiKTeX
  3. At the PowerShell command line type
    • pandoc "my file name.md" --pdf-engine=xelatex -o "my file name.pdf"
  4. MiKTeX now prompts you to to install several packages when you run this command at the first time, this may need several minutes.
  5. Your pdf should now be created including the Maths converted from the Latex notation.
  6. The command line output may include messages like:
    • miktex-dvipdfmx: major issue: So far, no MiKTeX administrator has checked for updates.
    • xelatex: major issue: So far, no MiKTeX administrator has checked for updates.
  7. The cause is if MiKTeX was installed for all users the the system wide MiKTeX update check is pending.
    • To get rid of the warning message, you have to switch to MiKTeX administrator mode and then check for MiKTeX updates.
    • Right click C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MiKTeX 2.9\MiKTeX Console and Run as Administrator, On Overview page click Check for updates

Upvotes: 26

Related Questions