TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I do quick build with Texmaker, it is also trying to open the output file from desktop and giving

error loading C:\Users\UserName\Desktop\pdfname.pdf

error. But it is also opening original file thus producing two output files for same tex file (one with error). I configured Texmaker as mentioned in the following link: Configure forward search with Texmaker + SumatraPDF (I used first and third solutions. Both gave the same error.)

What am I missing?

EDIT:- Now I got the issue. If another pdf file is opened(say 'some.pdf' file on the desktop), then sumatra is trying to open newly built pdf from desktop. That's why I am getting the error.

How to rectify this weird behavior?

share|improve this question
Welcome to TeX.sx!. Did you see similar symptoms solved at TexMaker + Sumatra PDF Forward search – texenthusiast Apr 8 '13 at 15:52
Yes I followed the same steps given in above link but still problem is there. I think problem is with configuring with forward-search only. When I don't add forward search, it is working fine. – Kiran Apr 9 '13 at 7:58
I found out that, we can't use -reuse-instance and -forward-search together because if i use either of them it worked fine. But with both of these, it is giving above error. Looking forward to an answer. – Kiran Apr 9 '13 at 16:31
up vote 1 down vote accepted

Finally, I found the solution by doing a bit of research in the commands. Actually you have to type following command while using sumatra and texmaker in the path to pdf viewer. Here "!" indicates current directory.

"C:/Program Files (x86)/SumatraPDF/SumatraPDF.exe " -reuse-instance   "!\%.pdf"  -forward-search  #.tex @
share|improve this answer
! is an additionnal parameter for the current directory is available for the commands from 3.3.2 and are you missing doube quotes in "#.tex" ? – texenthusiast Apr 9 '13 at 16:55
I didn't use \include command. And i think no need to put double quotes. – Kiran Apr 10 '13 at 12:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.