Menu

MiKTeX with NppExec - basic error

2012-08-01
2012-11-13
  • Ricardo Servino

    Ricardo Servino - 2012-08-01

    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

     
  • DV

    DV - 2012-08-01

    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.)

     
  • Ricardo Servino

    Ricardo Servino - 2012-08-01

    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).

     
  • DV

    DV - 2012-08-03

    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

     
MongoDB Logo MongoDB