1

I compile ConTeXt out of NP++ with the following command in the Execution-Plugin:

cd $(CURRENT_DIRECTORY)
context.exe "filename.tex" --synctex=1
taskkill /im SumatraPDF.exe
C:\somedirectory\sumatra.bat "$(CURRENT_DIRECTORY)\filename.pdf"

This command compiles the context-file and opens it in the PDF-reader Sumatra. As you see, I close the reader ("taskkill") and restart it again with every compile.

But that is not necessary, Sumatra updates the pdf-file by its own. So how to change the command, such that the reader will be only started, if it is not already started?

Mustafa
  • 133
  • 3
  • 9

1 Answers1

0

Have you already tried to remove the line

taskkill /im SumatraPDF.exe

and call something like this (the reuse-instance operator should do this quite well)

C:\somedirectory\sumatra.bat "$(CURRENT_DIRECTORY)\filename.pdf" -reuse-instance

at least this works for my current LaTeX setup with a quite similiar method.

This is a tutorial i used to get my NP++ working with MikTex https://tex.stackexchange.com/questions/43984/using-notepad-with-miktex-on-windows

Community
  • 1
  • 1
eiselems
  • 170
  • 1
  • 12
  • Does not work here, simply opens just another instance of sumatra. – Mustafa Oct 28 '13 at 13:59
  • What is your sumatra.bat doing? why aren't you using the SumatraPDF.exe instead? can you assure that -reuse-instance isn't working for you by using the commandline? – eiselems Oct 29 '13 at 15:22