Hello, I am trying to use MiKTeX 2.9 (64 bits) within my notepad++ using the NppExec plugin but somewhy I am having this error that appears to be related to a path error. I have tried to solve it myself and search about it but could not resolve it. I am using the following script:
NPP_SAVE // Save current file
CD $(CURRENT_DIRECTORY) // Switch to the current dir
// Run the pdflatex program:
C:\Program Files\MiKTeX 2.9\mixtex\bin\x64\pdflatex "$(FULL_CURRENT_PATH)"
// Show us the resulting LaTeX created PDF:
NPP_RUN $(NAME_PART).pdf
And this is what is printed in the console after this scrip runs:
NPP_SAVE: C:\Users\Ricardo\Desktop\folder\test.tex
CD: C:\Users\Ricardo\Desktop\folder
Current directory: C:\Users\Ricardo\Desktop\folder
C:\Program Files\MiKTeX 2.9\mixtex\bin\x64\pdflatex "C:\Users\Ricardo\Desktop\folder\test.tex"
CreateProcess() failed with error code 2:
The system cannot find the file specified
NPP_RUN: test.pdf
- the specified file was not found
================ READY ================
Any solutions?
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Everything related to file names should be enclosed in double quotes since the default behaviour of system is to understand a file name with spaces as several file names separated by spaces.
In your case:
* use "C:\Program Files\MiKTeX 2.9\mixtex\bin\x64\pdflatex" (notice space between Program and Files)
* use "$(NAME_PART).pdf" (name may contain spaces)
Also you can use CD "$(CURRENT_DIRECTORY)" - but it's not neccessary here as long as the CD command is processed by NppExec itself. (NppExec expects just one argument of the CD command, either enclosed in double quotes or not.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I am trying to use MiKTeX 2.9 (64 bits) within my notepad++ using the NppExec plugin but somewhy I am having this error that appears to be related to a path error. I have tried to solve it myself and search about it but could not resolve it. I am using the following script:
// Run the pdflatex program:
C:\Program Files\MiKTeX 2.9\mixtex\bin\x64\pdflatex "$(FULL_CURRENT_PATH)"
// Show us the resulting LaTeX created PDF:
NPP_RUN $(NAME_PART).pdf
And this is what is printed in the console after this scrip runs:
NPP_RUN: test.pdf
- the specified file was not found
================ READY ================
Any solutions?
Thanks in advance
Everything related to file names should be enclosed in double quotes since the default behaviour of system is to understand a file name with spaces as several file names separated by spaces.
In your case:
* use "C:\Program Files\MiKTeX 2.9\mixtex\bin\x64\pdflatex" (notice space between Program and Files)
* use "$(NAME_PART).pdf" (name may contain spaces)
Also you can use CD "$(CURRENT_DIRECTORY)" - but it's not neccessary here as long as the CD command is processed by NppExec itself. (NppExec expects just one argument of the CD command, either enclosed in double quotes or not.)
Thanks for the reply dv__.
I did what you suggested, but it didn't work either.
Somehow the path to the pdflatex isn't being properly identified (although the path is properly written).
Try to follow all the steps described in NppExec Manual, section 4.0, with your pdflatex. I think the section 4.0 contains examples of all the basic errors & solutions.
If the Manual shows just empty pages for you, please refer to https://sourceforge.net/projects/npp-plugins/forums/forum/672146/topic/5224781