I've changed almost all TextStudio commands to generate temporary files into a different build directory. I need this behavior because I'm syncing the source directory with the cloud and this way I can avoid unnecessary network activity (temp files sync). All works fine and the directory containing the .tex files remains clean.

However the internal PDF viewer doesn't work anymore. It still looks for the PDF in the same directory where the original .tex file is located.

Is there any wat to setup the internal viewer to look into the build folder?

  • I don't use TexStudio, but I could imagine that a symbolic link to the pdf file in the project folder could work. This would not be an automatic thing and you need to create it manually for each project. Worth a try I guess
    – Martin H
    May 13, 2013 at 21:21
  • @MartinH I appreciate the idea, however the link will be synced with dropbox every time the pointed pdf changes... I suppose.
    – user34295
    May 13, 2013 at 21:24
  • You can use --aux-directory=<path> (MikTeX) which will output the PDF in the main directory (I think). If true, this will still sync the PDF, of course. May 13, 2013 at 21:28
  • Welcome to TeX.sx! Feel free to visit our TeX.SX starter guide to get th emost out of this site. May 13, 2013 at 21:36
  • 1
    @MartinH, I believe that the main reason is to avoid other users getting a lot of warning on the screen showing the updated files in Dropbox folder. Some time ago I was testing some commands and I forgot that the folder was shared with my friend. He almost kill me...lol
    – Sigur
    May 13, 2013 at 22:54

3 Answers 3


Similar to "Cursor on build error and temp build directory with TexStudio".

In TexStudio 2.5.2 on Linux the "PDF Viewer" path under "Additional Search Paths" does not seem to actually set the path. In my case, the newly-set output directory was not being passed to dvips or the viewer, resulting in the error:

Process started: dvips -o "filename".ps "filename".dvi
dvips: DVI file can't be opened: filename.dvi: No such file or directory
Process exited with error(s)

This can be solved by setting the paths manually. For example, if you were setting your directory to "/tmp":

Under Options -> Configure -> Commands

# Set the output directory with -output-directory
latex -src -interaction=nonstopmode -output-directory=/tmp %.tex
DVI Viewer: evince /tmp/%.dvi > /dev/null
PS Viewer: evince /tmp/%.ps > /dev/null
PDF Viewer: evince /tmp/%.pdf > /dev/null
dvips -o /tmp/%.ps /tmp/%.dvi

Under Build -> Additional Search Paths (to remove a log file error)

Log File: /tmp

I tried setting search paths, -aux-directory, etc. and manually setting the path as so was the only thing that worked for me.


The preview of pdf cannot be seen when the output directory is changed?

The solution to this one is to enter the output directory (output in our example above), in Tools → Configure Texstudio → Build → Additional Search Paths → PDF Viewer

Click the Additional Search Paths checkbox in Tools → Configure → Build and enter the name of the output directory in PDF Viewer. Then click OK

PDF Viewer will look for the pdf file in output directory

You are done!


I am using TeXStudio 2.11.2 on Windows 10.

However, I can not find Tools -> Configure Texstudio -> Build -> Additional Search Paths -> PDF Viewer.

So here is my solution:

  1. Options -> Save profile as *.txsprofile.

  2. Open your config file. Assume that you have changed the default build directory to ".\Tmp". Find and modify these lines:

Tools\Commands\view=txs:///view-pdf-internal --embedded "?a.\\Tmp\\?m.pdf"

Tools\Commands\view-pdf=txs:///view-pdf-internal --embedded

  1. Save and Options -> Load profile.
  2. Now, you can compile and build your tex, and see your pdf simutanouly on the embeded windows.

May you succeed.

  • 1
    Sorry... I found the Tools -> Configure Texstudio -> Build -> Additional Search Paths -> PDF Viewer when I checkout the advanced settings.
    – zhulj
    Dec 28, 2016 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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