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.
Pandoc for Windows: pdflatex not found
I tried more directly the command: 'pdftex test.tex' but It spit out errors with \documentclass, \usepackage, and then did not build the PDF. It seems that it does not accept the standard LaTex formatting, which was built directly from Pandoc. How do I deal with this?\ –
Delft
Did you install the packages from the installer and then run the setup utility? I didn't run setup and thought I had MikTex installed but it turns out there's another executable to install the packages that the installer program just downloads for you. –
Cristycriswell
I was getting the same error, this is how I solved it:
- Install MiKTeX
- Relogin/restart to reset the PATH for MiKTeX
- At the PowerShell command line type
- pandoc "my file name.md" --pdf-engine=xelatex -o "my file name.pdf"
- MiKTeX now prompts you to to install several packages when you run this command at the first time, this may need several minutes.
- Your pdf should now be created including the Maths converted from the Latex notation.
- 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.
- 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
Typora uses pandoc to export PDF on my computer, and I need to install nothing (e.g., MiKTeX). –
Elise
This was a long solution, but worked like a charm, for me I had to remove
--pdf-engine=xelatex
needed to use default engine –
Hendecagon © 2022 - 2024 — McMap. All rights reserved.