Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdflatex not found even though MikTex is already installed (Windows) #152

Open
RandyChen233 opened this issue Feb 1, 2024 · 3 comments
Open

Comments

@RandyChen233
Copy link

Hi all,

I am getting this error when running the example:


../tikzmake.sh: line 5: pdflatex: command not found
rm: cannot remove '*.aux': No such file or directory
rm: cannot remove '*.log': No such file or directory
rm: cannot remove '*.vscodeLog': No such file or directory
../tikzmake.sh: line 13: xdg-open: command not found

I am not sure why this happens. I have installed MikTex and it is added to my path:
image

@SamPrinceFranklin
Copy link

Facing the same issue

@SamPrinceFranklin
Copy link

Hi all,

I am getting this error when running the example:


../tikzmake.sh: line 5: pdflatex: command not found
rm: cannot remove '*.aux': No such file or directory
rm: cannot remove '*.log': No such file or directory
rm: cannot remove '*.vscodeLog': No such file or directory
../tikzmake.sh: line 13: xdg-open: command not found

I am not sure why this happens. I have installed MikTex and it is added to my path: image

The following method worked for me

Adding pdflatex to PATH on Windows

  1. Find the Path to pdflatex:

    • Open File Explorer.
    • Navigate to the directory where pdflatex is installed. By default, if you've installed LaTeX using MiKTeX, it might be located in C:\Program Files\MiKTeX<version>\miktex\bin or C:\Program Files (x86)\MiKTeX<version>\miktex\bin if you're using a 32-bit version.
  2. Add pdflatex to System Environment Variables:

    • Right-click on "This PC" or "My Computer" (depending on your Windows version) and select "Properties".
    • In the System window, click on "Advanced system settings" on the left panel.
    • In the System Properties window, click on the "Environment Variables" button at the bottom.
    • In the Environment Variables window, under the "System variables" section, find the "Path" variable and select it, then click on "Edit".
    • Click on "New" and add the path to the directory where pdflatex is located. Ensure each path in the list is separated by a semicolon (;).
    • Click "OK" to close each window.
  3. Verify Installation:

    • Open Command Prompt (search for "cmd" in the Start menu).
    • Type pdflatex --version and press Enter.
    • If pdflatex is correctly added to the PATH, you should see version information printed in the Command Prompt.

@RandyChen233
Copy link
Author

Hi, thanks for the instructions!
However, even though the pdflatex version info shows up when I type pdflatex --version in a command prompt, I'm still facing the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants